human_enum 0.1.2 → 1.1.2

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: 754cd01c0e5f2c7176d6cb835ee43cbbf555433f3b94f6d87c9762ca8a4091a5
4
- data.tar.gz: ea1fa8588c89b94387dcb3df06e254041dc986832859e82b085d4bfb0e6dd93f
3
+ metadata.gz: 70901ad863143ed0cd282bd80410c8f6d3748ce7d82e049e2b03327866e20903
4
+ data.tar.gz: 9d8b0ca4db806f2dad9a512492083cfcb59e105ae715b6aa2b4df81466da9e2d
5
5
  SHA512:
6
- metadata.gz: f28aa6018ef05d2bb2a8e745d919760ab4375c0f3056796cdd82903b5b3d1270f8bf1f15176c70d1002def46f4401dd50aa6df9a4e7d6cb90b55554b95c2c733
7
- data.tar.gz: 9a1d8bc8aa7d50fc72044159631eca687247899c9d763398e8f6446909ac4d48196b098120d8701067c8e28f79f549b1effb3e431b171984c05e8b86fad503cd
6
+ metadata.gz: 690fa84f0b397789f0e93e2ef6fa532da7c96423d1b5afa8713043829ce5c9c6f688c296036e37d63a8587857f885a564f7c1f97cd0f9e03b6137ffe0823940f
7
+ data.tar.gz: 9cbc3d72af9091c9598b796e1f4e78e2baa81d5a6f2eb0b01ceeebdd9ed79db0e132e6d3beb4a04a8983b2dec5e2544e295e23611b0329c6e6695a645454c329
data/.codeclimate.yml ADDED
@@ -0,0 +1,4 @@
1
+ plugins:
2
+ rubocop:
3
+ enabled: true
4
+ channel: rubocop-1-56-3
@@ -0,0 +1 @@
1
+ {"image":"mcr.microsoft.com/devcontainers/universal:2"}
@@ -0,0 +1,15 @@
1
+ # To get started with Dependabot version updates, you'll need to specify which
2
+ # package ecosystems to update and where the package manifests are located.
3
+ # Please see the documentation for all configuration options:
4
+ # https://docs.github.com/github/administering-a-repository/configuration-options-for-dependency-updates
5
+
6
+ version: 2
7
+ updates:
8
+ - package-ecosystem: "bundler" # See documentation for possible values
9
+ directory: "/" # Location of package manifests
10
+ schedule:
11
+ interval: "weekly"
12
+
13
+ ignore:
14
+ - dependency-name: "*"
15
+ update-types: ["version-update:semver-major"]
@@ -0,0 +1,31 @@
1
+ name: publish
2
+
3
+ on:
4
+ release:
5
+ types: [published]
6
+
7
+ jobs:
8
+ tests:
9
+ uses: ./.github/workflows/tests.yml
10
+ secrets: inherit
11
+
12
+ publish:
13
+ runs-on: ubuntu-latest
14
+
15
+ needs: tests
16
+
17
+ permissions:
18
+ packages: write
19
+ contents: read
20
+ attestations: write
21
+ id-token: write
22
+
23
+ steps:
24
+ - uses: actions/checkout@v4
25
+
26
+ - uses: ruby/setup-ruby@v1
27
+ with:
28
+ rubygems: latest
29
+ bundler-cache: true
30
+
31
+ - uses: rubygems/release-gem@v1
@@ -0,0 +1,26 @@
1
+ name: test-results
2
+
3
+ on:
4
+ workflow_run:
5
+ workflows: ["tests"]
6
+ types:
7
+ - completed
8
+
9
+ permissions:
10
+ contents: read
11
+ actions: read
12
+ checks: write
13
+
14
+ jobs:
15
+ report:
16
+ name: Report test results
17
+
18
+ runs-on: ubuntu-latest
19
+
20
+ steps:
21
+ - uses: dorny/test-reporter@v1
22
+ with:
23
+ name: rspec
24
+ path: "*.json"
25
+ artifact: test-results
26
+ reporter: rspec-json
@@ -0,0 +1,65 @@
1
+ name: tests
2
+
3
+ on:
4
+ push:
5
+ branches: [main]
6
+ pull_request:
7
+ branches: [main]
8
+ workflow_call:
9
+
10
+ permissions:
11
+ contents: read
12
+
13
+ jobs:
14
+ test-current:
15
+ name: Run specs against current Ruby and Rails
16
+
17
+ runs-on: ubuntu-latest
18
+
19
+ steps:
20
+ - uses: actions/checkout@v4
21
+
22
+ - uses: ruby/setup-ruby@v1
23
+ with:
24
+ rubygems: latest
25
+ bundler-cache: true
26
+
27
+ - name: Run tests and upload code coverage to Code Climate
28
+ uses: paambaati/codeclimate-action@v6
29
+ env:
30
+ CC_TEST_REPORTER_ID: ${{ secrets.CC_TEST_REPORTER_ID }}
31
+ with:
32
+ coverageCommand: bin/rspec --format json --out spec/reports/rspec.json
33
+
34
+ - name: Upload test results
35
+ uses: actions/upload-artifact@v4
36
+ if: success() || failure()
37
+ with:
38
+ name: test-results
39
+ path: spec/reports/rspec.json
40
+
41
+ test-matrix:
42
+ name: Test against Ruby ${{ matrix.ruby }} and Rails ${{ matrix.rails }}
43
+ needs: test-current
44
+
45
+ runs-on: ubuntu-latest
46
+
47
+ strategy:
48
+ matrix:
49
+ ruby: ['3.1', '3.2', '3.3']
50
+ rails: ['6.1', '7.0', '7.1']
51
+
52
+ env:
53
+ BUNDLE_LOCKFILE: rails-${{ matrix.rails }}
54
+
55
+ steps:
56
+ - uses: actions/checkout@v4
57
+
58
+ - uses: ruby/setup-ruby@v1
59
+ with:
60
+ ruby-version: ${{ matrix.ruby }}
61
+ rubygems: latest
62
+ bundler-cache: true
63
+
64
+ - name: Run specs
65
+ run: bin/rspec --no-profile
data/.gitignore CHANGED
@@ -1,14 +1,56 @@
1
- /.bundle/
2
- /.yardoc
3
- /_yardoc/
1
+ *.gem
2
+ *.rbc
3
+ /.config
4
4
  /coverage/
