Release Name: 0.2.0
Notes:
upr is Rack middleware that allows browser-side upload progress
monitoring. It is based on (and should be client-side compatible with)
several upload progress modules including ones used by leading web
servers. It allows any Moneta backing store in addition to DRb. There
is also a packaged example for using an ActiveRecord model for Rails.
* http://upr.bogomips.org/
* upr@librelist.com
* git://git.bogomips.org/upr.git
Changes:
This release fixes several bugs and adds better compatibility
with existing upload progress implementations from other web
servers.
'config.gem "upr"' in Rails config/environment should work now
that double loads are non-fatal (but still warn). Additionally,
better error handling has been added and timeouts increased
to reduce the probability of errors due to slow clients.
The Rack backend can now generate JSON responses compatible[1]
with upload progress modules for both lighttpd and nginx.
Additionally, streaming JSON as demonstrated in
mongrel_streaming_upload_progress is supported, too.
This is a list of upload progress modules we are compatible
with:
1. mongrel_upload_progress
http://mongrel.rubyforge.org/wiki/UploadProgress
2. jquery-upload-progress
http://github.com/drogus/jquery-upload-progress
3. mongrel_streaming_upload_progress
http://rubyforge.org/pipermail/mongrel-users/2007-July/003747.html
Eric Wong (32):
README: fix grammar/speling mistakes
README: fix grammar bug (excessive dash)
monitor: fix class name in RDoc
monitor: add "finish" method
input_wrapper: use the new finish methods in backends
example/rainbows_config: disable Nagle's algorithm
examples/rails_app-2.3.4: fix session verifier 1.9
examples/rails_app-2.3.4: move middleware setup to config.ru
examples/rails_app-2.3.4: smaller JavaScript footprint
split upr/status out to its own file
status: add error? method
Clarify license of examples
upr/status: add done? method
Revert "examples/rails_app-2.3.4: move middleware setup to config.ru"
Split out Params and StatusMethods
input_wrapper: don't wrap if we don't have to
set "encoding: binary" to workaround 1.9 insanity
backends: internal API updates/cleanups
gemspec: put a hard dependency on Rack
add JSON generator
input_wrapper: lower default frequency
examples/rails: UprStatus reuses expiry in Upr::Monitor
Upr::Monitor expiry is 60 seconds
Add jQuery-compatible Rails example
JSON compatible with Ry Dahl's Ajax.Pull + example
Update README
example/rails_app-2.3.4: limit compat 1.9 to only 1.9
example/rails_app-2.3.4: UprStatus unit tests
tests: add Monitor tests (also reaches into Status)
JSON: set no-transform in headers
examples/rails_app-2.3.4: show links to different interfaces
update README
Changes:
GIT-VERSION-GEN | 2 +-
GNUmakefile | 2 +-
LICENSE | 13 +-
README | 42 +-
.../app/controllers/application_controller.rb | 9 +-
.../app/controllers/files_controller.rb | 47 +-
.../app/controllers/progress_controller.rb | 11 +
examples/rails_app-2.3.4/app/models/upr_status.rb | 44 +-
.../rails_app-2.3.4/app/views/files/index.html.erb | 18 +-
.../rails_app-2.3.4/app/views/files/new.html.erb | 71 +
.../rails_app-2.3.4/app/views/files/pull.html.erb | 60 +
examples/rails_app-2.3.4/config.ru | 3 +
.../config/initializers/ruby_19_compat.rb | 26 +
.../public/javascripts/ajax_pull/ajax_pull.js | 85 +
.../javascripts/ajax_pull/prototype-1_5_1.js | 3271 ++++++++++++++++++++
.../javascripts/ajax_pull/upload_progress.js | 139 +
.../rails_app-2.3.4/public/javascripts/jquery.js | 32 +
.../public/javascripts/jquery.uploadProgress.js | 116 +
.../rails_app-2.3.4/public/stylesheets/site.css | 41 +
examples/rails_app-2.3.4/rainbows_config.rb | 2 +-
.../rails_app-2.3.4/test/fixtures/upr_statuses.yml | 22 +
.../rails_app-2.3.4/test/unit/upr_status_test.rb | 41 +
lib/upr.rb | 9 +-
lib/upr/input_wrapper.rb | 30 +-
lib/upr/json.rb | 143 +
lib/upr/monitor.rb | 24 +-
lib/upr/params.rb | 24 +
lib/upr/status.rb | 9 +
lib/upr/status_methods.rb | 13 +
test/test_monitor.rb | 58 +
upr.gemspec | 1 +
31 files changed, 4337 insertions(+), 71 deletions(-)
commit 42d80bbba13655aec55d733df0fe2709b568d6b2
Author: Eric Wong
Date: Fri Nov 13 17:45:09 2009 -0800
upr 0.2.0 - twice as good as the first!
This release fixes several bugs and adds better compatibility
with existing upload progress implementations from other web
servers.
'config.gem "upr"' in Rails config/environment should work now
that double loads are non-fatal (but still warn). Additionally,
better error handling has been added and timeouts increased
to reduce the probability of errors due to slow clients.
The Rack backend can now generate JSON responses compatible[1]
with upload progress modules for both lighttpd and nginx.
Additionally, streaming JSON as demonstrated in
mongrel_streaming_upload_progress is supported, too.
This is a list of upload progress modules we are compatible
with:
1. mongrel_upload_progress
http://mongrel.rubyforge.org/wiki/UploadProgress
2. jquery-upload-progress
http://github.com/drogus/jquery-upload-progress
3. mongrel_streaming_upload_progress
http://rubyforge.org/pipermail/mongrel-users/2007-July/003747.html
Eric Wong (32):
README: fix grammar/speling mistakes
README: fix grammar bug (excessive dash)
monitor: fix class name in RDoc
monitor: add "finish" method
input_wrapper: use the new finish methods in backends
example/rainbows_config: disable Nagle's algorithm
examples/rails_app-2.3.4: fix session verifier 1.9
examples/rails_app-2.3.4: move middleware setup to config.ru
examples/rails_app-2.3.4: smaller JavaScript footprint
split upr/status out to its own file
status: add error? method
Clarify license of examples
upr/status: add done? method
Revert "examples/rails_app-2.3.4: move middleware setup to config.ru"
Split out Params and StatusMethods
input_wrapper: don't wrap if we don't have to
set "encoding: binary" to workaround 1.9 insanity
backends: internal API updates/cleanups
gemspec: put a hard dependency on Rack
add JSON generator
input_wrapper: lower default frequency
examples/rails: UprStatus reuses expiry in Upr::Monitor
Upr::Monitor expiry is 60 seconds
Add jQuery-compatible Rails example
JSON compatible with Ry Dahl's Ajax.Pull + example
Update README
example/rails_app-2.3.4: limit compat 1.9 to only 1.9
example/rails_app-2.3.4: UprStatus unit tests
tests: add Monitor tests (also reaches into Status)
JSON: set no-transform in headers
examples/rails_app-2.3.4: show links to different interfaces
update README
commit 2bec62ccdd65a3e4de7841f5ffa7138646929803
Author: Eric Wong
Date: Fri Nov 13 17:43:48 2009 -0800
update README
commit 9ad5760a68b07fcc0df79e9ae8e31c56873476ce
Author: Eric Wong
Date: Fri Nov 13 17:33:35 2009 -0800
examples/rails_app-2.3.4: show links to different interfaces
commit 73ebdaf0445beb90a8397ca4a3ac05885b6b89fc
Author: Eric Wong
Date: Fri Nov 13 10:54:53 2009 -0800
JSON: set no-transform in headers
We can't have Rack::Deflater compressing long-pulling JS
commit 474f31b22bdc90a1baf0cc5cc5e5a0cf22f5710a
Author: Eric Wong
Date: Fri Nov 13 01:14:29 2009 -0800
tests: add Monitor tests (also reaches into Status)
commit eead1a80dd5fdca57cc8aa0333d249415ba2d85a
Author: Eric Wong
Date: Fri Nov 13 01:01:58 2009 -0800
example/rails_app-2.3.4: UprStatus unit tests
UprStatus.incr now returns the value incremented to
be compatible with Upr::Monitor.incr
commit f4b44763fa6802543f7d1590719e5aed21e120cd
Author: Eric Wong
Date: Thu Nov 12 23:13:01 2009 -0800
example/rails_app-2.3.4: limit compat 1.9 to only 1.9
Not 1.8.7, too, since 1.8.7 strings respond to :bytesize
each_byte iterators and j.next seem to make 1.8.7 unhappy
commit 504ab0d4a4c402a90824aaf3c84ef21707e08ad5
Author: Eric Wong
Date: Thu Nov 12 20:01:35 2009 -0800
Update README
commit b5419dc0e819550b5db0bc18579d8243477c53f2
Author: Eric Wong
Date: Thu Nov 12 19:32:46 2009 -0800
JSON compatible with Ry Dahl's Ajax.Pull + example
Ry posted about it here:
http://rubyforge.org/pipermail/mongrel-users/2007-July/003747.html
This is technically superior compared to all the existing interfaces
since it only requires only one, long-running client-side HTTP request.
I would imagine it's possible for a JavaScript programmer to be capable
of even removing the need for an extra request entirely, I'm not that
programmer...
commit 701405d00364c63c0efbf11a39368dd2cbee0053
Author: Eric Wong
Date: Thu Nov 12 18:49:21 2009 -0800
Add jQuery-compatible Rails example
This uses the new Upr::JSON class to generate output.
Apparently this is the same format used by Apache, nginx, and
lighttpd. Hopefully this will help increase upr adoption.
commit ca0493aa6b53a38b6254c29b44982c369ad9757f
Author: Eric Wong
Date: Thu Nov 12 18:47:50 2009 -0800
Upr::Monitor expiry is 60 seconds
Some folks we know have terrible Internet connections
commit a00f6fdb9b78a295307bada20f1e0dcaae59ac6d
Author: Eric Wong
Date: Thu Nov 12 18:43:51 2009 -0800
examples/rails: UprStatus reuses expiry in Upr::Monitor
Thou Shalt Not Repeat Thyself.
Thou Shalt Not Repeat Thyself.
Thou Shalt Not Repeat Thyself.
Thou Shalt Not Repeat Thyself.
Thou Shalt Not Repeat Thyself.
Thou Shalt Not Repeat Thyself.
wait...
commit 20c4841a76a6a01dd7f0ed761945cdc8e07785d0
Author: Eric Wong
Date: Thu Nov 12 18:37:39 2009 -0800
input_wrapper: lower default frequency
Backend updates should be pretty cheap, so don't skimp on them
since they can help avoid timeouts when connections choke for
a little while.
commit 743dcad9f6eef3714b1ff63f06c7844c8d869a54
Author: Eric Wong
Date: Thu Nov 12 18:36:12 2009 -0800
add JSON generator
It currently only barely works with Rails, but the plan is to
add full Rack long-polling/streaming support.
commit 726d7214083631f384470ef4751328f70afdbd03
Author: Eric Wong
Date: Thu Nov 12 17:45:58 2009 -0800
gemspec: put a hard dependency on Rack
We use Rack for query string parsing.
commit 680a3827db292bcf34ab0aeb773720562866bc3b
Author: Eric Wong
Date: Thu Nov 12 13:45:10 2009 -0800
backends: internal API updates/cleanups
Return values for class methods for Upr::Monitor and UprStatus
should synched.
Class methods:
* error!(upid) method added:
sets seen = -1, updates time and returns Status(-like) object
* read(upid) no longer updates time
* incr(upid, nr) does up increment errored statuses
* incr(upid, nr) returns nil on invalid upids
* finish(upid) returns nil on invalid upids
Additionally the AR example has been updated to include
Upr::StatusMethods for instance methods.
commit dd08acc53b0f17946b47a7a8f5e6b3f219c218fd
Author: Eric Wong
Date: Thu Nov 12 13:42:21 2009 -0800
set "encoding: binary" to workaround 1.9 insanity
It probably doesn't matter for these modules/classes, but I'd
much rather avoid potential surprises in the future.
commit f5eae25bad81afcd0e0c11f671a7fa7e12461015
Author: Eric Wong
Date: Thu Nov 12 13:38:09 2009 -0800
input_wrapper: don't wrap if we don't have to
Clients _must_ will either specify the Content-Length header
_or_ "Transfer-Encoding: chunked". This will work around
clients that seem to send POST requests with no body at all in
them.
commit f301f399937f9ff62dc41a9cd8e1ea45b43baa6b
Author: Eric Wong
Date: Thu Nov 12 13:32:56 2009 -0800
Split out Params and StatusMethods
StatusMethods will be reusable in subclasses like the
UprStatus ActiveRecord class. Params parsing will be
common to both InputWrapper and also to the upcoming
Streaming class.
commit e71a98deacd25bfaad5b80b0cd505e183933010c
Author: Eric Wong
Date: Thu Nov 12 12:03:39 2009 -0800
Revert "examples/rails_app-2.3.4: move middleware setup to config.ru"
This reverts commit 4770ea6d7a6eaf00cc19bc4fb2afd59071e8cf66.
commit a2c054810e035915d1e5ff27afd2b631de6ded0a
Author: Eric Wong
Date: Thu Nov 12 11:36:58 2009 -0800
upr/status: add done? method
Makes it easier to tell if we're done or not
commit 81c1f96c2c99d16b211f6b97c6f99ea46dfa9cd0
Author: Eric Wong
Date: Thu Nov 12 11:17:26 2009 -0800
Clarify license of examples
In short, example code retains their own copyrights
commit 6369300ca4171acf6848e2f63b24aa5278c42c1b
Author: Eric Wong
Date: Thu Nov 12 00:43:36 2009 -0800
status: add error? method
We'll define setting seen == -1 to be an error since
it's impossible to see -1 bytes.
commit a063217a2198769edcc287e662e5c4691c0ae4d0
Author: Eric Wong
Date: Wed Nov 11 22:19:42 2009 -0800
split upr/status out to its own file
This prevent double loads that seem to be caused by "config.gem"
in Rails from messing up due to the Struct re-definition. Of
course we'll still warn when the VERSION constant is redefined
so people will hopefully see a reason to avoid idiotic double
loads...
commit 64033a89a8b409a3b71382d8b328aa239caad428
Author: Eric Wong
Date: Wed Nov 11 19:51:33 2009 -0800
examples/rails_app-2.3.4: smaller JavaScript footprint
We'll be pulling in other JS files, too, so avoid pulling
in too much.
commit 4770ea6d7a6eaf00cc19bc4fb2afd59071e8cf66
Author: Eric Wong
Date: Wed Nov 11 19:29:57 2009 -0800
examples/rails_app-2.3.4: move middleware setup to config.ru
config.ru is more obvious and easier to use with non-Rails
applications. This is true especially if you want to share
the Upr::Monitor object/connection with the upcoming
Upr::Streaming JSON application.
commit cb90269157aeda3655b1a12ea7be4666c98a5e2c
Author: Eric Wong
Date: Wed Nov 11 19:27:54 2009 -0800
examples/rails_app-2.3.4: fix session verifier 1.9
Rails 2.3.4 screwed up cookie sessions under Ruby 1.9
ref: https://rails.lighthouseapp.com/projects/8994/tickets/3144
commit 82190a59a79a39fe8ac66073532878506bdc7a35
Author: Eric Wong
Date: Wed Nov 11 16:04:08 2009 -0800
example/rainbows_config: disable Nagle's algorithm
Less delay gives better interactive response
commit ec22a960d443ea846161fc16c78f5a6c4206f95b
Author: Eric Wong
Date: Wed Nov 11 15:44:03 2009 -0800
input_wrapper: use the new finish methods in backends
This provides the ability to add notifications when
we finish an upload
commit a3977a51ae30fd2856c969e2e7897535715d19c6
Author: Eric Wong
Date: Wed Nov 11 15:41:44 2009 -0800
monitor: add "finish" method
This lets us finish up connections by setting seen == length
when the client is finished uploading.
commit 4e1763e8bacdec892b98844ff514d2e505bb6d54
Author: Eric Wong
Date: Tue Nov 10 18:12:43 2009 -0800
monitor: fix class name in RDoc
commit c0207ddf6c6a578bed27a00c7b0be60ae4a71c8e
Author: Eric Wong
Date: Tue Nov 10 17:38:57 2009 -0800
README: fix grammar bug (excessive dash)
commit d6834bf37c6e334a105f04955d4bbf26ed470156
Author: Eric Wong
Date: Tue Nov 10 17:28:08 2009 -0800
README: fix grammar/speling mistakes
|