business_flow 0.19.5 → 0.20.0

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
  SHA256:
3
- metadata.gz: 82c431371d59045db43a3e6a53b1f5be3169396eb684cd3dd57360c13e66de93
4
- data.tar.gz: 7af7df17705aba80a4c27099a72a122413029bf95f73490d87de2ae66336dd4d
3
+ metadata.gz: 629b01be7c90cd6bd0d11524bda269fc640863487e2a45a59d739497938d0ac9
4
+ data.tar.gz: 7e3b3799817d2e8d451da79b266ebb9329f6db311c707ae1608471813f5ecb9f
5
5
  SHA512:
6
- metadata.gz: 27e674b0357b3312991ad8d65c91b95e0fed8481259512bdee9e3e2a262e9841af6a1d2b30de250781de36e4aa7544a5d17482ee75013067c9f59c837603958d
7
- data.tar.gz: 8c3fe93115e9ac88c71812c1392e9a88702a410ce904f12b2982640a115066a93b1b676fc671be99ef9675073f5e90454d231409e2c13c67ded91f595aa588ae
6
+ metadata.gz: 1b9affb629f4994fe84655c081d429ef056e221c59739d926ee87205d2febb7ab314beda318f0f7f94b38f215ddcd3588b4f813be38918d43496ad6ce0fa066c
7
+ data.tar.gz: 2fa9f60dd2d93f674ccf0473ebeb44ac8545d3a2f34cf2a815111a8bc934311bb0b07a205d6d5bd3ef7b84830859c2daa3e4bc07c7ad9819650127050e1c8124
@@ -0,0 +1,95 @@
1
+ version: 2.1
2
+
3
+ setup: true
4
+
5
+ orbs:
6
+ ruby: circleci/ruby@2.5.3
7
+
8
+ executors:
9
+ docker: # Docker using the Base Convenience Image
10
+ docker:
11
+ - image: cimg/base:stable
12
+ # linux: # a Linux VM running Ubuntu 20.04
13
+ # machine:
14
+ # image: ubuntu-2004:202107-02
15
+ # macos: # macos executor running Xcode
16
+ # macos:
17
+ # xcode: 14.2.0
18
+
19
+ references:
20
+ RUBY_IMAGE: &RUBY_IMAGE
21
+ cimg/ruby:3.3.7
22
+ RUBY_DEPS: &RUBY_DEPS
23
+ include-branch-in-cache-key: false
24
+ clean-bundle: true
25
+ key: gems-v2
26
+
27
+ jobs:
28
+ refresh_ruby_deps:
29
+ docker:
30
+ - image: *RUBY_IMAGE
31
+ environment:
32
+ BUNDLE_JOBS: '2'
33
+ MALLOC_ARENA_MAX: '2'
34
+ BUNDLE_RETRY: '3'
35
+ steps:
36
+ - checkout
37
+ - run: 'rm .ruby-*'
38
+ - ruby/install-deps:
39
+ <<: *RUBY_DEPS
40
+ rubocop:
41
+ docker:
42
+ - image: *RUBY_IMAGE
43
+ steps:
44
+ - checkout
45
+ - run: 'rm .ruby-*'
46
+ - ruby/install-deps:
47
+ <<: *RUBY_DEPS
48
+ - run: bundle exec rubocop
49
+ reek:
50
+ docker:
51
+ - image: *RUBY_IMAGE
52
+ steps:
53
+ - checkout
54
+ - run: 'rm .ruby-*'
55
+ - ruby/install-deps:
56
+ <<: *RUBY_DEPS
57
+ - run: bundle exec reek
58
+ rspec:
59
+ parameters:
60
+ os:
61
+ type: executor
62
+ ruby-version:
63
+ type: string
64
+ executor: << parameters.os >>
65
+ steps:
66
+ - checkout
67
+ - run: 'rm .ruby-*'
68
+ - ruby/install:
69
+ version: << parameters.ruby-version >>
70
+ - run: bundle
71
+ - run: appraisal install
72
+ - run: appraisal rspec --format p
73
+
74
+ workflows:
75
+ full:
76
+ jobs:
77
+ - refresh_ruby_deps
78
+ - rubocop:
79
+ requires:
80
+ - refresh_ruby_deps
81
+ - reek:
82
+ requires:
83
+ - refresh_ruby_deps
84
+ - rspec:
85
+ matrix:
86
+ parameters:
87
+ os:
88
+ - docker
89
+ # - linux
90
+ # - macos # Disabled because macOS testing isn't worth sorting out why GPG isn't present.
91
+ ruby-version:
92
+ - "3.1.7"
93
+ - "3.2.8"
94
+ - "3.3.8"
95
+ - "3.4.3"
data/.reek.yml CHANGED
@@ -1,6 +1,9 @@
1
1
  # Auto generated by Reeks --todo flag
