pause 0.4.0 → 0.5.1

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: 81a777526619b80e87ad3e11b6794c88634ea326cf34aad34ac70268517cdf4f
4
- data.tar.gz: 17f95640fde2ddd98e6922b7cab715e8c7973b791a3e728c65f132265da55b78
3
+ metadata.gz: 5e50b977e8a0291be3ffa4c7c3cd29e7e7dd4d35d7eaabf7135a50e285ba4e6e
4
+ data.tar.gz: 29090acb4bd36888191ecb05e5f233a87cf3d2f44e1c83ef5929406dee6b7568
5
5
  SHA512:
6
- metadata.gz: f46245fe1330897e8bf6dee18d32b8cc561849f59d5c6049bd45360b5614d27a7f0e0caf8494e93cd6266a733750cdd3aad2559508364c9ee7990493fb0934de
7
- data.tar.gz: c9fc4e23661001591aac93c7427e9e98ac03e6d5e15da060c537f43ce47b1eca3ac65658004ffff7e5706a59b1c98e7b7236329c1cd722e4348f2741acbd5e8c
6
+ metadata.gz: '09db81cdc48b8bc669a1a138cc00f1a2c7d230eee954551e15c09261d1caf7f2a0f465d4559e1cf0337dc5257c50585e85839365e59da35173737eed537625c5'
7
+ data.tar.gz: ade37423f09768bf16fc55c80d0252f412808b86457b4fc792efc1d86b499fcc9e346d5547f43d2a058d3f916075cf00b5e8d3fc4ad33c0232521e985ae3bc94
@@ -0,0 +1,31 @@
1
+ name: RSpec
2
+
3
+ on:
4
+ pull_request:
5
+ push: { branches: [master] }
6
+
7
+ jobs:
8
+ build:
9
+ runs-on: ubuntu-latest
10
+ strategy:
11
+ matrix:
12
+ ruby-version: [3.4.1, 3.3.6, 3.2.6, 3.1.6]
13
+ env:
14
+ RUBY_LATEST_VERSION: "3.4.1"
15
+ RUBY_VERSION: ${{ matrix.ruby-version }}
16
+
17
+ steps:
18
+ - uses: actions/checkout@v4
19
+
20
+ - name: Set up Ruby ${{ matrix.ruby-version }}
21
+ uses: ruby/setup-ruby@v1
22
+ with:
23
+ ruby-version: ${{ matrix.ruby-version }}
24
+
25
+ - name: Bundle Install
26
+ run: |
27
+ bundle check || bundle install -j 4
28
+
29
+ - name: Run Rubocop
30
+ run: |
31
+ bundle exec rspec --format progress -p1
@@ -0,0 +1,31 @@
1
+ name: Rubocop
2
+
3
+ on:
4
+ pull_request:
5
+ push: { branches: [master] }
6
+
7
+ jobs:
8
+ build:
9
+ runs-on: ubuntu-latest
10
+ strategy:
11
+ matrix:
12
+ ruby-version: [3.4.1, 3.3.6, 3.2.6, 3.1.6]
13
+ env:
14
+ RUBY_LATEST_VERSION: "3.4.1"
15
+ RUBY_VERSION: ${{ matrix.ruby-version }}
16
+
17
+ steps:
18
+ - uses: actions/checkout@v4
19
+
20
+ - name: Set up Ruby ${{ matrix.ruby-version }}
21
+ uses: ruby/setup-ruby@v1
22
+ with:
23
+ ruby-version: ${{ matrix.ruby-version }}
24
+
25
+ - name: Bundle Install
26
+ run: |
27
+ bundle check || bundle install -j 4
28
+
29
+ - name: Run Rubocop
30
+ run: |
31
+ bundle exec rubocop --parallel --format progress
data/.gitignore CHANGED
@@ -3,7 +3,6 @@
3
3
  .bundle
4
4
  .config
5
5
  .yardoc
