jackhammer 0.2.2 → 0.2.3

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 8ec005b8f248bfbb4cf93561e10f3d38a0f604a1d87e32ad2e0710fbebac5036
4
- data.tar.gz: e70265345c4420a092e66ed72014a5b8cd59a9762edd548db47f6bd18ce84088
3
+ metadata.gz: 91579ca5a88dbc8764db586cb2d68eb8bbf80ee7978be163207f2c89262e9483
4
+ data.tar.gz: 0bce10514904cbbaf973be002f9459b875294dc09c10d31945eb55d1b4b6267c
5
5
  SHA512:
6
- metadata.gz: 76915ab01ef1ae991db88c358810e164f8026493eb6f30855764a5814b1602f9bef5671f636b96b828cea86ff84a971d29b6f833e95bf13b42b476a9f4cbbd52
7
- data.tar.gz: 4f24dc8fb7da4362d3caf25129f617cb70c2af77e7e47ced3f8b6b21b31e70d2cd718f140dd0af9d1b2595fc8b1a3bfb826c549a3426320386e80a2eed806ea4
6
+ metadata.gz: 13b25122a6a66ab39c97dda9d71d90259ac57164ba9ea85231de7634663e8c5323cd7478a29bd965897bc015e8a109856c2c97ea762c4eeee0a877e354cba692
7
+ data.tar.gz: 31ddd4e068fff723c83c18052ec86d6fa9b2268073d7675ced0fd850fa3e25fc1c3040e9cf3f0df68ccedf4b488f46a9d92b81bfb471936c44e1f3f46ca5e805
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- jackhammer (0.2.2)
4
+ jackhammer (0.2.3)
5
5
  bunny (~> 2.14)
6
6
 
7
7
  GEM
@@ -16,11 +16,11 @@ GEM
16
16
  byebug (11.0.1)
17
17
  diff-lcs (1.3)
18
18
  jaro_winkler (1.5.4)
19
- parallel (1.18.0)
19
+ parallel (1.19.1)
20
20
  parser (2.6.5.0)
21
21
  ast (~> 2.4.0)
22
22
  rainbow (3.0.0)
23
- rake (13.0.0)
23
+ rake (13.0.1)
24
24
  rspec (3.9.0)
25
25
  rspec-core (~> 3.9.0)
26
26
  rspec-expectations (~> 3.9.0)
@@ -34,14 +34,14 @@ GEM
34
34
  diff-lcs (>= 1.2.0, < 2.0)
35
35
  rspec-support (~> 3.9.0)
36
36
  rspec-support (3.9.0)
37
- rubocop (0.76.0)
37
+ rubocop (0.78.0)
38
38
  jaro_winkler (~> 1.5.1)
39
39
  parallel (~> 1.10)
40
40
  parser (>= 2.6)
41
41
  rainbow (>= 2.2.2, < 4.0)
42
42
  ruby-progressbar (~> 1.7)
43
43
  unicode-display_width (>= 1.4.0, < 1.7)
44
- rubocop-performance (1.5.0)
44
+ rubocop-performance (1.5.1)
45
45
  rubocop (>= 0.71.0)
46
46
  ruby-progressbar (1.10.1)
47
47
  unicode-display_width (1.6.0)
@@ -50,14 +50,14 @@ PLATFORMS
50
50
  ruby
51
51
 
52
52
  DEPENDENCIES
53
- bundler (~> 2.0)
54
- bunny-mock (~> 1.7)
53
+ bundler
54
+ bunny-mock
55
55
  byebug
56
56
  jackhammer!
57
- rake (~> 13.0)
58
- rspec (~> 3.0)
59
- rubocop (~> 0.74)
60
- rubocop-performance (~> 1.5.0)
57
+ rake
58
+ rspec
59
+ rubocop
60
+ rubocop-performance
61
61
 
62
62
  BUNDLED WITH
63
63
  2.0.2
data/jackhammer.gemspec CHANGED
@@ -10,30 +10,27 @@ Gem::Specification.new do |spec|
10
10
  spec.authors = ['Scott Serok']
11
11
  spec.email = ['scott@renofi.com']
12
12
 
13
- spec.summary = 'Jackhammer is an opinionated facde over RabbitMQ Bunny'
14
- spec.description = spec.summary
13
+ spec.summary = 'Jackhammer is an opinionated facade over RabbitMQ Bunny'
15
14
  spec.homepage = 'https://github.com/renofi/jackhammer'
16
15
  spec.license = 'MIT'
17
16
 
18
17
  spec.metadata['homepage_uri'] = spec.homepage
19
18
  spec.metadata['source_code_uri'] = spec.homepage
20
- spec.metadata['changelog_uri'] = spec.homepage
21
19
 
