dispatch-rider 1.8.3 → 1.8.4

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
  SHA1:
3
- metadata.gz: 69577b88168f4ddb710d74d8552afce02c04d9a9
4
- data.tar.gz: bdc983fa2c33781cd4f7d7565913a4526324b2b9
3
+ metadata.gz: df7b869b4f2f8bf0c8a1127c02e9431f133af311
4
+ data.tar.gz: acf144ab31fb5752f18d765591fbfd46a2b028ff
5
5
  SHA512:
6
- metadata.gz: bd39b29442884ed7e6be32a437c6b6cabb6b3f34224124d513eef51f358bb11a91256d2500e3d5c6a0abb7982ec5a96c97ec1b36f98be3c2864936db467106af
7
- data.tar.gz: 97385b2ac0bf8236336a7b471c333bd7b6d06a1e8acb9a91cdf863e742558f4567182aa35e0719c3d98dd3b717a04b876bed04ba429a028130f91efabebd3e59
6
+ metadata.gz: 06e7944d5a52c584460f5616f45a23e2a137bb16b505c653e3f301d611fafcc3f4e7e8d9f1eac90f473f4cd085da077c1b299422e7f249a32ed193d7891afe8c
7
+ data.tar.gz: 64e66b6b04caee2d4c090d5f3a120315efe772ddff90938c67175d28d2ff6becd770ffe570e42ea5695d6c3cdebed47fc8ecd7960cdd43e52dbe1622f0657bbc
@@ -1,5 +1,10 @@
1
1
  language: ruby
2
+ addons:
3
+ apt:
4
+ packages:
5
+ - libgmp-dev
2
6
  rvm:
3
- - "2.1.5"
4
- - "2.2.1"
7
+ - 2.1.8
8
+ - 2.2.4
9
+ - 2.3.0
5
10
  script: "bundle exec rspec"
data/Gemfile CHANGED
@@ -1,26 +1,3 @@
1
1
  source 'https://rubygems.org'
2
2
 
3
3
  gemspec
4
-
5
- # only add dev/test gems here, runtime gems should go in the gemspec
6
-
7
- # Base
8
- gem "bundler"
9
- gem "rake"
10
-
11
- # Gem Stuff
12
- gem 'rubygems-tasks'
13
- gem 'github_changelog_generator'
14
- gem 'yard'
15
-
16
- # Testing
17
- gem "rspec", "~> 3.3"
18
- gem "factory_girl"
19
-
20
- # CI
21
- gem "travis-lint"
22
-
23
- # Dev/Debugging
24
- gem "byebug", platform: :ruby_20, require: !ENV['CI']
25
- gem "aws-sdk", "~> 1"
26
- gem "pry"
@@ -33,18 +33,27 @@ Gem::Specification.new do |gem|
33
33
  "piotr@payrollhero.com",
34
34
  "rmaravilla@payrollhero.com",
35
35
  ]
36
- gem.homepage = "https://github.com/payrollhero/dispatch-rider"
36
+ gem.homepage = 'https://github.com/payrollhero/dispatch-rider'
37
37
  gem.files = `git ls-files`.split($/)
38
- gem.executables = gem.files.grep(%r{^bin/}).map{ |f| File.basename(f) }
38
+ gem.executables = gem.files.grep(%r{^bin/}).map { |f| File.basename(f) }
39
39
  gem.test_files = gem.files.grep(%r{^(test|spec|features)/})
40
40
  gem.require_paths = ['lib']
41
41
 
42
- gem.add_runtime_dependency 'activesupport', ">= 3.2.0"
43
- gem.add_runtime_dependency 'activemodel', ">= 3.2.0"
44
- gem.add_runtime_dependency "activerecord", ">= 3.2.0"
45
- gem.add_runtime_dependency 'daemons', "~> 1.2"
46
- gem.add_runtime_dependency 'retries', "~> 0.0", ">= 0.0.5"
42
+ gem.add_runtime_dependency 'activesupport', '>= 3.2.0'
43
+ gem.add_runtime_dependency 'activemodel', '>= 3.2.0'
44
+ gem.add_runtime_dependency 'activerecord', '>= 3.2.0'
45
+ gem.add_runtime_dependency 'daemons', '~> 1.2'
46
+ gem.add_runtime_dependency 'retries', '~> 0.0', '>= 0.0.5'
47
47
  gem.add_runtime_dependency 'appsignal', '~> 1.0'
48
48
 
49
- gem.add_development_dependency "sqlite3"
49
+ gem.add_development_dependency 'bundler', '~> 1.0'
50
+ gem.add_development_dependency 'rake'
51
+ gem.add_development_dependency 'sqlite3'
52
+ gem.add_development_dependency 'rubygems-tasks'
53
+ gem.add_development_dependency 'github_changelog_generator'
54
+ gem.add_development_dependency 'yard'
55
+ gem.add_development_dependency 'rspec', '~> 3.3'
56
+ gem.add_development_dependency 'factory_girl'
57
+ gem.add_development_dependency 'aws-sdk', '~> 1'
58
+ gem.add_development_dependency 'pry'
50
59
  end
