em-throttled_queue 1.1.0 → 1.1.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: f94eff68244b47c306bb65f6e23aab55491bf744
4
+ data.tar.gz: 996ecb43b8622009df48d518a1565ef312d5b55e
5
+ SHA512:
6
+ metadata.gz: 81dccfa7bf862d8630440122861e8f92c48933bf68ed0a4bc7bfeb90ec5234efd778e19de1bf41944b10cba548a33949e2de3e6ec350784f5d515e95ca4d3ce3
7
+ data.tar.gz: 4795e8f3247c70759bcc1a8657b5c9384d3a61b16b23ea49d30a03ff73ef9edeef4ed58881f9f66c5c0c767711a6218760e5661ee3cdaea8f5ac1293458557b0
data/Gemfile CHANGED
@@ -1,10 +1,2 @@
1
1
  source :rubygems
2
-
3
- gem 'eventmachine'
4
-
5
- group :development do
6
- gem 'jeweler', '~> 1.5'
7
- gem 'rake'
8
- gem 'yard'
9
- gem 'rdiscount'
10
- end
2
+ gemspec
data/README.markdown CHANGED
@@ -1,44 +1,56 @@
1
- # THIS LIBRARY HAS BEEN ABANDONED!
1
+ # Throttled Queue is a throttled queue
2
+ [ThrottledQueue](http://rdoc.info/github/Burgestrand/em-throttled_queue/master/EventMachine/ThrottledQueue) is just like an [EM::Queue](http://rdoc.info/github/eventmachine/eventmachine/master/EventMachine/Queue), but will pop items off itself at a pace specified by you.
2
3
 
3
- If somebody wants to take on the project and make something useful of it, go on ahead. I, personally, will not be doing *any* more work on this.
4
+ **NOTE**: Version v1.0.0 and v1.0.1 has an unintentional flaw, and should not be used.
4
5
 
5
- ---
6
+ **NOTE**: I personally won’t be doing any development on this library, but I will accept
7
+ pull requests. If you want take over maintenance of this library for further development,
8
+ please do contact me.
6
9
 
7
- # EM-Throttled_Queue is a throttled queue (surprise, surprise!)
8
- [ThrottledQueue](http://rdoc.info/github/Burgestrand/em-throttled_queue/master/EventMachine/ThrottledQueue) is just like an [EM::Queue](http://rdoc.info/github/eventmachine/eventmachine/master/EventMachine/Queue), but will pop items off itself at a pace specified by you!
9
-
10
- *NOTE*: Version v1.0.0 and v1.0.1 has an unintentional flaw (result of coding while tired) and should not be used.
10
+ Contributors
11
+ ------------
12
+ - [Laust Rud Jacobsen](https://github.com/rud) (<laust@object.io> - <http://object.io>)
11
13
 
12
14
  Usage
13
15
  -----
16
+
14
17
  require 'em/throttled_queue'
15
-
18
+
16
19
  # Example code that will pop off 2 items in total within a period of
17
20
  # one second. The other items are not popped because of throttle.
18
21
  EM::run do
19
22
  # Create a queue that will pop off maximum of 2 items per second.
20
23
  queue = EM::ThrottledQueue.new(2)
21
-
24
+
22
25
  queue.push 1 # you can push one item at a time
23
26
  queue.push 2, 3, 4, 5, 6 # or several at once
24
-
27
+
25
28
  5.times { queue.pop(&EM::Callback(Object, :puts)) }
26
-
29
+
27
30
  EM::add_timer(1) { EM::stop }
28
31
  end
29
-
32
+
30
33
  # Output:
31
34
  # 1
32
35
  # 2
33
36
 
34
- Gem is on rubygems.org, so installation is a mere `gem install em-throttled_queue`.
37
+ Installation
38
+ ------------
39
+
40
+ > gem install [em-throttled_queue](https://rubygems.org/gems/em-throttled_queue)
35
41
 
36
42
  How do I contribute?
37
43
  --------------------
38
- Fork, add tests (important!), add your code and send a pull request. If you wish to report an issue, please use the GitHub issue tracker. I can also be contacted by mail (visible on [my GitHub user page](http://github.com/Burgestrand)).
44
+ [Fork](http://help.github.com/forking/), write tests, add your code and send a pull request. If you modify existing files, please adhere to the coding standard surrounding your code. If you wish to report an issue, please use the GitHub issue tracker. I can also be contacted by mail (visible on [my GitHub user page](http://github.com/Burgestrand)).
45
+
46
+ Development dependencies are specified in the gem specification, and can be installed using rubygems.
47
+
48
+ gem install em-throttled_queue --development
49
+
50
+ There’s also a Gemfile in the repository, allowing you to install dependencies via bundler.
39
51
 
40
- As far as development dependencies goes they are all specified in the Gemfile. Once you have checked out the code, a mere `bundle install` should fetch them all for you! \o/
52
+ bundle install
41
53
 
42
54
  Why don’t you support 1.8.7?
43
55
  ----------------------------
44
- There currently is no reason for me to do so. If you believe there is, file an issue.
56
+ There currently is no reason for me to do so. If you believe there is, file an issue.
@@ -16,10 +16,11 @@ Gem::Specification.new do |gem|
16
16
 
17
17
  gem.version = EventMachine::ThrottledQueue::VERSION
18
18
  gem.platform = Gem::Platform::RUBY
19
- gem.required_ruby_version = '~> 1.9'
19
+ gem.required_ruby_version = '>= 1.9'
20
20
 
21
21
  gem.add_dependency 'eventmachine'
22
22
  gem.add_development_dependency 'yard'
23
23
  gem.add_development_dependency 'rdiscount'
24
24
  gem.add_development_dependency 'bundler'
25
+ gem.add_development_dependency 'rake'
25
26
  end
@@ -15,6 +15,6 @@ module EventMachine
15
15
  class ThrottledQueue < Queue
16
16
  # Gem version, following Semantic Versioning since v1.0.2
17
17
  # @see http://semver.org/
18
- VERSION = [1, 1, 0].join('.')
18
+ VERSION = [1, 1, 1].join('.')
19
19
  end
20
20
  end
metadata CHANGED
@@ -1,60 +1,85 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: em-throttled_queue
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.0
5
- prerelease:
4
+ version: 1.1.1
6
5
  platform: ruby
7
6
  authors:
8
7
  - Kim Burgestrand
9
8
  autorequire:
10
9
  bindir: bin
11
10
  cert_chain: []
12
- date: 2011-07-13 00:00:00.000000000Z
11
+ date: 2014-04-21 00:00:00.000000000 Z
13
12
  dependencies:
14
13
  - !ruby/object:Gem::Dependency
15
14
  name: eventmachine
16
- requirement: &2157029440 !ruby/object:Gem::Requirement
17
- none: false
15
+ requirement: !ruby/object:Gem::Requirement
18
16
  requirements:
19
- - - ! '>='
17
+ - - ">="
20
18
  - !ruby/object:Gem::Version
21
19
  version: '0'
22
20
  type: :runtime
23
21
  prerelease: false
24
- version_requirements: *2157029440
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - ">="
25
+ - !ruby/object:Gem::Version
26
+ version: '0'
25
27
  - !ruby/object:Gem::Dependency
26
28
  name: yard
27
- requirement: &2157028880 !ruby/object:Gem::Requirement
28
- none: false
29
+ requirement: !ruby/object:Gem::Requirement
29
30
  requirements:
30
- - - ! '>='
31
+ - - ">="
31
32
  - !ruby/object:Gem::Version
32
33
  version: '0'
33
34
  type: :development
34
35
  prerelease: false
35
- version_requirements: *2157028880
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - ">="
39
+ - !ruby/object:Gem::Version
40
+ version: '0'
36
41
  - !ruby/object:Gem::Dependency
37
42
  name: rdiscount
38
- requirement: &2157028280 !ruby/object:Gem::Requirement
39
- none: false
43
+ requirement: !ruby/object:Gem::Requirement
40
44
  requirements:
41
- - - ! '>='
45
+ - - ">="
42
46
  - !ruby/object:Gem::Version
43
47
  version: '0'
44
48
  type: :development
45
49
  prerelease: false
46
- version_requirements: *2157028280
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - ">="
53
+ - !ruby/object:Gem::Version
54
+ version: '0'
47
55
  - !ruby/object:Gem::Dependency
48
56
  name: bundler
49
- requirement: &2157027500 !ruby/object:Gem::Requirement
50
- none: false
57
+ requirement: !ruby/object:Gem::Requirement
51
58
  requirements:
52
- - - ! '>='
59
+ - - ">="
53
60
  - !ruby/object:Gem::Version
54
61
  version: '0'
55
62
  type: :development
56
63
  prerelease: false
57
- version_requirements: *2157027500
64
+ version_requirements: !ruby/object:Gem::Requirement
65
+ requirements:
66
+ - - ">="
67
+ - !ruby/object:Gem::Version
68
+ version: '0'
69
+ - !ruby/object:Gem::Dependency
70
+ name: rake
71
+ requirement: !ruby/object:Gem::Requirement
72
+ requirements:
73
+ - - ">="
74
+ - !ruby/object:Gem::Version
75
+ version: '0'
76
+ type: :development
77
+ prerelease: false
78
+ version_requirements: !ruby/object:Gem::Requirement
79
+ requirements:
80
+ - - ">="
81
+ - !ruby/object:Gem::Version
82
+ version: '0'
58
83
  description:
59
84
  email:
60
85
  - kim@burgestrand.se
@@ -62,8 +87,8 @@ executables: []
62
87
  extensions: []
63
88
  extra_rdoc_files: []
64
89
  files:
65
- - .gitignore
66
- - .yardopts
90
+ - ".gitignore"
91
+ - ".yardopts"
67
92
  - Gemfile
68
93
  - LICENSE
69
94
  - README.markdown
@@ -77,27 +102,27 @@ files:
77
102
  homepage: http://github.com/Burgestrand/em-throttled_queue
78
103
  licenses:
79
104
  - X11 License
105
+ metadata: {}
80
106
  post_install_message:
81
107
  rdoc_options: []
82
108
  require_paths:
83
109
  - lib
84
110
  required_ruby_version: !ruby/object:Gem::Requirement
85
- none: false
86
111
  requirements:
87
- - - ~>
112
+ - - ">="
88
113
  - !ruby/object:Gem::Version
89
114
  version: '1.9'
90
115
  required_rubygems_version: !ruby/object:Gem::Requirement
91
- none: false
92
116
  requirements:
93
- - - ! '>='
117
+ - - ">="
94
118
  - !ruby/object:Gem::Version
95
119
  version: '0'
96
120
  requirements: []
97
121
  rubyforge_project:
98
- rubygems_version: 1.8.5
122
+ rubygems_version: 2.2.2
99
123
  signing_key:
100
- specification_version: 3
124
+ specification_version: 4
101
125
  summary: A rate-limited Queue for EventMachine
102
126
  test_files:
103
127
  - spec/throttled_queue.rb
128
+ has_rdoc: