ProtectedConstructor 3.0.3 → 4.0.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: 76c78926a721622fcb2c03adbc60e03387b0aad68743c1dab651e15c1047d0db
4
- data.tar.gz: 5e34dedc47342a7ebf954f85227148562c82cd675a80464459cd4d399c8c6e19
3
+ metadata.gz: 72d9776adfcce47db39012c63ee4aef1678d8604bb78b2a491686a5f9e30f2f5
4
+ data.tar.gz: 8002f3b10a17e52cd160d82282da4dfd1786d7e900a8463a41e280aa13a4986f
5
5
  SHA512:
6
- metadata.gz: a1c714692867dbde2463794b85a7c7463550289db954f904aeacf0e0aeac4b500c0855dfcce026005324d2ba33d1152f6216c04ca4aa806daa0d72ebb9472733
7
- data.tar.gz: 5a77ece5781ddbf6995c4e3bc4fb1af4a45941908b35cff3da4ae4bef397782e5e77305c29f4e6e2a4de0b068cb88f12239307426bce9a97b1b57a664c367813
6
+ metadata.gz: 18a1594abf8ace80d33a80cc76cb31f9274e98163c0dc74ad1a500858a35aa9f73c94a192dc17f94a9536153a5a83c5cfd731da54ae5787441cc1f1dafc88dec
7
+ data.tar.gz: ad6b0113121950d0828ed8c6dcf0d5e6f37c85bd068b9092f4cbc4f83dca7eb4e96be9742ffa13819c579bc938f703bd3f2729c809e960668fb806d6d1cc4ee0
@@ -14,8 +14,10 @@ jobs:
14
14
  runs-on: ${{ matrix.os }}
15
15
  strategy:
16
16
  matrix:
17
- os: [ubuntu-latest, ubuntu-20.04, macos-latest, macos-13, macos-12, windows-latest, windows-2019]
18
- ruby: ['3.0.7', '3.1', '3.2', '3.3']
17
+ # See https://github.com/actions/runner-images
18
+ os: [ubuntu-22.04, ubuntu-latest, macos-13, macos-14, macos-15, windows-2022, windows-latest]
19
+ # Define Ruby versions to test against, use `rbenv install -l`
20
+ ruby: ['3.2', '3.3', '3.4']
19
21
 
20
22
  steps:
21
23
  - uses: actions/checkout@v3
