diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml new file mode 100644 index 0000000..8a588ae --- /dev/null +++ b/.github/workflows/test.yml @@ -0,0 +1,21 @@ +name: Test + +on: [push, pull_request] + +jobs: + test: + name: RSpec + strategy: + fail-fast: false + matrix: + ruby: [ '2.2', '3.2' ] + runs-on: ubuntu-20.04 + steps: + - uses: actions/checkout@v4 + - name: Set up Ruby + uses: ruby/setup-ruby@v1 + with: + ruby-version: ${{ matrix.ruby }} + bundler-cache: true + - name: Run RSpec + run: bundle exec rake spec diff --git a/.gitignore b/.gitignore index 0cb6eeb..f9d6e86 100644 --- a/.gitignore +++ b/.gitignore @@ -4,6 +4,7 @@ /_yardoc/ /coverage/ /doc/ +/log/ /pkg/ /spec/reports/ /tmp/ diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 0888000..0000000 --- a/.travis.yml +++ /dev/null @@ -1,9 +0,0 @@ -language: ruby - -rvm: - - 2.3.0 - -script: bundle exec rspec -b - -notifications: - email: false diff --git a/Gemfile b/Gemfile index fa75df1..aebd81c 100644 --- a/Gemfile +++ b/Gemfile @@ -1,3 +1,5 @@ source 'https://rubygems.org' +gem 'loofah', '~>2.19.1' + gemspec diff --git a/README.md b/README.md index 64620ca..930bb1d 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# CarrierWave i18n [![Build Status](https://travis-ci.org/carrierwaveuploader/carrierwave-i18n.svg?branch=master)](https://travis-ci.org/carrierwaveuploader/carrierwave-i18n) +# CarrierWave i18n [![Build Status](https://github.com/carrierwaveuploader/carrierwave-i18n/actions/workflows/test.yml/badge.svg)](https://github.com/carrierwaveuploader/carrierwave-i18n/actions/workflows/test.yml) Provides additional locales for CarrierWave, the classier solution for file uploads for Rails. diff --git a/spec/locale_loading_spec.rb b/spec/locale_loading_spec.rb index 6733fab..913ca04 100644 --- a/spec/locale_loading_spec.rb +++ b/spec/locale_loading_spec.rb @@ -26,10 +26,10 @@ expected_translations = <<-EOS.gsub(/^ */, "") In French: Impossible de redimensionner l'image. In Spanish: no pudo ser procesado - In Japanese: translation missing: ja.errors.messages.carrierwave_processing_error + In Japanese: Translation missing: ja.errors.messages.carrierwave_processing_error EOS - expect(translations).to eq(expected_translations) + expect(translations.gsub('translation missing', 'Translation missing')).to eq(expected_translations) end end @@ -43,11 +43,11 @@ it "loads only this locale" do expected_translations = <<-EOS.gsub(/^ */, "") In French: Impossible de redimensionner l'image. - In Spanish: translation missing: es.errors.messages.carrierwave_processing_error - In Japanese: translation missing: ja.errors.messages.carrierwave_processing_error + In Spanish: Translation missing: es.errors.messages.carrierwave_processing_error + In Japanese: Translation missing: ja.errors.messages.carrierwave_processing_error EOS - expect(translations).to eq(expected_translations) + expect(translations.gsub('translation missing', 'Translation missing')).to eq(expected_translations) end end