2
2
  ---
3
3
  detectors:
4
+ ControlParameter:
5
+ exclude:
6
+ - BusinessFlow::ClusterLock#read_attribute_for_validation
4
7
  FeatureEnvy:
5
8
  exclude:
6
9
  - BusinessFlow::ClusterLock::ClassMethods::LockFailure#add_to
@@ -11,3 +14,5 @@ detectors:
11
14
  # N.B. If we want to enable this, we need to tweak the RuboCop config. In particular, RuboCop
12
15
  # prefers `e` for exceptions.
13
16
  enabled: false
17
+ exclude_paths:
18
+ - vendor # For CircleCI.
data/.rubocop.yml CHANGED
@@ -1,11 +1,15 @@
1
- require:
1
+ plugins:
2
2
  - rubocop-rspec
3
+ - rubocop-rspec_rails
4
+ - rubocop-rake
3
5
 
4
6
  AllCops:
5
- TargetRubyVersion: 2.7
7
+ TargetRubyVersion: 3.1
6
8
  NewCops: enable
7
9
  Exclude:
8
10
  - coverage/**/*
11
+ - gemfiles/**/*
12
+ - vendor/bundle/**/* # For CircleCI. Siiiiigh.
9
13
 
10
14
  # Excluding specs here because of RSpec's tendency to look at the line-number info on a backtrace to
11
15
  # decide what to show you when a matcher fails. I.E. a very long line may be needed to ensure you
@@ -18,6 +22,9 @@ Layout/LineLength:
18
22
  RSpec/MultipleMemoizedHelpers:
19
23
  Enabled: false
20
24
 
25
+ RSpec/IncludeExamples:
26
+ Enabled: false
27
+
21
28
  RSpec/IndexedLet:
22
29
  # We have specs that are describing process steps, so... numbers are kinda the best way to describe that.
23
30
  Enabled: false
@@ -48,10 +55,6 @@ Style/RescueModifier:
48
55
  Style/DocumentDynamicEvalDefinition:
49
56
  Enabled: false
50
57
 
51
- # Explicit is bettr than implicit.
52
- FactoryBot/SyntaxMethods:
53
- Enabled: false
54
-
55
58
  # For `match(hash_including(...))`, in specs, this rule would make things pretty unreadable.
56
59
  Layout/ClosingParenthesisIndentation:
57
60
  Exclude:
