msgr 0.15.2.1.b157 → 0.15.2.1.b158
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/.rubocop.yml +26 -22
- data/.travis.yml +3 -3
- data/Gemfile +2 -10
- data/Rakefile +6 -5
- data/gemfiles/Gemfile.rails-master +0 -1
- data/lib/msgr/binding.rb +1 -0
- data/lib/msgr/connection.rb +1 -0
- data/lib/msgr/consumer.rb +1 -0
- data/lib/msgr/dispatcher.rb +1 -0
- data/lib/msgr/errors.rb +1 -0
- data/lib/msgr/logging.rb +1 -0
- data/lib/msgr/message.rb +1 -0
- data/lib/msgr/railtie.rb +1 -0
- data/lib/msgr/route.rb +1 -0
- data/lib/msgr/routes.rb +1 -0
- data/lib/msgr/test_pool.rb +1 -0
- data/lib/msgr.rb +1 -0
- data/msgr.gemspec +11 -7
- data/scripts/simple_test.rb +1 -0
- data/spec/fixtures/msgr-routes-test-1.rb +1 -0
- data/spec/integration/dummy/Rakefile +2 -0
- data/spec/integration/dummy/app/consumers/application_consumer.rb +1 -0
- data/spec/integration/dummy/app/consumers/test_consumer.rb +1 -0
- data/spec/integration/dummy/app/controllers/application_controller.rb +1 -0
- data/spec/integration/dummy/app/controllers/test_controller.rb +1 -0
- data/spec/integration/dummy/app/helpers/application_helper.rb +1 -0
- data/spec/integration/dummy/bin/bundle +1 -0
- data/spec/integration/dummy/bin/rails +1 -0
- data/spec/integration/dummy/bin/rake +1 -0
- data/spec/integration/dummy/config/application.rb +1 -0
- data/spec/integration/dummy/config/boot.rb +1 -0
- data/spec/integration/dummy/config/environment.rb +1 -0
- data/spec/integration/dummy/config/msgr.rb +1 -0
- data/spec/integration/dummy/config/routes.rb +1 -0
- data/spec/integration/dummy/config.ru +3 -1
- data/spec/integration/msgr/dispatcher_spec.rb +1 -0
- data/spec/integration/msgr/railtie_spec.rb +1 -0
- data/spec/integration/msgr_spec.rb +1 -0
- data/spec/integration/spec_helper.rb +1 -0
- data/spec/msgr/msgr/client_spec.rb +1 -0
- data/spec/msgr/msgr/connection_spec.rb +1 -0
- data/spec/msgr/msgr/consumer_spec.rb +1 -0
- data/spec/msgr/msgr/route_spec.rb +1 -0
- data/spec/msgr/msgr/routes_spec.rb +9 -8
- data/spec/msgr/msgr_spec.rb +1 -0
- data/spec/msgr/spec_helper.rb +1 -0
- data/spec/support/setup.rb +1 -0
- metadata +2 -3
- data/Guardfile +0 -14
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: fadbaec9ebda9d16ef68c4355307e3a8bb88f59c
|
|
4
|
+
data.tar.gz: 7dfc240d16f44a72b65060388e2a2c2dbf490094
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 71e1836acbb01c00730299b99fed88eb14a8624c6cc80058716069a50b1b20fc5e9203e6bc6d74deed820b328a9c904a8e0d00a134201972439b9102bf09f944
|
|
7
|
+
data.tar.gz: fede9c7c5b34626d9984685edabb0a62b6e459731b39b02dbf0e54b3df0a5f20c4ad88a0e284cb9f30ff443a1b4b8a8c92b693b20bd6044a9b5c43a48c3263fd
|
data/.rubocop.yml
CHANGED
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
AllCops:
|
|
2
|
-
Include:
|
|
3
|
-
- '**/*.rb'
|
|
4
2
|
TargetRubyVersion: 2.4
|
|
5
3
|
|
|
4
|
+
|
|
6
5
|
Metrics/BlockLength:
|
|
7
6
|
Exclude:
|
|
8
7
|
- 'spec/**/*_spec.rb'
|
|
@@ -11,38 +10,43 @@ Metrics/LineLength:
|
|
|
11
10
|
Exclude:
|
|
12
11
|
- 'spec/**/*_spec.rb'
|
|
13
12
|
|
|
14
|
-
|
|
13
|
+
|
|
14
|
+
Layout/AlignParameters:
|
|
15
15
|
EnforcedStyle: with_fixed_indentation
|
|
16
16
|
|
|
17
|
-
|
|
18
|
-
EnforcedStyle:
|
|
17
|
+
Layout/CaseIndentation:
|
|
18
|
+
EnforcedStyle: end
|
|
19
|
+
SupportedStyles:
|
|
20
|
+
- case
|
|
21
|
+
- end
|
|
22
|
+
IndentOneStep: true
|
|
19
23
|
|
|
20
|
-
|
|
24
|
+
Layout/SpaceInsideBlockBraces:
|
|
25
|
+
EnforcedStyle: space
|
|
26
|
+
EnforcedStyleForEmptyBraces: no_space
|
|
27
|
+
SpaceBeforeBlockParameters: false
|
|
28
|
+
|
|
29
|
+
Layout/SpaceInsideHashLiteralBraces:
|
|
21
30
|
EnforcedStyle: no_space
|
|
22
31
|
|
|
23
|
-
|
|
24
|
-
|
|
32
|
+
|
|
33
|
+
Style/BracesAroundHashParameters:
|
|
34
|
+
EnforcedStyle: context_dependent
|
|
35
|
+
|
|
36
|
+
Style/ClassAndModuleChildren:
|
|
37
|
+
Enabled: false
|
|
25
38
|
|
|
26
39
|
Style/Documentation:
|
|
27
40
|
Enabled: false
|
|
28
41
|
|
|
29
|
-
Style/
|
|
30
|
-
EnforcedStyle:
|
|
31
|
-
|
|
32
|
-
|
|
42
|
+
Style/RaiseArgs:
|
|
43
|
+
EnforcedStyle: compact
|
|
44
|
+
|
|
45
|
+
Style/SafeNavigation:
|
|
46
|
+
Enabled: false # not available before 2.3
|
|
33
47
|
|
|
34
48
|
Style/SignalException:
|
|
35
49
|
EnforcedStyle: only_raise
|
|
36
50
|
|
|
37
|
-
Style/CaseIndentation:
|
|
38
|
-
EnforcedStyle: end
|
|
39
|
-
SupportedStyles:
|
|
40
|
-
- case
|
|
41
|
-
- end
|
|
42
|
-
IndentOneStep: true
|
|
43
|
-
|
|
44
|
-
Style/ClassAndModuleChildren:
|
|
45
|
-
Enabled: false
|
|
46
|
-
|
|
47
51
|
Style/TrivialAccessors:
|
|
48
52
|
AllowPredicates: true
|
data/.travis.yml
CHANGED
data/Gemfile
CHANGED
|
@@ -8,18 +8,10 @@ gem 'coveralls'
|
|
|
8
8
|
gem 'fuubar'
|
|
9
9
|
gem 'rake'
|
|
10
10
|
gem 'rspec', '~> 3.0'
|
|
11
|
-
|
|
12
|
-
# Doc
|
|
13
|
-
group :development do
|
|
14
|
-
gem 'guard-rspec'
|
|
15
|
-
gem 'guard-yard'
|
|
16
|
-
gem 'listen'
|
|
17
|
-
gem 'redcarpet'
|
|
18
|
-
gem 'yard', '~> 0.9.8'
|
|
19
|
-
end
|
|
11
|
+
gem 'rubocop', '~> 0.50.0'
|
|
20
12
|
|
|
21
13
|
group :rails do
|
|
22
|
-
gem 'rails', '>=
|
|
14
|
+
gem 'rails', '>= 4.2'
|
|
23
15
|
gem 'rspec-rails'
|
|
24
16
|
gem 'sqlite3'
|
|
25
17
|
end
|
data/Rakefile
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
1
3
|
begin
|
|
2
4
|
require 'bundler/setup'
|
|
3
5
|
rescue LoadError
|
|
@@ -9,13 +11,12 @@ require 'bundler/gem_tasks'
|
|
|
9
11
|
require 'rspec/core/rake_task'
|
|
10
12
|
|
|
11
13
|
# Delegate spec task task to spec:all to run all specs.
|
|
12
|
-
task :
|
|
14
|
+
task spec: 'spec:all'
|
|
13
15
|
|
|
14
16
|
desc 'Run all specs'
|
|
15
17
|
namespace :spec do
|
|
16
|
-
|
|
17
18
|
desc 'Run all msgr specs and all integration specs.'
|
|
18
|
-
task :
|
|
19
|
+
task all: %i[msgr integration]
|
|
19
20
|
|
|
20
21
|
desc 'Run all unit specs.'
|
|
21
22
|
RSpec::Core::RakeTask.new(:msgr) do |t|
|
|
@@ -35,8 +36,8 @@ begin
|
|
|
35
36
|
require 'yard/rake/yardoc_task'
|
|
36
37
|
|
|
37
38
|
YARD::Rake::YardocTask.new do |t|
|
|
38
|
-
t.files = %w
|
|
39
|
-
t.options = %w
|
|
39
|
+
t.files = %w[lib/**/*.rb]
|
|
40
|
+
t.options = %w[--output-dir doc/]
|
|
40
41
|
end
|
|
41
42
|
rescue LoadError
|
|
42
43
|
nil
|
|
@@ -7,7 +7,6 @@ gem 'activesupport', git: 'https://github.com/rails/rails'
|
|
|
7
7
|
gem 'bunny', ENV['BUNNY_VERSION'] if ENV['BUNNY_VERSION']
|
|
8
8
|
|
|
9
9
|
group :rails do
|
|
10
|
-
$RAILS = true
|
|
11
10
|
gem 'rails', '>= 3.2', git: 'https://github.com/rails/rails'
|
|
12
11
|
gem 'arel', git: 'https://github.com/rails/arel'
|
|
13
12
|
end
|
data/lib/msgr/binding.rb
CHANGED
data/lib/msgr/connection.rb
CHANGED
data/lib/msgr/consumer.rb
CHANGED
data/lib/msgr/dispatcher.rb
CHANGED
data/lib/msgr/errors.rb
CHANGED
data/lib/msgr/logging.rb
CHANGED
data/lib/msgr/message.rb
CHANGED
data/lib/msgr/railtie.rb
CHANGED
data/lib/msgr/route.rb
CHANGED
data/lib/msgr/routes.rb
CHANGED
data/lib/msgr/test_pool.rb
CHANGED
data/lib/msgr.rb
CHANGED
data/msgr.gemspec
CHANGED
|
@@ -1,6 +1,8 @@
|
|
|
1
|
-
#
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
2
3
|
lib = File.expand_path('../lib', __FILE__)
|
|
3
4
|
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
|
5
|
+
|
|
4
6
|
require 'msgr/version'
|
|
5
7
|
|
|
6
8
|
Gem::Specification.new do |spec|
|
|
@@ -8,15 +10,15 @@ Gem::Specification.new do |spec|
|
|
|
8
10
|
spec.version = Msgr::VERSION
|
|
9
11
|
spec.authors = ['Jan Graichen']
|
|
10
12
|
spec.email = ['jg@altimos.de']
|
|
11
|
-
spec.description =
|
|
12
|
-
spec.summary =
|
|
13
|
+
spec.description = 'Msgr: Rails-like Messaging Framework'
|
|
14
|
+
spec.summary = 'Msgr: Rails-like Messaging Framework'
|
|
13
15
|
spec.homepage = 'https://github.com/jgraichen/msgr'
|
|
14
16
|
spec.license = 'MIT'
|
|
15
17
|
|
|
16
|
-
spec.files = `git ls-files`.split(
|
|
17
|
-
spec.executables = spec.files.grep(%r{^bin/}) {
|
|
18
|
+
spec.files = `git ls-files -z`.split("\x0")
|
|
19
|
+
spec.executables = spec.files.grep(%r{^bin/}) {|f| File.basename(f) }
|
|
18
20
|
spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
|
|
19
|
-
spec.require_paths = [
|
|
21
|
+
spec.require_paths = %w[lib]
|
|
20
22
|
|
|
21
23
|
spec.add_dependency 'activesupport'
|
|
22
24
|
spec.add_dependency 'bunny', '>= 1.4', '< 3.0'
|
|
@@ -24,5 +26,7 @@ Gem::Specification.new do |spec|
|
|
|
24
26
|
|
|
25
27
|
spec.add_development_dependency 'bundler', '~> 1.3'
|
|
26
28
|
|
|
27
|
-
|
|
29
|
+
if ENV['TRAVIS_BUILD_NUMBER']
|
|
30
|
+
spec.version = "#{spec.version}.1.b#{ENV['TRAVIS_BUILD_NUMBER']}"
|
|
31
|
+
end
|
|
28
32
|
end
|
data/scripts/simple_test.rb
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
# frozen_string_literal: true
|
|
2
|
+
|
|
2
3
|
require 'spec_helper'
|
|
3
4
|
|
|
4
5
|
describe Msgr::Routes do
|
|
@@ -37,9 +38,9 @@ describe Msgr::Routes do
|
|
|
37
38
|
it 'should iterate over configured routes' do
|
|
38
39
|
expect(each.size).to eq 2
|
|
39
40
|
|
|
40
|
-
expect(each.map(&:keys)).to eq [%w
|
|
41
|
-
expect(each.map(&:consumer)).to eq %w
|
|
42
|
-
expect(each.map(&:action)).to eq %w
|
|
41
|
+
expect(each.map(&:keys)).to eq [%w[abc.#], %w[edf.#]]
|
|
42
|
+
expect(each.map(&:consumer)).to eq %w[TestConsumer TestConsumer]
|
|
43
|
+
expect(each.map(&:action)).to eq %w[index action]
|
|
43
44
|
end
|
|
44
45
|
end
|
|
45
46
|
|
|
@@ -54,7 +55,7 @@ describe Msgr::Routes do
|
|
|
54
55
|
it 'should add given route' do
|
|
55
56
|
subject.call
|
|
56
57
|
|
|
57
|
-
expect(last_route.keys).to eq %w
|
|
58
|
+
expect(last_route.keys).to eq %w[routing.key]
|
|
58
59
|
expect(last_route.consumer).to eq 'Test2Consumer'
|
|
59
60
|
expect(last_route.action).to eq 'index2'
|
|
60
61
|
end
|
|
@@ -73,7 +74,7 @@ describe Msgr::Routes do
|
|
|
73
74
|
|
|
74
75
|
it 'should add second binding to first route' do
|
|
75
76
|
subject.call
|
|
76
|
-
expect(routes.routes.first.keys).to eq %w
|
|
77
|
+
expect(routes.routes.first.keys).to eq %w[routing.key another.routing.key]
|
|
77
78
|
end
|
|
78
79
|
end
|
|
79
80
|
end
|
|
@@ -81,9 +82,9 @@ describe Msgr::Routes do
|
|
|
81
82
|
describe '#files' do
|
|
82
83
|
it 'should allow to add route paths' do
|
|
83
84
|
routes.files << 'abc.rb'
|
|
84
|
-
routes.files += %w
|
|
85
|
+
routes.files += %w[cde.rb edf.rb]
|
|
85
86
|
|
|
86
|
-
expect(routes.files).to eq %w
|
|
87
|
+
expect(routes.files).to eq %w[abc.rb cde.rb edf.rb]
|
|
87
88
|
end
|
|
88
89
|
end
|
|
89
90
|
|
|
@@ -93,7 +94,7 @@ describe Msgr::Routes do
|
|
|
93
94
|
it 'should trigger load for all files' do
|
|
94
95
|
expect(routes).to receive(:load).with('cde.rb').ordered
|
|
95
96
|
expect(routes).to receive(:load).with('edf.rb').ordered
|
|
96
|
-
routes.files += %w
|
|
97
|
+
routes.files += %w[cde.rb edf.rb]
|
|
97
98
|
routes.reload
|
|
98
99
|
end
|
|
99
100
|
|
data/spec/msgr/msgr_spec.rb
CHANGED
data/spec/msgr/spec_helper.rb
CHANGED
data/spec/support/setup.rb
CHANGED
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: msgr
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.15.2.1.
|
|
4
|
+
version: 0.15.2.1.b158
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Jan Graichen
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2017-
|
|
11
|
+
date: 2017-10-04 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: activesupport
|
|
@@ -84,7 +84,6 @@ files:
|
|
|
84
84
|
- ".travis.yml"
|
|
85
85
|
- CHANGELOG.md
|
|
86
86
|
- Gemfile
|
|
87
|
-
- Guardfile
|
|
88
87
|
- LICENSE.txt
|
|
89
88
|
- README.md
|
|
90
89
|
- Rakefile
|
data/Guardfile
DELETED
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
# A sample Guardfile
|
|
2
|
-
# More info at https://github.com/guard/guard#readme
|
|
3
|
-
|
|
4
|
-
guard 'rspec' do
|
|
5
|
-
watch(%r{^spec/.+_spec\.rb$})
|
|
6
|
-
watch(%r{^lib/(.+)\.rb$}) { |m| "spec/#{m[1]}_spec.rb" }
|
|
7
|
-
|
|
8
|
-
watch('spec/spec_helper.rb') { 'spec' }
|
|
9
|
-
watch(%r{^spec/support/(.+)\.rb$}) { 'spec' }
|
|
10
|
-
end
|
|
11
|
-
|
|
12
|
-
guard 'yard' do
|
|
13
|
-
watch(%r{lib/.+\.rb})
|
|
14
|
-
end
|