Skip to content

Commit

Permalink
Add support for Rails 5
Browse files Browse the repository at this point in the history
  • Loading branch information
gonzalo-bulnes committed Jul 7, 2016
1 parent 9cc5c9e commit 3834199
Show file tree
Hide file tree
Showing 7 changed files with 39 additions and 27 deletions.
8 changes: 4 additions & 4 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,21 +1,21 @@
language: ruby
gemfile:
- gemfiles/rails_4_devise_4.gemfile
- gemfiles/rails_5_devise_4.gemfile
- gemfiles/rails_4_devise_3.gemfile
- gemfiles/ruby_1.9.3_rails_3.2.gemfile
rvm:
- "1.9.3"
- "2.2.0"
- "2.2.2"

This comment has been minimized.

Copy link
@aried3r

aried3r Jul 7, 2016

I know Rails 5 requires at least 2.2.2, but we could use 2.2.5 to use the latest 2.2.x release. What do you think?

This comment has been minimized.

Copy link
@gonzalo-bulnes

gonzalo-bulnes Jul 9, 2016

Author Owner

Hi @aried3r,

The latest Ruby is covered by the ruby-head. Simple Token Authentication is not very sensitive to Ruby versions and out of testing major changes (1.9, 2.x), I don't think it matters much which exact version is used in the test suite...

- ruby-head
matrix:
allow_failures:
- rvm: ruby-head
exclude:
- rvm: 1.9.3
gemfile: gemfiles/rails_4_devise_4.gemfile
gemfile: gemfiles/rails_5_devise_4.gemfile
- rvm: 1.9.3
gemfile: gemfiles/rails_4_devise_3.gemfile
- rvm: 2.2.0
- rvm: 2.2.2
gemfile: gemfiles/ruby_1.9.3_rails_3.2.gemfile
- rvm: ruby-head
gemfile: gemfiles/rails_4_devise_3.gemfile
Expand Down
9 changes: 7 additions & 2 deletions Appraisals
Original file line number Diff line number Diff line change
@@ -1,8 +1,13 @@
appraise 'rails_4_devise_4' do
# Use the version constraints defined in the gemspec
appraise 'rails_5_devise_4' do
# Until Mongoid 6 is released, allow Rails 5 dependencies to be installed,
# see https://github.com/gonzalo-bulnes/simple_token_authentication/issues/231
gem 'mongoid', git: 'https://github.com/mongodb/mongoid.git', branch: 'master'
end

appraise 'rails_4_devise_3' do
gem 'actionmailer', '~> 4.0'
gem 'actionpack', '~> 4.0'
gem 'activerecord', '~> 4.0'
gem 'devise', '~> 3.2'
end

Expand Down
26 changes: 14 additions & 12 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ PATH
remote: .
specs:
simple_token_authentication (1.13.0)
actionmailer (>= 3.2.6, < 5)
actionpack (>= 3.2.6, < 5)
devise (>= 3.2, < 5)
actionmailer (>= 3.2.6, < 6)
actionpack (>= 3.2.6, < 6)
devise (>= 3.2, < 6)