data/.ruby-version CHANGED
@@ -1 +1 @@
1
- ruby-2.7.4
1
+ ruby-3.1.6
data/Appraisals ADDED
@@ -0,0 +1,48 @@
1
+ # frozen_string_literal: true
2
+
3
+ if RUBY_ENGINE == 'ruby' && Gem::Version.new(RUBY_VERSION) < Gem::Version.new('3.4.0')
4
+ appraise 'activemodel-4.2' do
5
+ source 'https://teak_io_199:6YKvtYgoo5R8_zxD@gems.railslts.com' do
6
+ gem 'activemodel', '~> 4.2.11'
7
+ gem 'activesupport', '~> 4.2.11'
8
+ end
9
+ end
10
+
11
+ appraise 'activemodel-5.2' do
12
+ source 'https://teak_io_199:6YKvtYgoo5R8_zxD@gems.railslts.com' do
13
+ gem 'activemodel', '~> 5.2.8'
14
+ gem 'activesupport', '~> 5.2.8'
15
+ end
16
+ end
17
+ end
18
+
19
+ appraise 'activemodel-6.1' do
20
+ source 'https://teak_io_199:6YKvtYgoo5R8_zxD@gems.railslts.com' do
21
+ gem 'activemodel', '~> 6.1.7'
22
+ gem 'activesupport', '~> 6.1.7'
23
+ end
24
+ end
25
+
26
+ if RUBY_ENGINE == 'ruby' && Gem::Version.new(RUBY_VERSION) < Gem::Version.new('3.4.0')
27
+ appraise 'activemodel-7.0' do
28
+ gem 'activemodel', '~> 7.0.8'
29
+ gem 'activesupport', '~> 7.0.8'
30
+ end
31
+ end
32
+
33
+ appraise 'activemodel-7.1' do
34
+ gem 'activemodel', '~> 7.1.3'
35
+ gem 'activesupport', '~> 7.1.3'
36
+ end
37
+
38
+ appraise 'activemodel-7.2' do
39
+ gem 'activemodel', '~> 7.2.1'
40
+ gem 'activesupport', '~> 7.2.1'
41
+ end
42
+
43
+ if RUBY_ENGINE == 'ruby' && Gem::Version.new(RUBY_VERSION) >= Gem::Version.new('3.2.0')
44
+ appraise 'activemodel-8.0' do
45
+ gem 'activemodel', '~> 8.0.0'
46
+ gem 'activesupport', '~> 8.0.0'
47
+ end
48
+ end
data/Gemfile CHANGED
@@ -7,12 +7,19 @@ git_source(:github) { |repo_name| "https://github.com/#{repo_name}" }
7
7
  # Specify your gem's dependencies in business_flow.gemspec
8
8
  gemspec
9
9
 
10
- gem 'pry', '~> 0.14.2'
10
+ gem 'pry', '~> 0.15.2'
11
11
  gem 'rake', '~> 13.0'
12
12
  gem 'reek', '~> 6.1'
13
13
  gem 'retryable', '~> 3.0.4'
14
14
  gem 'rspec', '~> 3.0'
15
- gem 'rubocop', '~> 1.59.0'
16
- gem 'rubocop-rspec', '~> 2.29.1'
15
+ gem 'rubocop', '~> 1.59'
16
+ gem 'rubocop-factory_bot', '~> 2.27'
17
+ gem 'rubocop-rspec', '~> 3.0'
18
+ gem 'rubocop-rspec_rails', '~> 2.31'
19
+ gem 'rubocop-rake', '~> 0.7.0'
17
20
  gem 'simplecov', '~> 0.22.0'
18
21
  gem 'timecop', '~> 0.9.1'
22
+
23
+ gem 'ruby3-backward-compatibility'
24
+
25
+ gem 'appraisal', '~> 2.5.0'
data/Gemfile.lock CHANGED
@@ -1,122 +1,175 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- business_flow (0.19.5)
5
- activemodel (>= 4.2, < 8)
6
- activesupport (>= 4.2, < 8)
4
+ business_flow (0.20.0)
5
+ activemodel (>= 4.2, < 8.1)
6
+ activesupport (>= 4.2, < 8.1)
7
7
 
8
8
  GEM
9
9
  remote: https://rubygems.org/
10
10
  specs:
11
- activemodel (7.1.3.2)
12
- activesupport (= 7.1.3.2)
13
- activesupport (7.1.3.2)
11
+ activemodel (7.1.5.1)
12
+ activesupport (= 7.1.5.1)
13
+ activesupport (7.1.5.1)
14
14
  base64
15
+ benchmark (>= 0.3)
15
16
  bigdecimal
16
17
  concurrent-ruby (~> 1.0, >= 1.0.2)
17
18
  connection_pool (>= 2.2.5)
18
19
  drb
19
20
  i18n (>= 1.6, < 2)
21
+ logger (>= 1.4.2)
20
22
  minitest (>= 5.1)
21
23
  mutex_m
24
+ securerandom (>= 0.3)
22
25
  tzinfo (~> 2.0)
