laboristo 0.1.0 → 0.2.0
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.
- checksums.yaml +4 -4
- data/.travis.yml +13 -0
- data/README.md +25 -3
- data/laboristo.gemspec +1 -1
- data/lib/laboristo.rb +4 -0
- data/test/helper.rb +1 -1
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 17f08dc40db63489c80c5c3eb1bcf63f0b5fe5c0
|
4
|
+
data.tar.gz: eb280e7db9e83c62050f38acbbbd59d64d48eb5a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 953a02b03057565688a1d20191f79d6d604016bc9885f635af2c5bd5de58bd8552bd5adcd04b33b5b1f03e141f3fe633a22def6ba8371996131435a9dc3e80d3
|
7
|
+
data.tar.gz: 9872c860230de61ef52c08cba0d362b3bcdb1f3804b4242f6dd589ba879b0254c63ae6cd5f9b6f992d25291a00b9189c59c786d5bdc3e4bc8ae87fea581e5f76
|
data/.travis.yml
ADDED
@@ -0,0 +1,13 @@
|
|
1
|
+
language: ruby
|
2
|
+
rvm:
|
3
|
+
- 2.0.0
|
4
|
+
- 1.9.3
|
5
|
+
- jruby-19mode
|
6
|
+
- rbx-2
|
7
|
+
install:
|
8
|
+
- gem install aws-sdk-core
|
9
|
+
- gem install clap
|
10
|
+
- gem install cutest -v 1.1.3
|
11
|
+
- gem install codeclimate-test-reporter
|
12
|
+
script:
|
13
|
+
RUBYLIB=./lib cutest test/*_test.rb
|
data/README.md
CHANGED
@@ -1,6 +1,20 @@
|
|
1
1
|
# Laboristo
|
2
|
+
|
3
|
+
[][gem]
|
4
|
+
[][gemnasium]
|
5
|
+
[][codeclimate]
|
6
|
+
[][travis]
|
7
|
+
[][codeclimate]
|
8
|
+
|
9
|
+
[gem]: http://badge.fury.io/rb/laboristo
|
10
|
+
[gemnasium]: https://gemnasium.com/matiasow/laboristo
|
11
|
+
[codeclimate]: https://codeclimate.com/github/matiasow/laboristo
|
12
|
+
[travis]: https://travis-ci.org/matiasow/laboristo
|
13
|
+
|
2
14
|
Laboristo is an attempt to port [Ost](https://github.com/soveran/ost) simplicity to AWS SQS.
|
3
15
|
|
16
|
+

|
17
|
+
|
4
18
|
## Installation
|
5
19
|
|
6
20
|
Simply run:
|
@@ -48,13 +62,13 @@ To push a message to the queue:
|
|
48
62
|
```ruby
|
49
63
|
require 'laboristo'
|
50
64
|
|
51
|
-
Laboristo['
|
65
|
+
Laboristo['my_queue'] << 'some message'
|
52
66
|
```
|
53
67
|
|
54
68
|
And get messages from a queue:
|
55
69
|
```ruby
|
56
70
|
require 'laboristo'
|
57
|
-
Laboristo['
|
71
|
+
Laboristo['my_queue'].each do |msg|
|
58
72
|
# Do something with msg...
|
59
73
|
end
|
60
74
|
```
|
@@ -85,6 +99,14 @@ To run it in background you can use ```-d``` flag to daemonize the process:
|
|
85
99
|
|
86
100
|
You can stop the workers by killing the process. Keep in mind that, because of how SQS works, unprocessed messages will go back to the queue.
|
87
101
|
|
102
|
+
### Purging
|
103
|
+
|
104
|
+
Delete all messages from a queue:
|
105
|
+
|
106
|
+
```ruby
|
107
|
+
Laboristo['my_queue'].purge
|
108
|
+
```
|
109
|
+
|
88
110
|
## Development
|
89
111
|
|
90
112
|
After cloning repository install dependencies using [dep](https://github.com/cyx/dep):
|
@@ -109,7 +131,7 @@ Feel free to report bugs, open issues, comments and pull requests. Only keep in
|
|
109
131
|
|
110
132
|
## Credits
|
111
133
|
|
112
|
-
Most of the credit for this gem goes to [@soveran](https://github.com/soveran/ost) and [@djanowski](https://github.com/djanowski/ost-bin), who created the code this gem is based
|
134
|
+
Most of the credit for this gem goes to [@soveran](https://github.com/soveran/ost) and [@djanowski](https://github.com/djanowski/ost-bin), who created the code this gem is based on. Kudos to them!
|
113
135
|
|
114
136
|
## License
|
115
137
|
Laboristo is released under the [MIT License](http://www.opensource.org/licenses/MIT).
|
data/laboristo.gemspec
CHANGED
data/lib/laboristo.rb
CHANGED
data/test/helper.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: laboristo
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- matiasow
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-04-
|
11
|
+
date: 2015-04-04 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: aws-sdk-core
|
@@ -62,6 +62,7 @@ extra_rdoc_files: []
|
|
62
62
|
files:
|
63
63
|
- ".gems"
|
64
64
|
- ".gitignore"
|
65
|
+
- ".travis.yml"
|
65
66
|
- LICENSE
|
66
67
|
- README.md
|
67
68
|
- bin/laboristo
|