22
- # Specify which files should be added to the gem when it is released.
23
- # The `git ls-files -z` loads the files in the RubyGem that have been added into git.
24
20
  spec.files = Dir.chdir(File.expand_path(__dir__)) do
25
- `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
21
+ `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(bin/|spec/|\.rub)}) }
26
22
  end
27
23
  spec.bindir = 'exe'
28
24
  spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
29
25
  spec.require_paths = ['lib']
30
26
 
31
27
  spec.add_dependency 'bunny', '~> 2.14'
32
- spec.add_development_dependency 'bundler', '~> 2.0'
33
- spec.add_development_dependency 'bunny-mock', '~> 1.7'
34
- spec.add_development_dependency 'rake', '~> 13.0'
35
- spec.add_development_dependency 'rspec', '~> 3.0'
36
- spec.add_development_dependency 'rubocop', '~> 0.74'
37
- spec.add_development_dependency 'rubocop-performance', '~> 1.5.0'
28
+
29
+ spec.add_development_dependency 'bundler'
30
+ spec.add_development_dependency 'bunny-mock'
31
+ spec.add_development_dependency 'rake'
32
+ spec.add_development_dependency 'rspec'
33
+ spec.add_development_dependency 'rubocop'
34
+ spec.add_development_dependency 'rubocop-performance'
38
35
  spec.add_development_dependency 'byebug'
39
36
  end
@@ -0,0 +1 @@
1
+ InvalidConfigError = Class.new(StandardError)
@@ -4,12 +4,13 @@ module Jackhammer
4
4
  class TopicManager
5
5
  class << self
6
6
  def topics
7
- topics = {}
7
+ result = {}
8
8
  Jackhammer.configuration.yaml.each do |topic, topic_config|
9
+ fail(InvalidConfigError, "Topic config is invalid") unless topic_config.is_a?(Hash)
9
10
  queues = topic_config.delete 'queues'
10
- topics[topic.to_sym] = Topic.new(name: topic, options: topic_config, queue_config: queues)
11
+ result[topic.to_sym] = Topic.new(name: topic, options: topic_config, queue_config: queues)
11
12
  end
12
- topics
13
+ result
13
14
  end
14
15
  end
15
16
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Jackhammer
4
- VERSION = '0.2.2'
4
+ VERSION = '0.2.3'
5
5
  end
data/lib/jackhammer.rb CHANGED
@@ -5,6 +5,7 @@ require 'forwardable'
5
5
  require 'yaml'
6
6
  require 'bunny'
7
7
  require 'jackhammer/version'
8
+ require 'jackhammer/exceptions'
8
9
  require 'jackhammer/log'
9
10
  require 'jackhammer/configuration'
10
11
  require 'jackhammer/message_receiver'
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: jackhammer
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.2
4
+ version: 0.2.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Scott Serok
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2019-11-15 00:00:00.000000000 Z
11
+ date: 2019-12-19 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bunny
@@ -28,86 +28,86 @@ dependencies:
28
28
  name: bundler
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
- - - "~>"
31
+ - - ">="
32
32
  - !ruby/object:Gem::Version
33
- version: '2.0'
33
+ version: '0'
34
34
  type: :development
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: '2.0'
40
+ version: '0'
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: bunny-mock
43
43
  requirement: !ruby/object:Gem::Requirement
44
44
  requirements:
45
- - - "~>"
45
+ - - ">="
46
46
  - !ruby/object:Gem::Version
47
- version: '1.7'
47
+ version: '0'
48
48
  type: :development
49
49
  prerelease: false
50
50
  version_requirements: !ruby/object:Gem::Requirement
51
51
  requirements:
52
- - - "~>"
52
+ - - ">="
53
53
  - !ruby/object:Gem::Version
54
- version: '1.7'
54
+ version: '0'
55
55
  - !ruby/object:Gem::Dependency
56
56
  name: rake
57
57
  requirement: !ruby/object:Gem::Requirement
58
58
  requirements:
59
- - - "~>"
59
+ - - ">="
60
60
  - !ruby/object:Gem::Version
61
- version: '13.0'
61
+ version: '0'
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
- version: '13.0'
68
+ version: '0'
69
69
  - !ruby/object:Gem::Dependency
70
70
  name: rspec
71
71
  requirement: !ruby/object:Gem::Requirement
72
72
  requirements:
73
- - - "~>"
73
+ - - ">="
74
74
  - !ruby/object:Gem::Version
75
- version: '3.0'
75
+ version: '0'
76
76
  type: :development
77
77
  prerelease: false
78
78
  version_requirements: !ruby/object:Gem::Requirement
79
79
  requirements:
80
- - - "~>"
80
+ - - ">="
81
81
  - !ruby/object:Gem::Version
