cotton-tail 0.1.1 → 0.1.2
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
- checksums.yaml.gz.sig +0 -0
- data.tar.gz.sig +0 -0
- data/Gemfile.lock +1 -1
- data/checksum/cotton-tail-0.1.1.gem.sha512 +1 -0
- data/cotton-tail.gemspec +2 -2
- data/lib/cotton_tail/app.rb +1 -1
- data/lib/cotton_tail/queue/bunny.rb +6 -8
- data/lib/cotton_tail/version.rb +1 -1
- metadata +3 -2
- metadata.gz.sig +0 -0
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 6c184ea6b32368cff0639ab825a050dc42e3f8f88d0f56a66d2196deb0585ff0
|
|
4
|
+
data.tar.gz: e92242ed3918475fbd3de0b15a05978b5c5f3eefe31f8661b51bfc8c70271193
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 59773b7a58f66520f4ce9214e19e9f6ac2ba68cec669b589d77c4c1731bc6fe528bbfab62adf8eed3ef74b64dff9e829747bfbd35da511d5bf605b6e082d0d2e
|
|
7
|
+
data.tar.gz: 4836be3bef0422446e297b24c7c6643aeeb0e979995b5a06609f7e28b01ff0cc67b51b4fbf65e6b94559d8f379630f8f6ae01b2eed8518903f8103bd9bcc2252
|
checksums.yaml.gz.sig
CHANGED
|
Binary file
|
data.tar.gz.sig
CHANGED
|
Binary file
|
data/Gemfile.lock
CHANGED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
76a98e8d82c5390802dc3a607d3a9ff49b04902716f328540a5e6ef22bbd8c13288adc52592d749ab7c19e91081c3fc50c4a0581022db0b89ba1e3d9db92d35b
|
data/cotton-tail.gemspec
CHANGED
|
@@ -18,9 +18,9 @@ Gem::Specification.new do |spec|
|
|
|
18
18
|
spec.license = 'MIT'
|
|
19
19
|
|
|
20
20
|
spec.cert_chain = ['certs/jamesbrennan.pem']
|
|
21
|
-
spec.signing_key = File.expand_path('~/.ssh/gem-private_key.pem') if $
|
|
21
|
+
spec.signing_key = File.expand_path('~/.ssh/gem-private_key.pem') if $PROGRAM_NAME =~ /gem\z/
|
|
22
22
|
|
|
23
|
-
spec.files
|
|
23
|
+
spec.files = `git ls-files -z`.split("\x0").reject do |f|
|
|
24
24
|
f.match(%r{^(test|spec|features|integration)/})
|
|
25
25
|
end
|
|
26
26
|
|
data/lib/cotton_tail/app.rb
CHANGED
|
@@ -12,10 +12,10 @@ module CottonTail
|
|
|
12
12
|
def initialize(name, conn: Connection.new, prefetch: 1, manual_ack: false, **opts)
|
|
13
13
|
@name = name
|
|
14
14
|
@prefetch = prefetch
|
|
15
|
-
@manual_ack = manual_ack
|
|
16
15
|
@conn = conn
|
|
17
|
-
@closed = false
|
|
18
16
|
@queue = conn.queue(@name, **opts)
|
|
17
|
+
@messages = ::Queue.new
|
|
18
|
+
@queue.subscribe(manual_ack: manual_ack) { |*args| @messages << args }
|
|
19
19
|
end
|
|
20
20
|
|
|
21
21
|
def bind(routing_key)
|
|
@@ -28,21 +28,19 @@ module CottonTail
|
|
|
28
28
|
end
|
|
29
29
|
|
|
30
30
|
def close
|
|
31
|
-
@
|
|
31
|
+
@messages.close
|
|
32
32
|
end
|
|
33
33
|
|
|
34
34
|
def closed?
|
|
35
|
-
@closed
|
|
35
|
+
@messages.closed?
|
|
36
36
|
end
|
|
37
37
|
|
|
38
38
|
def empty?
|
|
39
|
-
@
|
|
39
|
+
@messages.empty?
|
|
40
40
|
end
|
|
41
41
|
|
|
42
42
|
def pop
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
delivery_info, *tail = @queue.pop(manual_ack: @manual_ack)
|
|
43
|
+
delivery_info, *tail = @messages.pop
|
|
46
44
|
[delivery_info[:routing_key], delivery_info, *tail, conn: @conn]
|
|
47
45
|
end
|
|
48
46
|
end
|
data/lib/cotton_tail/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: cotton-tail
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.1.
|
|
4
|
+
version: 0.1.2
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- James Brennan
|
|
@@ -30,7 +30,7 @@ cert_chain:
|
|
|
30
30
|
fXe/xr/Sc+2wCjHPVE2J+auN5hk3KCp1I4s2fKqyLIwyhTEF3shuYfCpC8rt/YdN
|
|
31
31
|
cy9/lg5LCI3OvakzxL4Xt1Sq4h/xJZ06ydTVJ1wxfk6BXHrg
|
|
32
32
|
-----END CERTIFICATE-----
|
|
33
|
-
date: 2018-
|
|
33
|
+
date: 2018-11-15 00:00:00.000000000 Z
|
|
34
34
|
dependencies:
|
|
35
35
|
- !ruby/object:Gem::Dependency
|
|
36
36
|
name: bunny
|
|
@@ -165,6 +165,7 @@ files:
|
|
|
165
165
|
- bin/console
|
|
166
166
|
- bin/entrypoint.sh
|
|
167
167
|
- certs/jamesbrennan.pem
|
|
168
|
+
- checksum/cotton-tail-0.1.1.gem.sha512
|
|
168
169
|
- cotton-tail.gemspec
|
|
169
170
|
- docker-compose.yml
|
|
170
171
|
- examples/app.rb
|
metadata.gz.sig
CHANGED
|
Binary file
|