diff -Nru ruby-friendly-id-5.3.0/certs/parndt.pem ruby-friendly-id-5.4.2/certs/parndt.pem --- ruby-friendly-id-5.3.0/certs/parndt.pem 1970-01-01 00:00:00.000000000 +0000 +++ ruby-friendly-id-5.4.2/certs/parndt.pem 2021-03-02 19:55:28.000000000 +0000 @@ -0,0 +1,25 @@ +-----BEGIN CERTIFICATE----- +MIIEMjCCApqgAwIBAgIBATANBgkqhkiG9w0BAQsFADAjMSEwHwYDVQQDDBhnZW1z +L0RDPXAvREM9YXJuZHQvREM9aW8wHhcNMjAwNTEwMjIxOTQ2WhcNMjEwNTEwMjIx +OTQ2WjAjMSEwHwYDVQQDDBhnZW1zL0RDPXAvREM9YXJuZHQvREM9aW8wggGiMA0G +CSqGSIb3DQEBAQUAA4IBjwAwggGKAoIBgQDT+JzHYPGMYJt9ct2DCsbIymn1uJJp +HnDkQESfsGe40jTC90oF2iVbVOkaacNc1N3CSWUZvZjuygUuS86P6/kpBILGdO2+ +bkXXKtfGC2YGGx9TdNLpCb4925vQHvdFeKXGpQDZdDw1SNC6zraZou47CvOE1cl2 +Bp+1QMZuGRZ4+5CzOEWDWurjqce3O1jUEbyBB7z5H0h/YEaxfXipxhL1Dhi0sgkH +qP/e6SxzifdifdZCksJFQ06a1ji9hJY6eM23qbv/aaluVHAZSVBAQBS7rYniLo+N +G4vpFhoubQO5u8UluUtCaPUpI/qOvVcSaZn3ZkzlMwC8b1RwAeXBQmtFE2wnrv2i +ovTwoN7rHchwhgaHbkuFh4Wr92wGbrWL7J+X8rWKk1f8RF4kvtNE/NA6YrkxTpVh +QMyDmekt7rTxvcq2NneLGroWIUVCx/JID+Jw492LKQ6Sl1/P2TRzdEDtqZAZL0gt +xlWeMUfGG2D/gLnhs5qnaFaWQwGTmBnTgHcCAwEAAaNxMG8wCQYDVR0TBAIwADAL +BgNVHQ8EBAMCBLAwHQYDVR0OBBYEFEqtAyQVxPgKsrgoTQ1YmaIu/fmvMBoGA1Ud +EQQTMBGBD2dlbXNAcC5hcm5kdC5pbzAaBgNVHRIEEzARgQ9nZW1zQHAuYXJuZHQu +aW8wDQYJKoZIhvcNAQELBQADggGBALu2HM50B8xqlAXkCwavJDvWWtV9pG1igFUg +friZRWprUQ5nTaNmAd8p8qbJQwaIK2gt+DfYWfB9LtKnQTfbhLRBbmJ7zYw8LjKY +PwCs4RWjDAiuyCO3ppfsz+1bsMUXPLgWlaUkXsUy3nr2NruEFTO9zu3wGYQQ93Tt +vYSHOnP35UB4QjsjNrOO7FBaQfy6O909PP+GnVcJ62s9c26voJz63RSolwY7Jydw +XUlG68jjJKSoDHRzVTmNB7sX8rs8P2kvYkpIUXPHyls3mWBWjBWbdEYWESZrxI2x +dS7jY3AnfqhvsWra2pSREb2IDqPnJrHVOejnEI/zuuufUxLwDx3AC6SMdsyWkZ7V +9OmLt2rg75Sct6h2220lO5ySqYtqAXuOMBDGv5L0zLalx1g8LACA7uILTKVWh8B8 +Hsej0MQ3drCB1eA4c9OXdCUQJnY2aLTq3uNvTbZvoTgWK55eq3KLBJ4zzoKZ4tBX +/HIFI/fEwYlI1Ji3oikUrHkc4rWgaQ== +-----END CERTIFICATE----- diff -Nru ruby-friendly-id-5.3.0/Changelog.md ruby-friendly-id-5.4.2/Changelog.md --- ruby-friendly-id-5.3.0/Changelog.md 2020-01-19 09:42:40.000000000 +0000 +++ ruby-friendly-id-5.4.2/Changelog.md 2021-03-02 19:55:28.000000000 +0000 @@ -3,6 +3,26 @@ We would like to think our many [contributors](https://github.com/norman/friendly_id/graphs/contributors) for suggestions, ideas and improvements to FriendlyId. +## Unreleased + +## 5.4.2 (2021-01-07) + +* Fix: Set slug before save if needed ([#948](https://github.com/norman/friendly_id/pull/948)) +* Revert "Make `first_by_friendly_id` case insensitive using `downcase`" ([#951](https://github.com/norman/friendly_id/pull/951)) + +## 5.4.1 (2020-11-06) + +* Fix unexpected `:slug` error on valid, unpersisted model ([#952](https://github.com/norman/friendly_id/pull/952)) + +## 5.4.0 (2020-08-14) + +* Fix Ruby 2.7 keyword params deprecation warning ([#939](https://github.com/norman/friendly_id/pull/939)) +* Fix Slug Validation in `unset_slug_if_invalid` ([#938](https://github.com/norman/friendly_id/pull/938)) +* Make `first_by_friendly_id` case insensitive using `downcase` ([#787](https://github.com/norman/friendly_id/pull/787)) +* Use `destroy_all` rather than `delete_all` when creating historical slugs ([#924](https://github.com/norman/friendly_id/pull/924)) +* Set required ruby version to `>= 2.1.0` ([#923](https://github.com/norman/friendly_id/pull/923)) +* Avoid using deprecated `update_attributes` ([#922](https://github.com/norman/friendly_id/pull/922)) + ## 5.3.0 (2019-09-25) * Record history when scope changes but slug does not ([#916](https://github.com/norman/friendly_id/pull/916)) diff -Nru ruby-friendly-id-5.3.0/checksums.yaml.gz.sig ruby-friendly-id-5.4.2/checksums.yaml.gz.sig --- ruby-friendly-id-5.3.0/checksums.yaml.gz.sig 1970-01-01 00:00:00.000000000 +0000 +++ ruby-friendly-id-5.4.2/checksums.yaml.gz.sig 2021-03-02 19:55:28.000000000 +0000 @@ -0,0 +1,2 @@ +ҺOWL[RF,%2Z*-&,ɳdxڢ7ҏ͹֛”.ʚ\ZGh탧?Tqx7GP.'Z!=@W6f\B#XY*MKvػU=-齤JqhR_v1(<}S6e[Q'ǵkOruNV +&^ENux,.C*MzYshoI#M z.ɴ9@cO b;++/xxF%YӐo[gG/*c/iV%.ҕ/7nI)m_wY _E~ \ No newline at end of file diff -Nru ruby-friendly-id-5.3.0/data.tar.gz.sig ruby-friendly-id-5.4.2/data.tar.gz.sig --- ruby-friendly-id-5.3.0/data.tar.gz.sig 1970-01-01 00:00:00.000000000 +0000 +++ ruby-friendly-id-5.4.2/data.tar.gz.sig 2021-03-02 19:55:28.000000000 +0000 @@ -0,0 +1,3 @@ + ,o*۬wS^턚jsn嚣%b1UV0d($\QF/PIӣD' +sH=9N`Qd<'|OQ{sY^a+5HmDSZ0i*xM'hN,Y  *XqAgDxYJ(0Z`MlZ=1tG rV%\m'D'<{8u:Wšyo#@CCa&=M=IsI`%n]|)~`/_i{L  + lѹ2p7xޥ}~|F %5rsAb8M8#[$B#j&b \ No newline at end of file diff -Nru ruby-friendly-id-5.3.0/debian/changelog ruby-friendly-id-5.4.2/debian/changelog --- ruby-friendly-id-5.3.0/debian/changelog 2020-02-05 21:15:51.000000000 +0000 +++ ruby-friendly-id-5.4.2/debian/changelog 2021-11-05 20:28:17.000000000 +0000 @@ -1,3 +1,24 @@ +ruby-friendly-id (5.4.2-1) unstable; urgency=medium + + * Team upload. + + [ Debian Janitor ] + * Bump debhelper from old 11 to 12. + * Set debhelper-compat version in Build-Depends. + * Set field Upstream-Contact in debian/copyright. + * Remove obsolete fields Contact, Name from debian/upstream/metadata (already + present in machine-readable debian/copyright). + * Update watch file format version to 4. + * Bump debhelper from old 12 to 13. + * Update standards version to 4.5.1, no changes needed. + + [ Lucas Kanashiro ] + * New upstream version 5.4.2 (Closes: #996230) + * Add runtime dependency on ${ruby:Depends} + * Declare compliance with Debian Policy 4.6.0 + + -- Lucas Kanashiro Fri, 05 Nov 2021 17:28:17 -0300 + ruby-friendly-id (5.3.0-1) unstable; urgency=medium * Team upload diff -Nru ruby-friendly-id-5.3.0/debian/compat ruby-friendly-id-5.4.2/debian/compat --- ruby-friendly-id-5.3.0/debian/compat 2020-02-05 21:15:51.000000000 +0000 +++ ruby-friendly-id-5.4.2/debian/compat 1970-01-01 00:00:00.000000000 +0000 @@ -1 +0,0 @@ -11 diff -Nru ruby-friendly-id-5.3.0/debian/control ruby-friendly-id-5.4.2/debian/control --- ruby-friendly-id-5.3.0/debian/control 2020-02-05 21:15:51.000000000 +0000 +++ ruby-friendly-id-5.4.2/debian/control 2021-11-05 20:27:51.000000000 +0000 @@ -1,16 +1,16 @@ Source: ruby-friendly-id Section: ruby Priority: optional -Maintainer: Debian Ruby Extras Maintainers +Maintainer: Debian Ruby Team Uploaders: Samyak Jain -Build-Depends: debhelper (>= 11~), +Build-Depends: debhelper-compat (= 13), gem2deb, rake, ruby-activerecord (>= 2:4.0), ruby-mocha, ruby-sqlite3, ruby-railties (>= 2:4.0), -Standards-Version: 4.5.0 +Standards-Version: 4.6.0 Vcs-Git: https://salsa.debian.org/ruby-team/ruby-friendly-id.git Vcs-Browser: https://salsa.debian.org/ruby-team/ruby-friendly-id Homepage: https://github.com/norman/friendly_id @@ -21,8 +21,8 @@ Package: ruby-friendly-id Architecture: all XB-Ruby-Versions: ${ruby:Versions} -Depends: ruby | ruby-interpreter, - ruby-activerecord (>= 2:4.0), +Depends: ruby-activerecord (>= 2:4.0), + ${ruby:Depends}, ${misc:Depends}, Description: Comprehensive slugging and pretty-URL plugin FriendlyId is the "Swiss Army bulldozer" of slugging and permalink plugins for diff -Nru ruby-friendly-id-5.3.0/debian/copyright ruby-friendly-id-5.4.2/debian/copyright --- ruby-friendly-id-5.3.0/debian/copyright 2020-02-05 21:15:51.000000000 +0000 +++ ruby-friendly-id-5.4.2/debian/copyright 2021-11-05 20:23:58.000000000 +0000 @@ -1,6 +1,7 @@ Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ Upstream-Name: friendly_id Source: https://github.com/norman/friendly_id +Upstream-Contact: https://github.com/norman/friendly_id/issues Files: * Copyright: 2008-2016 Norman Clarke diff -Nru ruby-friendly-id-5.3.0/debian/upstream/metadata ruby-friendly-id-5.4.2/debian/upstream/metadata --- ruby-friendly-id-5.3.0/debian/upstream/metadata 2020-02-05 21:15:51.000000000 +0000 +++ ruby-friendly-id-5.4.2/debian/upstream/metadata 2021-11-05 20:23:58.000000000 +0000 @@ -3,7 +3,5 @@ Bug-Database: https://github.com/norman/friendly_id/issues Bug-Submit: https://github.com/norman/friendly_id/issues Changelog: https://github.com/norman/friendly_id/tags -Contact: https://github.com/norman/friendly_id/issues -Name: friendly_id Repository: https://github.com/norman/friendly_id.git Repository-Browse: https://github.com/norman/friendly_id diff -Nru ruby-friendly-id-5.3.0/debian/watch ruby-friendly-id-5.4.2/debian/watch --- ruby-friendly-id-5.3.0/debian/watch 2020-02-05 21:15:51.000000000 +0000 +++ ruby-friendly-id-5.4.2/debian/watch 2021-11-05 20:23:58.000000000 +0000 @@ -1,2 +1,2 @@ -version=3 +version=4 https://gemwatch.debian.net/friendly_id .*/friendly_id-(.*).tar.gz diff -Nru ruby-friendly-id-5.3.0/friendly_id.gemspec ruby-friendly-id-5.4.2/friendly_id.gemspec --- ruby-friendly-id-5.3.0/friendly_id.gemspec 2020-01-19 09:42:40.000000000 +0000 +++ ruby-friendly-id-5.4.2/friendly_id.gemspec 2021-03-02 19:55:28.000000000 +0000 @@ -13,7 +13,7 @@ s.require_paths = ["lib"] s.license = 'MIT' - s.required_ruby_version = '>= 1.9.3' + s.required_ruby_version = '>= 2.1.0' s.add_dependency 'activerecord', '>= 4.0.0' @@ -31,4 +31,9 @@ Active Record. It lets you create pretty URLs and work with human-friendly strings as if they were numeric ids. EOM + + s.cert_chain = [File.expand_path('certs/parndt.pem', __dir__)] + if $PROGRAM_NAME =~ /gem\z/ && ARGV.include?('build') && ARGV.include?(__FILE__) + s.signing_key = File.expand_path('~/.ssh/gem-private_key.pem') + end end diff -Nru ruby-friendly-id-5.3.0/Gemfile ruby-friendly-id-5.4.2/Gemfile --- ruby-friendly-id-5.3.0/Gemfile 2020-01-19 09:42:40.000000000 +0000 +++ ruby-friendly-id-5.4.2/Gemfile 2021-03-02 19:55:28.000000000 +0000 @@ -2,6 +2,8 @@ gemspec +gem 'rake' + group :development, :test do platforms :ruby do gem 'byebug' diff -Nru ruby-friendly-id-5.3.0/gemfiles/Gemfile.rails-4.0.rb ruby-friendly-id-5.4.2/gemfiles/Gemfile.rails-4.0.rb --- ruby-friendly-id-5.3.0/gemfiles/Gemfile.rails-4.0.rb 2020-01-19 09:42:40.000000000 +0000 +++ ruby-friendly-id-5.4.2/gemfiles/Gemfile.rails-4.0.rb 1970-01-01 00:00:00.000000000 +0000 @@ -1,30 +0,0 @@ -source 'https://rubygems.org' - -gemspec path: '../' - -gem 'activerecord', '~> 4.0.13' -gem 'railties', '~> 4.0.13' -gem 'minitest', '~> 4.5.0' - -# Database Configuration -group :development, :test do - platforms :jruby do - gem 'activerecord-jdbcsqlite3-adapter', '~> 1.3.14' - gem 'activerecord-jdbcmysql-adapter', '~> 1.3.14' - gem 'activerecord-jdbcpostgresql-adapter', '~> 1.3.14' - gem 'kramdown' - end - - platforms :ruby, :rbx do - gem 'sqlite3' - gem 'mysql2', '~> 0.3.10' - gem 'pg', '~> 0.15' - gem 'redcarpet' - end - - platforms :rbx do - gem 'rubysl', '~> 2.0' - gem 'rubinius-developer_tools' - gem 'json' - end -end diff -Nru ruby-friendly-id-5.3.0/gemfiles/Gemfile.rails-4.1.rb ruby-friendly-id-5.4.2/gemfiles/Gemfile.rails-4.1.rb --- ruby-friendly-id-5.3.0/gemfiles/Gemfile.rails-4.1.rb 2020-01-19 09:42:40.000000000 +0000 +++ ruby-friendly-id-5.4.2/gemfiles/Gemfile.rails-4.1.rb 1970-01-01 00:00:00.000000000 +0000 @@ -1,29 +0,0 @@ -source 'https://rubygems.org' - -gemspec path: '../' - -gem 'activerecord', '~> 4.1.9' -gem 'railties', '~> 4.1.9' - -# Database Configuration -group :development, :test do - platforms :jruby do - gem 'activerecord-jdbcsqlite3-adapter', '~> 1.3.14' - gem 'activerecord-jdbcmysql-adapter', '~> 1.3.14' - gem 'activerecord-jdbcpostgresql-adapter', '~> 1.3.14' - gem 'kramdown' - end - - platforms :ruby, :rbx do - gem 'sqlite3' - gem 'mysql2', '~> 0.3.13' - gem 'pg', '~> 0.15' - gem 'redcarpet' - end - - platforms :rbx do - gem 'rubysl', '~> 2.0' - gem 'rubinius-developer_tools' - gem 'json' - end -end diff -Nru ruby-friendly-id-5.3.0/gemfiles/Gemfile.rails-4.2.rb ruby-friendly-id-5.4.2/gemfiles/Gemfile.rails-4.2.rb --- ruby-friendly-id-5.3.0/gemfiles/Gemfile.rails-4.2.rb 2020-01-19 09:42:40.000000000 +0000 +++ ruby-friendly-id-5.4.2/gemfiles/Gemfile.rails-4.2.rb 1970-01-01 00:00:00.000000000 +0000 @@ -1,28 +0,0 @@ -source 'https://rubygems.org' - -gemspec path: '../' - -gem 'activerecord', '~> 4.2.1' -gem 'railties', '~> 4.2.1' -gem 'i18n', '~> 0.7.0' - -# Database Configuration -group :development, :test do - platforms :jruby do - gem 'activerecord-jdbcmysql-adapter', '~> 1.3.14' - gem 'activerecord-jdbcpostgresql-adapter', '~> 1.3.14' - gem 'kramdown' - end - - platforms :ruby, :rbx do - gem 'sqlite3' - gem 'mysql2', '~> 0.4.10' - gem 'pg', '~> 0.15' - gem 'redcarpet' - end - - platforms :rbx do - gem 'rubysl', '~> 2.0' - gem 'rubinius-developer_tools' - end -end diff -Nru ruby-friendly-id-5.3.0/gemfiles/Gemfile.rails-5.0.rb ruby-friendly-id-5.4.2/gemfiles/Gemfile.rails-5.0.rb --- ruby-friendly-id-5.3.0/gemfiles/Gemfile.rails-5.0.rb 2020-01-19 09:42:40.000000000 +0000 +++ ruby-friendly-id-5.4.2/gemfiles/Gemfile.rails-5.0.rb 1970-01-01 00:00:00.000000000 +0000 @@ -1,28 +0,0 @@ -source 'https://rubygems.org' - -gemspec path: '../' - -gem 'activerecord', '~> 5.0.0' -gem 'railties', '~> 5.0.0' -gem 'i18n', '~> 0.7.0' - -# Database Configuration -group :development, :test do - platforms :jruby do - gem 'activerecord-jdbcmysql-adapter', '~> 50.1' - gem 'activerecord-jdbcpostgresql-adapter', '~> 50.1' - gem 'kramdown' - end - - platforms :ruby, :rbx do - gem 'sqlite3' - gem 'mysql2' - gem 'pg' - gem 'redcarpet' - end - - platforms :rbx do - gem 'rubysl', '~> 2.0' - gem 'rubinius-developer_tools' - end -end diff -Nru ruby-friendly-id-5.3.0/gemfiles/Gemfile.rails-5.1.rb ruby-friendly-id-5.4.2/gemfiles/Gemfile.rails-5.1.rb --- ruby-friendly-id-5.3.0/gemfiles/Gemfile.rails-5.1.rb 2020-01-19 09:42:40.000000000 +0000 +++ ruby-friendly-id-5.4.2/gemfiles/Gemfile.rails-5.1.rb 1970-01-01 00:00:00.000000000 +0000 @@ -1,27 +0,0 @@ -source 'https://rubygems.org' - -gemspec path: '../' - -gem 'activerecord', '~> 5.1.0' -gem 'railties', '~> 5.1.0' - -# Database Configuration -group :development, :test do - platforms :jruby do - gem 'activerecord-jdbcmysql-adapter', '~> 50.1' - gem 'activerecord-jdbcpostgresql-adapter', '~> 50.1' - gem 'kramdown' - end - - platforms :ruby, :rbx do - gem 'sqlite3' - gem 'mysql2' - gem 'pg' - gem 'redcarpet' - end - - platforms :rbx do - gem 'rubysl', '~> 2.0' - gem 'rubinius-developer_tools' - end -end diff -Nru ruby-friendly-id-5.3.0/.github/FUNDING.yml ruby-friendly-id-5.4.2/.github/FUNDING.yml --- ruby-friendly-id-5.3.0/.github/FUNDING.yml 1970-01-01 00:00:00.000000000 +0000 +++ ruby-friendly-id-5.4.2/.github/FUNDING.yml 2021-03-02 19:55:28.000000000 +0000 @@ -0,0 +1 @@ +github: parndt diff -Nru ruby-friendly-id-5.3.0/.github/stale.yml ruby-friendly-id-5.4.2/.github/stale.yml --- ruby-friendly-id-5.3.0/.github/stale.yml 1970-01-01 00:00:00.000000000 +0000 +++ ruby-friendly-id-5.4.2/.github/stale.yml 2021-03-02 19:55:28.000000000 +0000 @@ -0,0 +1,17 @@ +# Number of days of inactivity before an issue becomes stale +daysUntilStale: 84 +# Number of days of inactivity before a stale issue is closed +daysUntilClose: 7 +# Issues with these labels will never be considered stale +exemptLabels: + - pinned + - security +# Label to use when marking an issue as stale +staleLabel: stale +# Comment to post when marking an issue as stale. Set to `false` to disable +markComment: > + This issue has been automatically marked as stale because it has not had + recent activity. It will be closed if no further activity occurs. Thank you + for your contributions. +# Comment to post when closing a stale issue. Set to `false` to disable +closeComment: false diff -Nru ruby-friendly-id-5.3.0/.github/workflows/test.yml ruby-friendly-id-5.4.2/.github/workflows/test.yml --- ruby-friendly-id-5.3.0/.github/workflows/test.yml 1970-01-01 00:00:00.000000000 +0000 +++ ruby-friendly-id-5.4.2/.github/workflows/test.yml 2021-03-02 19:55:28.000000000 +0000 @@ -0,0 +1,49 @@ +name: CI + +on: + push: + branches: + - 'master' + pull_request: +jobs: + test: + strategy: + matrix: + database: [ mysql, postgresql ] + gemfile: [ '6.0', '5.2' ] + ruby: [ '2.7', '2.6', '2.5' ] + fail-fast: false + runs-on: ubuntu-latest + name: ${{ matrix.ruby }} ${{ matrix.database }} rails-${{ matrix.gemfile }} + steps: + - uses: actions/checkout@v2 + - run: sudo apt-get update && sudo apt-get install libpq-dev postgresql-client libmysqlclient-dev mysql-client libsqlite3-dev -y + - uses: ruby/setup-ruby@v1 + with: + bundler-cache: true + ruby-version: ${{ matrix.ruby }} + - run: bundle exec rake db:create db:up + - run: bundle exec rake test + + env: + BUNDLE_GEMFILE: gemfiles/Gemfile.rails-${{ matrix.gemfile }}.rb + CI: true + COVERALLS: true + DB: ${{ matrix.database }} + MYSQL_PASSWORD: root + PGHOST: localhost + PGPORT: 5432 + PGUSER: postgres + RAILS_ENV: test + + services: + postgres: + image: postgres:11.5 + ports: ["5432:5432"] + options: --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5 + mysql: + image: mysql:5.7 + ports: ["3306:3306"] + options: --health-cmd "mysqladmin ping" --health-interval 10s --health-timeout 5s --health-retries 5 + env: + MYSQL_ROOT_PASSWORD: root diff -Nru ruby-friendly-id-5.3.0/lib/friendly_id/base.rb ruby-friendly-id-5.4.2/lib/friendly_id/base.rb --- ruby-friendly-id-5.3.0/lib/friendly_id/base.rb 2020-01-19 09:42:40.000000000 +0000 +++ ruby-friendly-id-5.4.2/lib/friendly_id/base.rb 2021-03-02 19:55:28.000000000 +0000 @@ -159,8 +159,9 @@ # # @option options [Symbol,Module] :use The addon or name of an addon to use. # By default, FriendlyId provides {FriendlyId::Slugged :slugged}, - # {FriendlyId::History :history}, {FriendlyId::Reserved :reserved}, and - # {FriendlyId::Scoped :scoped}, and {FriendlyId::SimpleI18n :simple_i18n}. + # {FriendlyId::Reserved :finders}, {FriendlyId::History :history}, + # {FriendlyId::Reserved :reserved}, {FriendlyId::Scoped :scoped}, and + # {FriendlyId::SimpleI18n :simple_i18n}. # # @option options [Array] :reserved_words Available when using `:reserved`, # which is loaded by default. Sets an array of words banned for use as diff -Nru ruby-friendly-id-5.3.0/lib/friendly_id/configuration.rb ruby-friendly-id-5.4.2/lib/friendly_id/configuration.rb --- ruby-friendly-id-5.3.0/lib/friendly_id/configuration.rb 2020-01-19 09:42:40.000000000 +0000 +++ ruby-friendly-id-5.4.2/lib/friendly_id/configuration.rb 2021-03-02 19:55:28.000000000 +0000 @@ -25,6 +25,7 @@ attr_accessor :routes def initialize(model_class, values = nil) + @base = nil @model_class = model_class @defaults = {} @modules = [] @@ -47,8 +48,8 @@ # # @param [#to_s,Module] modules Arguments should be Modules, or symbols or # strings that correspond with the name of an addon to use with FriendlyId. - # By default FriendlyId provides `:slugged`, `:history`, `:simple_i18n`, - # and `:scoped`. + # By default FriendlyId provides `:slugged`, `:finders`, `:history`, + # `:reserved`, `:simple_i18n`, and `:scoped`. def use(*modules) modules.to_a.flatten.compact.map do |object| mod = get_module(object) diff -Nru ruby-friendly-id-5.3.0/lib/friendly_id/finder_methods.rb ruby-friendly-id-5.4.2/lib/friendly_id/finder_methods.rb --- ruby-friendly-id-5.3.0/lib/friendly_id/finder_methods.rb 2020-01-19 09:42:40.000000000 +0000 +++ ruby-friendly-id-5.4.2/lib/friendly_id/finder_methods.rb 2021-03-02 19:55:28.000000000 +0000 @@ -20,8 +20,8 @@ return super if args.count != 1 || id.unfriendly_id? first_by_friendly_id(id).tap {|result| return result unless result.nil?} return super if potential_primary_key?(id) - raise_not_found_exception id - + + raise_not_found_exception(id) end # Returns true if a record with the given id exists. @@ -39,7 +39,7 @@ end def exists_by_friendly_id?(id) - where(friendly_id_config.query_field => id).exists? + where(friendly_id_config.query_field => parse_friendly_id(id)).exists? end private @@ -59,14 +59,47 @@ end def first_by_friendly_id(id) - find_by(friendly_id_config.query_field => id) + find_by(friendly_id_config.query_field => parse_friendly_id(id)) + end + + # Parse the given value to make it suitable for use as a slug according to + # your application's rules. + # + # This method is not intended to be invoked directly; FriendlyId uses it + # internally to process a slug into string to use as a finder. + # + # However, if FriendlyId's default slug parsing doesn't suit your needs, + # you can override this method in your model class to control exactly how + # slugs are generated. + # + # ### Example + # + # class Person < ActiveRecord::Base + # extend FriendlyId + # friendly_id :name_and_location + # + # def name_and_location + # "#{name} from #{location}" + # end + # + # # Use default slug, but lower case + # # If `id` is "Jane-Doe" or "JANE-DOE", this finds data by "jane-doe" + # def parse_friendly_id(slug) + # super.downcase + # end + # end + # + # @param [#to_s] value The slug to be parsed. + # @return The parsed slug, which is not modified by default. + def parse_friendly_id(value) + value end def raise_not_found_exception(id) message = "can't find record with friendly id: #{id.inspect}" - if ActiveRecord.version < Gem::Version.create('5.0') then + if ActiveRecord.version < Gem::Version.create('5.0') raise ActiveRecord::RecordNotFound.new(message) - else + else raise ActiveRecord::RecordNotFound.new(message, name, friendly_id_config.query_field, id) end end diff -Nru ruby-friendly-id-5.3.0/lib/friendly_id/history.rb ruby-friendly-id-5.4.2/lib/friendly_id/history.rb --- ruby-friendly-id-5.3.0/lib/friendly_id/history.rb 2020-01-19 09:42:40.000000000 +0000 +++ ruby-friendly-id-5.4.2/lib/friendly_id/history.rb 2021-03-02 19:55:28.000000000 +0000 @@ -44,9 +44,9 @@ @post = Post.friendly.find params[:id] # If an old id or a numeric id was used to find the record, then - # the request path will not match the post_path, and we should do - # a 301 redirect that uses the current friendly id. - if request.path != post_path(@post) + # the request slug will not match the current slug, and we should do + # a 301 redirect to the new path + if params[:id] != @post.slug return redirect_to @post, :status => :moved_permanently end end @@ -72,7 +72,7 @@ # Configures the model instance to use the History add-on. def self.included(model_class) model_class.class_eval do - has_many :slugs, -> {order(id: :desc)}, { + has_many :slugs, -> {order(id: :desc)}, **{ :as => :sluggable, :dependent => @friendly_id_config.dependent_value, :class_name => Slug.to_s @@ -128,7 +128,7 @@ if friendly_id_config.uses?(:scoped) relation = relation.where(:scope => serialized_scope) end - relation.delete_all + relation.destroy_all unless relation.empty? slugs.create! do |record| record.slug = friendly_id record.scope = serialized_scope if friendly_id_config.uses?(:scoped) diff -Nru ruby-friendly-id-5.3.0/lib/friendly_id/slugged.rb ruby-friendly-id-5.4.2/lib/friendly_id/slugged.rb --- ruby-friendly-id-5.3.0/lib/friendly_id/slugged.rb 2020-01-19 09:42:40.000000000 +0000 +++ ruby-friendly-id-5.4.2/lib/friendly_id/slugged.rb 2021-03-02 19:55:28.000000000 +0000 @@ -67,7 +67,7 @@ #### Formatting By default, FriendlyId uses Active Support's -[paramaterize](http://api.rubyonrails.org/classes/ActiveSupport/Inflector.html#method-i-parameterize) +[parameterize](http://api.rubyonrails.org/classes/ActiveSupport/Inflector.html#method-i-parameterize) method to create slugs. This method will intelligently replace spaces with dashes, and Unicode Latin characters with ASCII approximations: @@ -248,6 +248,7 @@ defaults[:sequence_separator] ||= '-' end model_class.before_validation :set_slug + model_class.before_save :set_slug model_class.after_validation :unset_slug_if_invalid end @@ -375,7 +376,7 @@ private :slug_generator def unset_slug_if_invalid - if errors.present? && attribute_changed?(friendly_id_config.query_field.to_s) + if errors.key?(friendly_id_config.query_field) && attribute_changed?(friendly_id_config.query_field.to_s) diff = changes[friendly_id_config.query_field] send "#{friendly_id_config.slug_column}=", diff.first end diff -Nru ruby-friendly-id-5.3.0/lib/friendly_id/version.rb ruby-friendly-id-5.4.2/lib/friendly_id/version.rb --- ruby-friendly-id-5.3.0/lib/friendly_id/version.rb 2020-01-19 09:42:40.000000000 +0000 +++ ruby-friendly-id-5.4.2/lib/friendly_id/version.rb 2021-03-02 19:55:28.000000000 +0000 @@ -1,3 +1,3 @@ module FriendlyId - VERSION = '5.3.0'.freeze + VERSION = '5.4.2'.freeze end diff -Nru ruby-friendly-id-5.3.0/metadata.gz.sig ruby-friendly-id-5.4.2/metadata.gz.sig --- ruby-friendly-id-5.3.0/metadata.gz.sig 1970-01-01 00:00:00.000000000 +0000 +++ ruby-friendly-id-5.4.2/metadata.gz.sig 2021-03-02 19:55:28.000000000 +0000 @@ -0,0 +1 @@ + Z%d6(',gÞHUm)6 s, J16.Ndgf,RJ켅 @$~}cC+`t/h3 kÌizJpD S=8('T@8{oN.6J7qؐ7Hm`y>BF2Оh*\G|a;:LHo vdO8ZXޫ PߓK)՞mNJD:2 dda!.z.?iR7E3qK}L/C}lHHh5d([5<4Ȏ XB+hnI| \ No newline at end of file diff -Nru ruby-friendly-id-5.3.0/Rakefile ruby-friendly-id-5.4.2/Rakefile --- ruby-friendly-id-5.3.0/Rakefile 2020-01-19 09:42:40.000000000 +0000 +++ ruby-friendly-id-5.4.2/Rakefile 2021-03-02 19:55:28.000000000 +0000 @@ -71,7 +71,7 @@ driver = FriendlyId::Test::Database.driver config = FriendlyId::Test::Database.config[driver] commands = { - "mysql" => "mysql -u #{config['username']} -e 'create database #{config["database"]};' >/dev/null", + "mysql" => "mysql -h #{config['host']} -P #{config['port']} -u #{config['username']} --password=#{config['password']} -e 'create database #{config["database"]};' >/dev/null", "postgres" => "psql -c 'create database #{config['database']};' -U #{config['username']} >/dev/null" } %x{#{commands[driver] || true}} @@ -83,7 +83,7 @@ driver = FriendlyId::Test::Database.driver config = FriendlyId::Test::Database.config[driver] commands = { - "mysql" => "mysql -u #{config['username']} -e 'drop database #{config["database"]};' >/dev/null", + "mysql" => "mysql -h #{config['host']} -P #{config['port']} -u #{config['username']} --password=#{config['password']} -e 'drop database #{config["database"]};' >/dev/null", "postgres" => "psql -c 'drop database #{config['database']};' -U #{config['username']} >/dev/null" } %x{#{commands[driver] || true}} diff -Nru ruby-friendly-id-5.3.0/README.md ruby-friendly-id-5.4.2/README.md --- ruby-friendly-id-5.3.0/README.md 2020-01-19 09:42:40.000000000 +0000 +++ ruby-friendly-id-5.4.2/README.md 2021-03-02 19:55:28.000000000 +0000 @@ -1,10 +1,10 @@ -[![Build Status](https://travis-ci.org/norman/friendly_id.svg)](https://travis-ci.org/norman/friendly_id) +[![Build Status](https://github.com/norman/friendly_id/workflows/CI/badge.svg)](https://github.com/norman/friendly_id/actions) [![Code Climate](https://codeclimate.com/github/norman/friendly_id.svg)](https://codeclimate.com/github/norman/friendly_id) -[![Inline docs](http://inch-ci.org/github/norman/friendly_id.svg?branch=master)](http://inch-ci.org/github/norman/friendly_id) +[![Inline docs](https://inch-ci.org/github/norman/friendly_id.svg?branch=master)](https://inch-ci.org/github/norman/friendly_id) # FriendlyId -**For the most complete, user-friendly documentation, see the [FriendlyId Guide](http://norman.github.io/friendly_id/file.Guide.html).** +**For the most complete, user-friendly documentation, see the [FriendlyId Guide](https://norman.github.io/friendly_id/file.Guide.html).** FriendlyId is the "Swiss Army bulldozer" of slugging and permalink plugins for Active Record. It lets you create pretty URLs and work with human-friendly @@ -12,16 +12,16 @@ With FriendlyId, it's easy to make your application use URLs like: - http://example.com/states/washington + https://example.com/states/washington instead of: - http://example.com/states/4323454 + https://example.com/states/4323454 ## Getting Help -Ask questions on [Stack Overflow](http://stackoverflow.com/questions/tagged/friendly-id) +Ask questions on [Stack Overflow](https://stackoverflow.com/questions/tagged/friendly-id) using the "friendly-id" tag, and for bugs have a look at [the bug section](https://github.com/norman/friendly_id#bugs) ## FriendlyId Features @@ -39,9 +39,11 @@ Add this line to your application's Gemfile: ```ruby -gem 'friendly_id', '~> 5.2.4' # Note: You MUST use 5.0.0 or greater for Rails 4.0+ +gem 'friendly_id', '~> 5.4.0' ``` +Note: You MUST use 5.0.0 or greater for Rails 4.0+. + And then execute: ```shell @@ -95,7 +97,7 @@ You can then access the user show page using the URL http://localhost:3000/users/joe-schmoe. -If you're adding FriendlyId to an existing app and need to generate slugs for +If you're adding FriendlyId to an existing app and need to generate slugs for existing users, do this from the console, runner, or add a Rake task: ```ruby @@ -105,7 +107,7 @@ ## Bugs Please report them on the [Github issue -tracker](http://github.com/norman/friendly_id/issues) for this project. +tracker](https://github.com/norman/friendly_id/issues) for this project. If you have a bug to report, please include the following information: @@ -131,7 +133,7 @@ ## License -Copyright (c) 2008-2016 Norman Clarke and contributors, released under the MIT +Copyright (c) 2008-2020 Norman Clarke and contributors, released under the MIT license. Permission is hereby granted, free of charge, to any person obtaining a copy of diff -Nru ruby-friendly-id-5.3.0/test/databases.yml ruby-friendly-id-5.4.2/test/databases.yml --- ruby-friendly-id-5.3.0/test/databases.yml 2020-01-19 09:42:40.000000000 +0000 +++ ruby-friendly-id-5.4.2/test/databases.yml 2021-03-02 19:55:28.000000000 +0000 @@ -2,14 +2,16 @@ adapter: mysql2 database: friendly_id_test username: root - hostname: localhost + password: <%= ENV['MYSQL_PASSWORD'] %> + host: 127.0.0.1 + port: 3306 encoding: utf8 postgres: adapter: postgresql - host: localhost - port: 5432 - username: postgres + host: <%= ENV.fetch('PGHOST') { 'localhost' } %> + port: <%= ENV.fetch('PGPORT') { '5432' } %> + username: <%= ENV.fetch('PGUSER') { 'postgres' } %> database: friendly_id_test encoding: utf8 diff -Nru ruby-friendly-id-5.3.0/test/helper.rb ruby-friendly-id-5.4.2/test/helper.rb --- ruby-friendly-id-5.3.0/test/helper.rb 2020-01-19 09:42:40.000000000 +0000 +++ ruby-friendly-id-5.4.2/test/helper.rb 2021-03-02 19:55:28.000000000 +0000 @@ -27,6 +27,7 @@ require "mocha/setup" require "active_record" require 'active_support/core_ext/time/conversions' +require 'erb' I18n.enforce_available_locales = false @@ -85,7 +86,11 @@ end def config - @config ||= YAML::load(File.open(File.expand_path("../databases.yml", __FILE__))) + @config ||= YAML::load( + ERB.new( + File.read(File.expand_path("../databases.yml", __FILE__)) + ).result + ) end def driver diff -Nru ruby-friendly-id-5.3.0/test/history_test.rb ruby-friendly-id-5.4.2/test/history_test.rb --- ruby-friendly-id-5.3.0/test/history_test.rb 2020-01-19 09:42:40.000000000 +0000 +++ ruby-friendly-id-5.4.2/test/history_test.rb 2021-03-02 19:55:28.000000000 +0000 @@ -65,8 +65,7 @@ test "should not be read only when found by slug" do with_instance_of(model_class) do |record| refute model_class.friendly.find(record.friendly_id).readonly? - assert record.update_attribute :name, 'foo' - assert record.update_attributes name: 'foo' + assert record.update name: 'foo' end end @@ -93,6 +92,28 @@ end end + test 'should maintain history even if current slug is not the most recent one' do + with_instance_of(model_class) do |record| + record.name = 'current' + assert record.save + + # this feels like a hack. only thing i can get to work with the HistoryTestWithSti + # test cases. (Editorialist vs Journalist.) + sluggable_type = FriendlyId::Slug.first.sluggable_type + # create several slugs for record + # current slug does not have max id + FriendlyId::Slug.delete_all + FriendlyId::Slug.create(sluggable_type: sluggable_type, sluggable_id: record.id, slug: 'current') + FriendlyId::Slug.create(sluggable_type: sluggable_type, sluggable_id: record.id, slug: 'outdated') + + record.reload + record.slug = nil + assert record.save + + assert_equal 2, FriendlyId::Slug.count + end + end + test "should not create new slugs that match old slugs" do transaction do first_record = model_class.create! :name => "foo" @@ -109,10 +130,10 @@ first_record = model_class.create! :name => "foo" second_record = model_class.create! :name => 'another' - second_record.update_attributes :name => 'foo', :slug => nil + second_record.update :name => 'foo', :slug => nil assert_match(/foo-.*/, second_record.slug) - first_record.update_attributes :name => 'another', :slug => nil + first_record.update :name => 'another', :slug => nil assert_match(/another-.*/, first_record.slug) end end @@ -230,7 +251,7 @@ record = model_class.create(name: 'paranoid') assert FriendlyId::Slug.find_by_slug('paranoid').present? - record.update_attribute(:deleted_at, Time.now) + record.update deleted_at: Time.now orphan_slug = FriendlyId::Slug.find_by_slug('paranoid') assert orphan_slug.present?, 'Orphaned slug should exist' diff -Nru ruby-friendly-id-5.3.0/test/shared.rb ruby-friendly-id-5.4.2/test/shared.rb --- ruby-friendly-id-5.3.0/test/shared.rb 2020-01-19 09:42:40.000000000 +0000 +++ ruby-friendly-id-5.4.2/test/shared.rb 2021-03-02 19:55:28.000000000 +0000 @@ -62,7 +62,7 @@ my_model_class = Class.new(model_class) self.class.const_set("Foo", my_model_class) with_instance_of my_model_class do |record| - record.update_attributes my_model_class.friendly_id_config.slug_column => nil + record.update my_model_class.friendly_id_config.slug_column => nil record = my_model_class.friendly.find(record.id) record.class.validate Proc.new {errors.add(:name, "FAIL")} record.save @@ -132,7 +132,7 @@ test "updating record's other values should not change the friendly_id" do with_instance_of model_class do |record| old = record.friendly_id - record.update_attributes! :active => false + record.update! active: false assert model_class.friendly.find old end end diff -Nru ruby-friendly-id-5.3.0/test/simple_i18n_test.rb ruby-friendly-id-5.4.2/test/simple_i18n_test.rb --- ruby-friendly-id-5.3.0/test/simple_i18n_test.rb 2020-01-19 09:42:40.000000000 +0000 +++ ruby-friendly-id-5.4.2/test/simple_i18n_test.rb 2021-03-02 19:55:28.000000000 +0000 @@ -91,14 +91,14 @@ class RegressionTest < TestCaseClass include FriendlyId::Test - test "should not overwrite other locale's slugs on update_attributes" do + test "should not overwrite other locale's slugs on update" do transaction do journalist = Journalist.create!(:name => "John Smith") journalist.set_friendly_id("Juan Fulano", :es) journalist.save! assert_equal "john-smith", journalist.to_param journalist.slug = nil - journalist.update_attributes :name => "Johnny Smith" + journalist.update :name => "Johnny Smith" assert_equal "johnny-smith", journalist.to_param I18n.with_locale(:es) do assert_equal "juan-fulano", journalist.to_param diff -Nru ruby-friendly-id-5.3.0/test/slugged_test.rb ruby-friendly-id-5.4.2/test/slugged_test.rb --- ruby-friendly-id-5.3.0/test/slugged_test.rb 2020-01-19 09:42:40.000000000 +0000 +++ ruby-friendly-id-5.4.2/test/slugged_test.rb 2021-03-02 19:55:28.000000000 +0000 @@ -92,7 +92,7 @@ end end - test "should not set slug on create if unrelated validations fail" do + test "should set slug on create if unrelated validations fail" do klass = Class.new model_class do validates_presence_of :active friendly_id :name, :use => :slugged @@ -106,11 +106,30 @@ instance = klass.new :name => 'foo' refute instance.save refute instance.valid? + assert_equal 'foo', instance.slug + end + end + + test "should not set slug on create if slug validation fails" do + klass = Class.new model_class do + validates_presence_of :active + validates_length_of :slug, :minimum => 2 + friendly_id :name, :use => :slugged + + def self.name + "Journalist" + end + end + + transaction do + instance = klass.new :name => 'x' + refute instance.save + refute instance.valid? assert_nil instance.slug end end - test "should not set slug on create if unrelated validations fail with custom slug_column" do + test "should set slug on create if unrelated validations fail with custom slug_column" do klass = Class.new(ActiveRecord::Base) do self.table_name = 'authors' extend FriendlyId @@ -126,11 +145,31 @@ instance = klass.new :name => 'foo' refute instance.save refute instance.valid? + assert_equal 'foo', instance.subdomain + end + end + + test "should not set slug on create if custom slug column validations fail" do + klass = Class.new(ActiveRecord::Base) do + self.table_name = 'authors' + extend FriendlyId + validates_length_of :subdomain, :minimum => 2 + friendly_id :name, :use => :slugged, :slug_column => :subdomain + + def self.name + "Author" + end + end + + transaction do + instance = klass.new :name => 'x' + refute instance.save + refute instance.valid? assert_nil instance.subdomain end end - test "should not update slug on save if unrelated validations fail" do + test "should keep new slug on save if unrelated validations fail" do klass = Class.new model_class do validates_presence_of :active friendly_id :name, :use => :slugged @@ -149,6 +188,28 @@ instance.active = nil refute instance.save refute instance.valid? + assert_equal 'foobar', instance.slug + end + end + + test "should not update slug on save if slug validations fail" do + klass = Class.new model_class do + validates_length_of :slug, :minimum => 2 + friendly_id :name, :use => :slugged + + def self.name + "Journalist" + end + end + + transaction do + instance = klass.new :name => 'foo', :active => true + assert instance.save + assert instance.valid? + instance.name = 'x' + instance.slug = nil + instance.active = nil + refute instance.save assert_equal 'foo', instance.slug end end @@ -418,6 +479,37 @@ end +# https://github.com/norman/friendly_id/issues/947 +class GeneratingSlugWithValidationSkippedTest < TestCaseClass + + include FriendlyId::Test + + class Journalist < ActiveRecord::Base + extend FriendlyId + friendly_id :name, :use => :slugged + end + + test "should generate slug when skipping validation" do + transaction do + m1 = Journalist.new + m1.name = 'Bob Timesletter' + m1.save(validate: false) + assert_equal 'bob-timesletter', m1.slug + end + end + + test "should generate slug when #valid? called" do + transaction do + m1 = Journalist.new + m1.name = 'Bob Timesletter' + m1.valid? + m1.save(validate: false) + assert_equal 'bob-timesletter', m1.slug + end + end + +end + class ToParamTest < TestCaseClass include FriendlyId::Test @@ -425,6 +517,7 @@ class Journalist < ActiveRecord::Base extend FriendlyId validates_presence_of :active + validates_length_of :slug, :minimum => 2 friendly_id :name, :use => :slugged attr_accessor :to_param_in_callback @@ -438,9 +531,21 @@ assert_nil Journalist.new.to_param end - test "to_param should return nil if record failed validation" do + test "to_param should return original slug if record failed validation" do journalist = Journalist.new :name => 'Clark Kent', :active => nil refute journalist.save + assert_equal 'clark-kent', journalist.to_param + end + + test "to_param should clear slug attributes if slug attribute fails validation" do + journalist = Journalist.new :name => 'x', :active => true + refute journalist.save + assert_nil journalist.to_param + end + + test "to_param should clear slug attribute if slug attribute fails validation and unrelated validation fails" do + journalist = Journalist.new :name => 'x', :active => nil + refute journalist.save assert_nil journalist.to_param end @@ -452,7 +557,7 @@ end end - test "to_param should use original slug if existing record changes but fails to save" do + test "to_param should use new slug if existing record changes but fails to save" do transaction do journalist = Journalist.new :name => 'Clark Kent', :active => true assert journalist.save @@ -460,6 +565,18 @@ journalist.slug = nil journalist.active = nil refute journalist.save + assert_equal 'superman', journalist.to_param + end + end + + test "to_param should use original slug if new slug attribute is not valid" do + transaction do + journalist = Journalist.new :name => 'Clark Kent', :active => true + assert journalist.save + journalist.name = 'x' + journalist.slug = nil + journalist.active = nil + refute journalist.save assert_equal 'clark-kent', journalist.to_param end end diff -Nru ruby-friendly-id-5.3.0/.travis.yml ruby-friendly-id-5.4.2/.travis.yml --- ruby-friendly-id-5.3.0/.travis.yml 2020-01-19 09:42:40.000000000 +0000 +++ ruby-friendly-id-5.4.2/.travis.yml 1970-01-01 00:00:00.000000000 +0000 @@ -1,96 +0,0 @@ -language: ruby -cache: bundler -services: - - postgresql - - mysql -dist: trusty -addons: - postgresql: "9.6" -rvm: - - 2.6.3 - - 2.5.5 - - 2.4.6 - - 2.3.8 - - 2.2.0 - - 2.1.0 - - jruby-9.1.13.0 - -env: - global: - - COVERALLS=true - matrix: - - DB=postgres - - DB=mysql - -gemfile: - - gemfiles/Gemfile.rails-4.0.rb - - gemfiles/Gemfile.rails-4.1.rb - - gemfiles/Gemfile.rails-4.2.rb - - gemfiles/Gemfile.rails-5.0.rb - - gemfiles/Gemfile.rails-5.1.rb - - gemfiles/Gemfile.rails-5.2.rb - - gemfiles/Gemfile.rails-6.0.rb - -before_install: - - gem update bundler - -matrix: - exclude: - - rvm: 2.1.0 - gemfile: gemfiles/Gemfile.rails-5.2.rb - - rvm: 2.1.0 - gemfile: gemfiles/Gemfile.rails-6.0.rb - - rvm: 2.2.0 - gemfile: gemfiles/Gemfile.rails-5.2.rb - - rvm: 2.2.0 - gemfile: gemfiles/Gemfile.rails-6.0.rb - - rvm: jruby-9.1.13.0 - gemfile: gemfiles/Gemfile.rails-5.2.rb - - rvm: jruby-9.1.13.0 - gemfile: gemfiles/Gemfile.rails-6.0.rb - - rvm: 2.1.0 - gemfile: gemfiles/Gemfile.rails-5.0.rb - - rvm: 2.1.0 - gemfile: gemfiles/Gemfile.rails-5.1.rb - - rvm: 2.1.0 - gemfile: gemfiles/Gemfile.rails-6.0.rb - - rvm: 2.2.0 - gemfile: gemfiles/Gemfile.rails-5.1.rb - - rvm: 2.2.0 - gemfile: gemfiles/Gemfile.rails-5.0.rb - - rvm: 2.2.0 - gemfile: gemfiles/Gemfile.rails-6.0.rb - - rvm: 2.3.8 - gemfile: gemfiles/Gemfile.rails-6.0.rb - - rvm: 2.4.6 - gemfile: gemfiles/Gemfile.rails-4.0.rb - - rvm: 2.4.6 - gemfile: gemfiles/Gemfile.rails-4.1.rb - - rvm: 2.4.6 - gemfile: gemfiles/Gemfile.rails-6.0.rb - - rvm: 2.5.5 - gemfile: gemfiles/Gemfile.rails-4.0.rb - - rvm: 2.5.5 - gemfile: gemfiles/Gemfile.rails-4.1.rb - - rvm: 2.5.5 - gemfile: gemfiles/Gemfile.rails-5.0.rb - - rvm: 2.5.5 - gemfile: gemfiles/Gemfile.rails-5.1.rb - - rvm: 2.6.3 - gemfile: gemfiles/Gemfile.rails-4.0.rb - - rvm: 2.6.3 - gemfile: gemfiles/Gemfile.rails-4.1.rb - - rvm: 2.6.3 - gemfile: gemfiles/Gemfile.rails-5.0.rb - - rvm: 2.6.3 - gemfile: gemfiles/Gemfile.rails-5.1.rb - allow_failures: - - rvm: jruby-9.1.13.0 - gemfile: gemfiles/Gemfile.rails-5.1.rb - - rvm: jruby-9.1.13.0 - gemfile: gemfiles/Gemfile.rails-5.0.rb - -before_script: - - bundle exec rake db:create db:up - -script: 'bundle exec rake test'