diff --git a/.travis.yml b/.travis.yml index 98e42fb..cca0599 100644 --- a/.travis.yml +++ b/.travis.yml @@ -5,16 +5,26 @@ rvm: - 1.9.3 - 2.0.0 - 2.1.5 - - 2.2.1 + - 2.2.2 + - 2.3.1 gemfile: - gemfiles/Gemfile-rails.3.2.x - gemfiles/Gemfile-rails.4.0.x - gemfiles/Gemfile-rails.4.1.x + - gemfiles/Gemfile-rails.4.2.x - Gemfile matrix: exclude: - - rvm: 2.2.1 + - rvm: 2.2.2 + gemfile: gemfiles/Gemfile-rails.3.2.x + - rvm: 2.3.1 gemfile: gemfiles/Gemfile-rails.3.2.x + - rvm: 1.9.3 + gemfile: Gemfile + - rvm: 2.0.0 + gemfile: Gemfile + - rvm: 2.1.5 + gemfile: Gemfile notifications: email: false campfire: diff --git a/Gemfile b/Gemfile index 9d96794..f4a705a 100644 --- a/Gemfile +++ b/Gemfile @@ -5,5 +5,5 @@ gemspec gem 'rake' gem 'rdoc' -gem 'actionmailer', '~> 4.2.0' -gem 'activemodel', '~> 4.2.0' +gem 'actionmailer', '~> 5.0.0' +gem 'activemodel', '~> 5.0.0' diff --git a/Gemfile.lock b/Gemfile.lock index cd6f30c..2746e47 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -2,71 +2,72 @@ PATH remote: . specs: mail_form (1.5.0) - actionmailer (>= 3.2, < 5) - activemodel (>= 3.2, < 5) + actionmailer (>= 3.2, < 5.1) + activemodel (>= 3.2, < 5.1) GEM remote: https://rubygems.org/ specs: - actionmailer (4.2.1) - actionpack (= 4.2.1) - actionview (= 4.2.1) - activejob (= 4.2.1) + actionmailer (5.0.0) + actionpack (= 5.0.0) + actionview (= 5.0.0) + activejob (= 5.0.0) mail (~> 2.5, >= 2.5.4) - rails-dom-testing (~> 1.0, >= 1.0.5) - actionpack (4.2.1) - actionview (= 4.2.1) - activesupport (= 4.2.1) - rack (~> 1.6) - rack-test (~> 0.6.2) - rails-dom-testing (~> 1.0, >= 1.0.5) - rails-html-sanitizer (~> 1.0, >= 1.0.1) - actionview (4.2.1) - activesupport (= 4.2.1) + rails-dom-testing (~> 2.0) + actionpack (5.0.0) + actionview (= 5.0.0) + activesupport (= 5.0.0) + rack (~> 2.0) + rack-test (~> 0.6.3) + rails-dom-testing (~> 2.0) + rails-html-sanitizer (~> 1.0, >= 1.0.2) + actionview (5.0.0) + activesupport (= 5.0.0) builder (~> 3.1) erubis (~> 2.7.0) - rails-dom-testing (~> 1.0, >= 1.0.5) - rails-html-sanitizer (~> 1.0, >= 1.0.1) - activejob (4.2.1) - activesupport (= 4.2.1) - globalid (>= 0.3.0) - activemodel (4.2.1) - activesupport (= 4.2.1) - builder (~> 3.1) - activesupport (4.2.1) + rails-dom-testing (~> 2.0) + rails-html-sanitizer (~> 1.0, >= 1.0.2) + activejob (5.0.0) + activesupport (= 5.0.0) + globalid (>= 0.3.6) + activemodel (5.0.0) + activesupport (= 5.0.0) + activesupport (5.0.0) + concurrent-ruby (~> 1.0, >= 1.0.2) i18n (~> 0.7) - json (~> 1.7, >= 1.7.7) minitest (~> 5.1) - thread_safe (~> 0.3, >= 0.3.4) tzinfo (~> 1.1) builder (3.2.2) + concurrent-ruby (1.0.2) erubis (2.7.0) - globalid (0.3.5) + globalid (0.3.6) activesupport (>= 4.1.0) i18n (0.7.0) - json (1.8.2) - loofah (2.0.1) + json (1.8.3) + loofah (2.0.3) nokogiri (>= 1.5.9) - mail (2.6.3) - mime-types (>= 1.16, < 3) - mime-types (2.4.3) - mini_portile (0.6.2) - minitest (5.5.1) - nokogiri (1.6.6.2) - mini_portile (~> 0.6.0) - rack (1.6.0) + mail (2.6.4) + mime-types (>= 1.16, < 4) + mime-types (3.1) + mime-types-data (~> 3.2015) + mime-types-data (3.2016.0521) + mini_portile2 (2.1.0) + minitest (5.9.0) + nokogiri (1.6.8) + mini_portile2 (~> 2.1.0) + pkg-config (~> 1.1.7) + pkg-config (1.1.7) + rack (2.0.1) rack-test (0.6.3) rack (>= 1.0) - rails-deprecated_sanitizer (1.0.3) - activesupport (>= 4.2.0.alpha) - rails-dom-testing (1.0.6) - activesupport (>= 4.2.0.beta, < 5.0) + rails-dom-testing (2.0.1) + activesupport (>= 4.2.0, < 6.0) nokogiri (~> 1.6.0) - rails-deprecated_sanitizer (>= 1.0.1) - rails-html-sanitizer (1.0.2) + rails-html-sanitizer (1.0.3) loofah (~> 2.0) - rake (10.4.2) - rdoc (4.2.0) + rake (11.2.2) + rdoc (4.2.2) + json (~> 1.4) thread_safe (0.3.5) tzinfo (1.2.2) thread_safe (~> 0.1) @@ -75,8 +76,11 @@ PLATFORMS ruby DEPENDENCIES - actionmailer (~> 4.2.0) - activemodel (~> 4.2.0) + actionmailer (~> 5.0.0) + activemodel (~> 5.0.0) mail_form! rake rdoc + +BUNDLED WITH + 1.12.5 diff --git a/gemfiles/Gemfile-rails.4.0.x b/gemfiles/Gemfile-rails.4.0.x index dc633c9..e3cfc3b 100644 --- a/gemfiles/Gemfile-rails.4.0.x +++ b/gemfiles/Gemfile-rails.4.0.x @@ -7,3 +7,5 @@ gem 'rdoc' gem 'actionmailer', '~> 4.0.0' gem 'activemodel', '~> 4.0.0' + +gem "mime-types", (RUBY_VERSION >= "2.0" ? "~> 3.0" : "~> 2.99") diff --git a/gemfiles/Gemfile-rails.4.1.x b/gemfiles/Gemfile-rails.4.1.x index bccaaeb..8dce368 100644 --- a/gemfiles/Gemfile-rails.4.1.x +++ b/gemfiles/Gemfile-rails.4.1.x @@ -7,3 +7,5 @@ gem 'rdoc' gem 'actionmailer', '~> 4.1.0' gem 'activemodel', '~> 4.1.0' + +gem "mime-types", (RUBY_VERSION >= "2.0" ? "~> 3.0" : "~> 2.99") diff --git a/gemfiles/Gemfile-rails.4.2.x b/gemfiles/Gemfile-rails.4.2.x new file mode 100644 index 0000000..83c82de --- /dev/null +++ b/gemfiles/Gemfile-rails.4.2.x @@ -0,0 +1,11 @@ +source 'https://rubygems.org' + +gemspec path: '..' + +gem 'rake' +gem 'rdoc' + +gem 'actionmailer', '~> 4.2.0' +gem 'activemodel', '~> 4.2.0' + +gem "mime-types", (RUBY_VERSION >= "2.0" ? "~> 3.0" : "~> 2.99") diff --git a/mail_form.gemspec b/mail_form.gemspec index 5a8008c..e51f401 100644 --- a/mail_form.gemspec +++ b/mail_form.gemspec @@ -19,6 +19,6 @@ Gem::Specification.new do |s| s.rubyforge_project = "mail_form" - s.add_dependency('actionmailer', '>= 3.2', '< 5') - s.add_dependency('activemodel', '>= 3.2', '< 5') + s.add_dependency('actionmailer', '>= 3.2', '< 5.1') + s.add_dependency('activemodel', '>= 3.2', '< 5.1') end diff --git a/test/mail_form_test.rb b/test/mail_form_test.rb index bb7ec6d..1961b36 100644 --- a/test/mail_form_test.rb +++ b/test/mail_form_test.rb @@ -7,7 +7,9 @@ class MailFormNotifierTest < ActiveSupport::TestCase def setup @form = ContactForm.new(:name => 'José', :email => 'my.email@my.domain.com', :message => 'Cool') - @request = ActionController::TestRequest.new + ActionController::TestRequest.respond_to?(:create) ? + @request = ActionController::TestRequest.create : + @request = ActionController::TestRequest.new @valid_attributes = { :name => 'José', :email => 'my.email@my.domain.com', :message => "Cool\nno?" } @advanced = AdvancedForm.new(@valid_attributes) @advanced.request = @request