Skip to content

Commit

Permalink
Merge branch 'feature/rails-5.0.0' into develop
Browse files Browse the repository at this point in the history
  • Loading branch information
bogdanRada committed Jul 7, 2016
2 parents 3ecfe6d + f53bee6 commit ebd35ee
Show file tree
Hide file tree
Showing 22 changed files with 187 additions and 22 deletions.
6 changes: 3 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ doc
# jeweler generated
pkg

# Have editor/IDE/OS specific files you need to ignore? Consider using a global gitignore:
# Have editor/IDE/OS specific files you need to ignore? Consider using a global gitignore:
#
# * Create a file at ~/.gitignore
# * Include files you want ignored
Expand Down Expand Up @@ -100,11 +100,11 @@ pkg/
spec/dummy/db/*.sqlite3
spec/dummy/log/*.log
spec/dummy/tmp/
gemfiles
gemfiles/*.lock
coverage
tags
/nbproject/
/.git-rewrite/
.rbenv-version
.ruby-version
Gemfile.lock
Gemfile.lock
44 changes: 38 additions & 6 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,15 +1,47 @@
language: ruby
sudo: false
cache: bundler
before_install:
- "echo 'gem: --no-ri --no-rdoc' > ~/.gemrc"
- gem install bundler
- gem install appraisal
- gem install rspec-rails
bundler_args: "--no-deployment"
script:
- echo $BUNDLE_GEMFILE
- bundle exec rake
gemfile:
- gemfiles/rails_3.2.8.gemfile
- gemfiles/rails_3.2.12.gemfile
- gemfiles/rails_4.0.0.gemfile
- gemfiles/rails_4.0.2.gemfile
- gemfiles/rails_4.1.1.gemfile
- gemfiles/rails_4.1.4.gemfile
- gemfiles/rails_4.1.9.gemfile
- gemfiles/rails_4.2.0.gemfile
- gemfiles/rails_4.2.1.gemfile
- gemfiles/rails_4.2.2.gemfile
- gemfiles/rails_4.2.3.gemfile
- gemfiles/rails_4.2.4.gemfile
- gemfiles/rails_4.2.5.gemfile
- gemfiles/rails_4.2.6.gemfile
- gemfiles/rails_5.0.0.gemfile
rvm:
- 1.9.3
- jruby-19mode
- 2.0.0
- 2.0.0
- 2.1.5
- 2.1.8
- 2.2.2
env:
- RAILS_ENV=test RACK_ENV=test
- 2.2.3
- 2.3.0
- 2.3.1
matrix:
exclude:
- rvm: jruby-19mode
gemfile: gemfiles/rails_5.0.0.gemfile
- rvm: 1.9,3
gemfile: gemfiles/rails_5.0.0.gemfile
- rvm: 2.0.0
gemfile: gemfiles/rails_5.0.0.gemfile
- rvm: 2.1.5
gemfile: gemfiles/rails_5.0.0.gemfile
- rvm: 2.1.8
gemfile: gemfiles/rails_5.0.0.gemfile
6 changes: 6 additions & 0 deletions Appraisals
Original file line number Diff line number Diff line change
Expand Up @@ -54,3 +54,9 @@ end
appraise "rails-4.2.6" do
gem "rails", "4.2.6"
end

if RUBY_VERSION >= "2.2.0"
appraise "rails-5.0.0" do
gem "rails", "5.0.0"
end
end
6 changes: 6 additions & 0 deletions Gemfile
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
source 'http://rubygems.org'

gemspec

if RUBY_VERSION >= "2.2.0"
gem 'rack', '>= 1.0', '>= 1.0'
else
gem 'rack', '>= 1.0', '< 2.0'
end
21 changes: 11 additions & 10 deletions Rakefile
Original file line number Diff line number Diff line change
Expand Up @@ -19,24 +19,25 @@ require 'rake'

RSpec::Core::RakeTask.new(:spec) do |spec|
spec.rspec_opts = ['--backtrace '] if ENV['DEBUG']
spec.verbose = true
end

desc 'Default: run the unit tests.'
task default: [:all]

desc 'Test the plugin under all supported Rails versions.'
task :all do
task :all do |_t|
if ENV['TRAVIS']
exec('bundle exec appraisal install && bundle exec rake appraisal spec && bundle exec rake coveralls:push')
# require 'json'
# puts JSON.pretty_generate(ENV.to_hash)
if ENV['BUNDLE_GEMFILE'] =~ /gemfiles/
appraisal_name = ENV['BUNDLE_GEMFILE'].scan(/rails\_(.*)\.gemfile/).flatten.first
command_prefix = "appraisal rails-#{appraisal_name}"
exec ("#{command_prefix} bundle install && #{command_prefix} bundle exec rspec && bundle exec rake coveralls:push ")
else
exec(' bundle exec appraisal install && bundle exec rake appraisal spec && bundle exec rake coveralls:push')
end
else
exec('bundle exec appraisal install && bundle exec rake appraisal spec')
end
end

require 'rdoc/task'
Rake::RDocTask.new do |rdoc|
rdoc.rdoc_dir = 'rdoc'
rdoc.title = "enhanced_date_select #{EnhancedDateSelect.gem_version}"
rdoc.rdoc_files.include('README*')
rdoc.rdoc_files.include('lib/**/*.rb')
end
8 changes: 8 additions & 0 deletions gemfiles/rails_3.2.12.gemfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# This file was generated by Appraisal