data/.rubocop.yml ADDED
@@ -0,0 +1,194 @@
1
+ plugins:
2
+ - rubocop-performance
3
+ require:
4
+ - rubocop-rspec
5
+
6
+ AllCops:
7
+ SuggestExtensions: false
8
+ TargetRubyVersion: 3.2
9
+ NewCops: enable
10
+ Exclude:
11
+ - '.git/**/*'
12
+ - '.idea/**/*'
13
+ - 'init/*'
14
+ - 'Rakefile'
15
+ - '*.gemspec'
16
+ - 'spec/**/*'
17
+ - 'vendor/**/*'
18
+ - 'scratch*.rb'
19
+ - 'snippets*.rb'
20
+
21
+ # Align the elements of a hash literal if they span more than one line.
22
+ Layout/HashAlignment:
23
+ EnforcedLastArgumentHashStyle: always_ignore
24
+
25
+ # Alignment of parameters in multi-line method definition.
26
+ # The `with_fixed_indentation` style aligns the following lines with one
27
+ # level of indentation relative to the start of the line with the method
28
+ # definition.
29
+ #
30
+ # def my_method(a,
31
+ # b)
32
+ Layout/ParameterAlignment:
33
+ EnforcedStyle: with_fixed_indentation
34
+
35
+ # Alignment of parameters in multi-line method call.
36
+ # The `with_fixed_indentation` style aligns the following lines with one
37
+ # level of indentation relative to the start of the line with the method call.
38
+ #
39
+ # my_method(a,
40
+ # b)
41
+ Layout/ArgumentAlignment:
42
+ EnforcedStyle: with_fixed_indentation
43
+
44
+ # a = case n
45
+ # when 0
46
+ # x * 2
47
+ # else
48
+ # y / 3
49
+ # end
50
+ Layout/CaseIndentation:
51
+ EnforcedStyle: end
52
+
53
+ # Enforces a configured order of definitions within a class body
54
+ Layout/ClassStructure:
55
+ Enabled: true
56
+
57
+ # Align `end` with the matching keyword or starting expression except for
58
+ # assignments, where it should be aligned with the LHS.
59
+ Layout/EndAlignment:
60
+ EnforcedStyleAlignWith: variable
61
+ AutoCorrect: true
62
+
63
+ # The `consistent` style enforces that the first element in an array
64
+ # literal where the opening bracket and the first element are on
65
+ # seprate lines is indented the same as an array literal which is not
66
+ # defined inside a method call.
67
+ Layout/FirstArrayElementIndentation:
68
+ EnforcedStyle: consistent
69
+
70
+ # The `consistent` style enforces that the first key in a hash
71
+ # literal where the opening brace and the first key are on
72
+ # seprate lines is indented the same as a hash literal which is not
73
+ # defined inside a method call.
74
+ Layout/FirstHashElementIndentation:
75
+ EnforcedStyle: consistent
76
+
77
+ # Indent multi-line methods instead of aligning with periods
78
+ Layout/MultilineMethodCallIndentation:
79
+ EnforcedStyle: indented
80
+
81
+ # Allow `debug` in tasks for now
82
+ Lint/Debugger:
83
+ Exclude:
84
+ - 'RakeFile'
85
+
86
+ # A calculated magnitude based on number of assignments, branches, and
87
+ # conditions.
88
+ # NOTE: This is temporarily disabled until we can eliminate existing Rubocop
89
+ # complaints
90
+ Metrics/AbcSize:
91
+ Enabled: false
92
+
93
+ # Avoid long blocks with many lines.
94
+ Metrics/BlockLength:
95
+ Exclude:
96
+ - 'RakeFile'
97
+ - 'db/seeds.rb'
98
+ - 'spec/**/*.rb'
99
+
100
+ # Avoid classes longer than 100 lines of code.
101
+ # NOTE: This is temporarily disabled until we can eliminate existing Rubocop
102
+ # complaints
103
+ Metrics/ClassLength:
104
+ Max: 200
105
+ Exclude:
106
+ - 'spec/**/*.rb'
107
+
108
+ # A complexity metric that is strongly correlated to the number of test cases
109
+ # needed to validate a method.
110
+ Metrics/CyclomaticComplexity:
111
+ Max: 9
112
+
113
+ # Limit lines to 80 characters
114
+ Layout/LineLength:
115
+ Exclude:
116
+ - 'RakeFile'
117
+ - 'spec/**/*.rb'
118
+
119
+ # Avoid methods longer than 15 lines of code.
120
+ Metrics/MethodLength:
121
+ Max: 20
122
+ AllowedMethods:
123
+ - swagger_path
124
+ - operation
125
+
126
+
127
+ # A complexity metric geared towards measuring complexity for a human reader.
128
+ Metrics/PerceivedComplexity:
129
+ Max: 10
130
+
131
+ NestedGroups:
132
+ Max: 4
133
+
134
+ # Naming/FileName:
135
+ # Exclude:
136
+ # - 'lib/file.rb'
137
+
138
+ # Allow `downcase == ` instead of forcing `casecmp`
139
+ Performance/Casecmp:
140
+ Enabled: false
141
+
142
+ # Require children definitions to be nested or compact in classes and modules
143
+ Style/ClassAndModuleChildren:
144
+ Enabled: false
145
+
146
+ # Document classes and non-namespace modules.
147
+ # (Disabled for now, may revisit later)
148
+ Style/Documentation:
149
+ Enabled: false
150
+
151
+ # Checks the formatting of empty method definitions.
152
+ Style/EmptyMethod:
153
+ EnforcedStyle: expanded
154
+
155
+ # Add the frozen_string_literal comment to the top of files to help transition
156
+ # to frozen string literals by default.
157
+ Style/FrozenStringLiteralComment:
158
+ EnforcedStyle: always
159
+
160
+ # Check for conditionals that can be replaced with guard clauses
161
+ Style/GuardClause:
162
+ Enabled: false
163
+
164
+ Style/MixinUsage:
165
+ Exclude:
166
+ - 'RakeFile'
167
+
168
+ # Avoid multi-line method signatures.
169
+ Style/MultilineMethodSignature:
170
+ Enabled: true
171
+
172
+ # Don't use option hashes when you can use keyword arguments.
173
+ Style/OptionHash:
174
+ Enabled: true
175
+
176
+ # Use return instead of return nil.
177
+ Style/ReturnNil:
178
+ Enabled: true
179
+
180
+ # Allow code like `return x, y` as it's occasionally handy.
181
+ Style/RedundantReturn:
182
+ AllowMultipleReturnValues: true
183
+
184
+ # Prefer symbols instead of strings as hash keys.
185
+ Style/StringHashKeys:
186
+ Enabled: true
187
+
188
+ # Checks if configured preferred methods are used over non-preferred.
189
+ Style/StringMethods:
190
+ Enabled: true
191
+
192
+ # Checks for use of parentheses around ternary conditions.
193
+ Style/TernaryParentheses:
194
+ EnforcedStyle: require_parentheses_when_complex
data/.ruby-version CHANGED
@@ -1 +1 @@
1
- 3.0.1
1
+ 3.4.2
data/CHANGELOG.md CHANGED
@@ -1,3 +1,11 @@
1
+ ### 4.0.0 2025-07-10
2
+
3
+ * Changes
4
+ * Update gems.
5
+ * Add support for Ruby 3.2 through 3.4.
6
+ * Add CI tests against Ruby 3.2, 3.3, and 3.4.
7
+ * Removed os support for Windows 2019, ubuntu 20.04 and other unsupported GitHub Action runner os'.
8
+
1
9
  ### 3.0.3 2024-08-07
