diff --git a/.github/dependabot.yml b/.github/dependabot.yml index 8d3c7ce..449dabf 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -1,7 +1,8 @@ version: 2 updates: - package-ecosystem: bundler - directory: /gemfiles/ruby3.3 + directories: + - /gemfiles/* schedule: interval: weekly groups: @@ -9,17 +10,10 @@ updates: update-types: - "minor" - "patch" - - package-ecosystem: bundler - directory: /gemfiles/ruby3.4 - schedule: - interval: weekly - groups: - non-major-dependencies: - update-types: - - "minor" - - "patch" - - package-ecosystem: bundler - directory: /gemfiles/ruby4.0 + cooldown: + default-days: 28 + - package-ecosystem: github-actions + directory: / schedule: interval: weekly groups: @@ -27,3 +21,5 @@ updates: update-types: - "minor" - "patch" + cooldown: + default-days: 28 diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 1d2d49e..2bbb2fe 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -12,6 +12,7 @@ jobs: build-and-test: runs-on: ubuntu-latest strategy: + fail-fast: false matrix: ruby-version: - 3.3 diff --git a/.gitignore b/.gitignore index 0e8df54..7ef51ae 100644 --- a/.gitignore +++ b/.gitignore @@ -6,3 +6,5 @@ doc/ .byebug_history .ruby-version Gemfile.lock +!gemfiles/*/Gemfile.lock +.tool-versions diff --git a/gemfiles/ruby3.3/Gemfile b/gemfiles/ruby3.3/Gemfile index d09390d..307e563 100644 --- a/gemfiles/ruby3.3/Gemfile +++ b/gemfiles/ruby3.3/Gemfile @@ -1,6 +1,6 @@ # frozen_string_literal: true -source 'http://rubygems.org' +source 'https://rubygems.org' ruby '~> 3.3' diff --git a/gemfiles/ruby3.3/Gemfile.lock b/gemfiles/ruby3.3/Gemfile.lock index df8eb22..e050d73 100644 --- a/gemfiles/ruby3.3/Gemfile.lock +++ b/gemfiles/ruby3.3/Gemfile.lock @@ -4,9 +4,9 @@ PATH fat_zebra (0.0.0.pre.build) GEM - remote: http://rubygems.org/ + remote: https://rubygems.org/ specs: - addressable (2.8.8) + addressable (2.10.0) public_suffix (>= 2.0.2, < 8.0) ast (2.4.3) bigdecimal (4.0.1) @@ -16,7 +16,7 @@ GEM rexml diff-lcs (1.6.2) hashdiff (1.2.1) - json (2.18.1) + json (2.21.2) language_server-protocol (3.17.0.5) lint_roller (1.1.0) parallel (1.27.0) @@ -43,20 +43,22 @@ GEM diff-lcs (>= 1.2.0, < 2.0) rspec-support (~> 3.13.0) rspec-support (3.13.7) - rubocop (1.84.2) - json (~> 2.3) + rubocop (1.93.0) + json (>= 2.3) language_server-protocol (~> 3.17.0.2) lint_roller (~> 1.1.0) - parallel (~> 1.10) + parallel (>= 1.10) parser (>= 3.3.0.2) rainbow (>= 2.2.2, < 4.0) - regexp_parser (>= 2.9.3, < 3.0) - rubocop-ast (>= 1.49.0, < 2.0) + regexp_parser (>= 2.11.3, < 3.0) + rubocop-ast (>= 1.54.0, < 2.0) ruby-progressbar (~> 1.7) unicode-display_width (>= 2.4.0, < 4.0) - rubocop-ast (1.49.0) + rubocop-ast (1.54.0) + ast (~> 2.4) parser (>= 3.3.7.2) - prism (~> 1.7) + prism (>= 1.7) + racc ruby-progressbar (1.13.0) unicode-display_width (3.2.0) unicode-emoji (~> 4.1) diff --git a/gemfiles/ruby3.4/Gemfile b/gemfiles/ruby3.4/Gemfile index 679dd58..57286d5 100644 --- a/gemfiles/ruby3.4/Gemfile +++ b/gemfiles/ruby3.4/Gemfile @@ -1,6 +1,6 @@ # frozen_string_literal: true -source 'http://rubygems.org' +source 'https://rubygems.org' ruby '~> 3.4' diff --git a/gemfiles/ruby3.4/Gemfile.lock b/gemfiles/ruby3.4/Gemfile.lock index 74881c5..58cf870 100644 --- a/gemfiles/ruby3.4/Gemfile.lock +++ b/gemfiles/ruby3.4/Gemfile.lock @@ -4,9 +4,9 @@ PATH fat_zebra (0.0.0.pre.build) GEM - remote: http://rubygems.org/ + remote: https://rubygems.org/ specs: - addressable (2.9.0) + addressable (2.10.0) public_suffix (>= 2.0.2, < 8.0) ast (2.4.3) bigdecimal (4.1.2) @@ -18,7 +18,7 @@ GEM diff-lcs (1.6.2) hashdiff (1.2.1) io-console (0.8.2) - json (2.19.4) + json (2.21.2) language_server-protocol (3.17.0.5) lint_roller (1.1.0) parallel (2.0.1) @@ -47,20 +47,22 @@ GEM diff-lcs (>= 1.2.0, < 2.0) rspec-support (~> 3.13.0) rspec-support (3.13.6) - rubocop (1.86.1) - json (~> 2.3) + rubocop (1.93.0) + json (>= 2.3) language_server-protocol (~> 3.17.0.2) lint_roller (~> 1.1.0) parallel (>= 1.10) parser (>= 3.3.0.2) rainbow (>= 2.2.2, < 4.0) - regexp_parser (>= 2.9.3, < 3.0) - rubocop-ast (>= 1.49.0, < 2.0) + regexp_parser (>= 2.11.3, < 3.0) + rubocop-ast (>= 1.54.0, < 2.0) ruby-progressbar (~> 1.7) unicode-display_width (>= 2.4.0, < 4.0) - rubocop-ast (1.49.1) + rubocop-ast (1.54.0) + ast (~> 2.4) parser (>= 3.3.7.2) - prism (~> 1.7) + prism (>= 1.7) + racc ruby-progressbar (1.13.0) unicode-display_width (3.2.0) unicode-emoji (~> 4.1) diff --git a/gemfiles/ruby4/Gemfile b/gemfiles/ruby4/Gemfile index d273d07..e2ec6fb 100644 --- a/gemfiles/ruby4/Gemfile +++ b/gemfiles/ruby4/Gemfile @@ -1,6 +1,6 @@ # frozen_string_literal: true -source 'http://rubygems.org' +source 'https://rubygems.org' ruby '~> 4.0' diff --git a/gemfiles/ruby4/Gemfile.lock b/gemfiles/ruby4/Gemfile.lock new file mode 100644 index 0000000..d8a6d13 --- /dev/null +++ b/gemfiles/ruby4/Gemfile.lock @@ -0,0 +1,152 @@ +PATH + remote: ../.. + specs: + fat_zebra (0.0.0.pre.build) + +GEM + remote: https://rubygems.org/ + specs: + addressable (2.10.0) + public_suffix (>= 2.0.2, < 8.0) + ast (2.4.3) + bigdecimal (4.1.3) + byebug (13.0.0) + reline (>= 0.6.0) + crack (1.0.1) + bigdecimal + rexml + diff-lcs (1.6.2) + hashdiff (1.3.0) + io-console (0.9.5) + json (3.2.0) + language_server-protocol (3.17.0.6) + lint_roller (1.1.0) + parallel (2.3.0) + parser (3.3.14.0) + ast (~> 2.4.1) + racc + prism (2.1.0) + prism (2.1.0-aarch64-linux-gnu) + prism (2.1.0-aarch64-linux-musl) + prism (2.1.0-arm-linux-gnu) + prism (2.1.0-arm-linux-musl) + prism (2.1.0-arm64-darwin) + prism (2.1.0-x86_64-darwin) + prism (2.1.0-x86_64-linux-gnu) + prism (2.1.0-x86_64-linux-musl) + public_suffix (7.0.5) + racc (1.8.1) + rainbow (3.1.1) + rake (13.4.2) + regexp_parser (2.13.4) + reline (0.7.0) + io-console (~> 0.5) + rexml (3.4.4) + rspec (3.13.2) + rspec-core (~> 3.13.0) + rspec-expectations (~> 3.13.0) + rspec-mocks (~> 3.13.0) + rspec-core (3.13.7) + rspec-support (~> 3.13.0) + rspec-expectations (3.13.6) + diff-lcs (>= 1.2.0, < 2.0) + rspec-support (~> 3.13.0) + rspec-mocks (3.13.9) + diff-lcs (>= 1.2.0, < 2.0) + rspec-support (~> 3.13.0) + rspec-support (3.13.8) + rubocop (1.93.0) + json (>= 2.3) + language_server-protocol (~> 3.17.0.2) + lint_roller (~> 1.1.0) + parallel (>= 1.10) + parser (>= 3.3.0.2) + rainbow (>= 2.2.2, < 4.0) + regexp_parser (>= 2.11.3, < 3.0) + rubocop-ast (>= 1.54.0, < 2.0) + ruby-progressbar (~> 1.7) + unicode-display_width (>= 2.4.0, < 4.0) + rubocop-ast (1.54.0) + ast (~> 2.4) + parser (>= 3.3.7.2) + prism (>= 1.7) + racc + ruby-progressbar (1.13.0) + unicode-display_width (3.3.0) + unicode-emoji (~> 4.3) + unicode-emoji (4.3.0) + vcr (6.4.1) + webmock (3.41.0) + addressable (>= 2.8.0) + crack (>= 0.3.2) + hashdiff (>= 0.4.0, < 2.0.0) + +PLATFORMS + aarch64-linux-gnu + aarch64-linux-musl + arm-linux-gnu + arm-linux-musl + arm64-darwin + ruby + x86_64-darwin + x86_64-linux-gnu + x86_64-linux-musl + +DEPENDENCIES + byebug + fat_zebra! + rake + rspec + rubocop + vcr + webmock + +CHECKSUMS + addressable (2.10.0) sha256=5e13b9c001adf01dd65ad6e0d2a91d2bc07885c0ff2b83f48cbcd95e08d9de62 + ast (2.4.3) sha256=954615157c1d6a382bc27d690d973195e79db7f55e9765ac7c481c60bdb4d383 + bigdecimal (4.1.3) sha256=61ebe1e5e559bdc3cc6f2c0ee7f427321fc838f59611c294356eb04d6e21cf66 + byebug (13.0.0) sha256=d2263efe751941ca520fa29744b71972d39cbc41839496706f5d9b22e92ae05d + crack (1.0.1) sha256=ff4a10390cd31d66440b7524eb1841874db86201d5b70032028553130b6d4c7e + diff-lcs (1.6.2) sha256=9ae0d2cba7d4df3075fe8cd8602a8604993efc0dfa934cff568969efb1909962 + fat_zebra (0.0.0.pre.build) + hashdiff (1.3.0) sha256=0b6724b8f3fef3961acc09489b175698ce0b7fd22c9cc5aa559d280cc6b65649 + io-console (0.9.5) sha256=83dd9bbf4c4680416629245b39cd4212eb5f4d9a4ea91804870c1f6b846414d5 + json (3.2.0) sha256=4a4e222a9ee6ffb296ab3171b6b39d85fec83afc4e7b57eee17edf68c74aec87 + language_server-protocol (3.17.0.6) sha256=5ef2c0c138f8267e1bc631d3328347d354f96724b0af22f2c79516120443b7f0 + lint_roller (1.1.0) sha256=2c0c845b632a7d172cb849cc90c1bce937a28c5c8ccccb50dfd46a485003cc87 + parallel (2.3.0) sha256=f75a3e904101ce6a1ccb6b8dc800cbafd42166d83330192438dcf29395167a6f + parser (3.3.14.0) sha256=62f8f76af7b919425ee2d811880e9dcb8011ab40bfd59970dfb583141697e58f + prism (2.1.0) sha256=1c0a7c6dea0e93183390fb123f007564dbe663198e2f86ad87204151147601f3 + prism (2.1.0-aarch64-linux-gnu) sha256=808dddc72def68e1a0463689414c97e0ba211938eddbab05387a4844aa2b3ec2 + prism (2.1.0-aarch64-linux-musl) sha256=dd1a0732620c1e575dabb07a297a62911fabd72f8e20ce850b522a866f877930 + prism (2.1.0-arm-linux-gnu) sha256=96b2426b9dbab05448c4add735619929042be3cd7e871ff186468121b62bcfa8 + prism (2.1.0-arm-linux-musl) sha256=00ef918e42a3dc98f11a461bf473586a3424b0f78bee8a4e43b5a65a5f5e2cd0 + prism (2.1.0-arm64-darwin) sha256=2d0c2e3e011cfd89c041940907d3ff3def379d7b0f2ba158d1d42238e8ad8afc + prism (2.1.0-x86_64-darwin) sha256=6c645d8e6afc742956c7518220ce5106367727c4d9980ac9ab386d55004ddab4 + prism (2.1.0-x86_64-linux-gnu) sha256=b2b647afce09551e650b8bb3e2fc91d7d73d392a09534ca307ec0d619c33bfd4 + prism (2.1.0-x86_64-linux-musl) sha256=249f45981726923e259b927902246219fa25ad10a76f43849c9aee1a3d3ec5b8 + public_suffix (7.0.5) sha256=1a8bb08f1bbea19228d3bed6e5ed908d1cb4f7c2726d18bd9cadf60bc676f623 + racc (1.8.1) sha256=4a7f6929691dbec8b5209a0b373bc2614882b55fc5d2e447a21aaa691303d62f + rainbow (3.1.1) sha256=039491aa3a89f42efa1d6dec2fc4e62ede96eb6acd95e52f1ad581182b79bc6a + rake (13.4.2) sha256=cb825b2bd5f1f8e91ca37bddb4b9aaf345551b4731da62949be002fa89283701 + regexp_parser (2.13.4) sha256=1d0547814f57e6f00946957bd0ca201bc42f42cfb08eee89df60998aedcd8a3b + reline (0.7.0) sha256=5b012d8e55dbf9d450f12bde2cf7d15ff546ae80b3f8f3b30e570d431815583d + rexml (3.4.4) sha256=19e0a2c3425dfbf2d4fc1189747bdb2f849b6c5e74180401b15734bc97b5d142 + rspec (3.13.2) sha256=206284a08ad798e61f86d7ca3e376718d52c0bc944626b2349266f239f820587 + rspec-core (3.13.7) sha256=c64ff16d9788119805cbc6a3f4b6d87cc22417c2d25976a3330de136896b5469 + rspec-expectations (3.13.6) sha256=bf538ca6d367ff5b0d85a87fdb5c0c6038f2cd1308a0eeba07476caa02d22f35 + rspec-mocks (3.13.9) sha256=ea5c7ff3054a6098ca6039aacef80aec69d5a8a3ef80be8fc88337359b672a30 + rspec-support (3.13.8) sha256=e4160030309b7e3e9d9863dfe720a35dfcc577162f5402cd68fc8c5258a0ffd6 + rubocop (1.93.0) sha256=cb675628d17fe21dfab42f84848040ca2785c22ee4df41c888bfc404f3e74684 + rubocop-ast (1.54.0) sha256=11f7cadec54e593e905b1bb78f2b28bdd4b8e13b34cb82fe49c876e3dd5008c1 + ruby-progressbar (1.13.0) sha256=80fc9c47a9b640d6834e0dc7b3c94c9df37f08cb072b7761e4a71e22cff29b33 + unicode-display_width (3.3.0) sha256=4b7aa66a4b11db50f6f7e98411215cd0dd10eaecb665d36eec5bcacb3fa0b613 + unicode-emoji (4.3.0) sha256=11c02fa73290378c066bb0562cd4c87d8e1b706fbbe0059ca12746a4244de8ce + vcr (6.4.1) sha256=74870fc87d1bdf1f24e847f57977ac9a5e55cde681f56f1172c7c82dc9f006aa + webmock (3.41.0) sha256=9648ac9f83881790f562130d04cf54d74c4bd5e90740c519535b14da0757ee74 + +RUBY VERSION + ruby 4.0.10 + +BUNDLED WITH + 4.1.1 diff --git a/lib/fat_zebra/api_resource.rb b/lib/fat_zebra/api_resource.rb index 3ed73dd..e50b7bf 100644 --- a/lib/fat_zebra/api_resource.rb +++ b/lib/fat_zebra/api_resource.rb @@ -24,7 +24,7 @@ def base_path # # @return [Hash] response # @raise [FatZebra::RequestError] if the request is invalid - # rubocop:disable Metrics/AbcSize + # rubocop:disable-next Metrics/AbcSize def request(method, path, payload = {}, options = {}) payload[:test] = true if configurations.test_mode payload = Util.format_dates_in_hash(payload) @@ -45,7 +45,6 @@ def request(method, path, payload = {}, options = {}) raise end - # rubocop:enable Metrics/AbcSize private diff --git a/lib/fat_zebra/validation.rb b/lib/fat_zebra/validation.rb index 628978b..2dc9853 100644 --- a/lib/fat_zebra/validation.rb +++ b/lib/fat_zebra/validation.rb @@ -41,7 +41,7 @@ def validate_required(field, options, params) errors << "'#{field}' is required" if params[field].nil? || params[field] == '' end - # rubocop:disable Metrics/CyclomaticComplexity, Lint/MixedRegexpCaptureTypes + # rubocop:disable-next Metrics/CyclomaticComplexity, Lint/MixedRegexpCaptureTypes def validate_type(field, options, params) regexp = case options @@ -63,7 +63,6 @@ def validate_type(field, options, params) errors << "'#{field}' is not a '#{options}'" unless params[field].to_s =~ regexp end - # rubocop:enable Metrics/CyclomaticComplexity, Lint/MixedRegexpCaptureTypes end end