Skip to content

Commit

Permalink
Merge pull request rubygems#1888 from sonalkr132/email-style
Browse files Browse the repository at this point in the history
Add style to confirmation email
  • Loading branch information
sonalkr132 authored Jan 18, 2019
2 parents 5102709 + 70d9369 commit 6ead865
Show file tree
Hide file tree
Showing 17 changed files with 550 additions and 12 deletions.
1 change: 1 addition & 0 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ gem 'rack-utf8_sanitizer'
gem 'rbtrace', '~> 0.4.8'
gem 'rdoc'
gem 'rest-client', require: 'rest_client'
gem 'roadie-rails', '~> 1.3.0'
gem 'sass', require: false
gem 'shoryuken', '~> 2.1.0', require: false
gem 'statsd-instrument', '~> 2.3.0'
Expand Down
9 changes: 9 additions & 0 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,8 @@ GEM
compact_index (0.11.0)
concurrent-ruby (1.1.4)
crass (1.0.4)
css_parser (1.6.0)
addressable
daemons (1.2.6)
dalli (2.7.9)
delayed_job (4.1.5)
Expand Down Expand Up @@ -313,6 +315,12 @@ GEM
http-cookie (>= 1.0.2, < 2.0)
mime-types (>= 1.16, < 4.0)
netrc (~> 0.8)
roadie (3.4.0)
css_parser (~> 1.4)
nokogiri (~> 1.5)
roadie-rails (1.3.0)
railties (>= 3.0, < 5.3)
roadie (~> 3.1)
rotp (3.3.1)
rqrcode (0.10.1)
chunky_png (~> 1.0)
Expand Down Expand Up @@ -424,6 +432,7 @@ DEPENDENCIES
rbtrace (~> 0.4.8)
rdoc
rest-client
roadie-rails (~> 1.3.0)
rotp
rqrcode
rubocop
Expand Down
2 changes: 2 additions & 0 deletions app/mailers/mailer.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
class Mailer < ActionMailer::Base
include Roadie::Rails::Automatic

default_url_options[:host] = Gemcutter::HOST
default_url_options[:protocol] = Gemcutter::PROTOCOL

Expand Down
540 changes: 533 additions & 7 deletions app/views/mailer/email_confirmation.html.erb

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion config/initializers/assets.rb
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,4 @@
# Precompile additional assets.
# application.js, application.css, and all non-JS/CSS in the app/assets
# folder are already added.
# Rails.application.config.assets.precompile += %w( admin.js admin.css )
Rails.application.config.assets.precompile += %w[*.png *.jpg *.jpeg *.gif *.svg]
6 changes: 3 additions & 3 deletions test/helpers/email_helpers.rb
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
module EmailHelpers
def last_email_link
Delayed::Worker.new.work_off
body = ActionMailer::Base.deliveries.last.to_s
link = /href="([^"]*)"/.match(body)
link[1]
body = ActionMailer::Base.deliveries.last.body.decoded.to_s
link = %r{http://localhost/email_confirmations([^";]*)}.match(body)
link[0]
end
end
Binary file added vendor/assets/images/bot_left.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added vendor/assets/images/bot_right.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
File renamed without changes
Binary file added vendor/assets/images/gmail_fix.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added vendor/assets/images/google_group_icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added vendor/assets/images/ico_edge_1.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added vendor/assets/images/ico_edge_2.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added vendor/assets/images/top_left.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added vendor/assets/images/top_right.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added vendor/assets/images/twitter_mail_icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion vendor/assets/stylesheets/github_buttons.css
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@
width: 14px;
height: 14px;
margin-right: 4px;
background-image: url('/github_icon.svg');
background-image: url('/images/github_icon.svg');
background-size: 100% 100%;
background-repeat: no-repeat;
}
Expand Down

0 comments on commit 6ead865

Please sign in to comment.