2
10
 
3
11
  * Changes
data/Gemfile CHANGED
@@ -21,5 +21,5 @@ group :test do
21
21
  end
22
22
 
23
23
  group :development, :test do
24
- gem 'pry-byebug', '>= 3.9', '< 4.0'
24
+ gem 'pry-byebug', '~> 3.11'
25
25
  end
data/Gemfile.lock CHANGED
@@ -1,102 +1,111 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- ProtectedConstructor (3.0.3)
4
+ ProtectedConstructor (4.0.0)
5
5
 
6
6
  GEM
7
7
  remote: https://rubygems.org/
8
8
  specs:
9
- ast (2.4.2)
10
- bigdecimal (3.1.8)
11
- byebug (11.1.3)
9
+ ast (2.4.3)
10
+ bigdecimal (3.2.2)
11
+ byebug (12.0.0)
12
12
  coderay (1.1.3)
13
- concurrent-ruby (1.3.3)
14
- diff-lcs (1.5.1)
13
+ concurrent-ruby (1.3.5)
14
+ diff-lcs (1.6.2)
15
15
  docile (1.4.1)
16
- dry-configurable (1.2.0)
17
- dry-core (~> 1.0, < 2)
16
+ dry-configurable (1.3.0)
17
+ dry-core (~> 1.1)
18
18
  zeitwerk (~> 2.6)
19
- dry-core (1.0.1)
19
+ dry-core (1.1.0)
20
20
  concurrent-ruby (~> 1.0)
21
+ logger
21
22
  zeitwerk (~> 2.6)
22
- dry-inflector (1.1.0)
23
- dry-initializer (3.1.1)
24
- dry-logic (1.5.0)
23
+ dry-inflector (1.2.0)
24
+ dry-initializer (3.2.0)
25
+ dry-logic (1.6.0)
26
+ bigdecimal
25
27
  concurrent-ruby (~> 1.0)
26
- dry-core (~> 1.0, < 2)
28
+ dry-core (~> 1.1)
27
29
  zeitwerk (~> 2.6)
28
- dry-schema (1.13.4)
30
+ dry-schema (1.14.1)
29
31
  concurrent-ruby (~> 1.0)
30
32
  dry-configurable (~> 1.0, >= 1.0.1)
31
- dry-core (~> 1.0, < 2)
32
- dry-initializer (~> 3.0)
33
- dry-logic (>= 1.4, < 2)
34
- dry-types (>= 1.7, < 2)
33
+ dry-core (~> 1.1)
34
+ dry-initializer (~> 3.2)
35
+ dry-logic (~> 1.5)
36
+ dry-types (~> 1.8)
35
37
  zeitwerk (~> 2.6)
36
- dry-types (1.7.2)
38
+ dry-types (1.8.3)
37
39
  bigdecimal (~> 3.0)
38
40
  concurrent-ruby (~> 1.0)
39
41
  dry-core (~> 1.0)
40
42
  dry-inflector (~> 1.0)
41
43
  dry-logic (~> 1.4)
42
44
  zeitwerk (~> 2.6)
43
- json (2.7.2)
44
- language_server-protocol (3.17.0.3)
45
+ json (2.12.2)
46
+ language_server-protocol (3.17.0.5)
47
+ lint_roller (1.1.0)
48
+ logger (1.7.0)
45
49
  method_source (1.1.0)
46
- parallel (1.25.1)
47
- parser (3.3.4.0)
50
+ parallel (1.27.0)
51
+ parser (3.3.8.0)
48
52
  ast (~> 2.4.1)
49
53
  racc
50
- pry (0.14.2)
54
+ prism (1.4.0)
55
+ pry (0.15.2)
51
56
  coderay (~> 1.1)
52
57
  method_source (~> 1.0)