5
- /doc/
5
+ /InstalledFiles
6
6
  /pkg/
7
7
  /spec/reports/
8
+ /spec/examples.txt
9
+ /test/tmp/
10
+ /test/version_tmp/
8
11
  /tmp/
9
12
 
10
- # rspec failure tracking
11
- .rspec_status
13
+ # Used by dotenv library to load environment variables.
14
+ # .env
15
+
16
+ # Ignore Byebug command history file.
17
+ .byebug_history
18
+
19
+ ## Specific to RubyMotion:
20
+ .dat*
21
+ .repl_history
22
+ build/
23
+ *.bridgesupport
24
+ build-iPhoneOS/
25
+ build-iPhoneSimulator/
26
+
27
+ ## Specific to RubyMotion (use of CocoaPods):
28
+ #
29
+ # We recommend against adding the Pods directory to your .gitignore. However
30
+ # you should judge for yourself, the pros and cons are mentioned at:
31
+ # https://guides.cocoapods.org/using/using-cocoapods.html#should-i-check-the-pods-directory-into-source-control
32
+ #
33
+ # vendor/Pods/
34
+
35
+ ## Documentation cache and generated files:
36
+ /.yardoc/
37
+ /_yardoc/
38
+ /doc/
39
+ /rdoc/
40
+
41
+ ## Environment normalization:
42
+ /.bundle/
43
+ /vendor/bundle
44
+ /lib/bundler/man/
45
+
46
+ # for a library or gem, you might want to ignore these files since the code is
47
+ # intended to run in multiple environments; otherwise, check them in:
48
+ # Gemfile.lock
49
+ # .ruby-version
50
+ # .ruby-gemset
51
+
52
+ # unless supporting rvm < 1.11.0 or doing something fancy, ignore this:
53
+ .rvmrc
12
54
 
