acts_as_queue 0.1.3 → 0.1.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/.gitignore +2 -0
- data/Gemfile +8 -2
- data/Gemfile.lock +42 -0
- data/README.rdoc +10 -7
- data/acts_as_queue.gemspec +1 -1
- metadata +38 -50
data/.gitignore
CHANGED
data/Gemfile
CHANGED
data/Gemfile.lock
ADDED
@@ -0,0 +1,42 @@
|
|
1
|
+
GEM
|
2
|
+
remote: http://rubygems.org/
|
3
|
+
specs:
|
4
|
+
activemodel (3.2.13)
|
5
|
+
activesupport (= 3.2.13)
|
6
|
+
builder (~> 3.0.0)
|
7
|
+
activerecord (3.2.13)
|
8
|
+
activemodel (= 3.2.13)
|
9
|
+
activesupport (= 3.2.13)
|
10
|
+
arel (~> 3.0.2)
|
11
|
+
tzinfo (~> 0.3.29)
|
12
|
+
activesupport (3.2.13)
|
13
|
+
i18n (= 0.6.1)
|
14
|
+
multi_json (~> 1.0)
|
15
|
+
arel (3.0.2)
|
16
|
+
bourne (1.4.0)
|
17
|
+
mocha (~> 0.13.2)
|
18
|
+
builder (3.0.4)
|
19
|
+
i18n (0.6.1)
|
20
|
+
metaclass (0.0.1)
|
21
|
+
mocha (0.13.3)
|
22
|
+
metaclass (~> 0.0.1)
|
23
|
+
multi_json (1.7.2)
|
24
|
+
rake (10.0.3)
|
25
|
+
shoulda (3.4.0)
|
26
|
+
shoulda-context (~> 1.0, >= 1.0.1)
|
27
|
+
shoulda-matchers (~> 1.0, >= 1.4.1)
|
28
|
+
shoulda-context (1.0.2)
|
29
|
+
shoulda-matchers (1.5.4)
|
30
|
+
activesupport (>= 3.0.0)
|
31
|
+
bourne (~> 1.3)
|
32
|
+
sqlite3 (1.3.7)
|
33
|
+
tzinfo (0.3.37)
|
34
|
+
|
35
|
+
PLATFORMS
|
36
|
+
ruby
|
37
|
+
|
38
|
+
DEPENDENCIES
|
39
|
+
activerecord
|
40
|
+
rake
|
41
|
+
shoulda
|
42
|
+
sqlite3
|
data/README.rdoc
CHANGED
@@ -1,5 +1,7 @@
|
|
1
1
|
= acts_as_queue
|
2
2
|
|
3
|
+
{<img src="https://badge.fury.io/rb/acts_as_queue.png" alt="Gem Version" />}[http://badge.fury.io/rb/acts_as_queue] {<img src="https://travis-ci.org/matthewl/acts_as_queue.png?branch=master" alt="Build Status" />}[https://travis-ci.org/matthewl/acts_as_queue] {<img src="https://gemnasium.com/matthewl/acts_as_queue.png" alt="Dependency Status" />}[https://gemnasium.com/matthewl/acts_as_queue]
|
4
|
+
|
3
5
|
<tt>acts_as_queue</tt> is a gem for ActiveRecord that allows you to turn any of your ActiveRecord models into a queue.
|
4
6
|
|
5
7
|
acts_as_queue provides you with methods to simplify using your ActiveRecord as a queue. The two key methods it provides are <tt>Push</tt> and <tt>Pop</tt>.
|
@@ -11,21 +13,22 @@ acts_as_queue provides you with methods to simplify using your ActiveRecord as a
|
|
11
13
|
class Post < ActiveRecord::Base
|
12
14
|
acts_as_queue
|
13
15
|
end
|
14
|
-
|
16
|
+
|
15
17
|
# Pushing new posts onto the queue.
|
16
18
|
Post.push :name => "Hello World"
|
17
19
|
Post.push :name => "Using Rails"
|
18
|
-
|
20
|
+
|
19
21
|
# Popping the item at the front of the queue.
|
20
22
|
Post.pop
|
21
|
-
|
23
|
+
|
22
24
|
== Using a bounded queue
|
23
25
|
|
24
26
|
class Message < ActiveRecord::Base
|
25
27
|
acts_as_queue :size => 10
|
26
28
|
end
|
27
|
-
|
29
|
+
|
28
30
|
# Pushing 20 new messages onto the queue.
|
29
|
-
(1..20).each { |i| Message.push :description => "Message #{i}" }
|
30
|
-
|
31
|
-
Message.count # Just 10 messages on the queue
|
31
|
+
(1..20).each { |i| Message.push :description => "Message #{i}" }
|
32
|
+
|
33
|
+
Message.count # Just 10 messages on the queue
|
34
|
+
|
data/acts_as_queue.gemspec
CHANGED
metadata
CHANGED
@@ -1,48 +1,42 @@
|
|
1
|
-
--- !ruby/object:Gem::Specification
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
2
|
name: acts_as_queue
|
3
|
-
version: !ruby/object:Gem::Version
|
4
|
-
|
5
|
-
|
6
|
-
- 0
|
7
|
-
- 1
|
8
|
-
- 3
|
9
|
-
version: 0.1.3
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.1.4
|
5
|
+
prerelease:
|
10
6
|
platform: ruby
|
11
|
-
authors:
|
7
|
+
authors:
|
12
8
|
- Matthew Lang
|
13
9
|
autorequire:
|
14
10
|
bindir: bin
|
15
11
|
cert_chain: []
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
dependencies:
|
20
|
-
- !ruby/object:Gem::Dependency
|
12
|
+
date: 2013-03-24 00:00:00.000000000 Z
|
13
|
+
dependencies:
|
14
|
+
- !ruby/object:Gem::Dependency
|
21
15
|
name: shoulda
|
22
|
-
|
23
|
-
|
24
|
-
requirements:
|
25
|
-
- -
|
26
|
-
- !ruby/object:Gem::Version
|
27
|
-
segments:
|
28
|
-
- 2
|
29
|
-
- 11
|
30
|
-
- 3
|
16
|
+
requirement: !ruby/object:Gem::Requirement
|
17
|
+
none: false
|
18
|
+
requirements:
|
19
|
+
- - ! '>='
|
20
|
+
- !ruby/object:Gem::Version
|
31
21
|
version: 2.11.3
|
32
22
|
type: :development
|
33
|
-
|
23
|
+
prerelease: false
|
24
|
+
version_requirements: !ruby/object:Gem::Requirement
|
25
|
+
none: false
|
26
|
+
requirements:
|
27
|
+
- - ! '>='
|
28
|
+
- !ruby/object:Gem::Version
|
29
|
+
version: 2.11.3
|
34
30
|
description: Allows you to turn your ActiveRecord models into queues.
|
35
|
-
email:
|
31
|
+
email:
|
36
32
|
- matthew@matthewlang.co.uk
|
37
33
|
executables: []
|
38
|
-
|
39
34
|
extensions: []
|
40
|
-
|
41
35
|
extra_rdoc_files: []
|
42
|
-
|
43
|
-
files:
|
36
|
+
files:
|
44
37
|
- .gitignore
|
45
38
|
- Gemfile
|
39
|
+
- Gemfile.lock
|
46
40
|
- MIT-LICENSE
|
47
41
|
- README.rdoc
|
48
42
|
- Rakefile
|
@@ -50,35 +44,29 @@ files:
|
|
50
44
|
- init.rb
|
51
45
|
- lib/acts_as_queue.rb
|
52
46
|
- test/acts_as_queue_test.rb
|
53
|
-
has_rdoc: true
|
54
47
|
homepage: http://github.com/matthewl/acts_as_queue
|
55
48
|
licenses: []
|
56
|
-
|
57
49
|
post_install_message:
|
58
50
|
rdoc_options: []
|
59
|
-
|
60
|
-
require_paths:
|
51
|
+
require_paths:
|
61
52
|
- lib
|
62
|
-
required_ruby_version: !ruby/object:Gem::Requirement
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
requirements:
|
71
|
-
- -
|
72
|
-
- !ruby/object:Gem::Version
|
73
|
-
|
74
|
-
- 0
|
75
|
-
version: "0"
|
53
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
54
|
+
none: false
|
55
|
+
requirements:
|
56
|
+
- - ! '>='
|
57
|
+
- !ruby/object:Gem::Version
|
58
|
+
version: '0'
|
59
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
60
|
+
none: false
|
61
|
+
requirements:
|
62
|
+
- - ! '>='
|
63
|
+
- !ruby/object:Gem::Version
|
64
|
+
version: '0'
|
76
65
|
requirements: []
|
77
|
-
|
78
66
|
rubyforge_project:
|
79
|
-
rubygems_version: 1.
|
67
|
+
rubygems_version: 1.8.25
|
80
68
|
signing_key:
|
81
69
|
specification_version: 3
|
82
70
|
summary: Allows you to turn your ActiveRecord models into queues.
|
83
|
-
test_files:
|
71
|
+
test_files:
|
84
72
|
- test/acts_as_queue_test.rb
|