53
- pry-byebug (3.10.1)
54
- byebug (~> 11.0)
55
- pry (>= 0.13, < 0.15)
58
+ pry-byebug (3.11.0)
59
+ byebug (~> 12.0)
60
+ pry (>= 0.13, < 0.16)
56
61
  racc (1.8.1)
57
62
  rainbow (3.1.1)
58
- rake (13.2.1)
59
- reek (6.3.0)
60
- dry-schema (~> 1.13.0)
63
+ rake (13.3.0)
64
+ reek (6.5.0)
65
+ dry-schema (~> 1.13)
66
+ logger (~> 1.6)
61
67
  parser (~> 3.3.0)
62
68
  rainbow (>= 2.0, < 4.0)
63
69
  rexml (~> 3.1)
64
- regexp_parser (2.9.2)
65
- rexml (3.3.4)
66
- strscan
67
- rspec (3.13.0)
70
+ regexp_parser (2.10.0)
71
+ rexml (3.4.1)
72
+ rspec (3.13.1)
68
73
  rspec-core (~> 3.13.0)
69
74
  rspec-expectations (~> 3.13.0)
70
75
  rspec-mocks (~> 3.13.0)
71
- rspec-core (3.13.0)
76
+ rspec-core (3.13.5)
72
77
  rspec-support (~> 3.13.0)
73
- rspec-expectations (3.13.1)
78
+ rspec-expectations (3.13.5)
74
79
  diff-lcs (>= 1.2.0, < 2.0)
75
80
  rspec-support (~> 3.13.0)
76
- rspec-mocks (3.13.1)
81
+ rspec-mocks (3.13.5)
77
82
  diff-lcs (>= 1.2.0, < 2.0)
78
83
  rspec-support (~> 3.13.0)
79
- rspec-support (3.13.1)
80
- rubocop (1.65.1)
84
+ rspec-support (3.13.4)
85
+ rubocop (1.78.0)
81
86
  json (~> 2.3)
82
- language_server-protocol (>= 3.17.0)
87
+ language_server-protocol (~> 3.17.0.2)
88
+ lint_roller (~> 1.1.0)
83
89
  parallel (~> 1.10)
84
90
  parser (>= 3.3.0.2)
85
91
  rainbow (>= 2.2.2, < 4.0)
86
- regexp_parser (>= 2.4, < 3.0)
87
- rexml (>= 3.2.5, < 4.0)
88
- rubocop-ast (>= 1.31.1, < 2.0)
92
+ regexp_parser (>= 2.9.3, < 3.0)
93
+ rubocop-ast (>= 1.45.1, < 2.0)
89
94
  ruby-progressbar (~> 1.7)
90
- unicode-display_width (>= 2.4.0, < 3.0)
91
- rubocop-ast (1.32.0)
92
- parser (>= 3.3.1.0)
93
- rubocop-capybara (2.21.0)
94
- rubocop (~> 1.41)
95
- rubocop-factory_bot (2.26.1)
96
- rubocop (~> 1.61)
97
- rubocop-performance (1.21.1)
98
- rubocop (>= 1.48.1, < 2.0)
99
- rubocop-ast (>= 1.31.1, < 2.0)
95
+ unicode-display_width (>= 2.4.0, < 4.0)
96
+ rubocop-ast (1.45.1)
97
+ parser (>= 3.3.7.2)
98
+ prism (~> 1.4)
99
+ rubocop-capybara (2.22.1)
100
+ lint_roller (~> 1.1)
101
+ rubocop (~> 1.72, >= 1.72.1)
102
+ rubocop-factory_bot (2.27.1)
103
+ lint_roller (~> 1.1)
104
+ rubocop (~> 1.72, >= 1.72.1)
105
+ rubocop-performance (1.25.0)
106
+ lint_roller (~> 1.1)
107
+ rubocop (>= 1.75.0, < 2.0)
108
+ rubocop-ast (>= 1.38.0, < 2.0)
100
109
  rubocop-rspec (2.31.0)
101
110
  rubocop (~> 1.40)
102
111
  rubocop-capybara (~> 2.17)
@@ -109,11 +118,12 @@ GEM
109
118
  docile (~> 1.1)
110
119
  simplecov-html (~> 0.11)
111
120
  simplecov_json_formatter (~> 0.1)
112
- simplecov-html (0.12.3)
121
+ simplecov-html (0.13.1)
113
122
  simplecov_json_formatter (0.1.4)
114
- strscan (3.1.0)
115
- unicode-display_width (2.5.0)
116
- zeitwerk (2.6.17)
123
+ unicode-display_width (3.1.4)
124
+ unicode-emoji (~> 4.0, >= 4.0.4)
125
+ unicode-emoji (4.0.4)
126
+ zeitwerk (2.7.3)
117
127
 
