sidekiq_portal 0.2.0 → 0.3.0

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: 23dc75354e3f173ffc8fdaa30634f08509374eaecb190226344073c5e1ba0bbe
4
- data.tar.gz: c457e2865d1fac05fc1822f4ba4fea2121b29c7649ffabcff91039cb50abde02
3
+ metadata.gz: 8e041720ca79f2811ce4ddf7d6a4d19b379b00138850ac0c7282163959f6014d
4
+ data.tar.gz: 7d6d2099a08cca8a4b094bb904236d2d905b61b52ed096aa4736f6b844ed0bae
5
5
  SHA512:
6
- metadata.gz: a156ef577a6b09f906819c16b31234ee6e053f2d4a179acdaf84089433b99669ea14101ded51cd211c45d01367acdd81d4eb5c2a389f6bdddb96c78db48f6dd9
7
- data.tar.gz: 92e396e45095fe17dd02f2ad2c1b58fc3f5e342ec45771b78d8a89cba6491d54b22037fd697378234ce202e5fadeea505a42acadb8b3ca620c2b0bd8e2450148
6
+ metadata.gz: 8adb5904a88a07aa6bf24966deb498d6e65d24d48942b2e2a286a4e7653042a14c248d3fbcee6d7d36440dd5a6ef0e371c307491459f1cab4b37713724269eff
7
+ data.tar.gz: 50e4e657dca7868b5b9b254b462129a97531e1e7f2c65173ac9855e8df90e2564bb27f353f92e21d8eb31b0cb57e0f80c71031c33b6cc14062025819263e49b2
data/.gitignore CHANGED
@@ -13,4 +13,3 @@
13
13
  /spec/artifacts/
14
14
  /gemfiles/*.gemfile.lock
15
15
  *.gem
16
- Gemfile.lock
data/.rubocop.yml CHANGED
@@ -5,7 +5,8 @@ inherit_gem:
5
5
  - lib/rubocop.rspec.yml
6
6
 
7
7
  AllCops:
8
- TargetRubyVersion: 2.4.9
8
+ TargetRubyVersion: 2.7.1
9
+ NewCops: enable
9
10
  Include:
10
11
  - lib/**/*.rb
11
12
  - spec/**/*.rb
data/.travis.yml CHANGED
@@ -1,14 +1,16 @@
1
- sudo: false
1
+ os: linux
2
+ dist: xenial
2
3
  language: ruby
3
4
  before_install: gem install bundler
4
5
  script: bundle exec rspec
5
6
  cache: bundler
6
- matrix:
7
+ jobs:
7
8
  fast_finish: true
8
9
  include:
9
- - rvm: 2.4.9
10
- - rvm: 2.5.7
11
- - rvm: 2.6.5
10
+ - rvm: 2.4.10
11
+ - rvm: 2.5.8
12
+ - rvm: 2.6.6
13
+ - rvm: 2.7.1
12
14
  - rvm: ruby-head
13
15
  - rvm: jruby-head
14
16
  allow_failures:
data/CHANGELOG.md CHANGED
@@ -1,6 +1,16 @@
1
1
  # Changelog
2
2
  All notable changes to this project will be documented in this file.
3
3
 
4
+ ## [0.3.0] - 2022-10-10
5
+ ### Added
6
+ - Support for Rails@7;
7
+ - Support for Sidekiq@6 and experimental Sidekiq@7;
8
+
9
+ ### Changed
10
+ - Updated development dependencies;
11
+ - Updated core dependencies (`qonfig`, `active_support`, `fugit`);
12
+ - Minimal Ruby version - `>= 2.5`;
13
+
4
14
  ## [0.2.0] - 2020-01-04
5
15
  ### Added
6
16
  - Sidekiq's job retry mechanism emulation;