13
- # rspec local configuration
14
- .rspec-local
55
+ # Used by RuboCop. Remote config files pulled in from inherit_from directive.
56
+ # .rubocop-https?--*
data/.hound.yml CHANGED
@@ -1,2 +1,7 @@
1
1
  rubocop:
2
2
  version: 0.72.0
3
+
4
+ jshint:
5
+ enabled: false
6
+
7
+ fail_on_violations: true
data/.rspec CHANGED
@@ -1,3 +1 @@
1
- --format documentation
2
- --color
3
1
  --require spec_helper
data/.rubocop.yml CHANGED
@@ -1,9 +1,20 @@
1
1
  require:
2
2
  - rubocop-performance
3
+ - rubocop-rake
4
+ - rubocop-rails
3
5
  - rubocop-rspec
4
6
 
7
+ AllCops:
8
+ NewCops: enable
9
+ TargetRubyVersion: 3.1
10
+
5
11
  Metrics/BlockLength:
6
12
  Exclude:
7
- - 'Rakefile'
8
- - '**/*.gemspec'
9
- - 'spec/**/*.rb'
13
+ - "Rakefile"
14
+ - "Guardfile"
15
+ - "**/*.gemspec"
16
+ - "spec/**/*.rb"
17
+
18
+ Rails/ApplicationRecord:
19
+ Exclude:
20
+ - "spec/**/*.rb"
data/.ruby-version CHANGED
@@ -1 +1 @@
1
- ruby-2.6.4
1
+ ruby-3.3.5
@@ -0,0 +1,5 @@
1
+ {
2
+ "conventionalCommits.scopes": [
3
+ "deps"
4
+ ]
5
+ }
data/CHANGELOG.md CHANGED
@@ -1,5 +1,14 @@
1
1
  # Changelog
2
2
 
3
+ ## 1.0.0
4
+ Updating to Ruby 3.2 and Rails 7
5
+
6
+ ## 0.1.3
7
+ No code changes, just changing our CI
8
+
9
+ ## 0.1.2
10
+ Adding proper specs and improving the quality of the gem
11
+
3
12
  ## 0.1.1
4
13
  Improvements to the gem (no code changes)
5
14
 
data/CODEOWNERS ADDED
@@ -0,0 +1 @@
1
+ * @rafasoares
data/Gemfile CHANGED
@@ -2,5 +2,47 @@
2
2
 
3
3
  source 'https://rubygems.org'
4
4
 
5
- # Specify your gem's dependencies in human_enum.gemspec
6
5
  gemspec
6
+
7
+ plugin 'bundler-multilock', '~> 1.3'
8
+ return unless Plugin.installed?('bundler-multilock')
9
+
10
+ Plugin.send(:load_plugin, 'bundler-multilock')
11
+
12
+ lockfile do
13
+ gem 'activerecord', '~> 7.1'
14
+ end
15
+
16
+ lockfile 'rails-6.1' do
17
+ gem 'activerecord', '~> 6.1.0' # rubocop:disable Bundler/DuplicatedGem
18
+ end
19
+
20
+ lockfile 'rails-7.0' do
21
+ gem 'activerecord', '~> 7.0.0' # rubocop:disable Bundler/DuplicatedGem
22
+ end
23
+
24
+ lockfile 'rails-7.1' do
25
+ gem 'activerecord', '~> 7.1.0' # rubocop:disable Bundler/DuplicatedGem
26
+ end
27
+
28
+ gem 'rake', '~> 13.0'
29
+
30
+ gem 'sqlite3', '~> 1.4'
31
+
32
+ gem 'rspec', '~> 3.12'
33
+
34
+ # Should match the version in .codeclimate.yml
35
+ gem 'rubocop', '~> 1.56.3'
36
+ gem 'rubocop-performance'
37
+ gem 'rubocop-rails'
38
+ gem 'rubocop-rake'
39
+ gem 'rubocop-rspec'
40
+
41
+ gem 'ruby-lsp-rails'
42
+ gem 'ruby-lsp-rspec', require: false
43
+
44
+ gem 'guard', '~> 2.18'
45
+ gem 'guard-rspec', '~> 4.7'
46
+ gem 'guard-rubocop', '~> 1.5'
47
+
48
+ gem 'simplecov', '~> 0.22.0'
data/Gemfile.lock CHANGED
@@ -1,36 +1,51 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- human_enum (0.1.1)
5
- activerecord (> 5.0.0)
4
+ human_enum (1.1.2)
5
+ activerecord (>= 6.1, < 8)
6
6
 