23
- ast (2.4.2)
24
- base64 (0.2.0)
25
- bigdecimal (3.1.7)
26
+ appraisal (2.5.0)
27
+ bundler
28
+ rake
29
+ thor (>= 0.14.0)
30
+ ast (2.4.3)
31
+ base64 (0.3.0)
32
+ benchmark (0.4.1)
33
+ bigdecimal (3.2.2)
26
34
  coderay (1.1.3)
27
- concurrent-ruby (1.2.3)
28
- connection_pool (2.4.1)
29
- diff-lcs (1.5.1)
30
- docile (1.4.0)
31
- drb (2.2.1)
32
- i18n (1.14.4)
35
+ concurrent-ruby (1.3.5)
36
+ connection_pool (2.5.3)
37
+ diff-lcs (1.6.2)
38
+ docile (1.4.1)
39
+ drb (2.2.3)
40
+ dry-configurable (1.3.0)
41
+ dry-core (~> 1.1)
42
+ zeitwerk (~> 2.6)
43
+ dry-core (1.1.0)
33
44
  concurrent-ruby (~> 1.0)
34
- json (2.7.2)
35
- kwalify (0.7.2)
36
- language_server-protocol (3.17.0.3)
45
+ logger
46
+ zeitwerk (~> 2.6)
47
+ dry-inflector (1.2.0)
48
+ dry-initializer (3.2.0)
49
+ dry-logic (1.6.0)
50
+ bigdecimal
51
+ concurrent-ruby (~> 1.0)
52
+ dry-core (~> 1.1)
53
+ zeitwerk (~> 2.6)
54
+ dry-schema (1.14.1)
55
+ concurrent-ruby (~> 1.0)
56
+ dry-configurable (~> 1.0, >= 1.0.1)
57
+ dry-core (~> 1.1)
58
+ dry-initializer (~> 3.2)
59
+ dry-logic (~> 1.5)
60
+ dry-types (~> 1.8)
61
+ zeitwerk (~> 2.6)
62
+ dry-types (1.8.3)
63
+ bigdecimal (~> 3.0)
64
+ concurrent-ruby (~> 1.0)
65
+ dry-core (~> 1.0)
66
+ dry-inflector (~> 1.0)
67
+ dry-logic (~> 1.4)
68
+ zeitwerk (~> 2.6)
69
+ i18n (1.14.7)
70
+ concurrent-ruby (~> 1.0)
71
+ json (2.12.2)
72
+ language_server-protocol (3.17.0.5)
73
+ lint_roller (1.1.0)
74
+ logger (1.7.0)
37
75
  method_source (1.1.0)
38
- minitest (5.22.3)
39
- mutex_m (0.2.0)
40
- parallel (1.24.0)
41
- parser (3.2.2.4)
76
+ minitest (5.25.5)
77
+ mutex_m (0.3.0)
78
+ parallel (1.27.0)
79
+ parser (3.3.8.0)
42
80
  ast (~> 2.4.1)
43
81
  racc
44
- pry (0.14.2)
82
+ prism (1.4.0)
83
+ pry (0.15.2)
45
84
  coderay (~> 1.1)
46
85
  method_source (~> 1.0)
47
- racc (1.7.3)
86
+ racc (1.8.1)
48
87
  rainbow (3.1.1)
49
- rake (13.2.1)
50
- reek (6.1.4)
51
- kwalify (~> 0.7.0)
52
- parser (~> 3.2.0)
88
+ rake (13.3.0)
89
+ reek (6.5.0)
90
+ dry-schema (~> 1.13)
91
+ logger (~> 1.6)
92
+ parser (~> 3.3.0)
53
93
  rainbow (>= 2.0, < 4.0)
54
- regexp_parser (2.9.0)
94
+ rexml (~> 3.1)
95
+ regexp_parser (2.10.0)
55
96
  retryable (3.0.5)
56
- rexml (3.2.6)
57
- rspec (3.13.0)
97
+ rexml (3.4.1)
98
+ rspec (3.13.1)
58
99
  rspec-core (~> 3.13.0)
59
100
  rspec-expectations (~> 3.13.0)
60
101
  rspec-mocks (~> 3.13.0)
61
- rspec-core (3.13.0)
102
+ rspec-core (3.13.5)
62
103
  rspec-support (~> 3.13.0)
