From 2739a78c237dcd801663932a2fef126dba69127d Mon Sep 17 00:00:00 2001 From: Thomas Dy Date: Mon, 4 Dec 2023 15:33:54 +0900 Subject: [PATCH 1/4] Use Ruby 3.1 for the development shell --- shell.nix | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/shell.nix b/shell.nix index f39319b..68547f8 100644 --- a/shell.nix +++ b/shell.nix @@ -1,11 +1,12 @@ with (import {}); let + ruby = ruby_3_1; env = bundlerEnv { - ruby = ruby_3_0; + inherit ruby; name = "bundler-env"; gemdir = ./nix/gem; }; in stdenv.mkDerivation { name = "shell"; - buildInputs = [ env ]; + buildInputs = [ env ruby ]; } From f723ab86acbbf41dff392e2e0816190e1b32f3e0 Mon Sep 17 00:00:00 2001 From: Thomas Dy Date: Mon, 4 Dec 2023 15:34:01 +0900 Subject: [PATCH 2/4] Update dependencies --- .../locale_file/json_file.rb | 1 - nix/gem/Gemfile | 32 +++--- nix/gem/Gemfile.lock | 71 +++++++------ nix/gem/gemset.nix | 100 +++++++++++------- phraseapp_updater.gemspec | 17 ++- 5 files changed, 125 insertions(+), 96 deletions(-) diff --git a/lib/phraseapp_updater/locale_file/json_file.rb b/lib/phraseapp_updater/locale_file/json_file.rb index d447fff..96e4d23 100644 --- a/lib/phraseapp_updater/locale_file/json_file.rb +++ b/lib/phraseapp_updater/locale_file/json_file.rb @@ -1,6 +1,5 @@ # frozen_string_literal: true -require 'multi_json' require 'oj' # We're working with pure JSON, not diff --git a/nix/gem/Gemfile b/nix/gem/Gemfile index 28fa795..af29a76 100644 --- a/nix/gem/Gemfile +++ b/nix/gem/Gemfile @@ -6,25 +6,27 @@ gem "coderay", "1.1.3" gem "deep_merge", "1.2.2" gem "diff-lcs", "1.5.0" gem "ethon", "0.16.0" -gem "ffi", "1.15.5" +gem "ffi", "1.16.3" gem "hashdiff", "1.0.1" gem "io-console", "0.6.0" -gem "irb", "1.6.2" -gem "json", "2.6.3" +gem "irb", "1.10.0" +gem "json", "2.7.0" gem "link-header-parser", "4.0.0" gem "method_source", "1.0.0" -gem "multi_json", "1.15.0" -gem "oj", "2.18.5" -gem "parallel", "1.22.1" -gem "phrase", "2.8.3" +gem "oj", "3.16.1" +gem "parallel", "1.23.0" +gem "phrase", "2.20.0" gem "pry", "0.14.2" -gem "rake", "10.5.0" -gem "reline", "0.3.2" +gem "psych", "5.1.1.1" +gem "rake", "13.1.0" +gem "rdoc", "6.6.0" +gem "reline", "0.4.1" gem "rspec", "3.12.0" -gem "rspec-core", "3.12.1" -gem "rspec-expectations", "3.12.2" -gem "rspec-mocks", "3.12.3" -gem "rspec-support", "3.12.0" +gem "rspec-core", "3.12.2" +gem "rspec-expectations", "3.12.3" +gem "rspec-mocks", "3.12.6" +gem "rspec-support", "3.12.1" gem "rspec_junit_formatter", "0.6.0" -gem "thor", "0.20.3" -gem "typhoeus", "1.4.0" +gem "stringio", "3.1.0" +gem "thor", "1.3.0" +gem "typhoeus", "1.4.1" diff --git a/nix/gem/Gemfile.lock b/nix/gem/Gemfile.lock index ac80490..d4edc55 100644 --- a/nix/gem/Gemfile.lock +++ b/nix/gem/Gemfile.lock @@ -7,44 +7,49 @@ GEM diff-lcs (1.5.0) ethon (0.16.0) ffi (>= 1.15.0) - ffi (1.15.5) + ffi (1.16.3) hashdiff (1.0.1) io-console (0.6.0) - irb (1.6.2) - reline (>= 0.3.0) - json (2.6.3) + irb (1.10.0) + rdoc + reline (>= 0.3.8) + json (2.7.0) link-header-parser (4.0.0) method_source (1.0.0) - multi_json (1.15.0) - oj (2.18.5) - parallel (1.22.1) - phrase (2.8.3) + oj (3.16.1) + parallel (1.23.0) + phrase (2.20.0) json (~> 2.1, >= 2.1.0) link-header-parser (~> 4.0) typhoeus (~> 1.0, >= 1.0.1) pry (0.14.2) coderay (~> 1.1) method_source (~> 1.0) - rake (10.5.0) - reline (0.3.2) + psych (5.1.1.1) + stringio + rake (13.1.0) + rdoc (6.6.0) + psych (>= 4.0.0) + reline (0.4.1) io-console (~> 0.5) rspec (3.12.0) rspec-core (~> 3.12.0) rspec-expectations (~> 3.12.0) rspec-mocks (~> 3.12.0) - rspec-core (3.12.1) + rspec-core (3.12.2) rspec-support (~> 3.12.0) - rspec-expectations (3.12.2) + rspec-expectations (3.12.3) diff-lcs (>= 1.2.0, < 2.0) rspec-support (~> 3.12.0) - rspec-mocks (3.12.3) + rspec-mocks (3.12.6) diff-lcs (>= 1.2.0, < 2.0) rspec-support (~> 3.12.0) - rspec-support (3.12.0) + rspec-support (3.12.1) rspec_junit_formatter (0.6.0) rspec-core (>= 2, < 4, != 2.12.0) - thor (0.20.3) - typhoeus (1.4.0) + stringio (3.1.0) + thor (1.3.0) + typhoeus (1.4.1) ethon (>= 0.9.0) PLATFORMS @@ -56,28 +61,30 @@ DEPENDENCIES deep_merge (= 1.2.2) diff-lcs (= 1.5.0) ethon (= 0.16.0) - ffi (= 1.15.5) + ffi (= 1.16.3) hashdiff (= 1.0.1) io-console (= 0.6.0) - irb (= 1.6.2) - json (= 2.6.3) + irb (= 1.10.0) + json (= 2.7.0) link-header-parser (= 4.0.0) method_source (= 1.0.0) - multi_json (= 1.15.0) - oj (= 2.18.5) - parallel (= 1.22.1) - phrase (= 2.8.3) + oj (= 3.16.1) + parallel (= 1.23.0) + phrase (= 2.20.0) pry (= 0.14.2) - rake (= 10.5.0) - reline (= 0.3.2) + psych (= 5.1.1.1) + rake (= 13.1.0) + rdoc (= 6.6.0) + reline (= 0.4.1) rspec (= 3.12.0) - rspec-core (= 3.12.1) - rspec-expectations (= 3.12.2) - rspec-mocks (= 3.12.3) - rspec-support (= 3.12.0) + rspec-core (= 3.12.2) + rspec-expectations (= 3.12.3) + rspec-mocks (= 3.12.6) + rspec-support (= 3.12.1) rspec_junit_formatter (= 0.6.0) - thor (= 0.20.3) - typhoeus (= 1.4.0) + stringio (= 3.1.0) + thor (= 1.3.0) + typhoeus (= 1.4.1) BUNDLED WITH - 2.4.6 + 2.4.22 diff --git a/nix/gem/gemset.nix b/nix/gem/gemset.nix index d35093a..b19d5ac 100644 --- a/nix/gem/gemset.nix +++ b/nix/gem/gemset.nix @@ -55,10 +55,10 @@ platforms = []; source = { remotes = ["https://rubygems.org"]; - sha256 = "1862ydmclzy1a0cjbvm8dz7847d9rch495ib0zb64y84d3xd4bkg"; + sha256 = "1yvii03hcgqj30maavddqamqy50h7y6xcn2wcyq72wn823zl4ckd"; type = "gem"; }; - version = "1.15.5"; + version = "1.16.3"; }; hashdiff = { groups = ["default"]; @@ -81,25 +81,25 @@ version = "0.6.0"; }; irb = { - dependencies = ["reline"]; + dependencies = ["rdoc" "reline"]; groups = ["default"]; platforms = []; source = { remotes = ["https://rubygems.org"]; - sha256 = "10qvm0s8784lhmz98blqnxh36i7d7rzkk17znx17d46666z7czrf"; + sha256 = "05ha3lanjjfb0q0lp6bl0cpwvf372ix3m3jiwmkr87xyiwqck4dn"; type = "gem"; }; - version = "1.6.2"; + version = "1.10.0"; }; json = { groups = ["default"]; platforms = []; source = { remotes = ["https://rubygems.org"]; - sha256 = "0nalhin1gda4v8ybk6lq8f407cgfrj6qzn234yra4ipkmlbfmal6"; + sha256 = "0wi7g6c8q0v1kahwp38mv8d526p1n2ddsr79ajx84idvih0c601i"; type = "gem"; }; - version = "2.6.3"; + version = "2.7.0"; }; link-header-parser = { groups = ["default"]; @@ -121,35 +121,25 @@ }; version = "1.0.0"; }; - multi_json = { - groups = ["default"]; - platforms = []; - source = { - remotes = ["https://rubygems.org"]; - sha256 = "0pb1g1y3dsiahavspyzkdy39j4q377009f6ix0bh1ag4nqw43l0z"; - type = "gem"; - }; - version = "1.15.0"; - }; oj = { groups = ["default"]; platforms = []; source = { remotes = ["https://rubygems.org"]; - sha256 = "1jli4mi1xpmm8564pc09bfvv7znzqghidwa3zfw21r365ihmbv2p"; + sha256 = "0m4vsd6i093kmyz9gckvzpnws997laldaiaf86hg5lza1ir82x7n"; type = "gem"; }; - version = "2.18.5"; + version = "3.16.1"; }; parallel = { groups = ["default"]; platforms = []; source = { remotes = ["https://rubygems.org"]; - sha256 = "07vnk6bb54k4yc06xnwck7php50l09vvlw1ga8wdz0pia461zpzb"; + sha256 = "0jcc512l38c0c163ni3jgskvq1vc3mr8ly5pvjijzwvfml9lf597"; type = "gem"; }; - version = "1.22.1"; + version = "1.23.0"; }; phrase = { dependencies = ["json" "link-header-parser" "typhoeus"]; @@ -157,10 +147,10 @@ platforms = []; source = { remotes = ["https://rubygems.org"]; - sha256 = "1x4q71w4z0s3acg6glvs7bbd9p4nf0r5ida9aa9pc4gkmvwbdxrf"; + sha256 = "1dx93bwl7xdydn8xnip107ynrlybrvy8ci1q9f7yx3l9qqybnim1"; type = "gem"; }; - version = "2.8.3"; + version = "2.20.0"; }; pry = { dependencies = ["coderay" "method_source"]; @@ -173,15 +163,37 @@ }; version = "0.14.2"; }; + psych = { + dependencies = ["stringio"]; + groups = ["default"]; + platforms = []; + source = { + remotes = ["https://rubygems.org"]; + sha256 = "0wjzrkssjfjpynij5dpycyflhqbjvi1gc2j73xgq3b196s1d3c24"; + type = "gem"; + }; + version = "5.1.1.1"; + }; rake = { groups = ["default"]; platforms = []; source = { remotes = ["https://rubygems.org"]; - sha256 = "0jcabbgnjc788chx31sihc5pgbqnlc1c75wakmqlbjdm8jns2m9b"; + sha256 = "1ilr853hawi09626axx0mps4rkkmxcs54mapz9jnqvpnlwd3wsmy"; type = "gem"; }; - version = "10.5.0"; + version = "13.1.0"; + }; + rdoc = { + dependencies = ["psych"]; + groups = ["default"]; + platforms = []; + source = { + remotes = ["https://rubygems.org"]; + sha256 = "1pnkgnk2vli1y8bbc25qbgv6z2al44dlgcm2mx3ssm34j7xz7gqh"; + type = "gem"; + }; + version = "6.6.0"; }; reline = { dependencies = ["io-console"]; @@ -189,10 +201,10 @@ platforms = []; source = { remotes = ["https://rubygems.org"]; - sha256 = "1vpsmij5mknpiqy4b835rzl87slshm5dkr08hm8wypfya3v4m6cp"; + sha256 = "1hi6zfj6zqzxcbamhjm9w9cswv62f76l8gsdfcnmhpw35cyxphh8"; type = "gem"; }; - version = "0.3.2"; + version = "0.4.1"; }; rspec = { dependencies = ["rspec-core" "rspec-expectations" "rspec-mocks"]; @@ -211,10 +223,10 @@ platforms = []; source = { remotes = ["https://rubygems.org"]; - sha256 = "0da45cvllbv39sdbsl65vp5djb2xf5m10mxc9jm7rsqyyxjw4h1f"; + sha256 = "0l95bnjxdabrn79hwdhn2q1n7mn26pj7y1w5660v5qi81x458nqm"; type = "gem"; }; - version = "3.12.1"; + version = "3.12.2"; }; rspec-expectations = { dependencies = ["diff-lcs" "rspec-support"]; @@ -222,10 +234,10 @@ platforms = []; source = { remotes = ["https://rubygems.org"]; - sha256 = "03ba3lfdsj9zl00v1yvwgcx87lbadf87livlfa5kgqssn9qdnll6"; + sha256 = "05j44jfqlv7j2rpxb5vqzf9hfv7w8ba46wwgxwcwd8p0wzi1hg89"; type = "gem"; }; - version = "3.12.2"; + version = "3.12.3"; }; rspec-mocks = { dependencies = ["diff-lcs" "rspec-support"]; @@ -233,20 +245,20 @@ platforms = []; source = { remotes = ["https://rubygems.org"]; - sha256 = "0sq2cc9pm5gq411y7iwfvzbmgv3g91lyf7y7cqn1lr3yf1v122nc"; + sha256 = "1gq7gviwpck7fhp4y5ibljljvxgjklza18j62qf6zkm2icaa8lfy"; type = "gem"; }; - version = "3.12.3"; + version = "3.12.6"; }; rspec-support = { groups = ["default"]; platforms = []; source = { remotes = ["https://rubygems.org"]; - sha256 = "12y52zwwb3xr7h91dy9k3ndmyyhr3mjcayk0nnarnrzz8yr48kfx"; + sha256 = "1ky86j3ksi26ng9ybd7j0qsdf1lpr8mzrmn98yy9gzv801fvhsgr"; type = "gem"; }; - version = "3.12.0"; + version = "3.12.1"; }; rspec_junit_formatter = { dependencies = ["rspec-core"]; @@ -259,15 +271,25 @@ }; version = "0.6.0"; }; + stringio = { + groups = ["default"]; + platforms = []; + source = { + remotes = ["https://rubygems.org"]; + sha256 = "063psvsn1aq6digpznxfranhcpmi0sdv2jhra5g0459sw0x2dxn1"; + type = "gem"; + }; + version = "3.1.0"; + }; thor = { groups = ["default"]; platforms = []; source = { remotes = ["https://rubygems.org"]; - sha256 = "1yhrnp9x8qcy5vc7g438amd5j9sw83ih7c30dr6g6slgw9zj3g29"; + sha256 = "1hx77jxkrwi66yvs10wfxqa8s25ds25ywgrrf66acm9nbfg7zp0s"; type = "gem"; }; - version = "0.20.3"; + version = "1.3.0"; }; typhoeus = { dependencies = ["ethon"]; @@ -275,9 +297,9 @@ platforms = []; source = { remotes = ["https://rubygems.org"]; - sha256 = "1m22yrkmbj81rzhlny81j427qdvz57yk5wbcf3km0nf3bl6qiygz"; + sha256 = "0z7gamf6s83wy0yqms3bi4srirn3fc0lc7n65lqanidxcj1xn5qw"; type = "gem"; }; - version = "1.4.0"; + version = "1.4.1"; }; } diff --git a/phraseapp_updater.gemspec b/phraseapp_updater.gemspec index c157e9b..46f6732 100644 --- a/phraseapp_updater.gemspec +++ b/phraseapp_updater.gemspec @@ -19,16 +19,15 @@ Gem::Specification.new do |spec| spec.executables = ["phraseapp_updater"] spec.require_paths = ["lib"] - spec.add_dependency "thor", "~> 0.19" - spec.add_dependency "phrase", "~> 2.8.3" + spec.add_dependency "thor", "~> 1.3.0" + spec.add_dependency "phrase", "~> 2.20.0" spec.add_dependency "hashdiff", "~> 1.0.1" - spec.add_dependency "multi_json", "~> 1.12" - spec.add_dependency "oj", "~> 2.18" - spec.add_dependency "deep_merge", "~> 1.1" - spec.add_dependency "parallel", "~> 1.12" + spec.add_dependency "oj", "~> 3.16" + spec.add_dependency "deep_merge", "~> 1.2" + spec.add_dependency "parallel", "~> 1.23" spec.add_development_dependency "bundler", "~> 2.2" - spec.add_development_dependency "rake", "~> 10.0" - spec.add_development_dependency "rspec", "~> 3.0" - spec.add_development_dependency "pry", "~> 0.10" + spec.add_development_dependency "rake", "~> 13.1" + spec.add_development_dependency "rspec", "~> 3.12" + spec.add_development_dependency "pry", "~> 0.14" end From 84698bbcf8b36fdf23e0e706566ba28e4760d892 Mon Sep 17 00:00:00 2001 From: Thomas Dy Date: Mon, 4 Dec 2023 15:54:26 +0900 Subject: [PATCH 3/4] Update ruby versions for CI --- .github/workflows/gem-push.yml | 4 ++-- .github/workflows/test.yml | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/gem-push.yml b/.github/workflows/gem-push.yml index 8a94f8d..4931c57 100644 --- a/.github/workflows/gem-push.yml +++ b/.github/workflows/gem-push.yml @@ -14,10 +14,10 @@ jobs: steps: - uses: actions/checkout@v3 - - name: Set up Ruby 2.7 + - name: Set up Ruby 3.1 uses: ruby/setup-ruby@v1 with: - ruby-version: 2.7 + ruby-version: 3.1 - name: Publish to RubyGems run: | diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 46d2943..7339b4a 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -15,7 +15,7 @@ jobs: strategy: matrix: - ruby-version: ['2.7', '3.0', '3.1'] + ruby-version: ['3.1', '3.2'] steps: - uses: actions/checkout@v3 From a12a69e819d5ab5fd87f38c7f4a6f5427098befd Mon Sep 17 00:00:00 2001 From: Thomas Dy Date: Mon, 4 Dec 2023 18:08:31 +0900 Subject: [PATCH 4/4] Bump gem version --- lib/phraseapp_updater/version.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/phraseapp_updater/version.rb b/lib/phraseapp_updater/version.rb index c8d0ba5..50adfc1 100644 --- a/lib/phraseapp_updater/version.rb +++ b/lib/phraseapp_updater/version.rb @@ -1,5 +1,5 @@ # frozen_string_literal: true class PhraseAppUpdater - VERSION = '3.1.0' + VERSION = '3.2.0' end