7
7
  GEM
8
8
  remote: https://rubygems.org/
9
9
  specs:
10
- activemodel (6.0.0)
11
- activesupport (= 6.0.0)
12
- activerecord (6.0.0)
13
- activemodel (= 6.0.0)
14
- activesupport (= 6.0.0)
15
- activesupport (6.0.0)
10
+ activemodel (7.1.4.2)
11
+ activesupport (= 7.1.4.2)
12
+ activerecord (7.1.4.2)
13
+ activemodel (= 7.1.4.2)
14
+ activesupport (= 7.1.4.2)
15
+ timeout (>= 0.4.0)
16
+ activesupport (7.1.4.2)
17
+ base64
18
+ bigdecimal
16
19
  concurrent-ruby (~> 1.0, >= 1.0.2)
17
- i18n (>= 0.7, < 2)
18
- minitest (~> 5.1)
19
- tzinfo (~> 1.1)
20
- zeitwerk (~> 2.1, >= 2.1.8)
21
- ast (2.4.0)
22
- coderay (1.1.2)
23
- concurrent-ruby (1.1.5)
24
- diff-lcs (1.3)
25
- ffi (1.11.1)
26
- formatador (0.2.5)
27
- guard (2.15.1)
20
+ connection_pool (>= 2.2.5)
21
+ drb
22
+ i18n (>= 1.6, < 2)
23
+ minitest (>= 5.1)
24
+ mutex_m
25
+ tzinfo (~> 2.0)
26
+ ast (2.4.2)
27
+ base64 (0.1.2)
28
+ bigdecimal (3.1.8)
29
+ coderay (1.1.3)
30
+ concurrent-ruby (1.3.4)
31
+ connection_pool (2.4.1)
32
+ diff-lcs (1.5.1)
33
+ docile (1.4.1)
34
+ drb (2.2.1)
35
+ ffi (1.17.0-aarch64-linux-gnu)
36
+ ffi (1.17.0-arm-linux-gnu)
37
+ ffi (1.17.0-arm64-darwin)
38
+ ffi (1.17.0-x86-linux-gnu)
39
+ ffi (1.17.0-x86_64-darwin)
40
+ ffi (1.17.0-x86_64-linux-gnu)
41
+ formatador (1.1.0)
42
+ guard (2.19.0)
28
43
  formatador (>= 0.2.4)
29
44
  listen (>= 2.7, < 4.0)
30
45
  lumberjack (>= 1.0.12, < 2.0)
31
46
  nenv (~> 0.1)
32
47
  notiffany (~> 0.0)
33
- pry (>= 0.9.12)
48
+ pry (>= 0.13.0)
34
49
  shellany (~> 0.0)
35
50
  thor (>= 0.18.1)
36
51
  guard-compat (1.2.1)
@@ -38,82 +53,138 @@ GEM
38
53
  guard (~> 2.1)
39
54
  guard-compat (~> 1.1)
40
55
  rspec (>= 2.99.0, < 4.0)
41
- guard-rubocop (1.3.0)
56
+ guard-rubocop (1.5.0)
42
57
  guard (~> 2.0)
43
- rubocop (~> 0.20)
44
- i18n (1.7.0)
58
+ rubocop (< 2.0)
59
+ i18n (1.14.6)
45
60
  concurrent-ruby (~> 1.0)