6
- Gemfile.lock
7
6
  InstalledFiles
8
7
  _yardoc
9
8
  coverage
data/.rubocop.yml ADDED
@@ -0,0 +1,35 @@
1
+ require:
2
+ - rubocop-rake
3
+ - rubocop-rspec
4
+
5
+ inherit_from: .rubocop_todo.yml
6
+
7
+ # The behavior of RuboCop can be controlled via the .rubocop.yml
8
+ # configuration file. It makes it possible to enable/disable
9
+ # certain cops (checks) and to alter their behavior if they accept
10
+ # any parameters. The file can be placed either in your home
11
+ # directory or in some project directory.
12
+ #
13
+ # RuboCop will start looking for the configuration file in the directory
14
+ # where the inspected file is and continue its way up to the root directory.
15
+ #
16
+ # See https://docs.rubocop.org/rubocop/configuration
17
+ #
18
+ AllCops:
19
+ NewCops: enable
20
+ TargetRubyVersion: 3.2
21
+
22
+ RSpec/MultipleMemoizedHelpers:
23
+ Enabled: false
24
+
25
+ RSpec/ExampleLength:
26
+ Enabled: false
27
+
28
+ RSpec/MultipleExpectations:
29
+ Enabled: false
30
+
31
+ RSpec/IndexedLet:
32
+ Enabled: false
33
+
34
+ Naming/VariableNumber:
35
+ Enabled: false
data/.rubocop_todo.yml ADDED
@@ -0,0 +1,192 @@
1
+ # This configuration was generated by
2
+ # `rubocop --auto-gen-config`
3
+ # on 2025-02-07 21:04:05 UTC using RuboCop version 1.71.2.
4
+ # The point is for the user to remove these configuration records
5
+ # one by one as the offenses are removed from the code base.
6
+ # Note that changes in the inspected code, or installation of new
7
+ # versions of RuboCop, may require this file to be generated again.
8
+
9
+ # Offense count: 1
10
+ # Configuration parameters: Severity, Include.
11
+ # Include: **/*.gemspec
12
+ Gemspec/RequiredRubyVersion:
13
+ Exclude:
14
+ - 'pause.gemspec'
15
+
16
+ # Offense count: 9
17
+ # Configuration parameters: AllowedMethods.
18
+ # AllowedMethods: enums
19
+ Lint/ConstantDefinitionInBlock:
20
+ Exclude:
21
+ - 'spec/pause/action_spec.rb'
22
+ - 'spec/pause/analyzer_spec.rb'
23
+
24
+ # Offense count: 1
25
+ # Configuration parameters: AllowedParentClasses.
26
+ Lint/MissingSuper:
27
+ Exclude:
28
+ - 'lib/pause/action.rb'
29
+
30
+ # Offense count: 1
31
+ Lint/StructNewOverride:
32
+ Exclude:
33
+ - 'lib/pause.rb'
34
+
35
+ # Offense count: 1
36
+ # Configuration parameters: AllowedMethods, AllowedPatterns, CountRepeatedAttributes.
37
+ Metrics/AbcSize:
38
+ Max: 33
39
+
40
+ # Offense count: 1
41
+ # Configuration parameters: CountComments, CountAsOne.
42
+ Metrics/ClassLength:
43
+ Max: 108
44
+
45
+ # Offense count: 1
46
+ # Configuration parameters: CountComments, CountAsOne, AllowedMethods, AllowedPatterns.
47
+ Metrics/MethodLength:
48
+ Max: 16
49
+
50
+ # Offense count: 1
51
+ # Configuration parameters: MinNameLength, AllowNamesEndingInNumbers, AllowedNames, ForbiddenNames.
52
+ # AllowedNames: as, at, by, cc, db, id, if, in, io, ip, of, on, os, pp, to
53
+ Naming/MethodParameterName:
54
+ Exclude:
55
+ - 'lib/pause/redis/adapter.rb'
56
+
57
+ # Offense count: 1
58
+ RSpec/AnyInstance:
59
+ Exclude:
60
+ - 'spec/pause/action_spec.rb'
61
+
62
+ # Offense count: 7
63
+ # Configuration parameters: Prefixes, AllowedPatterns.
64
+ # Prefixes: when, with, without
65
+ RSpec/ContextWording:
66
+ Exclude:
67
+ - 'spec/pause/action_spec.rb'
68
+ - 'spec/pause/pause_spec.rb'
69
+ - 'spec/pause/redis/adapter_spec.rb'
70
+
71
+ # Offense count: 1
72
+ RSpec/DescribeMethod:
73
+ Exclude:
74
+ - 'spec/pause/action_spec.rb'
75
+
76
+ # Offense count: 15
77
+ # Configuration parameters: CountAsOne.
78
+ RSpec/ExampleLength:
79
+ Max: 14
80
+
81
+ # Offense count: 10
82
+ RSpec/ExpectInHook:
83
+ Exclude:
84
+ - 'spec/pause/action_spec.rb'
85
+ - 'spec/pause/logger_spec.rb'
86
+ - 'spec/pause/redis/adapter_spec.rb'
87
+
88
+ # Offense count: 10
89
+ RSpec/LeakyConstantDeclaration:
90
+ Exclude:
91
+ - 'spec/pause/action_spec.rb'
92
+ - 'spec/pause/analyzer_spec.rb'
93
+
94
+ # Offense count: 10
95
+ # Configuration parameters: .
96
+ # SupportedStyles: have_received, receive
97
+ RSpec/MessageSpies:
98
+ EnforcedStyle: receive
99
+
100
+ # Offense count: 1
101
+ RSpec/MultipleDescribes:
102
+ Exclude:
103
+ - 'spec/pause/action_spec.rb'
104
+
105
+ # Offense count: 24
106
+ RSpec/MultipleExpectations:
107
+ Max: 6
108
+
109
+ # Offense count: 26
110
+ # Configuration parameters: AllowSubject.
111
+ RSpec/MultipleMemoizedHelpers:
112
+ Max: 10
113
+
114
+ # Offense count: 14
115
+ # Configuration parameters: EnforcedStyle, IgnoreSharedExamples.
116
+ # SupportedStyles: always, named_only
117
+ RSpec/NamedSubject:
118
+ Exclude:
119
+ - 'spec/pause/configuration_spec.rb'
120
+
121
+ # Offense count: 2
122
+ # Configuration parameters: AllowedGroups.
123
+ RSpec/NestedGroups:
124
+ Max: 4
125
+
126
+ # Offense count: 5
127
+ # Configuration parameters: AllowedPatterns.
128
+ # AllowedPatterns: ^expect_, ^assert_
129
+ RSpec/NoExpectationExample:
130
+ Exclude:
131
+ - 'spec/pause/action_spec.rb'
132
+ - 'spec/pause/logger_spec.rb'
133
+ - 'spec/pause/redis/adapter_spec.rb'
134
+
135
+ # Offense count: 1
136
+ RSpec/PendingWithoutReason:
137
+ Exclude:
138
+ - 'spec/pause/redis/adapter_spec.rb'
139
+
140
+ # Offense count: 4
141
+ # This cop supports unsafe autocorrection (--autocorrect-all).
142
+ RSpec/ReceiveMessages:
143
+ Exclude:
144
+ - 'spec/pause/action_spec.rb'
145
+
146
+ # Offense count: 4
147
+ RSpec/RepeatedDescription:
148
+ Exclude:
149
+ - 'spec/pause/action_spec.rb'
150
+
151
+ # Offense count: 1
152
+ # Configuration parameters: Include, CustomTransform, IgnoreMethods, IgnoreMetadata.
153
+ # Include: **/*_spec.rb
154
+ RSpec/SpecFilePathFormat:
155
+ Exclude:
156
+ - '**/spec/routing/**/*'
157
+ - 'spec/pause/configuration_spec.rb'
158
+
159
+ # Offense count: 2
160
+ # This cop supports safe autocorrection (--autocorrect).
161
+ Rake/Desc:
162
+ Exclude:
163
+ - 'Rakefile'
164
+
165
+ # Offense count: 6
166
+ # Configuration parameters: AllowedConstants.
167
+ Style/Documentation:
168
+ Exclude:
169
+ - 'spec/**/*'
170
+ - 'test/**/*'
171
+ - 'lib/pause.rb'
172
+ - 'lib/pause/action.rb'
173
+ - 'lib/pause/analyzer.rb'
174
+ - 'lib/pause/configuration.rb'
175
+ - 'lib/pause/helper/timing.rb'
176
+ - 'lib/pause/rate_limited_event.rb'
177
+
178
+ # Offense count: 1
179
+ # This cop supports unsafe autocorrection (--autocorrect-all).
180
+ # Configuration parameters: EnforcedStyle.
181
+ # SupportedStyles: always, always_true, never
182
+ Style/FrozenStringLiteralComment:
183
+ Exclude:
184
+ - '**/*.arb'
185
+ - 'spec/pause/action_spec.rb'
186
+
187
+ # Offense count: 2
188
+ # This cop supports safe autocorrection (--autocorrect).
189
+ # Configuration parameters: AllowHeredoc, AllowURI, URISchemes, IgnoreCopDirectives, AllowedPatterns, SplitStrings.
190
+ # URISchemes: http, https
191
+ Layout/LineLength:
192
+ Max: 307
data/CHANGELOG.md ADDED
@@ -0,0 +1,21 @@
1
+ # Changelog
2
+
3
+ ## [Unreleased](https://github.com/kigster/pause/tree/HEAD)
4
+
5
+ [Full Changelog](https://github.com/kigster/pause/compare/v0.5.0...HEAD)
6
+
7
+ **Merged pull requests:**
8
+
9
+ - Improving test coverage by adding missing tests [\#3](https://github.com/kigster/pause/pull/3) ([kigster](https://github.com/kigster))
10
+
11
+ ## [v0.5.0](https://github.com/kigster/pause/tree/v0.5.0) (2025-02-07)
12
+
13
+ [Full Changelog](https://github.com/kigster/pause/compare/2bad44d9026e4bd24c35384d28f5945187a061f5...v0.5.0)
14
+
15
+ **Merged pull requests:**
16
+
17
+ - Adding Guthub Actions and removing Travis [\#2](https://github.com/kigster/pause/pull/2) ([kigster](https://github.com/kigster))
18
+
19
+
20
+
21
+ \* *This Changelog was automatically generated by [github_changelog_generator](https://github.com/github-changelog-generator/github-changelog-generator)*
data/Gemfile CHANGED
@@ -1,7 +1,21 @@
1
1
  #!/usr/bin/env ruby
2
- #^syntax detection
2
+ # frozen_string_literal: true
3
+
4
+ # ^syntax detection
3
5
 
4
6
  source 'https://rubygems.org'
5
7
 
8
+ group :development, :test do
9
+ gem 'fakeredis'
10
+ gem 'rake'
11
+ gem 'rspec'
12
+ gem 'rubocop'
13
+ gem 'rubocop-rake'
14
+ gem 'rubocop-rspec'
15
+ gem 'simplecov'
16
+ gem 'timecop'
17
+ gem 'yard'
18
+ end
19
+
6
20
  # Specify your gem's dependencies in pause.gemspec
7
21
  gemspec
data/Gemfile.lock ADDED
@@ -0,0 +1,96 @@
1
+ PATH
2
+ remote: .
3
+ specs:
4
+ pause (0.5.1)
5
+ colored2
6
+ redis
7
+
8
+ GEM
9
+ remote: https://rubygems.org/
10
+ specs:
11
+ ast (2.4.2)
12
+ colored2 (4.0.3)
13
+ diff-lcs (1.5.1)
14
+ docile (1.4.1)
15
+ fakeredis (0.9.2)
16
+ redis (~> 4.8)
17
+ json (2.9.1)
18
+ language_server-protocol (3.17.0.4)
19
+ parallel (1.26.3)
20
+ parser (3.3.7.1)
21
+ ast (~> 2.4.1)
22
+ racc
23
+ racc (1.8.1)
24
+ rainbow (3.1.1)
25
+ rake (13.2.1)
26
+ redis (4.8.1)
27
+ regexp_parser (2.10.0)
28
+ rspec (3.13.0)
29
+ rspec-core (~> 3.13.0)
30
+ rspec-expectations (~> 3.13.0)
31
+ rspec-mocks (~> 3.13.0)
32
+ rspec-core (3.13.3)
33
+ rspec-support (~> 3.13.0)
34
+ rspec-expectations (3.13.3)
35
+ diff-lcs (>= 1.2.0, < 2.0)
36
+ rspec-support (~> 3.13.0)
37
+ rspec-mocks (3.13.2)
38
+ diff-lcs (>= 1.2.0, < 2.0)
39
+ rspec-support (~> 3.13.0)
40
+ rspec-support (3.13.2)
41
+ rubocop (1.71.2)
42
+ json (~> 2.3)
43
+ language_server-protocol (>= 3.17.0)
44
+ parallel (~> 1.10)
45
+ parser (>= 3.3.0.2)
46
+ rainbow (>= 2.2.2, < 4.0)
47
+ regexp_parser (>= 2.9.3, < 3.0)
48
+ rubocop-ast (>= 1.38.0, < 2.0)
49
+ ruby-progressbar (~> 1.7)
50
+ unicode-display_width (>= 2.4.0, < 4.0)
51
+ rubocop-ast (1.38.0)
52
+ parser (>= 3.3.1.0)
53
+ rubocop-rake (0.6.0)
54
+ rubocop (~> 1.0)
55
+ rubocop-rspec (3.4.0)
56
+ rubocop (~> 1.61)
57
+ ruby-progressbar (1.13.0)
58
+ simplecov (0.22.0)
59
+ docile (~> 1.1)
60
+ simplecov-html (~> 0.11)
61
+ simplecov_json_formatter (~> 0.1)
62
+ simplecov-html (0.13.1)
63
+ simplecov_json_formatter (0.1.4)
64
+ timecop (0.9.10)
65
+ unicode-display_width (3.1.4)
66
+ unicode-emoji (~> 4.0, >= 4.0.4)
67
+ unicode-emoji (4.0.4)
68
+ yard (0.9.37)
69
+
70
+ PLATFORMS
71
+ aarch64-linux-gnu
72
+ aarch64-linux-musl
73
+ arm-linux-gnu
74
+ arm-linux-musl
75
+ arm64-darwin
76
+ ruby
77
+ x86-linux-gnu
78
+ x86-linux-musl
79
+ x86_64-darwin
80
+ x86_64-linux-gnu
81
+ x86_64-linux-musl
82
+
83
+ DEPENDENCIES
84
+ fakeredis
85
+ pause!
86
+ rake
87
+ rspec
88
+ rubocop
89
+ rubocop-rake
90
+ rubocop-rspec
91
+ simplecov
92
+ timecop
93
+ yard
94
+
95
+ BUNDLED WITH
96
+ 2.6.3
data/LICENSE.txt CHANGED
@@ -1,4 +1,4 @@
1
- Copyright (c) 2012 Wanelo, Inc
1
+ Copyright © 2013-2025 Konstantin Gredeskoul, Atasay Gokkaya, Eric Saxby, Paul Henry
2
2
 
3
3
  MIT License
4
4