worker-glass 0.2.0 → 0.2.1

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: f20197a329197164ab1cbd91a21d25180a871cc8
4
- data.tar.gz: 56dbd94122c19db5ed9b2d90e16d102dc55324e9
3
+ metadata.gz: dbf4dfacf5492898da2958ab96cf2e412d5719cd
4
+ data.tar.gz: 9c6ae556430b159b083fe4c96a8dd8ed592a69eb
5
5
  SHA512:
6
- metadata.gz: e943604a60634a4c019043599e7d7b502cb9525add70048417d7e2dd2fe562fa1f84dc3f942b4b13d8b0d1223dd76df79939606adf5407ba068327f67ed9f6c6
7
- data.tar.gz: e7aaa1fcaafe67f09a06c4bef79fdb258d5c61efa675369cd5858d0f7b9e4ecc9d28add7ab73d31be3c06aefe194f3d904783c58177dd8a413785474a4c6ccd4
6
+ metadata.gz: 62822676b6558be3229c792316bd0bffcec1149f3f65504c2229e64180688e87c00de58a89195eaaa0865bf2c698d0ec788ab2cfab934ed11b907c3cb795c0ee
7
+ data.tar.gz: 74012f663fc8c8411bae82a36c0f726ec28e2684e603f9a768211c9faa30313f96bd6cf315ff78ffd3b0576cd6e27444a5fcf16d6246c6eae4fffb05c395c77e
data/.ruby-version CHANGED
@@ -1 +1 @@
1
- 2.2.3
1
+ 2.3.0
data/.travis.yml CHANGED
@@ -2,5 +2,6 @@ language: ruby
2
2
  rvm:
3
3
  - 2.1.7
4
4
  - 2.2.3
5
+ - 2.3.0
5
6
  script:
6
7
  - bundle exec rake
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- worker-glass (0.2.0)
4
+ worker-glass (0.2.1)
5
5
  activesupport
6
6
  null-logger
7
7
 
@@ -9,10 +9,10 @@ GEM
9
9
  remote: https://rubygems.org/
10
10
  specs:
11
11
  abstract_type (0.0.7)
12
- activemodel (4.2.5)
13
- activesupport (= 4.2.5)
12
+ activemodel (4.2.5.1)
13
+ activesupport (= 4.2.5.1)
14
14
  builder (~> 3.1)
15
- activesupport (4.2.5)
15
+ activesupport (4.2.5.1)
16
16
  i18n (~> 0.7)
17
17
  json (~> 1.7, >= 1.7.7)
18
18
  minitest (~> 5.1)
@@ -21,14 +21,12 @@ GEM
21
21
  adamantium (0.2.0)
22
22
  ice_nine (~> 0.11.0)
23
23
  memoizable (~> 0.4.0)
24
- ast (2.1.0)
25
- astrolabe (1.3.1)
26
- parser (~> 2.2)
24
+ ast (2.2.0)
27
25
  axiom-types (0.1.1)
28
26
  descendants_tracker (~> 0.0.4)
29
27
  ice_nine (~> 0.11.0)
30
28
  thread_safe (~> 0.3, >= 0.3.1)
31
- brakeman (3.1.3)
29
+ brakeman (3.1.4)
32
30
  erubis (~> 2.6)
33
31
  fastercsv (~> 1.5)
34
32
  haml (>= 3.0, < 5.0)
@@ -40,13 +38,14 @@ GEM
40
38
  sass (~> 3.0)
41
39
  slim (>= 1.3.6, < 4.0)
42
40
  terminal-table (~> 1.4)
43
- bson (4.0.0)
41
+ bson (4.0.1)
44
42
  builder (3.2.2)
45
43
  codeclimate-engine-rb (0.1.0)
46
44
  virtus (~> 1.0)
47
45
  coderay (1.1.0)
48
46
  coercible (1.0.0)
49
47
  descendants_tracker (~> 0.0.1)
48
+ colorize (0.7.7)
50
49
  concord (0.1.5)
51
50
  adamantium (~> 0.2.0)
52
51
  equalizer (~> 0.0.9)
@@ -78,10 +77,10 @@ GEM
78
77
  memoizable (0.4.2)
79
78
  thread_safe (~> 0.3, >= 0.3.1)
80
79
  method_source (0.8.2)
81
- minitest (5.8.3)
82
- mongo (2.2.1)
80
+ minitest (5.8.4)
81
+ mongo (2.2.2)
83
82
  bson (~> 4.0)
84
- mongoid (5.0.1)
83
+ mongoid (5.0.2)
85
84
  activemodel (~> 4.0)
86
85
  mongo (~> 2.1)
87
86
  origin (~> 2.1)
@@ -92,9 +91,9 @@ GEM
92
91
  rspec (~> 3.3)
93
92
  multi_json (1.11.2)
94
93
  null-logger (0.1.0)
95
- origin (2.1.1)
96
- parser (2.2.3.0)
97
- ast (>= 1.1, < 3.0)
94
+ origin (2.2.0)
95
+ parser (2.3.0.2)
96
+ ast (~> 2.2)
98
97
  polishgeeks-dev-tools (1.2.1)
99
98
  brakeman
100
99
  faker
@@ -115,9 +114,9 @@ GEM
115
114
  coderay (~> 1.1.0)
116
115
  method_source (~> 0.8.1)
117
116
  slop (~> 3.4)
118
- rainbow (2.0.0)
119
- rake (10.4.2)
120
- reek (3.7.1)
117
+ rainbow (2.1.0)
118
+ rake (10.5.0)
119
+ reek (3.8.1)
121
120
  codeclimate-engine-rb (~> 0.1.0)
122
121
  parser (~> 2.2, >= 2.2.2.5)
123
122
  private_attr (~> 1.1)