63
- rspec-expectations (3.13.0)
104
+ rspec-expectations (3.13.5)
64
105
  diff-lcs (>= 1.2.0, < 2.0)
65
106
  rspec-support (~> 3.13.0)
66
- rspec-mocks (3.13.0)
107
+ rspec-mocks (3.13.5)
67
108
  diff-lcs (>= 1.2.0, < 2.0)
68
109
  rspec-support (~> 3.13.0)
69
- rspec-support (3.13.1)
70
- rubocop (1.59.0)
110
+ rspec-support (3.13.4)
111
+ rubocop (1.78.0)
71
112
  json (~> 2.3)
72
- language_server-protocol (>= 3.17.0)
113
+ language_server-protocol (~> 3.17.0.2)
114
+ lint_roller (~> 1.1.0)
73
115
  parallel (~> 1.10)
74
- parser (>= 3.2.2.4)
116
+ parser (>= 3.3.0.2)
75
117
  rainbow (>= 2.2.2, < 4.0)
76
- regexp_parser (>= 1.8, < 3.0)
77
- rexml (>= 3.2.5, < 4.0)
78
- rubocop-ast (>= 1.30.0, < 2.0)
118
+ regexp_parser (>= 2.9.3, < 3.0)
119
+ rubocop-ast (>= 1.45.1, < 2.0)
79
120
  ruby-progressbar (~> 1.7)
80
- unicode-display_width (>= 2.4.0, < 3.0)
81
- rubocop-ast (1.30.0)
82
- parser (>= 3.2.1.0)
83
- rubocop-capybara (2.20.0)
84
- rubocop (~> 1.41)
85
- rubocop-factory_bot (2.25.1)
86
- rubocop (~> 1.41)
87
- rubocop-rspec (2.29.2)
88
- rubocop (~> 1.40)
89
- rubocop-capybara (~> 2.17)
90
- rubocop-factory_bot (~> 2.22)
91
- rubocop-rspec_rails (~> 2.28)
92
- rubocop-rspec_rails (2.28.3)
93
- rubocop (~> 1.40)
121
+ unicode-display_width (>= 2.4.0, < 4.0)
122
+ rubocop-ast (1.45.1)
123
+ parser (>= 3.3.7.2)
124
+ prism (~> 1.4)
125
+ rubocop-factory_bot (2.27.1)
126
+ lint_roller (~> 1.1)
127
+ rubocop (~> 1.72, >= 1.72.1)
128
+ rubocop-rake (0.7.1)
129
+ lint_roller (~> 1.1)
130
+ rubocop (>= 1.72.1)
131
+ rubocop-rspec (3.6.0)
132
+ lint_roller (~> 1.1)
133
+ rubocop (~> 1.72, >= 1.72.1)
134
+ rubocop-rspec_rails (2.31.0)
135
+ lint_roller (~> 1.1)
136
+ rubocop (~> 1.72, >= 1.72.1)
137
+ rubocop-rspec (~> 3.5)
94
138
  ruby-progressbar (1.13.0)
139
+ ruby3-backward-compatibility (1.5.0)
140
+ securerandom (0.3.2)
95
141
  simplecov (0.22.0)
96
142
  docile (~> 1.1)
97
143
  simplecov-html (~> 0.11)
98
144
  simplecov_json_formatter (~> 0.1)
99
- simplecov-html (0.12.3)
145
+ simplecov-html (0.13.1)
100
146
  simplecov_json_formatter (0.1.4)
101
- timecop (0.9.8)
147
+ thor (1.3.2)
148
+ timecop (0.9.10)
102
149
  tzinfo (2.0.6)
103
150
  concurrent-ruby (~> 1.0)
104
- unicode-display_width (2.5.0)
151
+ unicode-display_width (2.6.0)
152
+ zeitwerk (2.6.18)
105
153
 
106
154
  PLATFORMS
107
155
  ruby
108
156
 
109
157
  DEPENDENCIES
158
+ appraisal (~> 2.5.0)
110
159
  business_flow!
111
- pry (~> 0.14.2)
160
+ pry (~> 0.15.2)
112
161
  rake (~> 13.0)
