msgr 0.1.0 → 0.1.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.travis.yml +9 -2
- data/Gemfile +8 -1
- data/README.md +1 -1
- data/lib/msgr/client.rb +3 -2
- data/lib/msgr/version.rb +1 -1
- data/msgr.gemspec +1 -1
- data/spec/integration/dummy/config/environments/test.rb +1 -1
- data/spec/integration/dummy/config/initializers/secret_token.rb +1 -0
- data/spec/msgr/msgr_spec.rb +1 -1
- metadata +17 -17
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b23217108455c5fa7ffc2234c8794e95b42ea10b
|
4
|
+
data.tar.gz: 5209c89733bc064d09a4ca7a706a2abdaf49ce17
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 260954767ff2fa347eeae118ac9ba9e7e75e5da624ef98b408e560a81822f1831c532fc6f6428b783e13c70d67c6bebc248ba0d8974fe97822a4396a8e97b5f8
|
7
|
+
data.tar.gz: 996f1024666f2f3232fe92b9ca047f0425e94020405b2e4e0aff9002fb412e319ded02ea3d59cb71e2d10748d3ce7d9c6d9dc1ef8bb0c4cc6c8751e9337c5881
|
data/.travis.yml
CHANGED
@@ -3,14 +3,21 @@ bundler_args: --without development
|
|
3
3
|
services:
|
4
4
|
- rabbitmq
|
5
5
|
rvm:
|
6
|
+
- 2.1.0
|
6
7
|
- 2.0.0
|
7
8
|
- 1.9.3
|
8
9
|
- jruby
|
9
|
-
- rbx
|
10
|
+
- rbx
|
10
11
|
gemfile:
|
11
12
|
- gemfiles/Gemfile.rails-3-2
|
12
13
|
- gemfiles/Gemfile.rails-4-0
|
13
|
-
|
14
|
+
matrix:
|
15
|
+
allow_failures:
|
16
|
+
- rvm: jruby
|
17
|
+
- rvm: rbx
|
18
|
+
before_install:
|
19
|
+
- gem install json -v '1.8.1'
|
20
|
+
- gem install minitest -v '4.7.5'
|
14
21
|
script:
|
15
22
|
- bundle exec rake spec:msgr
|
16
23
|
- bundle exec rake spec:integration
|
data/Gemfile
CHANGED
@@ -18,12 +18,19 @@ group :development do
|
|
18
18
|
end
|
19
19
|
|
20
20
|
group :rails do
|
21
|
-
gem 'rails'
|
21
|
+
gem 'rails', '>= 3.2', '< 5'
|
22
22
|
gem 'rspec-rails'
|
23
23
|
gem 'sqlite3', platform: :ruby
|
24
24
|
gem 'activerecord-jdbcsqlite3-adapter', platform: :jruby
|
25
25
|
end
|
26
26
|
|
27
|
+
platform :rbx do
|
28
|
+
gem 'rubysl'
|
29
|
+
gem 'rubysl-json'
|
30
|
+
gem 'rubinius-coverage'
|
31
|
+
gem 'racc'
|
32
|
+
end
|
33
|
+
|
27
34
|
# Specify your gem's dependencies in acfs.gemspec
|
28
35
|
gemroot = File.dirname File.absolute_path __FILE__
|
29
36
|
gemspec path: gemroot
|
data/README.md
CHANGED
data/lib/msgr/client.rb
CHANGED
@@ -80,8 +80,9 @@ module Msgr
|
|
80
80
|
log(:info) { 'Terminated.' }
|
81
81
|
end
|
82
82
|
|
83
|
-
def publish(
|
84
|
-
|
83
|
+
def publish(payload, opts = {})
|
84
|
+
opts[:routing_key] = opts.delete(:to) if opts[:to]
|
85
|
+
@connection.publish payload, opts
|
85
86
|
end
|
86
87
|
|
87
88
|
private
|
data/lib/msgr/version.rb
CHANGED
data/msgr.gemspec
CHANGED
@@ -19,7 +19,7 @@ Gem::Specification.new do |spec|
|
|
19
19
|
spec.require_paths = ['lib']
|
20
20
|
|
21
21
|
spec.add_dependency 'activesupport'
|
22
|
-
spec.add_dependency 'bunny', '~>
|
22
|
+
spec.add_dependency 'bunny', '~> 1.0'
|
23
23
|
spec.add_dependency 'celluloid'
|
24
24
|
|
25
25
|
spec.add_development_dependency 'bundler', '~> 1.3'
|
@@ -29,7 +29,7 @@ Dummy::Application.configure do
|
|
29
29
|
# Tell Action Mailer not to deliver emails to the real world.
|
30
30
|
# The :test delivery method accumulates sent emails in the
|
31
31
|
# ActionMailer::Base.deliveries array.
|
32
|
-
config.action_mailer.delivery_method = :test
|
32
|
+
# config.action_mailer.delivery_method = :test
|
33
33
|
|
34
34
|
# Print deprecation notices to the stderr.
|
35
35
|
config.active_support.deprecation = :stderr
|
@@ -10,3 +10,4 @@
|
|
10
10
|
# Make sure your secret_key_base is kept private
|
11
11
|
# if you're sharing your code publicly.
|
12
12
|
Dummy::Application.config.secret_key_base = 'f86fdb0bb65c2fc129c469d31af6b4e13623e15536087d9afd24ca86fe480f392b7401e2fcf966a415b983786954c2d4015e649290d12bd8f2bdb3d35bdd3597'
|
13
|
+
Dummy::Application.config.secret_token = 'f86fdb0bb65c2fc129c469d31af6b4e13623e15536087d9afd24ca86fe480f392b7401e2fcf966a415b983786954c2d4015e649290d12bd8f2bdb3d35bdd3597'
|
data/spec/msgr/msgr_spec.rb
CHANGED
@@ -29,7 +29,7 @@ describe Msgr do
|
|
29
29
|
it 'should dispatch published methods to consumer' do
|
30
30
|
expect_any_instance_of(TestConsumer).to receive(:index).within(10).seconds.and_call_original
|
31
31
|
|
32
|
-
client.publish '
|
32
|
+
client.publish 'Payload', to: 'routing.key'
|
33
33
|
|
34
34
|
sleep 10
|
35
35
|
end
|
metadata
CHANGED
@@ -1,69 +1,69 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: msgr
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jan Graichen
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2014-02-20 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
|
-
- -
|
17
|
+
- - ">="
|
18
18
|
- !ruby/object:Gem::Version
|
19
19
|
version: '0'
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
|
-
- -
|
24
|
+
- - ">="
|
25
25
|
- !ruby/object:Gem::Version
|
26
26
|
version: '0'
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: bunny
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
|
-
- - ~>
|
31
|
+
- - "~>"
|
32
32
|
- !ruby/object:Gem::Version
|
33
|
-
version:
|
33
|
+
version: '1.0'
|
34
34
|
type: :runtime
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
|
-
- - ~>
|
38
|
+
- - "~>"
|
39
39
|
- !ruby/object:Gem::Version
|
40
|
-
version:
|
40
|
+
version: '1.0'
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
42
|
name: celluloid
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
44
44
|
requirements:
|
45
|
-
- -
|
45
|
+
- - ">="
|
46
46
|
- !ruby/object:Gem::Version
|
47
47
|
version: '0'
|
48
48
|
type: :runtime
|
49
49
|
prerelease: false
|
50
50
|
version_requirements: !ruby/object:Gem::Requirement
|
51
51
|
requirements:
|
52
|
-
- -
|
52
|
+
- - ">="
|
53
53
|
- !ruby/object:Gem::Version
|
54
54
|
version: '0'
|
55
55
|
- !ruby/object:Gem::Dependency
|
56
56
|
name: bundler
|
57
57
|
requirement: !ruby/object:Gem::Requirement
|
58
58
|
requirements:
|
59
|
-
- - ~>
|
59
|
+
- - "~>"
|
60
60
|
- !ruby/object:Gem::Version
|
61
61
|
version: '1.3'
|
62
62
|
type: :development
|
63
63
|
prerelease: false
|
64
64
|
version_requirements: !ruby/object:Gem::Requirement
|
65
65
|
requirements:
|
66
|
-
- - ~>
|
66
|
+
- - "~>"
|
67
67
|
- !ruby/object:Gem::Version
|
68
68
|
version: '1.3'
|
69
69
|
description: 'Msgr: Rails-like Messaging Framework'
|
@@ -73,8 +73,8 @@ executables: []
|
|
73
73
|
extensions: []
|
74
74
|
extra_rdoc_files: []
|
75
75
|
files:
|
76
|
-
- .gitignore
|
77
|
-
- .travis.yml
|
76
|
+
- ".gitignore"
|
77
|
+
- ".travis.yml"
|
78
78
|
- Gemfile
|
79
79
|
- Guardfile
|
80
80
|
- LICENSE.txt
|
@@ -167,17 +167,17 @@ require_paths:
|
|
167
167
|
- lib
|
168
168
|
required_ruby_version: !ruby/object:Gem::Requirement
|
169
169
|
requirements:
|
170
|
-
- -
|
170
|
+
- - ">="
|
171
171
|
- !ruby/object:Gem::Version
|
172
172
|
version: '0'
|
173
173
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
174
174
|
requirements:
|
175
|
-
- -
|
175
|
+
- - ">="
|
176
176
|
- !ruby/object:Gem::Version
|
177
177
|
version: '0'
|
178
178
|
requirements: []
|
179
179
|
rubyforge_project:
|
180
|
-
rubygems_version: 2.
|
180
|
+
rubygems_version: 2.2.1
|
181
181
|
signing_key:
|
182
182
|
specification_version: 4
|
183
183
|
summary: 'Msgr: Rails-like Messaging Framework'
|