46
- jaro_winkler (1.5.3)
47
- listen (3.2.0)
61
+ json (2.7.4)
62
+ language_server-protocol (3.17.0.3)
63
+ listen (3.9.0)
48
64
  rb-fsevent (~> 0.10, >= 0.10.3)
49
65
  rb-inotify (~> 0.9, >= 0.9.10)
50
- lumberjack (1.0.13)
51
- method_source (0.9.2)
52
- minitest (5.12.2)
66
+ logger (1.6.1)
67
+ lumberjack (1.2.10)
68
+ method_source (1.1.0)
69
+ minitest (5.25.1)
70
+ mutex_m (0.2.0)
53
71
  nenv (0.3.0)
54
72
  notiffany (0.1.3)
55
73
  nenv (~> 0.1)
56
74
  shellany (~> 0.0)
57
- parallel (1.18.0)
58
- parser (2.6.5.0)
59
- ast (~> 2.4.0)
60
- pry (0.12.2)
61
- coderay (~> 1.1.0)
62
- method_source (~> 0.9.0)
63
- rainbow (3.0.0)
64
- rake (10.5.0)
65
- rb-fsevent (0.10.3)
66
- rb-inotify (0.10.0)
75
+ parallel (1.26.3)
76
+ parser (3.3.5.0)
77
+ ast (~> 2.4.1)
78
+ racc
79
+ prism (1.2.0)
80
+ pry (0.14.2)
81
+ coderay (~> 1.1)
82
+ method_source (~> 1.0)
83
+ racc (1.8.1)
84
+ rack (3.1.8)
85
+ rainbow (3.1.1)
86
+ rake (13.2.1)
87
+ rb-fsevent (0.11.2)
88
+ rb-inotify (0.11.1)
67
89
  ffi (~> 1.0)
68
- rspec (3.9.0)
69
- rspec-core (~> 3.9.0)
70
- rspec-expectations (~> 3.9.0)
71
- rspec-mocks (~> 3.9.0)
72
- rspec-core (3.9.0)
73
- rspec-support (~> 3.9.0)
74
- rspec-expectations (3.9.0)
90
+ rbs (3.6.1)
91
+ logger
92
+ regexp_parser (2.9.2)
93
+ rexml (3.3.9)
94
+ rspec (3.13.0)
95
+ rspec-core (~> 3.13.0)
96
+ rspec-expectations (~> 3.13.0)
97
+ rspec-mocks (~> 3.13.0)
98
+ rspec-core (3.13.2)
99
+ rspec-support (~> 3.13.0)
100
+ rspec-expectations (3.13.3)
75
101
  diff-lcs (>= 1.2.0, < 2.0)
76
- rspec-support (~> 3.9.0)
77
- rspec-mocks (3.9.0)
102
+ rspec-support (~> 3.13.0)
103
+ rspec-mocks (3.13.2)
78
104
  diff-lcs (>= 1.2.0, < 2.0)
79
- rspec-support (~> 3.9.0)
80
- rspec-support (3.9.0)
81
- rubocop (0.72.0)
82
- jaro_winkler (~> 1.5.1)
105
+ rspec-support (~> 3.13.0)
106
+ rspec-support (3.13.1)
107
+ rubocop (1.56.4)
108
+ base64 (~> 0.1.1)
109
+ json (~> 2.3)
110
+ language_server-protocol (>= 3.17.0)
83
111
  parallel (~> 1.10)
84
- parser (>= 2.6)
112
+ parser (>= 3.2.2.3)
85
113
  rainbow (>= 2.2.2, < 4.0)
114
+ regexp_parser (>= 1.8, < 3.0)
115
+ rexml (>= 3.2.5, < 4.0)
116
+ rubocop-ast (>= 1.28.1, < 2.0)
86
117
  ruby-progressbar (~> 1.7)
