upr 0.2.0 → 0.3.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,7 +1,7 @@
1
1
  #!/bin/sh
2
2
 
3
3
  GVF=GIT-VERSION-FILE
4
- DEF_VER=v0.2.0.GIT
4
+ DEF_VER=v0.3.0
5
5
 
6
6
  LF='
7
7
  '
data/README CHANGED
@@ -6,13 +6,6 @@ several upload progress modules including ones used by leading web
6
6
  servers. It allows any Moneta backing store in addition to DRb. There
7
7
  is also a packaged example for using an ActiveRecord model for Rails.
8
8
 
9
- == Demo
10
-
11
- You can see upr in action at http://upr-demo.bogomips.org/ It will
12
- report the size and SHA1 of the file you've uploaded. Much of the demo
13
- was stolen from all the existing upload progress examples for other web
14
- servers.
15
-
16
9
  == Web Server Compatibility
17
10
 
18
11
  While upr is completely Rack::Lint-compatible, upr is only compatible
@@ -23,10 +16,18 @@ handful of concurrency models:
23
16
  * ThreadSpawn
24
17
  * ThreadPool
25
18
  * Revactor*
19
+ * FiberSpawn
20
+ * FiberPool
21
+ * RevFiberSpawn
22
+ * ActorSpawn (Rubinius)
26
23
 
27
24
  For use with Revactor, the use of network-based Moneta stores or DRb is
28
25
  only advised if those stores are using Revactor-aware sockets.
29
26
 
