Showing with 9 additions and 7 deletions.
  1. +0 −3 .travis.yml
  2. +1 −1 Gemfile
  3. +3 −3 lib/active_support_patch.rb
  4. +5 −0 lib/tasks/rubocop.rake
@@ -15,6 +15,3 @@ before_script:
addons:
code_climate:
repo_token: 8850bccc6911d74965627b1fafe753beb368fab00d33de0c7576c6598fc1220e
script:
- bundle exec rake
- bundle exec rubocop
@@ -30,7 +30,7 @@ else
when 'postgresql'
gem 'pg'
when 'mysql2'
gem 'mysql2'
gem 'mysql2', '~> 0.3.18'
else
raise "Don't know what gem to use for adapter #{adapter}"
end
@@ -8,14 +8,14 @@ def mail_to(email_address, name = nil, html_options = {}, &block)
html_options, name = name, nil if block_given?
html_options = (html_options || {}).stringify_keys

extras = %w{ cc bcc body subject }.map! { |item|
extras = %w( cc bcc body subject ).map! { |item|
option = html_options.delete(item) || next
"#{item}=#{Rack::Utils.escape_path(option)}"
}.compact
extras = extras.empty? ? '' : '?' + extras.join('&')

encoded_email_address = ERB::Util.url_encode(email_address.to_str).gsub("%40", "@")
html_options["href"] = "mailto:#{encoded_email_address}#{extras}"
encoded_email_address = ERB::Util.url_encode(email_address.to_str).gsub('%40', '@')
html_options['href'] = "mailto:#{encoded_email_address}#{extras}"

content_tag(:a, name || email_address, html_options, &block)
end
@@ -0,0 +1,5 @@
require 'rubocop/rake_task'

RuboCop::RakeTask.new

task default: :rubocop