diff --git a/.github/workflows/actions.yml b/.github/workflows/actions.yml index 9f780ef6..113a96f9 100644 --- a/.github/workflows/actions.yml +++ b/.github/workflows/actions.yml @@ -11,11 +11,11 @@ jobs: matrix: ruby: [ '3.0' ] task: [ 'default' ] - gemfile: [ 'rails52' ] + gemfile: [ 'rails71' ] include: - ruby: '3.0' # lowest supported version task: rubocop - gemfile: rails52 + gemfile: rails71 name: ${{ matrix.ruby }} ${{ matrix.gemfile }} rake ${{ matrix.task }} env: BUNDLE_GEMFILE: ${{ github.workspace }}/gemfiles/${{ matrix.gemfile }}.gemfile @@ -32,7 +32,7 @@ jobs: - uses: actions/checkout@v2 - uses: ruby/setup-ruby@v1 with: - ruby-version: 3.3 + ruby-version: 3.0 bundler-cache: true - run: gem i gettext && gem i activesupport && bundle exec rake benchmark namespaces: @@ -41,6 +41,6 @@ jobs: - uses: actions/checkout@v2 - uses: ruby/setup-ruby@v1 with: - ruby-version: 3.3 + ruby-version: 3.0 bundler-cache: true - run: echo 'gem "gettext"' >> Gemfile && echo 'gem "iconv"' >> Gemfile && bundle config unset deployment && bundle && bundle exec rake namespaces diff --git a/Gemfile.lock b/Gemfile.lock index fd0f3700..09bf18de 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -7,29 +7,38 @@ PATH GEM remote: https://rubygems.org/ specs: - activemodel (5.2.2) - activesupport (= 5.2.2) - activerecord (5.2.2) - activemodel (= 5.2.2) - activesupport (= 5.2.2) - arel (>= 9.0) - activesupport (5.2.2) + activemodel (7.1.3.3) + activesupport (= 7.1.3.3) + activerecord (7.1.3.3) + activemodel (= 7.1.3.3) + activesupport (= 7.1.3.3) + timeout (>= 0.4.0) + activesupport (7.1.3.3) + base64 + bigdecimal concurrent-ruby (~> 1.0, >= 1.0.2) - i18n (>= 0.7, < 2) - minitest (~> 5.1) - tzinfo (~> 1.1) - arel (9.0.0) + connection_pool (>= 2.2.5) + drb + i18n (>= 1.6, < 2) + minitest (>= 5.1) + mutex_m + tzinfo (~> 2.0) ast (2.4.2) + base64 (0.2.0) + bigdecimal (3.1.8) bump (0.7.0) - concurrent-ruby (1.1.3) + concurrent-ruby (1.2.3) + connection_pool (2.4.1) diff-lcs (1.3) + drb (2.2.1) forking_test_runner (1.3.0) parallel_tests (>= 1.3.7) forwardable (1.3.3) - i18n (1.2.0) + i18n (1.14.5) concurrent-ruby (~> 1.0) mini_portile2 (2.8.6) - minitest (5.11.3) + minitest (5.23.0) + mutex_m (0.2.0) parallel (1.21.0) parallel_tests (2.27.0) parallel @@ -71,15 +80,17 @@ GEM ruby-progressbar (1.11.0) single_cov (1.3.0) singleton (0.2.0) - sqlite3 (1.6.9) + sqlite3 (1.7.3) mini_portile2 (~> 2.8.0) - thread_safe (0.3.6) - tzinfo (1.2.5) - thread_safe (~> 0.1) + sqlite3 (1.7.3-x86_64-linux) + timeout (0.4.1) + tzinfo (2.0.6) + concurrent-ruby (~> 1.0) unicode-display_width (2.1.0) PLATFORMS ruby + x86_64-linux DEPENDENCIES activerecord @@ -92,7 +103,7 @@ DEPENDENCIES rubocop rubocop-packaging single_cov - sqlite3 + sqlite3 (~> 1.4) BUNDLED WITH 2.5.10 diff --git a/fast_gettext.gemspec b/fast_gettext.gemspec index e81b149b..4150bd20 100644 --- a/fast_gettext.gemspec +++ b/fast_gettext.gemspec @@ -10,11 +10,11 @@ Gem::Specification.new name, FastGettext::VERSION do |s| s.homepage = "https://github.com/grosser/#{name}" s.files = Dir["{lib/**/*.{rb,mo,rdoc},Readme.md,CHANGELOG,LICENSE}"] s.licenses = ["MIT", "Ruby"] - s.required_ruby_version = '>= 2.5.0' + s.required_ruby_version = '>= 3.0.0' s.add_runtime_dependency 'prime' s.add_development_dependency 'rake' - s.add_development_dependency 'sqlite3' + s.add_development_dependency 'sqlite3', '~> 1.4' # need to match what activerecord requires s.add_development_dependency 'rspec' s.add_development_dependency 'activerecord' s.add_development_dependency 'i18n' diff --git a/gemfiles/rails52.gemfile.lock b/gemfiles/rails52.gemfile.lock deleted file mode 100644 index 53833bf1..00000000 --- a/gemfiles/rails52.gemfile.lock +++ /dev/null @@ -1,186 +0,0 @@ -PATH - remote: .. - specs: - fast_gettext (2.4.0) - prime - -GEM - remote: https://rubygems.org/ - specs: - actioncable (5.2.6) - actionpack (= 5.2.6) - nio4r (~> 2.0) - websocket-driver (>= 0.6.1) - actionmailer (5.2.6) - actionpack (= 5.2.6) - actionview (= 5.2.6) - activejob (= 5.2.6) - mail (~> 2.5, >= 2.5.4) - rails-dom-testing (~> 2.0) - actionpack (5.2.6) - actionview (= 5.2.6) - activesupport (= 5.2.6) - rack (~> 2.0, >= 2.0.8) - rack-test (>= 0.6.3) - rails-dom-testing (~> 2.0) - rails-html-sanitizer (~> 1.0, >= 1.0.2) - actionview (5.2.6) - activesupport (= 5.2.6) - builder (~> 3.1) - erubi (~> 1.4) - rails-dom-testing (~> 2.0) - rails-html-sanitizer (~> 1.0, >= 1.0.3) - activejob (5.2.6) - activesupport (= 5.2.6) - globalid (>= 0.3.6) - activemodel (5.2.6) - activesupport (= 5.2.6) - activerecord (5.2.6) - activemodel (= 5.2.6) - activesupport (= 5.2.6) - arel (>= 9.0) - activestorage (5.2.6) - actionpack (= 5.2.6) - activerecord (= 5.2.6) - marcel (~> 1.0.0) - activesupport (5.2.6) - concurrent-ruby (~> 1.0, >= 1.0.2) - i18n (>= 0.7, < 2) - minitest (~> 5.1) - tzinfo (~> 1.1) - arel (9.0.0) - ast (2.4.2) - builder (3.2.4) - bump (0.7.0) - concurrent-ruby (1.1.9) - crass (1.0.6) - diff-lcs (1.3) - erubi (1.10.0) - forking_test_runner (1.6.0) - parallel_tests (>= 1.3.7) - forwardable (1.3.3) - globalid (0.5.2) - activesupport (>= 5.0) - i18n (1.8.10) - concurrent-ruby (~> 1.0) - loofah (2.12.0) - crass (~> 1.0.2) - nokogiri (>= 1.5.9) - mail (2.7.1) - mini_mime (>= 0.1.1) - marcel (1.0.1) - method_source (1.0.0) - mini_mime (1.1.1) - mini_portile2 (2.8.6) - minitest (5.14.4) - nio4r (2.7.3) - nokogiri (1.16.5) - mini_portile2 (~> 2.8.2) - racc (~> 1.4) - parallel (1.21.0) - parallel_tests (2.31.0) - parallel - parser (3.1.0.0) - ast (~> 2.4.1) - prime (0.1.2) - forwardable - singleton - racc (1.5.2) - rack (2.2.3) - rack-test (1.1.0) - rack (>= 1.0, < 3) - rails (5.2.6) - actioncable (= 5.2.6) - actionmailer (= 5.2.6) - actionpack (= 5.2.6) - actionview (= 5.2.6) - activejob (= 5.2.6) - activemodel (= 5.2.6) - activerecord (= 5.2.6) - activestorage (= 5.2.6) - activesupport (= 5.2.6) - bundler (>= 1.3.0) - railties (= 5.2.6) - sprockets-rails (>= 2.0.0) - rails-dom-testing (2.2.0) - activesupport (>= 5.0.0) - minitest - nokogiri (>= 1.6) - rails-html-sanitizer (1.4.2) - loofah (~> 2.3) - railties (5.2.6) - actionpack (= 5.2.6) - activesupport (= 5.2.6) - method_source - rake (>= 0.8.7) - thor (>= 0.19.0, < 2.0) - rainbow (3.1.1) - rake (13.0.6) - regexp_parser (2.2.0) - rexml (3.2.5) - rspec (3.8.0) - rspec-core (~> 3.8.0) - rspec-expectations (~> 3.8.0) - rspec-mocks (~> 3.8.0) - rspec-core (3.8.0) - rspec-support (~> 3.8.0) - rspec-expectations (3.8.2) - diff-lcs (>= 1.2.0, < 2.0) - rspec-support (~> 3.8.0) - rspec-mocks (3.8.0) - diff-lcs (>= 1.2.0, < 2.0) - rspec-support (~> 3.8.0) - rspec-support (3.8.0) - rubocop (1.25.0) - parallel (~> 1.10) - parser (>= 3.1.0.0) - rainbow (>= 2.2.2, < 4.0) - regexp_parser (>= 1.8, < 3.0) - rexml - rubocop-ast (>= 1.15.1, < 2.0) - ruby-progressbar (~> 1.7) - unicode-display_width (>= 1.4.0, < 3.0) - rubocop-ast (1.15.1) - parser (>= 3.0.1.1) - rubocop-packaging (0.5.1) - rubocop (>= 0.89, < 2.0) - ruby-progressbar (1.11.0) - single_cov (1.3.2) - singleton (0.2.0) - sprockets (4.0.2) - concurrent-ruby (~> 1.0) - rack (> 1, < 3) - sprockets-rails (3.2.2) - actionpack (>= 4.0) - activesupport (>= 4.0) - sprockets (>= 3.0.0) - sqlite3 (2.0.1) - mini_portile2 (~> 2.8.0) - thor (1.1.0) - thread_safe (0.3.6) - tzinfo (1.2.9) - thread_safe (~> 0.1) - unicode-display_width (2.1.0) - websocket-driver (0.7.5) - websocket-extensions (>= 0.1.0) - websocket-extensions (0.1.5) - -PLATFORMS - ruby - -DEPENDENCIES - activerecord - bump - fast_gettext! - forking_test_runner - i18n - rails (~> 5.2.0) - rake - rspec - rubocop - rubocop-packaging - single_cov - sqlite3 - -BUNDLED WITH - 2.5.10 diff --git a/gemfiles/rails52.gemfile b/gemfiles/rails71.gemfile similarity index 68% rename from gemfiles/rails52.gemfile rename to gemfiles/rails71.gemfile index 892983b0..f765ba31 100644 --- a/gemfiles/rails52.gemfile +++ b/gemfiles/rails71.gemfile @@ -2,4 +2,4 @@ source "https://rubygems.org" gemspec path: "../" -gem "rails", "~> 5.2.0" +gem "rails", "~> 7.1.0" diff --git a/gemfiles/rails71.gemfile.lock b/gemfiles/rails71.gemfile.lock new file mode 100644 index 00000000..2518ab68 --- /dev/null +++ b/gemfiles/rails71.gemfile.lock @@ -0,0 +1,262 @@ +PATH + remote: .. + specs: + fast_gettext (2.4.0) + prime + +GEM + remote: https://rubygems.org/ + specs: + actioncable (7.1.3.3) + actionpack (= 7.1.3.3) + activesupport (= 7.1.3.3) + nio4r (~> 2.0) + websocket-driver (>= 0.6.1) + zeitwerk (~> 2.6) + actionmailbox (7.1.3.3) + actionpack (= 7.1.3.3) + activejob (= 7.1.3.3) + activerecord (= 7.1.3.3) + activestorage (= 7.1.3.3) + activesupport (= 7.1.3.3) + mail (>= 2.7.1) + net-imap + net-pop + net-smtp + actionmailer (7.1.3.3) + actionpack (= 7.1.3.3) + actionview (= 7.1.3.3) + activejob (= 7.1.3.3) + activesupport (= 7.1.3.3) + mail (~> 2.5, >= 2.5.4) + net-imap + net-pop + net-smtp + rails-dom-testing (~> 2.2) + actionpack (7.1.3.3) + actionview (= 7.1.3.3) + activesupport (= 7.1.3.3) + nokogiri (>= 1.8.5) + racc + rack (>= 2.2.4) + rack-session (>= 1.0.1) + rack-test (>= 0.6.3) + rails-dom-testing (~> 2.2) + rails-html-sanitizer (~> 1.6) + actiontext (7.1.3.3) + actionpack (= 7.1.3.3) + activerecord (= 7.1.3.3) + activestorage (= 7.1.3.3) + activesupport (= 7.1.3.3) + globalid (>= 0.6.0) + nokogiri (>= 1.8.5) + actionview (7.1.3.3) + activesupport (= 7.1.3.3) + builder (~> 3.1) + erubi (~> 1.11) + rails-dom-testing (~> 2.2) + rails-html-sanitizer (~> 1.6) + activejob (7.1.3.3) + activesupport (= 7.1.3.3) + globalid (>= 0.3.6) + activemodel (7.1.3.3) + activesupport (= 7.1.3.3) + activerecord (7.1.3.3) + activemodel (= 7.1.3.3) + activesupport (= 7.1.3.3) + timeout (>= 0.4.0) + activestorage (7.1.3.3) + actionpack (= 7.1.3.3) + activejob (= 7.1.3.3) + activerecord (= 7.1.3.3) + activesupport (= 7.1.3.3) + marcel (~> 1.0) + activesupport (7.1.3.3) + base64 + bigdecimal + concurrent-ruby (~> 1.0, >= 1.0.2) + connection_pool (>= 2.2.5) + drb + i18n (>= 1.6, < 2) + minitest (>= 5.1) + mutex_m + tzinfo (~> 2.0) + ast (2.4.2) + base64 (0.2.0) + bigdecimal (3.1.8) + builder (3.2.4) + bump (0.10.0) + concurrent-ruby (1.2.3) + connection_pool (2.4.1) + crass (1.0.6) + date (3.3.4) + diff-lcs (1.5.1) + drb (2.2.1) + erubi (1.12.0) + forking_test_runner (1.13.0) + parallel_tests (>= 1.3.7) + forwardable (1.3.3) + globalid (1.2.1) + activesupport (>= 6.1) + i18n (1.14.5) + concurrent-ruby (~> 1.0) + io-console (0.7.2) + irb (1.13.1) + rdoc (>= 4.0.0) + reline (>= 0.4.2) + json (2.7.2) + language_server-protocol (3.17.0.3) + loofah (2.22.0) + crass (~> 1.0.2) + nokogiri (>= 1.12.0) + mail (2.8.1) + mini_mime (>= 0.1.1) + net-imap + net-pop + net-smtp + marcel (1.0.4) + mini_mime (1.1.5) + minitest (5.23.0) + mutex_m (0.2.0) + net-imap (0.4.11) + date + net-protocol + net-pop (0.1.2) + net-protocol + net-protocol (0.2.2) + timeout + net-smtp (0.5.0) + net-protocol + nio4r (2.7.3) + nokogiri (1.16.5-arm64-darwin) + racc (~> 1.4) + nokogiri (1.16.5-x86_64-darwin) + racc (~> 1.4) + nokogiri (1.16.5-x86_64-linux) + racc (~> 1.4) + parallel (1.24.0) + parallel_tests (4.7.1) + parallel + parser (3.3.1.0) + ast (~> 2.4.1) + racc + prime (0.1.2) + forwardable + singleton + psych (5.1.2) + stringio + racc (1.8.0) + rack (3.0.11) + rack-session (2.0.0) + rack (>= 3.0.0) + rack-test (2.1.0) + rack (>= 1.3) + rackup (2.1.0) + rack (>= 3) + webrick (~> 1.8) + rails (7.1.3.3) + actioncable (= 7.1.3.3) + actionmailbox (= 7.1.3.3) + actionmailer (= 7.1.3.3) + actionpack (= 7.1.3.3) + actiontext (= 7.1.3.3) + actionview (= 7.1.3.3) + activejob (= 7.1.3.3) + activemodel (= 7.1.3.3) + activerecord (= 7.1.3.3) + activestorage (= 7.1.3.3) + activesupport (= 7.1.3.3) + bundler (>= 1.15.0) + railties (= 7.1.3.3) + rails-dom-testing (2.2.0) + activesupport (>= 5.0.0) + minitest + nokogiri (>= 1.6) + rails-html-sanitizer (1.6.0) + loofah (~> 2.21) + nokogiri (~> 1.14) + railties (7.1.3.3) + actionpack (= 7.1.3.3) + activesupport (= 7.1.3.3) + irb + rackup (>= 1.0.0) + rake (>= 12.2) + thor (~> 1.0, >= 1.2.2) + zeitwerk (~> 2.6) + rainbow (3.1.1) + rake (13.2.1) + rdoc (6.6.3.1) + psych (>= 4.0.0) + regexp_parser (2.9.2) + reline (0.5.7) + io-console (~> 0.5) + rexml (3.2.8) + strscan (>= 3.0.9) + rspec (3.13.0) + rspec-core (~> 3.13.0) + rspec-expectations (~> 3.13.0) + rspec-mocks (~> 3.13.0) + rspec-core (3.13.0) + rspec-support (~> 3.13.0) + rspec-expectations (3.13.0) + diff-lcs (>= 1.2.0, < 2.0) + rspec-support (~> 3.13.0) + rspec-mocks (3.13.1) + diff-lcs (>= 1.2.0, < 2.0) + rspec-support (~> 3.13.0) + rspec-support (3.13.1) + rubocop (1.63.5) + json (~> 2.3) + language_server-protocol (>= 3.17.0) + parallel (~> 1.10) + parser (>= 3.3.0.2) + rainbow (>= 2.2.2, < 4.0) + regexp_parser (>= 1.8, < 3.0) + rexml (>= 3.2.5, < 4.0) + rubocop-ast (>= 1.31.1, < 2.0) + ruby-progressbar (~> 1.7) + unicode-display_width (>= 2.4.0, < 3.0) + rubocop-ast (1.31.3) + parser (>= 3.3.1.0) + rubocop-packaging (0.5.2) + rubocop (>= 1.33, < 2.0) + ruby-progressbar (1.13.0) + single_cov (1.11.0) + singleton (0.2.0) + sqlite3 (1.7.3-arm64-darwin) + sqlite3 (1.7.3-x86_64-darwin) + sqlite3 (1.7.3-x86_64-linux) + stringio (3.1.0) + strscan (3.1.0) + thor (1.3.1) + timeout (0.4.1) + tzinfo (2.0.6) + concurrent-ruby (~> 1.0) + unicode-display_width (2.5.0) + webrick (1.8.1) + websocket-driver (0.7.6) + websocket-extensions (>= 0.1.0) + websocket-extensions (0.1.5) + zeitwerk (2.6.14) + +PLATFORMS + arm64-darwin + x86_64-darwin + x86_64-linux + +DEPENDENCIES + activerecord + bump + fast_gettext! + forking_test_runner + i18n + rails (~> 7.1.0) + rake + rspec + rubocop + rubocop-packaging + single_cov + sqlite3 (~> 1.4) + +BUNDLED WITH + 2.5.10 diff --git a/spec/fast_gettext/translation_repository/db_spec.rb b/spec/fast_gettext/translation_repository/db_spec.rb index 1869e137..b839b024 100644 --- a/spec/fast_gettext/translation_repository/db_spec.rb +++ b/spec/fast_gettext/translation_repository/db_spec.rb @@ -17,7 +17,7 @@ ActiveRecord::Migration.verbose = false ActiveRecord::Schema.define(:version => 1) do create_table :translation_keys do |t| - t.string :key, :unique=>true, :null=>false + t.string :key, :null=>false t.timestamps null: false end