@@ -132,32 +131,31 @@ GEM
132
131
  rspec-expectations (3.4.0)
133
132
  diff-lcs (>= 1.2.0, < 2.0)
134
133
  rspec-support (~> 3.4.0)
135
- rspec-mocks (3.4.0)
134
+ rspec-mocks (3.4.1)
136
135
  diff-lcs (>= 1.2.0, < 2.0)
137
136
  rspec-support (~> 3.4.0)
138
137
  rspec-support (3.4.1)
139
- rubocop (0.35.1)
140
- astrolabe (~> 1.3)
141
- parser (>= 2.2.3.0, < 3.0)
138
+ rubocop (0.36.0)
139
+ parser (>= 2.3.0.0, < 3.0)
142
140
  powerpack (~> 0.1)
143
141
  rainbow (>= 1.99.1, < 3.0)
144
142
  ruby-progressbar (~> 1.7)
145
- tins (<= 1.6.0)
146
143
  ruby-progressbar (1.7.5)
147
144
  ruby2ruby (2.2.0)
148
145
  ruby_parser (~> 3.1)
149
146
  sexp_processor (~> 4.0)
150
- ruby_parser (3.7.2)
147
+ ruby_parser (3.7.3)
151
148
  sexp_processor (~> 4.1)
152
- rubycritic (2.3.0)
149
+ rubycritic (2.6.0)
150
+ colorize
153
151
  flay (= 2.6.1)
154
152
  flog (= 4.3.2)
155
153
  parser (>= 2.2.0, < 3.0)
156
- reek (= 3.7.1)
154
+ reek (= 3.8.1)
157
155
  virtus (~> 1.0)
158
156
  safe_yaml (1.0.4)
159
- sass (3.4.20)
160
- sexp_processor (4.6.0)
157
+ sass (3.4.21)
158
+ sexp_processor (4.6.1)
161
159
  shoulda (3.5.0)
162
160
  shoulda-context (~> 1.0, >= 1.0.1)
163
161
  shoulda-matchers (>= 1.4.1, < 3.0)
@@ -177,18 +175,17 @@ GEM
177
175
  temple (0.7.6)
178
176
  terminal-table (1.5.2)
179
177
  thread_safe (0.3.5)
180
- tilt (2.0.1)
178
+ tilt (2.0.2)
181
179
  timecop (0.8.0)
182
- tins (1.6.0)
183
180
  tzinfo (1.2.2)
184
181
  thread_safe (~> 0.1)
185
- unparser (0.2.4)
182
+ unparser (0.2.5)
186
183
  abstract_type (~> 0.0.7)
187
184
  adamantium (~> 0.2.0)
188
185
  concord (~> 0.1.5)
189
186
  diff-lcs (~> 1.2.5)
190
187
  equalizer (~> 0.0.9)
191
- parser (~> 2.2.2)
188
+ parser (~> 2.3.0)
192
189
  procto (~> 0.0.2)
193
190
  virtus (1.0.5)
194
191
  axiom-types (~> 0.1)
@@ -205,4 +202,4 @@ DEPENDENCIES
205
202
  worker-glass!
206
203
 
207
204
  BUNDLED WITH
208
- 1.10.6
205
+ 1.11.2
data/README.md CHANGED
@@ -34,7 +34,7 @@ WorkerGlass has few submodules that you can prepend to your workers to obtain gi
34
34
  If you want to provide timeouts for your workers, just prepend WorkerGlass::Timeout to your worker and set the timeout value:
35
35
 
36
36
  ```ruby
37
- class Worker2 < WorkerGlass::Worker
37
+ class Worker2
38
38
  prepend WorkerGlass::Timeout
39
39
 
40
40
  self.timeout = 60 # 1 minute timeout
@@ -52,7 +52,7 @@ Worker2.perform_async(example1, example2, example3)
52
52
  If you want to provide reentrancy for your workers, just include WorkerGlass::Reentrancy to your worker and define **after_failure** method that will be executed uppon failure:
53
53
 
54
54
  ```ruby
55
- class Worker3 < WorkerGlass::Worker
55
+ class Worker3
56
56
  include WorkerGlass::Reentrancy
57
57
 
58
58
  def perform(first_param, second_param, third_param)
@@ -23,6 +23,7 @@ module WorkerGlass
23
23
  # @raise [WorkerGlass::Errors::TimeoutNotDefined] if we didn't define timeout
24
24
  def perform(*args)
25
25
  fail Errors::TimeoutNotDefined unless self.class.timeout
26
+
26
27
  ::Timeout.timeout(self.class.timeout, Errors::TimeoutError) { super }
27
28
  end
28
29
  end
@@ -1,5 +1,6 @@
1
+ # frozen_string_literal: true
1
2
  # Main wrapper
2
3
  module WorkerGlass
3
4
  # Current version of WorkerGlass gem
4
- VERSION = '0.2.0'
5
+ VERSION = '0.2.1'.freeze
5
6
  end
data/worker-glass.gemspec CHANGED
@@ -1,6 +1,6 @@
1
1
  lib = File.expand_path('../lib', __FILE__)
2
2
  $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
3
- require 'rake'
3
+
4
4
  require 'worker_glass/version'
5
5
 
6
6
  Gem::Specification.new do |spec|
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: worker-glass
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Maciej Mensfeld
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2015-12-17 00:00:00.000000000 Z
12
+ date: 2016-01-26 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: null-logger
@@ -84,7 +84,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
84
84
  version: '0'
85
85
  requirements: []
86
86
  rubyforge_project:
87
- rubygems_version: 2.4.8
87
+ rubygems_version: 2.5.1
88
88
  signing_key:
89
89
  specification_version: 4
90
90
  summary: Timeout and Reentrancy for your background processing workers!