data/Gemfile.lock ADDED
@@ -0,0 +1,120 @@
1
+ PATH
2
+ remote: .
3
+ specs:
4
+ sidekiq_portal (0.3.0)
5
+ activesupport (>= 4, <= 7)
6
+ fugit (~> 1.7)
7
+ qonfig (~> 0.28)
8
+
9
+ GEM
10
+ remote: https://rubygems.org/
11
+ specs:
12
+ activesupport (7.0.0)
13
+ concurrent-ruby (~> 1.0, >= 1.0.2)
14
+ i18n (>= 1.6, < 2)
15
+ minitest (>= 5.1)
16
+ tzinfo (~> 2.0)
17
+ armitage-rubocop (1.36.0)
18
+ rubocop (= 1.36.0)
19
+ rubocop-performance (= 1.15.0)
20
+ rubocop-rails (= 2.16.1)
21
+ rubocop-rake (= 0.6.0)
22
+ rubocop-rspec (= 2.13.2)
23
+ ast (2.4.2)
24
+ coderay (1.1.3)
25
+ concurrent-ruby (1.1.10)
26
+ connection_pool (2.3.0)
27
+ diff-lcs (1.5.0)
28
+ docile (1.4.0)
29
+ et-orbi (1.2.7)
30
+ tzinfo
31
+ fugit (1.7.1)
32
+ et-orbi (~> 1, >= 1.2.7)
33
+ raabro (~> 1.4)
34
+ i18n (1.12.0)
35
+ concurrent-ruby (~> 1.0)
36
+ json (2.6.2)
37
+ method_source (1.0.0)
38
+ minitest (5.16.3)
39
+ parallel (1.22.1)
40
+ parser (3.1.2.1)
41
+ ast (~> 2.4.1)
42
+ pry (0.14.1)
43
+ coderay (~> 1.1)
44
+ method_source (~> 1.0)
45
+ qonfig (0.28.0)
46
+ raabro (1.4.0)
47
+ rack (2.2.4)
48
+ rainbow (3.1.1)
49
+ rake (13.0.6)
50
+ redis (4.8.0)
51
+ regexp_parser (2.6.0)
52
+ rexml (3.2.5)
53
+ rspec (3.11.0)
54
+ rspec-core (~> 3.11.0)
55
+ rspec-expectations (~> 3.11.0)
56
+ rspec-mocks (~> 3.11.0)
57
+ rspec-core (3.11.0)
58
+ rspec-support (~> 3.11.0)
59
+ rspec-expectations (3.11.1)
60
+ diff-lcs (>= 1.2.0, < 2.0)
61
+ rspec-support (~> 3.11.0)
62
+ rspec-mocks (3.11.1)
63
+ diff-lcs (>= 1.2.0, < 2.0)
64
+ rspec-support (~> 3.11.0)
65
+ rspec-support (3.11.1)
66
+ rubocop (1.36.0)
67
+ json (~> 2.3)
68
+ parallel (~> 1.10)
69
+ parser (>= 3.1.2.1)
70
+ rainbow (>= 2.2.2, < 4.0)
71
+ regexp_parser (>= 1.8, < 3.0)
72
+ rexml (>= 3.2.5, < 4.0)
73
+ rubocop-ast (>= 1.20.1, < 2.0)
74
+ ruby-progressbar (~> 1.7)
75
+ unicode-display_width (>= 1.4.0, < 3.0)
76
+ rubocop-ast (1.21.0)
77
+ parser (>= 3.1.1.0)
78
+ rubocop-performance (1.15.0)
79
+ rubocop (>= 1.7.0, < 2.0)
80
+ rubocop-ast (>= 0.4.0)
81
+ rubocop-rails (2.16.1)
82
+ activesupport (>= 4.2.0)
83
+ rack (>= 1.1)
84
+ rubocop (>= 1.33.0, < 2.0)
85
+ rubocop-rake (0.6.0)
86
+ rubocop (~> 1.0)
87
+ rubocop-rspec (2.13.2)
88
+ rubocop (~> 1.33)
89
+ ruby-progressbar (1.11.0)
90
+ sidekiq (6.5.7)
91
+ connection_pool (>= 2.2.5)
92
+ rack (~> 2.0)
93
+ redis (>= 4.5.0, < 5)
94
+ simplecov (0.21.2)
95
+ docile (~> 1.1)
96
+ simplecov-html (~> 0.11)
97
+ simplecov_json_formatter (~> 0.1)
98
+ simplecov-html (0.12.3)
99
+ simplecov_json_formatter (0.1.4)
100
+ timecop (0.9.5)
101
+ tzinfo (2.0.5)
102
+ concurrent-ruby (~> 1.0)
103
+ unicode-display_width (2.3.0)
104
+
105
+ PLATFORMS
106
+ x86_64-darwin-20
107
+
108
+ DEPENDENCIES
109
+ armitage-rubocop (~> 1.36)
110
+ bundler (~> 2.3)
111
+ pry (~> 0.14)
112
+ rake (~> 13.0)
113
+ rspec (~> 3.11)
114
+ sidekiq (>= 5, <= 7)
115
+ sidekiq_portal!
116
+ simplecov (~> 0.21)
117
+ timecop (~> 0.9)
118
+
119
+ BUNDLED WITH
120
+ 2.3.22
data/README.md CHANGED
@@ -2,6 +2,10 @@
2
2
 