87
- unicode-display_width (>= 1.4.0, < 1.7)
88
- rubocop-performance (1.5.0)
89
- rubocop (>= 0.71.0)
90
- rubocop-rspec (1.36.0)
91
- rubocop (>= 0.68.1)
92
- ruby-progressbar (1.10.1)
118
+ unicode-display_width (>= 2.4.0, < 3.0)
119
+ rubocop-ast (1.32.3)
120
+ parser (>= 3.3.1.0)
121
+ rubocop-performance (1.22.1)
122
+ rubocop (>= 1.48.1, < 2.0)
123
+ rubocop-ast (>= 1.31.1, < 2.0)
124
+ rubocop-rails (2.27.0)
125
+ activesupport (>= 4.2.0)
126
+ rack (>= 1.1)
127
+ rubocop (>= 1.52.0, < 2.0)
128
+ rubocop-ast (>= 1.31.1, < 2.0)
129
+ rubocop-rake (0.6.0)
130
+ rubocop (~> 1.0)
131
+ rubocop-rspec (3.0.0)
132
+ rubocop (~> 1.40)
133
+ ruby-lsp (0.20.1)
134
+ language_server-protocol (~> 3.17.0)
135
+ prism (>= 1.2, < 2.0)
136
+ rbs (>= 3, < 4)
137
+ sorbet-runtime (>= 0.5.10782)
138
+ ruby-lsp-rails (0.3.21)
139
+ ruby-lsp (>= 0.20.0, < 0.21.0)
140
+ ruby-lsp-rspec (0.1.17)
141
+ ruby-lsp (~> 0.20.1)
142
+ ruby-progressbar (1.13.0)
93
143
  shellany (0.0.1)
94
- sqlite3 (1.4.1)
95
- thor (0.20.3)
96
- thread_safe (0.3.6)
97
- tzinfo (1.2.5)
98
- thread_safe (~> 0.1)
99
- unicode-display_width (1.6.0)
100
- zeitwerk (2.2.0)
144
+ simplecov (0.22.0)
145
+ docile (~> 1.1)
146
+ simplecov-html (~> 0.11)
147
+ simplecov_json_formatter (~> 0.1)
148
+ simplecov-html (0.13.1)
149
+ simplecov_json_formatter (0.1.4)
150
+ sorbet-runtime (0.5.11620)
151
+ sqlite3 (1.7.3-aarch64-linux)
152
+ sqlite3 (1.7.3-arm-linux)
153
+ sqlite3 (1.7.3-arm64-darwin)
154
+ sqlite3 (1.7.3-x86-linux)
155
+ sqlite3 (1.7.3-x86_64-darwin)
156
+ sqlite3 (1.7.3-x86_64-linux)
157
+ thor (1.3.2)
158
+ timeout (0.4.1)
159
+ tzinfo (2.0.6)
160
+ concurrent-ruby (~> 1.0)
161
+ unicode-display_width (2.6.0)
101
162
 
102
163
  PLATFORMS
103
- ruby
164
+ aarch64-linux
165
+ arm-linux
166
+ arm64-darwin
167
+ x86-linux
168
+ x86_64-darwin
169
+ x86_64-linux
104
170
 
105
171
  DEPENDENCIES
106
- bundler (~> 2.0)
107
- guard (~> 2.15)
172
+ activerecord (~> 7.1)
173
+ guard (~> 2.18)
108
174
  guard-rspec (~> 4.7)
109
- guard-rubocop (~> 1.3)
175
+ guard-rubocop (~> 1.5)
110
176
  human_enum!
111
- rake (~> 10.0)
112
- rspec (~> 3.0)
113
- rubocop (~> 0.72.0)
114
- rubocop-performance (~> 1.5)
115
- rubocop-rspec (~> 1.36)
177
+ rake (~> 13.0)
178
+ rspec (~> 3.12)
179
+ rubocop (~> 1.56.3)
180
+ rubocop-performance
181
+ rubocop-rails
182
+ rubocop-rake
183
+ rubocop-rspec
184
+ ruby-lsp-rails
185
+ ruby-lsp-rspec
186
+ simplecov (~> 0.22.0)
116
187
  sqlite3 (~> 1.4)
117
188
 
118
189
  BUNDLED WITH
119
- 2.0.2
190
+ 2.5.10