@@ -6,31 +6,20 @@ if defined? Appsignal
6
6
  module Appsignal
7
7
 
8
8
  def self.wrap_message(job, message)
9
- begin
10
- ::Appsignal::Transaction.create(
11
- SecureRandom.uuid,
12
- ::Appsignal::Transaction::BACKGROUND_JOB,
13
- ::Appsignal::Transaction::GenericRequest.new(ENV.to_hash)
14
- )
15
-
16
- ::ActiveSupport::Notifications.instrument(
17
- 'perform_job.dispatch-rider',
18
- :class => message.subject,
19
- :method => 'handle',
20
- :attempts => message.receive_count,
21
- :queue => message.queue_name,
22
- :queue_time => (Time.now.to_f - message.sent_at.to_f) * 1000
23
- ) do
24
- job.call
25
- end
26
- rescue Exception => exception
27
- unless ::Appsignal.is_ignored_error?(exception)
28
- ::Appsignal::Transaction.current.add_exception(exception)
29
- end
30
- raise exception
31
- ensure
32
- ::Appsignal::Transaction.complete_current!
9
+ ::Appsignal.start
10
+
11
+ ::Appsignal.monitor_transaction(
12
+ 'perform_job.dispatch-rider',
13
+ class: message.subject,
14
+ method: 'handle',
15
+ attempts: message.receive_count,
16
+ queue: message.queue_name,
17
+ queue_time: (Time.now.to_f - message.sent_at.to_f) * 1000,
18
+ ) do
19
+ job.call
33
20
  end
21
+
22
+ ::Appsignal.stop
34
23
  end
35
24
 
36
25
  end
@@ -45,8 +34,4 @@ if defined? Appsignal
45
34
 
46
35
  end
47
36
 
48
- if ::Appsignal.active?
49
- ::Appsignal.start
50
- end
51
-
52
37
  end
@@ -1,4 +1,4 @@
1
1
  # This file specifies the current version of the gem.
2
2
  module DispatchRider
3
- VERSION = "1.8.3"
3
+ VERSION = "1.8.4"
4
4
  end
@@ -17,7 +17,7 @@ describe DispatchRider::Publisher::ConfigurationReader do
17
17
  it "requires 2 paramaters" do
18
18
  expect {
19
19
  subject.load_config
20
- }.to raise_exception(ArgumentError, /0 for 2/)
20
+ }.to raise_exception(ArgumentError)
21
21
  end
22
22
 
23
23
  it "deals with an empty configuration hash" do
@@ -1,15 +1,10 @@
1
- $LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '..', 'lib'))
2
- $LOAD_PATH.unshift(File.dirname(__FILE__))
3
-
4
- Bundler.require
5
-
6
- require 'aws'
7
- require 'rake'
8
- require 'tempfile'
9
- require "sqlite3"
1
+ require 'bundler'
10
2
 
3
+ Bundler.setup
4
+ Bundler.require(:default, :development)
11
5
 
12
6
  require 'dispatch-rider'
7
+
13
8
  Dir['./spec/support/**/*.rb'].each { |fn| require(fn) }
14
9
 
15
10
  FactoryGirl.definition_file_paths = %w{spec/factories/}
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: dispatch-rider
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.8.3
4
+ version: 1.8.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Suman Mukherjee
@@ -11,7 +11,7 @@ authors:
11
11
  autorequire:
12
12
  bindir: bin
13
13
  cert_chain: []
14
- date: 2016-01-19 00:00:00.000000000 Z
14
+ date: 2016-02-09 00:00:00.000000000 Z
15
15
  dependencies:
16
16
  - !ruby/object:Gem::Dependency
17
17
  name: activesupport
@@ -103,6 +103,34 @@ dependencies:
103
103
  - - "~>"
104
104
  - !ruby/object:Gem::Version
105
105
  version: '1.0'
106
+ - !ruby/object:Gem::Dependency
107
+ name: bundler
108
+ requirement: !ruby/object:Gem::Requirement
109
+ requirements:
110
+ - - "~>"
111
+ - !ruby/object:Gem::Version
112
+ version: '1.0'
113
+ type: :development
114
+ prerelease: false
115
+ version_requirements: !ruby/object:Gem::Requirement
116
+ requirements:
117
+ - - "~>"
118
+ - !ruby/object:Gem::Version
119
+ version: '1.0'
120
+ - !ruby/object:Gem::Dependency
121
+ name: rake
122
+ requirement: !ruby/object:Gem::Requirement
123
+ requirements:
124
+ - - ">="
125
+ - !ruby/object:Gem::Version
126
+ version: '0'
127
+ type: :development
128
+ prerelease: false
129
+ version_requirements: !ruby/object:Gem::Requirement
130
+ requirements:
131
+ - - ">="
132
+ - !ruby/object:Gem::Version
133
+ version: '0'
106
134
  - !ruby/object:Gem::Dependency