118
128
  PLATFORMS
119
129
  arm64-darwin-22
@@ -124,12 +134,13 @@ PLATFORMS
124
134
  x86_64-darwin-19
125
135
  x86_64-darwin-20
126
136
  x86_64-darwin-21
137
+ x86_64-darwin-22
127
138
  x86_64-linux
128
139
 
129
140
  DEPENDENCIES
130
141
  ProtectedConstructor!
131
142
  bundler (~> 2.5, >= 2.5.3)
132
- pry-byebug (>= 3.9, < 4.0)
143
+ pry-byebug (~> 3.11)
133
144
  rake (>= 13.0, < 14.0)
134
145
  reek (>= 6.1, < 7.0)
135
146
  rspec (>= 3.12, < 4.0)
@@ -18,7 +18,7 @@ Gem::Specification.new do |spec|
18
18
  spec.homepage = 'https://github.com/gangelo/ProtectedConstructor'
19
19
  spec.license = 'MIT'
20
20
 
21
- spec.required_ruby_version = Gem::Requirement.new('>= 3.0.1', '< 4.0')
21
+ spec.required_ruby_version = Gem::Requirement.new('>= 3.2', '< 4.0')
22
22
 
23
23
  spec.files = `git ls-files`.split($INPUT_RECORD_SEPARATOR)
24
24
  spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
data/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  [![Ruby](https://github.com/gangelo/ProtectedConstructor/actions/workflows/ruby.yml/badge.svg)](https://github.com/gangelo/ProtectedConstructor/actions/workflows/ruby.yml)
2
- [![GitHub version](http://badge.fury.io/gh/gangelo%2FProtectedConstructor.svg?refresh=7)](http://badge.fury.io/gh/gangelo%2FProtectedConstructor.svg)
3
- [![Gem Version](https://badge.fury.io/rb/ProtectedConstructor.svg?refresh=7)](https://badge.fury.io/rb/ProtectedConstructor.svg)
2
+ [![GitHub version](http://badge.fury.io/gh/gangelo%2FProtectedConstructor.svg?refresh=8)](http://badge.fury.io/gh/gangelo%2FProtectedConstructor.svg)
3
+ [![Gem Version](https://badge.fury.io/rb/ProtectedConstructor.svg?refresh=8)](https://badge.fury.io/rb/ProtectedConstructor.svg)
4
4
  [![Documentation](http://img.shields.io/badge/docs-rdoc.info-blue.svg)](http://www.rubydoc.info/gems/ProtectedConstructor/)
5
5
  [![Report Issues](https://img.shields.io/badge/report-issues-red.svg)](https://github.com/gangelo/ProtectedConstructor/issues)
6
6
  [![License](http://img.shields.io/badge/license-MIT-yellowgreen.svg)](#license)
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module ProtectedConstructor
4
- VERSION = '3.0.3'
4
+ VERSION = '4.0.0'
5
5
  end
metadata CHANGED
@@ -1,14 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ProtectedConstructor
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.0.3
4
+ version: 4.0.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Gene M. Angelo, Jr.
8
- autorequire:
9
8
  bindir: bin
10
9
  cert_chain: []
11
- date: 2024-08-07 00:00:00.000000000 Z
10
+ date: 2025-07-11 00:00:00.000000000 Z
12
11
  dependencies: []
13
12
  description: ProtectedConstructor Gem
14
13
  email:
@@ -21,6 +20,7 @@ files:
21
20
  - ".github/workflows/ruby.yml"
22
21
  - ".gitignore"
23
22
  - ".rspec"
23
+ - ".rubocop.yml"
24
24
  - ".ruby-version"
25
25
  - CHANGELOG.md
26
26
  - Gemfile
@@ -74,7 +74,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
74
74
  requirements:
75
75
  - - ">="
76
76
  - !ruby/object:Gem::Version
77
- version: 3.0.1
77
+ version: '3.2'
78
78
  - - "<"
79
79
  - !ruby/object:Gem::Version
80
80
  version: '4.0'
@@ -84,8 +84,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
84
84
  - !ruby/object:Gem::Version
85
85
  version: '0'
86
86
  requirements: []
87
- rubygems_version: 3.2.15
88
- signing_key:
87
+ rubygems_version: 3.6.2
89
88
  specification_version: 4
90
89
  summary: Provides a module that may be included in a Ruby class, that protects the
91
90
  constructor; good for enforcing instantiation of classes using, for instance, a