113
162
  reek (~> 6.1)
114
163
  retryable (~> 3.0.4)
115
164
  rspec (~> 3.0)
116
- rubocop (~> 1.59.0)
117
- rubocop-rspec (~> 2.29.1)
165
+ rubocop (~> 1.59)
166
+ rubocop-factory_bot (~> 2.27)
167
+ rubocop-rake (~> 0.7.0)
168
+ rubocop-rspec (~> 3.0)
169
+ rubocop-rspec_rails (~> 2.31)
170
+ ruby3-backward-compatibility
118
171
  simplecov (~> 0.22.0)
119
172
  timecop (~> 0.9.1)
120
173
 
121
174
  BUNDLED WITH
122
- 2.3.6
175
+ 2.6.9
data/README.md CHANGED
@@ -30,9 +30,23 @@ After checking out the repo, run `bin/setup` to install dependencies. Then, run
30
30
 
31
31
  To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).
32
32
 
33
+ ### Running Tests
34
+
35
+ ```bash
36
+ # To test against all supported ActiveModel versions:
37
+ appraisal rspec
38
+
39
+ # To test against a specific ActiveModel version:
40
+ appraisal activemodel-5.2 rspec
41
+
42
+ # Validate code quality:
43
+ rubocop
44
+ reek # N.B. RSpec runs _some_ reek tests, but not _all_!
45
+ ```
46
+
33
47
  ## Contributing
34
48
 
35
- Bug reports and pull requests are welcome on GitHub at https://github.com/[USERNAME]/business_flow.
49
+ Bug reports and pull requests are welcome on GitHub at <https://github.com/GoCarrot/business_flow>.
36
50
 
37
51
  ## License
38
52
 
data/bin/setup CHANGED
@@ -5,4 +5,10 @@ set -vx
5
5
 
6
6
  bundle install
7
7
 
8
+ if which rbenv >/dev/null; then
9
+ rbenv rehash
10
+ fi
11
+
12
+ appraisal install
13
+
8
14
  # Do any other automated setup that you need to do here
@@ -21,10 +21,10 @@ Gem::Specification.new do |spec|
21
21
  spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
22
22
  spec.require_paths = ['lib']
23
23
 
24
- spec.add_dependency 'activemodel', '>= 4.2', '< 8'
25
- spec.add_dependency 'activesupport', '>= 4.2', '< 8'
24
+ spec.add_dependency 'activemodel', '>= 4.2', '< 8.1'
25
+ spec.add_dependency 'activesupport', '>= 4.2', '< 8.1'
26
26
 
27
27
  spec.metadata['rubygems_mfa_required'] = 'true'
28
28
 
29
- spec.required_ruby_version = '>= 2.7.0'
29
+ spec.required_ruby_version = '>= 3.1.0'
30
30
  end
@@ -0,0 +1,2 @@
1
+ ---
2
+ BUNDLE_RETRY: "1"
@@ -0,0 +1,24 @@
1
+ # This file was generated by Appraisal
2
+
3
+ source "https://rubygems.org"
4
+
5
+ gem "pry", "~> 0.15.2"
6
+ gem "rake", "~> 13.0"
7
+ gem "reek", "~> 6.1.0"
8
+ gem "retryable", "~> 3.0.4"
9
+ gem "rspec", "~> 3.0"
10
+ gem "rubocop", "~> 1.59"
11
+ gem "rubocop-factory_bot", "~> 2.24"
12
+ gem "rubocop-rspec", "~> 2.29"
13
+ gem "rubocop-rspec_rails", "~> 2.28"
14
+ gem "simplecov", "~> 0.22.0"
15
+ gem "timecop", "~> 0.9.1"
16
+ gem "appraisal", "~> 2.5.0"
17
+ gem "ruby3-backward-compatibility"
18
+
19
+ source 'https://teak_io_199:6YKvtYgoo5R8_zxD@gems.railslts.com' do
20
+ gem "activemodel", "~> 4.2.11"
21
+ gem "activesupport", "~> 4.2.11"
22
+ end
23
+
24
+ gemspec path: "../"