iknow_params 2.3.0 → 2.3.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 +4 -4
- data/.github/workflows/gem-push.yml +31 -0
- data/.github/workflows/test.yml +59 -0
- data/Appraisals +14 -9
- data/gemfiles/{activesupport_5_2.gemfile → activesupport_7_1.gemfile} +2 -2
- data/gemfiles/{activesupport_6_0.gemfile → activesupport_7_2.gemfile} +2 -2
- data/gemfiles/{activesupport_7_0.gemfile → activesupport_8_0.gemfile} +2 -2
- data/gemfiles/activesupport_8_1.gemfile +9 -0
- data/iknow_params.gemspec +4 -3
- data/lib/iknow_params/serializer.rb +6 -1
- data/lib/iknow_params/version.rb +1 -1
- metadata +31 -15
- data/.circleci/config.yml +0 -107
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 3aef224e0fc4ee8a811bbb60fe624352c35636a4baf89fb8ea19ad64a9c156bd
|
|
4
|
+
data.tar.gz: 786ef6a2629700baafc476568c66ccdf8fd30f4210668bb4dae41cc51d0f3208
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 513eccf0e4550505606bfe9481303cb3c2718fc2f0f88bdefccd383dbca3a006dd1d606b0904316dfbd8c0d3ce947f20f8659d0d85ed6c9f3d27be351e3bcf79
|
|
7
|
+
data.tar.gz: 91bca71a731897e4697e6fc036036888cf02681ae6e4ce0725115575681b1dc58ef01090560b7461bc15cedc9ec60184473e93262f504d790b27d1f3b51019a2
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
name: Publish Ruby Gem
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches: [ "master" ]
|
|
6
|
+
|
|
7
|
+
jobs:
|
|
8
|
+
build:
|
|
9
|
+
name: Build + Publish
|
|
10
|
+
runs-on: ubuntu-latest
|
|
11
|
+
permissions:
|
|
12
|
+
contents: read
|
|
13
|
+
packages: write
|
|
14
|
+
|
|
15
|
+
steps:
|
|
16
|
+
- uses: actions/checkout@v3
|
|
17
|
+
- name: Set up Ruby 2.7
|
|
18
|
+
uses: ruby/setup-ruby@v1
|
|
19
|
+
with:
|
|
20
|
+
ruby-version: 2.7
|
|
21
|
+
|
|
22
|
+
- name: Publish to RubyGems
|
|
23
|
+
run: |
|
|
24
|
+
mkdir -p $HOME/.gem
|
|
25
|
+
touch $HOME/.gem/credentials
|
|
26
|
+
chmod 0600 $HOME/.gem/credentials
|
|
27
|
+
printf -- "---\n:rubygems_api_key: ${GEM_HOST_API_KEY}\n" > $HOME/.gem/credentials
|
|
28
|
+
gem build *.gemspec
|
|
29
|
+
gem push *.gem
|
|
30
|
+
env:
|
|
31
|
+
GEM_HOST_API_KEY: "${{secrets.RUBYGEMS_AUTH_TOKEN}}"
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
name: Run Tests
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
pull_request:
|
|
5
|
+
branches: "**"
|
|
6
|
+
|
|
7
|
+
permissions:
|
|
8
|
+
contents: read
|
|
9
|
+
checks: write
|
|
10
|
+
pull-requests: write
|
|
11
|
+
|
|
12
|
+
jobs:
|
|
13
|
+
test:
|
|
14
|
+
runs-on: ubuntu-latest
|
|
15
|
+
|
|
16
|
+
strategy:
|
|
17
|
+
fail-fast: false
|
|
18
|
+
matrix:
|
|
19
|
+
include:
|
|
20
|
+
# We test all relevant versions of rails, using the lowest, non-EOL,
|
|
21
|
+
# Ruby version required for that version of rails.
|
|
22
|
+
- ruby-version: '3.2'
|
|
23
|
+
activesupport-version: 7.1
|
|
24
|
+
bundle-gemfile: gemfiles/activesupport_7_1.gemfile
|
|
25
|
+
- ruby-version: '3.2'
|
|
26
|
+
activesupport-version: 7.2
|
|
27
|
+
bundle-gemfile: gemfiles/activesupport_7_2.gemfile
|
|
28
|
+
- ruby-version: '3.2'
|
|
29
|
+
activesupport-version: 8.0
|
|
30
|
+
bundle-gemfile: gemfiles/activesupport_8_0.gemfile
|
|
31
|
+
- ruby-version: '3.2'
|
|
32
|
+
activesupport-version: 8.1
|
|
33
|
+
bundle-gemfile: gemfiles/activesupport_8_1.gemfile
|
|
34
|
+
|
|
35
|
+
env: # $BUNDLE_GEMFILE must be set at the job level, so it is set for all steps
|
|
36
|
+
BUNDLE_GEMFILE: ${{ github.workspace }}/${{ matrix.bundle-gemfile }}
|
|
37
|
+
|
|
38
|
+
steps:
|
|
39
|
+
- uses: actions/checkout@v3
|
|
40
|
+
- name: Set up Ruby
|
|
41
|
+
uses: ruby/setup-ruby@v1
|
|
42
|
+
with:
|
|
43
|
+
ruby-version: ${{ matrix.ruby-version }}
|
|
44
|
+
bundler-cache: true # runs 'bundle install' and caches installed gems automatically
|
|
45
|
+
- name: Run tests
|
|
46
|
+
run: bundle exec rspec --profile 10 --format RspecJunitFormatter --out test_results/rspec.xml --format progress
|
|
47
|
+
- name: Upload result
|
|
48
|
+
uses: actions/upload-artifact@v4
|
|
49
|
+
if: always()
|
|
50
|
+
with:
|
|
51
|
+
name: rspec_${{ matrix.ruby-version }}_${{ matrix.activesupport-version }}.xml
|
|
52
|
+
path: test_results/rspec.xml
|
|
53
|
+
- name: Test Report
|
|
54
|
+
uses: dorny/test-reporter@v1
|
|
55
|
+
if: always()
|
|
56
|
+
with:
|
|
57
|
+
name: Rspec Tests - ${{ matrix.ruby-version }}_${{ matrix.activesupport-version }}
|
|
58
|
+
path: test_results/rspec.xml
|
|
59
|
+
reporter: java-junit
|
data/Appraisals
CHANGED
|
@@ -1,14 +1,19 @@
|
|
|
1
|
-
appraise 'activesupport-
|
|
2
|
-
gem 'activesupport', '~>
|
|
3
|
-
gem 'rails', '~>
|
|
1
|
+
appraise 'activesupport-7-1' do
|
|
2
|
+
gem 'activesupport', '~> 7.1.0'
|
|
3
|
+
gem 'rails', '~> 7.1.0'
|
|
4
4
|
end
|
|
5
5
|
|
|
6
|
-
appraise 'activesupport-
|
|
7
|
-
gem 'activesupport', '~>
|
|
8
|
-
gem 'rails', '~>
|
|
6
|
+
appraise 'activesupport-7-2' do
|
|
7
|
+
gem 'activesupport', '~> 7.2.0'
|
|
8
|
+
gem 'rails', '~> 7.2.0'
|
|
9
9
|
end
|
|
10
10
|
|
|
11
|
-
appraise 'activesupport-
|
|
12
|
-
gem 'activesupport', '~>
|
|
13
|
-
gem 'rails', '~>
|
|
11
|
+
appraise 'activesupport-8-0' do
|
|
12
|
+
gem 'activesupport', '~> 8.0.0'
|
|
13
|
+
gem 'rails', '~> 8.0.0'
|
|
14
|
+
end
|
|
15
|
+
|
|
16
|
+
appraise 'activesupport-8-1' do
|
|
17
|
+
gem 'activesupport', '~> 8.1.0'
|
|
18
|
+
gem 'rails', '~> 8.1.0'
|
|
14
19
|
end
|
data/iknow_params.gemspec
CHANGED
|
@@ -13,7 +13,7 @@ Gem::Specification.new do |spec|
|
|
|
13
13
|
spec.homepage = "http://github.com/iknow/iknow_params"
|
|
14
14
|
spec.license = "MIT"
|
|
15
15
|
|
|
16
|
-
spec.required_ruby_version = ">= 2
|
|
16
|
+
spec.required_ruby_version = ">= 3.2"
|
|
17
17
|
spec.required_rubygems_version = ">= 2.5"
|
|
18
18
|
|
|
19
19
|
spec.files = `git ls-files -z`.split("\x0")
|
|
@@ -26,13 +26,14 @@ Gem::Specification.new do |spec|
|
|
|
26
26
|
spec.add_development_dependency "rspec", "~> 3.0"
|
|
27
27
|
spec.add_development_dependency "sqlite3"
|
|
28
28
|
spec.add_development_dependency "actionpack", "> 5.2.0"
|
|
29
|
-
spec.add_development_dependency "rails", ">
|
|
29
|
+
spec.add_development_dependency "rails", "> 7.1.0"
|
|
30
30
|
|
|
31
31
|
spec.add_development_dependency "byebug"
|
|
32
32
|
spec.add_development_dependency "appraisal"
|
|
33
|
+
spec.add_development_dependency "ostruct"
|
|
33
34
|
spec.add_development_dependency "tzinfo-data"
|
|
34
35
|
|
|
35
36
|
spec.add_dependency "activesupport", "> 5.2.0"
|
|
36
37
|
spec.add_dependency "tzinfo"
|
|
37
|
-
spec.add_dependency "json-schema", "
|
|
38
|
+
spec.add_dependency "json-schema", "> 3.0.0"
|
|
38
39
|
end
|
|
@@ -237,7 +237,12 @@ class IknowParams::Serializer
|
|
|
237
237
|
class UUID < String
|
|
238
238
|
def load(str)
|
|
239
239
|
matches_type!(str, err: LoadError)
|
|
240
|
-
|
|
240
|
+
|
|
241
|
+
# UUIDs in Ruby are typically represented as lower case strings,
|
|
242
|
+
# for example, as returned by SecureRandom.uuid. To avoid surprises,
|
|
243
|
+
# and ensure that two equivalent UUIDs are equal to each other, we
|
|
244
|
+
# canonicalize any provided strings to lower case.
|
|
245
|
+
super.downcase
|
|
241
246
|
end
|
|
242
247
|
|
|
243
248
|
def matches_type?(str)
|
data/lib/iknow_params/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: iknow_params
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 2.3.
|
|
4
|
+
version: 2.3.2
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- dev@iknow.jp
|
|
8
|
-
autorequire:
|
|
8
|
+
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date:
|
|
11
|
+
date: 2026-01-21 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: bundler
|
|
@@ -86,14 +86,14 @@ dependencies:
|
|
|
86
86
|
requirements:
|
|
87
87
|
- - ">"
|
|
88
88
|
- !ruby/object:Gem::Version
|
|
89
|
-
version:
|
|
89
|
+
version: 7.1.0
|
|
90
90
|
type: :development
|
|
91
91
|
prerelease: false
|
|
92
92
|
version_requirements: !ruby/object:Gem::Requirement
|
|
93
93
|
requirements:
|
|
94
94
|
- - ">"
|
|
95
95
|
- !ruby/object:Gem::Version
|
|
96
|
-
version:
|
|
96
|
+
version: 7.1.0
|
|
97
97
|
- !ruby/object:Gem::Dependency
|
|
98
98
|
name: byebug
|
|
99
99
|
requirement: !ruby/object:Gem::Requirement
|
|
@@ -122,6 +122,20 @@ dependencies:
|
|
|
122
122
|
- - ">="
|
|
123
123
|
- !ruby/object:Gem::Version
|
|
124
124
|
version: '0'
|
|
125
|
+
- !ruby/object:Gem::Dependency
|
|
126
|
+
name: ostruct
|
|
127
|
+
requirement: !ruby/object:Gem::Requirement
|
|
128
|
+
requirements:
|
|
129
|
+
- - ">="
|
|
130
|
+
- !ruby/object:Gem::Version
|
|
131
|
+
version: '0'
|
|
132
|
+
type: :development
|
|
133
|
+
prerelease: false
|
|
134
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
135
|
+
requirements:
|
|
136
|
+
- - ">="
|
|
137
|
+
- !ruby/object:Gem::Version
|
|
138
|
+
version: '0'
|
|
125
139
|
- !ruby/object:Gem::Dependency
|
|
126
140
|
name: tzinfo-data
|
|
127
141
|
requirement: !ruby/object:Gem::Requirement
|
|
@@ -168,14 +182,14 @@ dependencies:
|
|
|
168
182
|
name: json-schema
|
|
169
183
|
requirement: !ruby/object:Gem::Requirement
|
|
170
184
|
requirements:
|
|
171
|
-
- - "
|
|
185
|
+
- - ">"
|
|
172
186
|
- !ruby/object:Gem::Version
|
|
173
187
|
version: 3.0.0
|
|
174
188
|
type: :runtime
|
|
175
189
|
prerelease: false
|
|
176
190
|
version_requirements: !ruby/object:Gem::Requirement
|
|
177
191
|
requirements:
|
|
178
|
-
- - "
|
|
192
|
+
- - ">"
|
|
179
193
|
- !ruby/object:Gem::Version
|
|
180
194
|
version: 3.0.0
|
|
181
195
|
description: ''
|
|
@@ -185,7 +199,8 @@ executables: []
|
|
|
185
199
|
extensions: []
|
|
186
200
|
extra_rdoc_files: []
|
|
187
201
|
files:
|
|
188
|
-
- ".
|
|
202
|
+
- ".github/workflows/gem-push.yml"
|
|
203
|
+
- ".github/workflows/test.yml"
|
|
189
204
|
- ".gitignore"
|
|
190
205
|
- ".rspec"
|
|
191
206
|
- Appraisals
|
|
@@ -193,9 +208,10 @@ files:
|
|
|
193
208
|
- LICENSE.txt
|
|
194
209
|
- README.md
|
|
195
210
|
- Rakefile
|
|
196
|
-
- gemfiles/
|
|
197
|
-
- gemfiles/
|
|
198
|
-
- gemfiles/
|
|
211
|
+
- gemfiles/activesupport_7_1.gemfile
|
|
212
|
+
- gemfiles/activesupport_7_2.gemfile
|
|
213
|
+
- gemfiles/activesupport_8_0.gemfile
|
|
214
|
+
- gemfiles/activesupport_8_1.gemfile
|
|
199
215
|
- iknow_params.gemspec
|
|
200
216
|
- lib/iknow_params.rb
|
|
201
217
|
- lib/iknow_params/parser.rb
|
|
@@ -214,7 +230,7 @@ homepage: http://github.com/iknow/iknow_params
|
|
|
214
230
|
licenses:
|
|
215
231
|
- MIT
|
|
216
232
|
metadata: {}
|
|
217
|
-
post_install_message:
|
|
233
|
+
post_install_message:
|
|
218
234
|
rdoc_options: []
|
|
219
235
|
require_paths:
|
|
220
236
|
- lib
|
|
@@ -222,15 +238,15 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
|
222
238
|
requirements:
|
|
223
239
|
- - ">="
|
|
224
240
|
- !ruby/object:Gem::Version
|
|
225
|
-
version: '2
|
|
241
|
+
version: '3.2'
|
|
226
242
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
|
227
243
|
requirements:
|
|
228
244
|
- - ">="
|
|
229
245
|
- !ruby/object:Gem::Version
|
|
230
246
|
version: '2.5'
|
|
231
247
|
requirements: []
|
|
232
|
-
rubygems_version: 3.
|
|
233
|
-
signing_key:
|
|
248
|
+
rubygems_version: 3.1.6
|
|
249
|
+
signing_key:
|
|
234
250
|
specification_version: 4
|
|
235
251
|
summary: Rails parameter parser for iKnow.
|
|
236
252
|
test_files:
|
data/.circleci/config.yml
DELETED
|
@@ -1,107 +0,0 @@
|
|
|
1
|
-
version: 2.1
|
|
2
|
-
|
|
3
|
-
executors:
|
|
4
|
-
ruby:
|
|
5
|
-
parameters:
|
|
6
|
-
ruby-version:
|
|
7
|
-
type: string
|
|
8
|
-
default: "2.6"
|
|
9
|
-
gemfile:
|
|
10
|
-
type: string
|
|
11
|
-
default: "Gemfile"
|
|
12
|
-
docker:
|
|
13
|
-
- image: cimg/ruby:<< parameters.ruby-version >>
|
|
14
|
-
environment:
|
|
15
|
-
BUNDLE_JOBS: 3
|
|
16
|
-
BUNDLE_RETRY: 3
|
|
17
|
-
BUNDLE_PATH: vendor/bundle
|
|
18
|
-
RAILS_ENV: test
|
|
19
|
-
BUNDLE_GEMFILE: << parameters.gemfile >>
|
|
20
|
-
|
|
21
|
-
jobs:
|
|
22
|
-
test:
|
|
23
|
-
parameters:
|
|
24
|
-
ruby-version:
|
|
25
|
-
type: string
|
|
26
|
-
gemfile:
|
|
27
|
-
type: string
|
|
28
|
-
executor:
|
|
29
|
-
name: ruby
|
|
30
|
-
ruby-version: << parameters.ruby-version >>
|
|
31
|
-
gemfile: << parameters.gemfile >>
|
|
32
|
-
parallelism: 1
|
|
33
|
-
steps:
|
|
34
|
-
- checkout
|
|
35
|
-
|
|
36
|
-
- run:
|
|
37
|
-
# Remove the non-appraisal gemfile for safety: we never want to use it.
|
|
38
|
-
name: Prepare bundler
|
|
39
|
-
command: bundle -v
|
|
40
|
-
|
|
41
|
-
- run:
|
|
42
|
-
name: Compute a gemfile lock
|
|
43
|
-
command: bundle lock && cp "${BUNDLE_GEMFILE}.lock" /tmp/gem-lock
|
|
44
|
-
|
|
45
|
-
- restore_cache:
|
|
46
|
-
keys:
|
|
47
|
-
- iknow_params-<< parameters.ruby-version >>-{{ checksum "/tmp/gem-lock" }}
|
|
48
|
-
- iknow_params-
|
|
49
|
-
|
|
50
|
-
- run:
|
|
51
|
-
name: Bundle Install
|
|
52
|
-
command: bundle check || bundle install
|
|
53
|
-
|
|
54
|
-
- save_cache:
|
|
55
|
-
key: iknow_params-<< parameters.ruby-version >>-{{ checksum "/tmp/gem-lock" }}
|
|
56
|
-
paths:
|
|
57
|
-
- vendor/bundle
|
|
58
|
-
|
|
59
|
-
- run:
|
|
60
|
-
name: Run rspec
|
|
61
|
-
command: bundle exec rspec --profile 10 --format RspecJunitFormatter --out test_results/rspec.xml --format progress
|
|
62
|
-
|
|
63
|
-
- store_test_results:
|
|
64
|
-
path: test_results
|
|
65
|
-
|
|
66
|
-
publish:
|
|
67
|
-
executor: ruby
|
|
68
|
-
steps:
|
|
69
|
-
- checkout
|
|
70
|
-
- run:
|
|
71
|
-
name: Setup Rubygems
|
|
72
|
-
command: |
|
|
73
|
-
mkdir ~/.gem &&
|
|
74
|
-
echo -e "---\r\n:rubygems_api_key: $RUBYGEMS_API_KEY" > ~/.gem/credentials &&
|
|
75
|
-
chmod 0600 ~/.gem/credentials
|
|
76
|
-
- run:
|
|
77
|
-
name: Publish to Rubygems
|
|
78
|
-
command: |
|
|
79
|
-
gem build iknow_params.gemspec
|
|
80
|
-
gem push iknow_params-*.gem
|
|
81
|
-
|
|
82
|
-
workflows:
|
|
83
|
-
version: 2.1
|
|
84
|
-
build:
|
|
85
|
-
jobs:
|
|
86
|
-
- test:
|
|
87
|
-
name: 'ruby 2.5 ActiveSupport 5.2'
|
|
88
|
-
ruby-version: "2.5"
|
|
89
|
-
gemfile: gemfiles/activesupport_5_2.gemfile
|
|
90
|
-
- test:
|
|
91
|
-
name: 'ruby 2.6 ActiveSupport 5.2'
|
|
92
|
-
ruby-version: "2.6"
|
|
93
|
-
gemfile: gemfiles/activesupport_5_2.gemfile
|
|
94
|
-
- test:
|
|
95
|
-
name: 'ruby 2.7 ActiveSupport 6.0'
|
|
96
|
-
ruby-version: "2.7"
|
|
97
|
-
gemfile: gemfiles/activesupport_6_0.gemfile
|
|
98
|
-
- test:
|
|
99
|
-
name: 'ruby 3.1 ActiveSupport 7.0'
|
|
100
|
-
ruby-version: "3.1"
|
|
101
|
-
gemfile: gemfiles/activesupport_7_0.gemfile
|
|
102
|
-
- publish:
|
|
103
|
-
filters:
|
|
104
|
-
branches:
|
|
105
|
-
only: master
|
|
106
|
-
tags:
|
|
107
|
-
ignore: /.*/
|