27
+ Likewise, with the *FiberSpawn and FiberPool models, any network based stores
28
+ should be using the wrapper class
29
+ {Rainbows::Fiber::IO}[http://rainbows.rubyforge.org/Rainbows/Fiber/IO.html]
30
+
30
31
  == JavaScript/CSS/HTML Compatibility
31
32
 
32
33
  The current developer does not react well with GUIs. Thus all (R)HTML,
@@ -46,7 +47,7 @@ Contributions to enhance compatibility for more modern things like
46
47
  jQuery and HTML5 are very welcome. We would prefer as much as possible
47
48
  to NOT proliferate new AJAX sub-protocols and use existing ones whenever
48
49
  possible. Our current favorite is the Ajax.Pull JavaScript used in
49
- Ry Dahl's mongrel_streaming_upload_progress because it only requires a
50
+ ry dahl's mongrel_streaming_upload_progress because it only requires a
50
51
  one extra HTTP request to pull all the status notifications.
51
52
 
52
53
  == Backend Compatibility
data/Rakefile CHANGED
@@ -24,6 +24,7 @@ def tags
24
24
  end
25
25
 
26
26
  cgit_url = "http://git.bogomips.org/cgit/upr.git"
27
+ git_url = ENV['GIT_URL'] || 'git://git.bogomips.org/upr.git'
27
28
 
28
29
  desc 'prints news as an Atom feed'
29
30
  task :news_atom do
@@ -88,8 +89,6 @@ desc "print release notes for Rubyforge"
88
89
  task :release_notes do
89
90
  require 'rubygems'
90
91
 
91
- git_url = ENV['GIT_URL'] || 'git://git.bogomips.org/upr.git'
92
-
93
92
  spec = Gem::Specification.load('upr.gemspec')
94
93
  puts spec.description.strip
95
94
  puts ""
@@ -117,3 +116,43 @@ task :publish_news do
117
116
  rf.login
118
117
  rf.post_news('rainbows', subject, body)
119
118
  end
119
+
120
+ desc "post to RAA"
121
+ task :raa_update do
122
+ require 'rubygems'
123
+ require 'net/http'
124
+ require 'net/netrc'
125
+ rc = Net::Netrc.locate('upr-raa') or abort "~/.netrc not found"
126
+ password = rc.password
127
+ p password
128
+
129
+ s = Gem::Specification.load('upr.gemspec')
130
+ desc = [ s.description.strip ]
131
+ desc << ""
132
+ desc << "* #{s.homepage}"
133
+ desc << "* #{s.email}"
134
+ desc << "* #{git_url}"
135
+ desc << "* http://upr-demo.bogomips.org/"
136
+ desc = desc.join("\n")
137
+ uri = URI.parse('http://raa.ruby-lang.org/regist.rhtml')
138
+ form = {
139
+ :name => s.name,
140
+ :short_description => s.summary,
141
+ :version => s.version,
142
+ :status => 'beta',
143
+ :owner => s.authors.first,
144
+ :email => 'upr@bogomips.org',
145
+ :category_major => 'Library',
146
+ :category_minor => 'Rack',
147
+ :url => s.homepage,
148
+ :download => "http://rubyforge.org/frs/?group_id=8977",
149
+ :license => "Ruby's",
150
+ :description_style => 'Plain',
151
+ :description => desc,
152
+ :pass => password,
153
+ :submit => "Update",
154
+ }
155
+ res = Net::HTTP.post_form(uri, form)
156
+ p res
157
+ puts res.body
158
+ end
@@ -6,7 +6,7 @@ class FilesController < ApplicationController
6
6
  _sha1_flash_self
7
7
  end
8
8
 
9
- # based on Ry Dahl's streaming AJAX pull:
9
+ # based on ry dahl's streaming AJAX pull:
10
10
  # http://rubyforge.org/pipermail/mongrel-users/2007-July/003747.html
11
11
  def pull
12
12
  _sha1_flash_self
@@ -1,5 +1,5 @@
1
1
  /*
2
- * stolen from Ry Dahl's mongrel_streaming_upload_progress
2
+ * stolen from ry dahl's mongrel_streaming_upload_progress
3
3
  * http://rubyforge.org/pipermail/mongrel-users/2007-July/003747.html
4
4
  */
5
5
  .notice {
data/lib/upr.rb CHANGED
@@ -5,7 +5,7 @@ require 'upr/status'
5
5
  module Upr
6
6
 
7
7
  # Upr version number
8
- VERSION = '0.2.0'
8
+ VERSION = '0.3.0'
9
9
 
10
10
  autoload :Monitor, 'upr/monitor'
11
11
  autoload :Params, 'upr/params'
@@ -5,10 +5,10 @@ module Upr
5
5
  # This uses any {Moneta}[http://github.com/wycats/moneta]
6
6
  # store to monitor upload progress.
7
7
  #
8
- # Usage (in config.ru with Moneta::Memory store):
8
+ # Usage (in config.ru with Moneta Memory store):
9
9
  # require 'upr'
10
- # require 'moneta/memory'
11
- # use Upr, :backend => Upr::Monitor.new(Moneta::Memory.new)
10
+ # require 'moneta'
11
+ # use Upr, :backend => Upr::Monitor.new(Moneta.new(:Memory, :serializer => nil))
12
12
  # run YourApplication.new
13
13
  class Monitor < Struct.new(:moneta)
14
14
  # nuke anything not read/updated in 60 seconds
@@ -17,8 +17,7 @@ module Upr
17
17
  def initialize(moneta_store = nil)
18
18
  super
19
19
  if moneta_store.nil?
20
- require 'moneta/memory' # moneta does not autoload :<
21
- self.moneta = Moneta::Memory.new
20
+ self.moneta = Moneta.new(:Memory, :serializer => nil)
22
21
  end
23
22
  end
24
23
 
@@ -31,7 +31,7 @@ Gem::Specification.new do |s|
31
31
  s.require_paths = %w(lib)
32
32
  s.rubyforge_project = %q{rainbows}
33
33
 
34
- s.add_dependency(%q<moneta>)
34
+ s.add_dependency(%q<moneta>, '~>0.7')
35
35
  s.add_dependency(%q<rack>)
36
36
 
37
37
  # Folks on intranets sharing humongous files can use Unicorn, too
metadata CHANGED
@@ -1,7 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: upr
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ hash: 19
5
+ prerelease:
6
+ segments:
7
+ - 0
8
+ - 3
9
+ - 0
10
+ version: 0.3.0
5
11
  platform: ruby
6
12
  authors:
7
13
  - upr hackers
@@ -9,29 +15,37 @@ autorequire:
9
15
  bindir: bin
10
16
  cert_chain: []
11
17
 
12
- date: 2009-11-14 00:00:00 -08:00
13
- default_executable:
18
+ date: 2013-07-09 00:00:00 Z
14
19
  dependencies:
15
20
  - !ruby/object:Gem::Dependency
16
21
  name: moneta
17
- type: :runtime
18
- version_requirement:
19
- version_requirements: !ruby/object:Gem::Requirement
22
+ prerelease: false
23
+ requirement: &id001 !ruby/object:Gem::Requirement
24
+ none: false
20
25
  requirements:
21
- - - ">="
26
+ - - ~>
22
27
  - !ruby/object:Gem::Version
23
- version: "0"
24
- version:
28
+ hash: 5
29
+ segments:
30
+ - 0
31
+ - 7
32
+ version: "0.7"
33
+ type: :runtime
34
+ version_requirements: *id001
25
35
  - !ruby/object:Gem::Dependency
26
36
  name: rack
27
- type: :runtime
28
- version_requirement:
29
- version_requirements: !ruby/object:Gem::Requirement
37
+ prerelease: false
38
+ requirement: &id002 !ruby/object:Gem::Requirement
39
+ none: false
30
40
  requirements:
31
41
  - - ">="
32
42
  - !ruby/object:Gem::Version
43
+ hash: 3
44
+ segments:
45
+ - 0
33
46
  version: "0"
34
- version:
47
+ type: :runtime
48
+ version_requirements: *id002
35
49
  description: |-
36
50
  upr is Rack middleware that allows browser-side upload progress
37
51
  monitoring. It is based on (and should be client-side compatible with)
@@ -125,7 +139,6 @@ files:
125
139
  - setup.rb
126
140
  - test/test_monitor.rb
127
141
  - upr.gemspec
128
- has_rdoc: true
129
142
  homepage: http://upr.bogomips.org/
130
143
  licenses: []
131
144
 
@@ -137,21 +150,27 @@ rdoc_options:
137
150
  require_paths:
138
151
  - lib
139
152
  required_ruby_version: !ruby/object:Gem::Requirement
153
+ none: false
140
154
  requirements:
141
155
  - - ">="
142
156
  - !ruby/object:Gem::Version
157
+ hash: 3
158
+ segments:
159
+ - 0
143
160
  version: "0"
144
- version:
145
161
  required_rubygems_version: !ruby/object:Gem::Requirement
162
+ none: false
146
163
  requirements:
147
164
  - - ">="
148
165
  - !ruby/object:Gem::Version
166
+ hash: 3
167
+ segments:
168
+ - 0
149
169
  version: "0"
150
- version:
151
170
  requirements: []
152
171
 
153
172
  rubyforge_project: rainbows
154
- rubygems_version: 1.3.5
173
+ rubygems_version: 1.8.24
155
174
  signing_key:
156
175
  specification_version: 3
157
176
  summary: Upload Progress for Rack