Skip to content

Commit d6bcc9e

Browse files
committed
Merge pull request #46 from travis-ci/email_fixes
Lets get emails working again
2 parents 73a33cf + 093afba commit d6bcc9e

File tree

6 files changed

+37
-28
lines changed

6 files changed

+37
-28
lines changed

Gemfile

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,18 +7,19 @@ gem 'travis-config', '~> 1.0.0'
77

88
gem 'sidekiq', '~> 4.0.0'
99
gem 'redis-namespace'
10-
gem 'gh', github: 'travis-ci/gh'
1110
gem 'sentry-raven'
1211
gem 'rollout', github: 'jamesgolick/rollout', :ref => 'v1.1.0'
13-
gem 'newrelic_rpm', '~> 3.3.2'
12+
gem 'metriks'
13+
gem 'metriks-librato_metrics'
14+
gem 'jemalloc'
15+
16+
gem 'gh', github: 'travis-ci/gh'
1417
gem 'aws-sdk'
1518
gem 'actionmailer', '~> 3.2.18'
1619
gem 'roadie'
17-
gem 'metriks'
18-
gem 'metriks-librato_metrics'
20+
gem 'roadie-rails', '~> 1.0'
1921
gem 'multi_json'
2022
gem 'pusher', '~> 0.14.5'
21-
gem 'jemalloc'
2223

2324
group :test do
2425
gem 'rspec', '~> 2.14.0'

Gemfile.lock

Lines changed: 21 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -49,12 +49,12 @@ GEM
4949
atomic (1.1.99)
5050
avl_tree (1.2.1)
5151
atomic (~> 1.1)
52-
aws-sdk (2.2.1)
53-
aws-sdk-resources (= 2.2.1)
54-
aws-sdk-core (2.2.1)
52+
aws-sdk (2.2.3)
53+
aws-sdk-resources (= 2.2.3)
54+
aws-sdk-core (2.2.3)
5555
jmespath (~> 1.0)
56-
aws-sdk-resources (2.2.1)
57-
aws-sdk-core (= 2.2.1)
56+
aws-sdk-resources (2.2.3)
57+
aws-sdk-core (= 2.2.3)
5858
backports (3.6.7)
5959
builder (3.0.4)
6060
coderay (1.1.0)
@@ -117,7 +117,6 @@ GEM
117117
nenv (0.2.0)
118118
net-http-persistent (2.9.4)
119119
net-http-pipeline (1.0.1)
120-
newrelic_rpm (3.3.5)
121120
nokogiri (1.6.6.4)
122121
mini_portile (~> 0.6.0)
123122
notiffany (0.0.8)
@@ -136,17 +135,32 @@ GEM
136135
rack (1.4.7)
137136
rack-cache (1.5.1)
138137
rack (>= 0.4)
138+
rack-ssl (1.3.4)
139+
rack
139140
rack-test (0.6.3)
140141
rack (>= 1.0)
142+
railties (3.2.22)
143+
actionpack (= 3.2.22)
144+
activesupport (= 3.2.22)
145+
rack-ssl (~> 1.3.2)
146+
rake (>= 0.8.7)
147+
rdoc (~> 3.4)
148+
thor (>= 0.14.6, < 2.0)
149+
rake (10.4.2)
141150
rb-fsevent (0.9.6)
142151
rb-inotify (0.9.5)
143152
ffi (>= 0.5.0)
153+
rdoc (3.12.2)
154+
json (~> 1.4)
144155
redis (3.2.2)
145156
redis-namespace (1.5.2)
146157
redis (~> 3.0, >= 3.0.4)
147158
roadie (3.1.0)
148159
css_parser (~> 1.3.4)
149160
nokogiri (>= 1.5.0, < 1.7.0)
161+
roadie-rails (1.1.0)
162+
railties (>= 3.0, < 4.3)
163+
roadie (~> 3.1)
150164
rspec (2.14.1)
151165
rspec-core (~> 2.14.0)
152166
rspec-expectations (~> 2.14.0)
@@ -196,10 +210,10 @@ DEPENDENCIES
196210
metriks-librato_metrics
197211
mocha (~> 0.10.0)
198212
multi_json
199-
newrelic_rpm (~> 3.3.2)
200213
pusher (~> 0.14.5)
201214
redis-namespace
202215
roadie
216+
roadie-rails (~> 1.0)
203217
rollout!
204218
rspec (~> 2.14.0)
205219
sentry-raven

