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

Add Rails 5 support #46

Merged
merged 1 commit into from
Jul 10, 2016
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
14 changes: 12 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
4 changes: 2 additions & 2 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -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'
100 changes: 52 additions & 48 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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
2 changes: 2 additions & 0 deletions gemfiles/Gemfile-rails.4.0.x
Original file line number Diff line number Diff line change
Expand Up @@ -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")
2 changes: 2 additions & 0 deletions gemfiles/Gemfile-rails.4.1.x
Original file line number Diff line number Diff line change
Expand Up @@ -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")
11 changes: 11 additions & 0 deletions gemfiles/Gemfile-rails.4.2.x
Original file line number Diff line number Diff line change
@@ -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")
4 changes: 2 additions & 2 deletions mail_form.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -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
4 changes: 3 additions & 1 deletion test/mail_form_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,9 @@ class MailFormNotifierTest < ActiveSupport::TestCase
def setup
@form = ContactForm.new(:name => 'José', :email => '[email protected]', :message => 'Cool')

@request = ActionController::TestRequest.new
ActionController::TestRequest.respond_to?(:create) ?
@request = ActionController::TestRequest.create :
@request = ActionController::TestRequest.new
@valid_attributes = { :name => 'José', :email => '[email protected]', :message => "Cool\nno?" }
@advanced = AdvancedForm.new(@valid_attributes)
@advanced.request = @request
Expand Down