GEM
remote: https://rubygems.org/
Expand Down Expand Up @@ -54,7 +54,7 @@ GEM
builder (3.2.2)
coderay (1.1.1)
connection_pool (2.2.0)
devise (4.0.0)
devise (4.2.0)
bcrypt (~> 3.0)
orm_adapter (~> 0.1)
railties (>= 4.1.0, < 5.1)
Expand All @@ -76,10 +76,10 @@ GEM
mail (2.6.4)
mime-types (>= 1.16, < 4)
method_source (0.8.2)
mime-types (3.0)
mime-types (3.1)
mime-types-data (~> 3.2015)
mime-types-data (3.2016.0221)
mini_portile2 (2.0.0)
mime-types-data (3.2016.0521)
mini_portile2 (2.1.0)
minitest (5.8.4)
mongoid (4.0.2)
activemodel (~> 4.0)
Expand All @@ -90,11 +90,13 @@ GEM
bson (~> 3.0)
connection_pool (~> 2.0)
optionable (~> 0.2.0)
nokogiri (1.6.7.2)
mini_portile2 (~> 2.0.0.rc2)
nokogiri (1.6.8)
mini_portile2 (~> 2.1.0)
pkg-config (~> 1.1.7)
optionable (0.2.0)
origin (2.2.0)
orm_adapter (0.5.0)
pkg-config (1.1.7)
pry (0.10.3)
coderay (~> 1.1.0)
method_source (~> 0.8.1)
Expand All @@ -116,7 +118,7 @@ GEM
rake (>= 0.8.7)
thor (>= 0.18.1, < 2.0)
rake (11.1.2)
responders (2.1.2)
responders (2.2.0)
railties (>= 4.2.0, < 5.1)
rspec (3.4.0)
rspec-core (~> 3.4.0)
Expand Down Expand Up @@ -148,10 +150,10 @@ PLATFORMS
ruby

DEPENDENCIES
activerecord (>= 3.2.6, < 5)
activerecord (>= 3.2.6, < 6)
appraisal (~> 2.0)
inch (~> 0.4)
mongoid (>= 3.1.0, < 5)
mongoid (>= 3.1.0, < 7)
rspec (~> 3.0)
simple_token_authentication!

Expand Down
3 changes: 3 additions & 0 deletions gemfiles/rails_4_devise_3.gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@

source "https://rubygems.org"

gem "actionmailer", "~> 4.0"
gem "actionpack", "~> 4.0"
gem "activerecord", "~> 4.0"
gem "devise", "~> 3.2"

gemspec :path => "../"
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,6 @@

source "https://rubygems.org"

gem "mongoid", :git => "https://github.com/mongodb/mongoid.git", :branch => "master"

gemspec :path => "../"
8 changes: 4 additions & 4 deletions gemfiles/ruby_1.9.3_rails_3.2.gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ PATH
remote: ../
specs:
simple_token_authentication (1.13.0)
actionmailer (>= 3.2.6, < 5)
actionpack (>= 3.2.6, < 5)
devise (>= 3.2, < 5)
actionmailer (>= 3.2.6, < 6)
actionpack (>= 3.2.6, < 6)
devise (>= 3.2, < 6)

GEM
remote: https://rubygems.org/
Expand Down Expand Up @@ -141,7 +141,7 @@ DEPENDENCIES
appraisal (~> 2.0)
inch (~> 0.4)
mime-types (< 3)
mongoid (>= 3.1.0, < 5)
mongoid (>= 3.1.0, < 7)
rspec (~> 3.0)
simple_token_authentication!
tins (< 1.7.0)
Expand Down
10 changes: 5 additions & 5 deletions simple_token_authentication.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,13 @@ Gem::Specification.new do |s|
s.files = Dir["{app,config,doc,lib}/**/*", "CHANGELOG.md", "LICENSE", "Rakefile", "README.md"]
s.test_files = Dir["spec/**/*", "gemfiles/*.gemfile", "Appraisals"]

s.add_dependency "actionmailer", ">= 3.2.6", "< 5"
s.add_dependency "actionpack", ">= 3.2.6", "< 5"
s.add_dependency "devise", ">= 3.2", "< 5"
s.add_dependency "actionmailer", ">= 3.2.6", "< 6"
s.add_dependency "actionpack", ">= 3.2.6", "< 6"
s.add_dependency "devise", ">= 3.2", "< 6"

s.add_development_dependency "rspec", "~> 3.0"
s.add_development_dependency "inch", "~> 0.4"
s.add_development_dependency "activerecord", ">= 3.2.6", "< 5"
s.add_development_dependency 'mongoid', '>= 3.1.0', '< 5'
s.add_development_dependency "activerecord", ">= 3.2.6", "< 6"
s.add_development_dependency 'mongoid', '>= 3.1.0', '< 7'
s.add_development_dependency "appraisal", "~> 2.0"
end

0 comments on commit 3834199

Please sign in to comment.