Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix build and test against Rails 5.1 and 5.2 #863

Merged
merged 7 commits into from
Apr 24, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 17 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,24 @@ gemfile:
- 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

before_install:
- gem update bundler

matrix:
exclude:
- rvm: 2.1.0
gemfile: gemfiles/Gemfile.rails-5.2.rb
- rvm: 2.2.0
gemfile: gemfiles/Gemfile.rails-5.2.rb
- rvm: jruby-9.1.13.0
gemfile: gemfiles/Gemfile.rails-5.2.rb
- rvm: 2.1.0
gemfile: gemfiles/Gemfile.rails-5.1.rb
- rvm: 2.2.0
gemfile: gemfiles/Gemfile.rails-5.1.rb
- rvm: 2.1.0
gemfile: gemfiles/Gemfile.rails-5.0.rb
- rvm: 2.2.0
Expand All @@ -31,6 +43,11 @@ matrix:
gemfile: gemfiles/Gemfile.rails-4.0.rb
- rvm: 2.4.0
gemfile: gemfiles/Gemfile.rails-4.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

sudo: false

Expand Down
2 changes: 1 addition & 1 deletion gemfiles/Gemfile.rails-4.0.rb
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
platforms :ruby, :rbx do
gem 'sqlite3'
gem 'mysql2', '~> 0.3.10'
gem 'pg'
gem 'pg', '~> 0.15'
gem 'redcarpet'
end

Expand Down
2 changes: 1 addition & 1 deletion gemfiles/Gemfile.rails-4.1.rb
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
platforms :ruby, :rbx do
gem 'sqlite3'
gem 'mysql2', '~> 0.3.13'
gem 'pg'
gem 'pg', '~> 0.15'
gem 'redcarpet'
end

Expand Down
4 changes: 2 additions & 2 deletions gemfiles/Gemfile.rails-4.2.rb
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@

platforms :ruby, :rbx do
gem 'sqlite3'
gem 'mysql2'
gem 'pg'
gem 'mysql2', '~> 0.4.10'
gem 'pg', '~> 0.15'
gem 'redcarpet'
end

Expand Down
4 changes: 2 additions & 2 deletions gemfiles/Gemfile.rails-5.0.rb
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@
# Database Configuration
group :development, :test do
platforms :jruby do
gem 'activerecord-jdbcmysql-adapter', git: 'https://github.com/jruby/activerecord-jdbc-adapter.git', branch: 'rails-5'
gem 'activerecord-jdbcpostgresql-adapter', git: 'https://github.com/jruby/activerecord-jdbc-adapter.git', branch: 'rails-5'
gem 'activerecord-jdbcmysql-adapter', git: 'https://github.com/jruby/activerecord-jdbc-adapter', branch: '50-stable'
gem 'activerecord-jdbcpostgresql-adapter', git: 'https://github.com/jruby/activerecord-jdbc-adapter', branch: '50-stable'
gem 'kramdown'
end

Expand Down
27 changes: 27 additions & 0 deletions gemfiles/Gemfile.rails-5.1.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
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', git: 'https://github.com/jruby/activerecord-jdbc-adapter', branch: 'master'
gem 'activerecord-jdbcpostgresql-adapter', git: 'https://github.com/jruby/activerecord-jdbc-adapter', branch: 'master'
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
27 changes: 27 additions & 0 deletions gemfiles/Gemfile.rails-5.2.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
source 'https://rubygems.org'

gemspec path: '../'

gem 'activerecord', '~> 5.2.0'
gem 'railties', '~> 5.2.0'

# Database Configuration
group :development, :test do
platforms :jruby do
gem 'activerecord-jdbcmysql-adapter', git: 'https://github.com/jruby/activerecord-jdbc-adapter', branch: 'master'
gem 'activerecord-jdbcpostgresql-adapter', git: 'https://github.com/jruby/activerecord-jdbc-adapter', branch: 'master'
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
1 change: 0 additions & 1 deletion lib/friendly_id.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
require "friendly_id/object_utils"
require "friendly_id/configuration"
require "friendly_id/finder_methods"
require 'friendly_id/railtie' if defined?(Rails)

=begin

Expand Down
4 changes: 4 additions & 0 deletions lib/friendly_id/object_utils.rb
Original file line number Diff line number Diff line change
Expand Up @@ -70,3 +70,7 @@ def self.mark_as_unfriendly(klass)
# one of its descendants.

FriendlyId::UNFRIENDLY_CLASSES.each { |klass| FriendlyId.mark_as_unfriendly(klass) }

ActiveSupport.on_load(:active_record) do
FriendlyId.mark_as_unfriendly(ActiveRecord::Base)
end
9 changes: 0 additions & 9 deletions lib/friendly_id/railtie.rb

This file was deleted.