107
135
  name: sqlite3
108
136
  requirement: !ruby/object:Gem::Requirement
@@ -117,6 +145,104 @@ dependencies:
117
145
  - - ">="
118
146
  - !ruby/object:Gem::Version
119
147
  version: '0'
148
+ - !ruby/object:Gem::Dependency
149
+ name: rubygems-tasks
150
+ requirement: !ruby/object:Gem::Requirement
151
+ requirements:
152
+ - - ">="
153
+ - !ruby/object:Gem::Version
154
+ version: '0'
155
+ type: :development
156
+ prerelease: false
157
+ version_requirements: !ruby/object:Gem::Requirement
158
+ requirements:
159
+ - - ">="
160
+ - !ruby/object:Gem::Version
161
+ version: '0'
162
+ - !ruby/object:Gem::Dependency
163
+ name: github_changelog_generator
164
+ requirement: !ruby/object:Gem::Requirement
165
+ requirements:
166
+ - - ">="
167
+ - !ruby/object:Gem::Version
168
+ version: '0'
169
+ type: :development
170
+ prerelease: false
171
+ version_requirements: !ruby/object:Gem::Requirement
172
+ requirements:
173
+ - - ">="
174
+ - !ruby/object:Gem::Version
175
+ version: '0'
176
+ - !ruby/object:Gem::Dependency
177
+ name: yard
178
+ requirement: !ruby/object:Gem::Requirement
179
+ requirements:
180
+ - - ">="
181
+ - !ruby/object:Gem::Version
182
+ version: '0'
183
+ type: :development
184
+ prerelease: false
185
+ version_requirements: !ruby/object:Gem::Requirement
186
+ requirements:
187
+ - - ">="
188
+ - !ruby/object:Gem::Version
189
+ version: '0'
190
+ - !ruby/object:Gem::Dependency
191
+ name: rspec
192
+ requirement: !ruby/object:Gem::Requirement
193
+ requirements:
194
+ - - "~>"
195
+ - !ruby/object:Gem::Version
196
+ version: '3.3'
197
+ type: :development
198
+ prerelease: false
199
+ version_requirements: !ruby/object:Gem::Requirement
200
+ requirements:
201
+ - - "~>"
202
+ - !ruby/object:Gem::Version
203
+ version: '3.3'
204
+ - !ruby/object:Gem::Dependency
205
+ name: factory_girl
206
+ requirement: !ruby/object:Gem::Requirement
207
+ requirements:
208
+ - - ">="
209
+ - !ruby/object:Gem::Version
210
+ version: '0'
211
+ type: :development
212
+ prerelease: false
213
+ version_requirements: !ruby/object:Gem::Requirement
214
+ requirements:
215
+ - - ">="
216
+ - !ruby/object:Gem::Version
217
+ version: '0'
218
+ - !ruby/object:Gem::Dependency
219
+ name: aws-sdk
220
+ requirement: !ruby/object:Gem::Requirement
221
+ requirements:
222
+ - - "~>"
223
+ - !ruby/object:Gem::Version
224
+ version: '1'
225
+ type: :development
226
+ prerelease: false
227
+ version_requirements: !ruby/object:Gem::Requirement
228
+ requirements:
229
+ - - "~>"
230
+ - !ruby/object:Gem::Version
231
+ version: '1'
232
+ - !ruby/object:Gem::Dependency
233
+ name: pry
234
+ requirement: !ruby/object:Gem::Requirement
235
+ requirements:
236
+ - - ">="
237
+ - !ruby/object:Gem::Version
238
+ version: '0'
239
+ type: :development
240
+ prerelease: false
241
+ version_requirements: !ruby/object:Gem::Requirement
242
+ requirements:
243
+ - - ">="
244
+ - !ruby/object:Gem::Version
245
+ version: '0'
120
246
  description: "\n Messaging system based on the reactor pattern.\n\n You can
121
247
  publish messages to a queue and then a demultiplexer\n runs an event loop which
122
248
  pops items from the queue and hands\n it over to a dispatcher.\n\n The dispatcher
@@ -289,7 +415,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
289
415
  version: '0'
290
416
  requirements: []
291
417
  rubyforge_project:
292
- rubygems_version: 2.2.2
418
+ rubygems_version: 2.5.1
293
419
  signing_key:
294
420
  specification_version: 4
295
421
  summary: Messaging system that is customizable based on which queueing system we are