lib/travis/addons/email/mailer/build.rb

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,12 @@
11
require 'action_mailer'
2+
require 'roadie-rails'
23

34
module Travis
45
module Addons
56
module Email
67
module Mailer
78
class Build < ActionMailer::Base
9+
include Roadie::Rails::Automatic
810

911
helper Mailer::Helpers
1012

@@ -32,6 +34,10 @@ def url_options
3234
nil
3335
end
3436

37+
def roadie_options
38+
Roadie::Rails::Options.new
39+
end
40+
3541
private
3642

3743
def subject

lib/travis/addons/email/mailer/views/build/finished_email.html.erb

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -369,9 +369,9 @@
369369
<img src="https://<%= Travis.config.assets.host -%>/images/mailer/email-footer-travis-logo.png" style="width: 50px; height: 50px;" />
370370
</td>
371371
<td style="" class="grey">
372-
<a href="http://docs.travis-ci.com">Documentation</a> about Travis CI<br/>
372+
<a href="https://docs.travis-ci.com">Documentation</a> about Travis CI<br/>
373373
For help please join our IRC channel <a href="irc://irc.freenode.net/travis">irc.freenode.net#travis</a>.<br/>
374-
Choose who receives these build notification emails in your <a href="http://docs.travis-ci.com/user/notifications">configuration file</a>.
374+
Choose who receives these build notification emails in your <a href="https://docs.travis-ci.com/user/notifications">configuration file</a>.
375375
</td>
376376
</tr>
377377
</table>
@@ -381,13 +381,7 @@
381381
<img id="mascot" src="https://<%= Travis.config.assets.host %>/images/mailer/travis-mascot.png" width="80" >
382382
<div class="section footnote">
383383
<p class="grey"><strong>Would you like to test your private code?</strong></p>
384-
<p class="grey"><a href="http://travis-ci.com?utm_source=build_email_footer&utm_campaign=travis-ci.org&utm_medium=email">Travis Pro</a> could be your new best friend!</p>
385-
</div>
386-
387-
<div class="tiny-footer">
388-
<p class="grey">
389-
<span>Travis CI is powered by </span><a href="http://bluebox.net"><img src="https://travis-ci.org/images/sponsors/bluebox-78x15.png"></a>
390-
</p>
384+
<p class="grey"><a href="https://travis-ci.com?utm_source=build_email_footer&utm_campaign=travis-ci.org&utm_medium=email">Travis CI for Private Projects</a> could be your new best friend!</p>
391385
</div>
392386
</div>
393387
<% end -%>

lib/travis/addons/email/mailer/views/build/finished_email.text.erb

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,5 +15,4 @@ View the full build log and details: <%= repository_build_url(slug: @repository.
1515

1616
--
1717

18-
You can configure recipients for build notifications in your .travis.yml file. See http://docs.travis-ci.com/user/notifications
19-
18+
You can configure recipients for build notifications in your .travis.yml file. See https://docs.travis-ci.com/user/notifications

spec/addons/email/mailer/build_spec.rb

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -88,11 +88,6 @@
8888
html.should include("まつもとゆきひろ a.k.a. Matz")
8989
end
9090

91-
it 'includes the build footer' do
92-
email.deliver # inline css interceptor is called before delivery.
93-
email.html_part.decoded.should =~ %r(<div class="tiny-footer">)
94-
end
95-
9691
describe 'with the footer disabled' do
9792
before do
9893
Travis.config.build_email_footer = false

0 commit comments

Comments
 (0)