82
- version: '3.0'
82
+ version: '0'
83
83
  - !ruby/object:Gem::Dependency
84
84
  name: rubocop
85
85
  requirement: !ruby/object:Gem::Requirement
86
86
  requirements:
87
- - - "~>"
87
+ - - ">="
88
88
  - !ruby/object:Gem::Version
89
- version: '0.74'
89
+ version: '0'
90
90
  type: :development
91
91
  prerelease: false
92
92
  version_requirements: !ruby/object:Gem::Requirement
93
93
  requirements:
94
- - - "~>"
94
+ - - ">="
95
95
  - !ruby/object:Gem::Version
96
- version: '0.74'
96
+ version: '0'
97
97
  - !ruby/object:Gem::Dependency
98
98
  name: rubocop-performance
99
99
  requirement: !ruby/object:Gem::Requirement
100
100
  requirements:
101
- - - "~>"
101
+ - - ">="
102
102
  - !ruby/object:Gem::Version
103
- version: 1.5.0
103
+ version: '0'
104
104
  type: :development
105
105
  prerelease: false
106
106
  version_requirements: !ruby/object:Gem::Requirement
107
107
  requirements:
108
- - - "~>"
108
+ - - ">="
109
109
  - !ruby/object:Gem::Version
110
- version: 1.5.0
110
+ version: '0'
111
111
  - !ruby/object:Gem::Dependency
112
112
  name: byebug
113
113
  requirement: !ruby/object:Gem::Requirement
@@ -122,7 +122,7 @@ dependencies:
122
122
  - - ">="
123
123
  - !ruby/object:Gem::Version
124
124
  version: '0'
125
- description: Jackhammer is an opinionated facde over RabbitMQ Bunny
125
+ description:
126
126
  email:
127
127
  - scott@renofi.com
128
128
  executables:
@@ -132,7 +132,6 @@ extra_rdoc_files: []
132
132
  files:
133
133
  - ".gitignore"
134
134
  - ".rspec"
135
- - ".rubocop.yml"
136
135
  - ".travis.yml"
137
136
  - CODE_OF_CONDUCT.md
138
137
  - Gemfile
@@ -140,13 +139,12 @@ files:
140
139
  - LICENSE.txt
141
140
  - README.md
142
141
  - Rakefile
143
- - bin/console
144
- - bin/setup
145
142
  - exe/jackhammer
146
143
  - jackhammer.gemspec
147
144
  - lib/jackhammer.rb
148
145
  - lib/jackhammer/cli.rb
149
146
  - lib/jackhammer/configuration.rb
147
+ - lib/jackhammer/exceptions.rb
150
148
  - lib/jackhammer/log.rb
151
149
  - lib/jackhammer/message_receiver.rb
152
150
  - lib/jackhammer/queue.rb
@@ -160,7 +158,6 @@ licenses:
160
158
  metadata:
161
159
  homepage_uri: https://github.com/renofi/jackhammer
162
160
  source_code_uri: https://github.com/renofi/jackhammer
163
- changelog_uri: https://github.com/renofi/jackhammer
164
161
  post_install_message:
165
162
  rdoc_options: []
166
163
  require_paths:
@@ -179,5 +176,5 @@ requirements: []
179
176
  rubygems_version: 3.0.6
180
177
  signing_key:
181
178
  specification_version: 4
182
- summary: Jackhammer is an opinionated facde over RabbitMQ Bunny
179
+ summary: Jackhammer is an opinionated facade over RabbitMQ Bunny
183
180
  test_files: []
data/.rubocop.yml DELETED
@@ -1,9 +0,0 @@
1
- require:
2
- - rubocop-performance
3
-
4
- inherit_from:
5
- - https://raw.githubusercontent.com/RenoFi/rubocop/master/ruby.yml
6
-
7
- AllCops:
8
- TargetRailsVersion: 5.2
9
- TargetRubyVersion: 2.6
data/bin/console DELETED
@@ -1,15 +0,0 @@
1
- #!/usr/bin/env ruby
2
- # frozen_string_literal: true
3
-
4
- require 'bundler/setup'
5
- require 'jackhammer'
6
-
7
- # You can add fixtures and/or initialization code here to make experimenting
8
- # with your gem easier. You can also use a different console, if you like.
9
-
10
- # (If you use this, don't forget to add pry to your Gemfile!)
11
- # require "pry"
12
- # Pry.start
13
-
14
- require 'irb'
15
- IRB.start(__FILE__)
data/bin/setup DELETED
@@ -1,8 +0,0 @@
1
- #!/usr/bin/env bash
2
- set -euo pipefail
3
- IFS=$'\n\t'
4
- set -vx
5
-
6
- bundle install
7
-
8
- # Do any other automated setup that you need to do here