source "http://rubygems.org"

gem "rack", ">= 1.0", ">= 1.0"
gem "rails", "3.2.12"

gemspec :path => "../"
8 changes: 8 additions & 0 deletions gemfiles/rails_3.2.8.gemfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# This file was generated by Appraisal

source "http://rubygems.org"

gem "rack", ">= 1.0", ">= 1.0"
gem "rails", "3.2.8"

gemspec :path => "../"
8 changes: 8 additions & 0 deletions gemfiles/rails_4.0.0.gemfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# This file was generated by Appraisal

source "http://rubygems.org"

gem "rack", ">= 1.0", ">= 1.0"
gem "rails", "4.0.0"

gemspec :path => "../"
8 changes: 8 additions & 0 deletions gemfiles/rails_4.0.2.gemfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# This file was generated by Appraisal

source "http://rubygems.org"

gem "rack", ">= 1.0", ">= 1.0"
gem "rails", "4.0.2"

gemspec :path => "../"
8 changes: 8 additions & 0 deletions gemfiles/rails_4.1.1.gemfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# This file was generated by Appraisal

source "http://rubygems.org"

gem "rack", ">= 1.0", ">= 1.0"
gem "rails", "4.1.1"

gemspec :path => "../"
8 changes: 8 additions & 0 deletions gemfiles/rails_4.1.4.gemfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# This file was generated by Appraisal

source "http://rubygems.org"

gem "rack", ">= 1.0", ">= 1.0"
gem "rails", "4.1.4"

gemspec :path => "../"
8 changes: 8 additions & 0 deletions gemfiles/rails_4.1.9.gemfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# This file was generated by Appraisal

source "http://rubygems.org"

gem "rack", ">= 1.0", ">= 1.0"
gem "rails", "4.1.9"

gemspec :path => "../"
8 changes: 8 additions & 0 deletions gemfiles/rails_4.2.0.gemfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# This file was generated by Appraisal

source "http://rubygems.org"

gem "rack", ">= 1.0", ">= 1.0"
gem "rails", "4.2.0"

gemspec :path => "../"
8 changes: 8 additions & 0 deletions gemfiles/rails_4.2.1.gemfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# This file was generated by Appraisal

source "http://rubygems.org"

gem "rack", ">= 1.0", ">= 1.0"
gem "rails", "4.2.1"

gemspec :path => "../"
8 changes: 8 additions & 0 deletions gemfiles/rails_4.2.2.gemfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# This file was generated by Appraisal

source "http://rubygems.org"

gem "rack", ">= 1.0", ">= 1.0"
gem "rails", "4.2.2"

gemspec :path => "../"
8 changes: 8 additions & 0 deletions gemfiles/rails_4.2.3.gemfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# This file was generated by Appraisal

source "http://rubygems.org"

gem "rack", ">= 1.0", ">= 1.0"
gem "rails", "4.2.3"

gemspec :path => "../"
8 changes: 8 additions & 0 deletions gemfiles/rails_4.2.4.gemfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# This file was generated by Appraisal

source "http://rubygems.org"

gem "rack", ">= 1.0", ">= 1.0"
gem "rails", "4.2.4"

gemspec :path => "../"
8 changes: 8 additions & 0 deletions gemfiles/rails_4.2.5.gemfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# This file was generated by Appraisal

source "http://rubygems.org"

gem "rack", ">= 1.0", ">= 1.0"
gem "rails", "4.2.5"

gemspec :path => "../"
8 changes: 8 additions & 0 deletions gemfiles/rails_4.2.6.gemfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# This file was generated by Appraisal

source "http://rubygems.org"

gem "rack", ">= 1.0", ">= 1.0"
gem "rails", "4.2.6"

gemspec :path => "../"
8 changes: 8 additions & 0 deletions gemfiles/rails_5.0.0.gemfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# This file was generated by Appraisal

source "http://rubygems.org"

gem "rack", ">= 1.0", ">= 1.0"
gem "rails", "5.0.0"

gemspec :path => "../"
4 changes: 2 additions & 2 deletions lib/version.rb
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@ module VERSION
# the major version of the gem
MAJOR = 1
# the minor version of the gem
MINOR = 2
MINOR = 3
# the tiny version of the gem
TINY = 5
TINY = 0
# if the version should be a e
PRE = nil

Expand Down
2 changes: 1 addition & 1 deletion spec/enhanced_date_select_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
else
@instance_tag = rails4_instance_tag
end
if Rails::VERSION::MAJOR.to_i >= 4 && Rails::VERSION::MINOR >= 1
if Rails::VERSION::MAJOR.to_i >= 4
@form_builder = rails41_form_builder
else
@form_builder = deprecated_form_builder
Expand Down

0 comments on commit ebd35ee

Please sign in to comment.