3
3
  > hackaton slides: [link](https://github.com/0exp/sidekiq_portal/blob/master/docs/umbrellio_hackaton_v1.0.pdf)
4
4
 
5
+ > meetup slides: [link](https://github.com/0exp/sidekiq_portal/blob/master/docs/sidekiq_portal_ruby_group_meetup.pdf)
6
+
7
+ > meetup video: [link](https://youtu.be/H3SafkpBQ_w?t=12288)
8
+
5
9
  **Sidekiq::Portal** - scheduled jobs runner for your test environments,
6
10
  which execution process must occur during the `Timecop.travel(...)` operations according to the scheduler config.
7
11
 
@@ -31,7 +35,7 @@ gem 'timecop', '~> 0.9' # runtime dependency
31
35
 
32
36
  group :test do
33
37
  gem 'rspec'
34
- gem 'sidekiq-portal'
38
+ gem 'sidekiq_portal'
35
39
  end
36
40
  ```
37
41
 
@@ -41,7 +45,7 @@ end
41
45
  bundle install
42
46
  ```
43
47
 
44
- - `scec_helper.rb`:
48
+ - `spec_helper.rb`:
45
49
 
46
50
  ```ruby
47
51
  require 'timecop' # runtime dependency
@@ -70,10 +74,10 @@ Sidekiq::Portal.setup! do |config|
70
74
  config.retry_on = [StandardError] # [StandardError] by default
71
75
 
72
76
  # pre-defined sidekiq-scheduler configs (Rails example)
73
- config.scheduler_cofnig = Rails.application.config_for(:sidekiq)[:schedule]
77
+ config.scheduler_config = Rails.application.config_for(:sidekiq)[:schedule]
74
78
 
75
79
  # manual sidekiq-scheduler configs
76
- config.schedluer_config = {
80
+ config.scheduler_config = {
77
81
  LoolJob: { every: '15m' },
78
82
  kek_job: { cron: '0 * * * * *', class: :KekJob }
79
83
  }
@@ -150,15 +154,20 @@ end
150
154
  (`Sidekiq::Testing.inline!` and `Sidekiq::Testing.fake` respectively);
151
155
  - support for `ActiveSupport::TimeZone` instances in `default_timezone` config;
152
156
  - rspec matchers;
153
- - `#reload!` should use previosly defined settings?;
157
+ - `#reload!` should use previously defined settings?;
154
158
  - support for `Sidekiq::Worker` job backend;
155
159
  - support for `Sidekiq::Cron` scheduler plans;
156
160
  - more specs;
157
161
  - documentation and examples for instance-based portals (`Sidekiq::Portal.new(&configuration)`);
158
- - job execution randomization (for jobs which should be invoked at the same time);
159
- - configurable in-line invokations (with job list config);
160
- - configurable and conditional portal invokation (run over all specs or only over the one or etc)
162
+ - configurable job execution randomization (for jobs which should be invoked at the same time)
163
+ (randomized invocation and not - at the same time or not);
164
+ - configurable in-line invocations (with job list config);
165
+ - configurable and conditional portal invocation (run over all specs or only over the one or etc)
161
166
  (suitable for unit tests);
167
+ - support for **Ruby 2.7**;
168
+ - **Time** as external dependency;
169
+ - getting rid of **ActiveSupport**'s **Time**-related core extensions;
170
+ - better specs;
162
171
 
163
172
  ## License
164
173
 
data/lib/portal/config.rb CHANGED
@@ -38,7 +38,7 @@ class Sidekiq::Portal::Config < Qonfig::DataSet
38
38
 
39
39
  # @since 0.1.0
40
40
  validate :default_timezone do |value|
41
- value.is_a?(String) && !ActiveSupport::TimeZone[value].nil?
41
+ value.is_a?(String) && ActiveSupport::TimeZone[value] != nil
42
42
  end
43
43
 
44
44
  # @since 0.1.0
@@ -10,6 +10,7 @@ module Sidekiq
10
10
  #
11
11
  # @api public
12
12
  # @since 0.1.0
13
- VERSION = '0.2.0'
13
+ # @version 0.3.0
14
+ VERSION = '0.3.0'
14
15
  end
15
16
  end
@@ -2,6 +2,7 @@
2
2
 
3
3
  require 'qonfig'
4
4
  require 'fugit'
5
+ require 'active_support/isolated_execution_state'
5
6
  require 'active_support/core_ext/numeric/time'
6
7
  require 'active_support/core_ext/time'
7
8
  require 'active_support/core_ext/time/calculations'
@@ -5,7 +5,7 @@ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
5
5
  require_relative 'lib/portal/version'
6
6
 
7
7
  Gem::Specification.new do |spec|
8
- spec.required_ruby_version = '>= 2.4.9'
8
+ spec.required_ruby_version = '>= 2.5'
9
9
 
10
10
  spec.name = 'sidekiq_portal'
11
11
  spec.version = Sidekiq::Portal::VERSION
@@ -28,18 +28,18 @@ Gem::Specification.new do |spec|
28
28
  f.match(%r{^(test|spec|features)/})
29
29
  end
30
30
 
31
- spec.add_dependency 'qonfig', '~> 0.23'
32
- spec.add_dependency 'fugit', '~> 1.3'
33
- spec.add_dependency 'activesupport', '>= 4', '< 7'
31
+ spec.add_dependency 'qonfig', '~> 0.28'
32
+ spec.add_dependency 'fugit', '~> 1.7'
33
+ spec.add_dependency 'activesupport', '>= 4', '<= 7'
34
34
 
35
- spec.add_development_dependency 'armitage-rubocop', '~> 0.78'
36
- spec.add_development_dependency 'rspec', '~> 3.9.0'
37
- spec.add_development_dependency 'simplecov', '~> 0.17.1'
35
+ spec.add_development_dependency 'armitage-rubocop', '~> 1.36'
36
+ spec.add_development_dependency 'rspec', '~> 3.11'
37
+ spec.add_development_dependency 'simplecov', '~> 0.21'
38
38
 
39
- spec.add_development_dependency 'sidekiq', '>= 5', '< 7'
39
+ spec.add_development_dependency 'sidekiq', '>= 5', '<= 7'
40
40
  spec.add_development_dependency 'timecop', '~> 0.9'
41
41
 
42
- spec.add_development_dependency 'bundler', '~> 2.1'
42
+ spec.add_development_dependency 'bundler', '~> 2.3'
43
43
  spec.add_development_dependency 'rake', '~> 13.0'
44
- spec.add_development_dependency 'pry', '~> 0.12'
44
+ spec.add_development_dependency 'pry', '~> 0.14'
45
45
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sidekiq_portal
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.3.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Rustam Ibragimov
8
- autorequire:
8
+ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-01-04 00:00:00.000000000 Z
11
+ date: 2022-10-10 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: qonfig
@@ -16,28 +16,28 @@ dependencies:
16
16
  requirements:
17
17
  - - "~>"
18
18
  - !ruby/object:Gem::Version
19
- version: '0.23'
19
+ version: '0.28'
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
- version: '0.23'
26
+ version: '0.28'
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: fugit
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
31
  - - "~>"
32
32
  - !ruby/object:Gem::Version
33
- version: '1.3'
33
+ version: '1.7'
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: '1.3'
40
+ version: '1.7'
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: activesupport
43
43
  requirement: !ruby/object:Gem::Requirement
@@ -45,7 +45,7 @@ dependencies:
45
45
  - - ">="
46
46
  - !ruby/object:Gem::Version
47
47
  version: '4'
48
- - - "<"
48
+ - - "<="
49
49
  - !ruby/object:Gem::Version
50
50
  version: '7'
51
51
  type: :runtime
@@ -55,7 +55,7 @@ dependencies:
55
55
  - - ">="
56
56
  - !ruby/object:Gem::Version
57
57
  version: '4'
58
- - - "<"
58
+ - - "<="
59
59
  - !ruby/object:Gem::Version
60
60
  version: '7'
61
61
  - !ruby/object:Gem::Dependency
@@ -64,42 +64,42 @@ dependencies:
64
64
  requirements:
65
65
  - - "~>"
66
66
  - !ruby/object:Gem::Version
67
- version: '0.78'
67
+ version: '1.36'
68
68
  type: :development
69
69
  prerelease: false
70
70
  version_requirements: !ruby/object:Gem::Requirement
71
71
  requirements:
72
72
  - - "~>"
73
73
  - !ruby/object:Gem::Version
74
- version: '0.78'
74
+ version: '1.36'
75
75
  - !ruby/object:Gem::Dependency
76
76
  name: rspec
77
77
  requirement: !ruby/object:Gem::Requirement
78
78
  requirements:
79
79
  - - "~>"
80
80
  - !ruby/object:Gem::Version
81
- version: 3.9.0
81
+ version: '3.11'
82
82
  type: :development
83
83
  prerelease: false
84
84
  version_requirements: !ruby/object:Gem::Requirement
85
85
  requirements:
86
86
  - - "~>"
87
87
  - !ruby/object:Gem::Version
88
- version: 3.9.0
88
+ version: '3.11'
89
89
  - !ruby/object:Gem::Dependency
90
90
  name: simplecov
91
91
  requirement: !ruby/object:Gem::Requirement
92
92
  requirements:
93
93
  - - "~>"
94
94
  - !ruby/object:Gem::Version
95
- version: 0.17.1
95
+ version: '0.21'
96
96
  type: :development
97
97
  prerelease: false
98
98
  version_requirements: !ruby/object:Gem::Requirement
99
99
  requirements:
100
100
  - - "~>"
101
101
  - !ruby/object:Gem::Version
102
- version: 0.17.1
102
+ version: '0.21'
103
103
  - !ruby/object:Gem::Dependency
104
104
  name: sidekiq
105
105
  requirement: !ruby/object:Gem::Requirement
@@ -107,7 +107,7 @@ dependencies:
107
107
  - - ">="
108
108
  - !ruby/object:Gem::Version
109
109
  version: '5'
110
- - - "<"
110
+ - - "<="
111
111
  - !ruby/object:Gem::Version
112
112
  version: '7'
113
113
  type: :development
@@ -117,7 +117,7 @@ dependencies:
117
117
  - - ">="
118
118
  - !ruby/object:Gem::Version
119
119
  version: '5'
120
- - - "<"
120
+ - - "<="
121
121
  - !ruby/object:Gem::Version
122
122
  version: '7'
123
123
  - !ruby/object:Gem::Dependency
@@ -140,14 +140,14 @@ dependencies:
140
140
  requirements:
141
141
  - - "~>"
142
142
  - !ruby/object:Gem::Version
143
- version: '2.1'
143
+ version: '2.3'
144
144
  type: :development
145
145
  prerelease: false
146
146
  version_requirements: !ruby/object:Gem::Requirement
147
147
  requirements:
148
148
  - - "~>"
149
149
  - !ruby/object:Gem::Version
150
- version: '2.1'
150
+ version: '2.3'
151
151
  - !ruby/object:Gem::Dependency
152
152
  name: rake
153
153
  requirement: !ruby/object:Gem::Requirement
@@ -168,14 +168,14 @@ dependencies:
168
168
  requirements:
169
169
  - - "~>"
170
170
  - !ruby/object:Gem::Version
171
- version: '0.12'
171
+ version: '0.14'
172
172
  type: :development
173
173
  prerelease: false
174
174
  version_requirements: !ruby/object:Gem::Requirement
175
175
  requirements:
176
176
  - - "~>"
177
177
  - !ruby/object:Gem::Version
178
- version: '0.12'
178
+ version: '0.14'
179
179
  description: Sidekiq::Portal - emulate scheduled job activity in tests when you work
180
180
  with time traveling.
181
181
  email:
@@ -192,11 +192,14 @@ files:
192
192
  - CHANGELOG.md
193
193
  - CODE_OF_CONDUCT.md
194
194
  - Gemfile
195
+ - Gemfile.lock
195
196
  - LICENSE.txt
196
197
  - README.md
197
198
  - Rakefile
198
199
  - bin/console
199
200
  - bin/setup
201
+ - docs/sidekiq_portal_ruby_group_meetup.key
202
+ - docs/sidekiq_portal_ruby_group_meetup.pdf
200
203
  - docs/umbrellio_hackaton_v1.0.pdf
201
204
  - lib/portal/config.rb
202
205
  - lib/portal/core_extensions.rb
@@ -222,7 +225,7 @@ homepage: https://github.com/0exp/sidekiq_portal
222
225
  licenses:
223
226
  - MIT
224
227
  metadata: {}
225
- post_install_message:
228
+ post_install_message:
226
229
  rdoc_options: []
227
230
  require_paths:
228
231
  - lib
@@ -230,15 +233,15 @@ required_ruby_version: !ruby/object:Gem::Requirement
230
233
  requirements:
231
234
  - - ">="
232
235
  - !ruby/object:Gem::Version
233
- version: 2.4.9
236
+ version: '2.5'
234
237
  required_rubygems_version: !ruby/object:Gem::Requirement
235
238
  requirements:
236
239
  - - ">="
237
240
  - !ruby/object:Gem::Version
238
241
  version: '0'
239
242
  requirements: []
240
- rubygems_version: 3.1.2
241
- signing_key:
243
+ rubygems_version: 3.3.7
244
+ signing_key:
242
245
  specification_version: 4
243
246
  summary: Sidekiq::Portal - scheduled jobs invocation emulation for test environments
244
247
  test_files: []