email_spec 1.6.0 → 2.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/History.txt +18 -0
- data/README.md +30 -28
- data/examples/rails4_root/Gemfile +19 -0
- data/examples/rails4_root/Gemfile.lock +180 -0
- data/examples/rails4_root/README +5 -0
- data/examples/rails4_root/Rakefile +11 -0
- data/examples/rails4_root/app/controllers/application_controller.rb +3 -0
- data/examples/rails4_root/app/controllers/welcome_controller.rb +18 -0
- data/examples/rails4_root/app/helpers/application_helper.rb +2 -0
- data/examples/rails4_root/app/mailers/user_mailer.rb +39 -0
- data/examples/rails4_root/app/models/user.rb +2 -0
- data/examples/rails4_root/app/views/user_mailer/email_with_attachment.html.erb +6 -0
- data/examples/rails4_root/app/views/user_mailer/newsletter.html.erb +8 -0
- data/examples/rails4_root/app/views/user_mailer/signup.html.erb +4 -0
- data/examples/rails4_root/app/views/user_mailer/signup.text.erb +4 -0
- data/examples/rails4_root/app/views/welcome/attachments.html.erb +0 -0
- data/examples/rails4_root/app/views/welcome/confirm.html.erb +1 -0
- data/examples/rails4_root/app/views/welcome/index.html.erb +8 -0
- data/examples/rails4_root/app/views/welcome/newsletter.html.erb +0 -0
- data/examples/rails4_root/app/views/welcome/signup.html.erb +1 -0
- data/examples/rails4_root/attachments/document.pdf +0 -0
- data/examples/rails4_root/attachments/image.png +0 -0
- data/examples/rails4_root/config.ru +4 -0
- data/examples/rails4_root/config/application.rb +45 -0
- data/examples/rails4_root/config/boot.rb +14 -0
- data/examples/rails4_root/config/cucumber.yml +8 -0
- data/examples/rails4_root/config/database.yml +25 -0
- data/examples/rails4_root/config/environment.rb +6 -0
- data/examples/rails4_root/config/environments/development.rb +19 -0
- data/examples/rails4_root/config/environments/production.rb +42 -0
- data/examples/rails4_root/config/environments/test.rb +32 -0
- data/examples/rails4_root/config/initializers/backtrace_silencers.rb +7 -0
- data/examples/rails4_root/config/initializers/cookie_verification_secret.rb +7 -0
- data/examples/rails4_root/config/initializers/delayed_job.rb +1 -0
- data/examples/rails4_root/config/initializers/inflections.rb +10 -0
- data/examples/rails4_root/config/initializers/mime_types.rb +5 -0
- data/examples/rails4_root/config/initializers/notifier_job.rb +1 -0
- data/examples/rails4_root/config/initializers/rspec_generator.rb +6 -0
- data/examples/rails4_root/config/initializers/session_store.rb +10 -0
- data/examples/rails4_root/config/locales/en.yml +5 -0
- data/examples/rails4_root/config/routes.rb +7 -0
- data/examples/rails4_root/config/secrets.yml +22 -0
- data/examples/rails4_root/db/migrate/20090125013728_create_users.rb +11 -0
- data/examples/rails4_root/db/migrate/20090908054656_create_delayed_jobs.rb +20 -0
- data/examples/rails4_root/db/migrate/20141119224309_add_queue_to_delayed_jobs.rb +9 -0
- data/examples/rails4_root/db/schema.rb +35 -0
- data/examples/rails4_root/db/seeds.rb +7 -0
- data/examples/rails4_root/db/test.sqlite3 +0 -0
- data/examples/rails4_root/doc/README_FOR_APP +2 -0
- data/examples/rails4_root/features/attachments.feature +27 -0
- data/examples/rails4_root/features/delayed_job.feature +13 -0
- data/examples/rails4_root/features/errors.feature +40 -0
- data/examples/rails4_root/features/example.feature +93 -0
- data/examples/rails4_root/features/step_definitions/email_steps.rb +210 -0
- data/examples/rails4_root/features/step_definitions/user_steps.rb +26 -0
- data/examples/rails4_root/features/step_definitions/web_steps.rb +219 -0
- data/examples/rails4_root/features/support/env.rb +59 -0
- data/examples/rails4_root/features/support/env_ext.rb +4 -0
- data/examples/rails4_root/features/support/paths.rb +33 -0
- data/examples/rails4_root/lib/notifier_job.rb +5 -0
- data/examples/rails4_root/lib/tasks/cucumber.rake +65 -0
- data/examples/rails4_root/lib/tasks/rspec.rake +69 -0
- data/examples/rails4_root/log/development.log +0 -0
- data/examples/rails4_root/log/test.log +43813 -0
- data/examples/rails4_root/public/404.html +26 -0
- data/examples/rails4_root/public/422.html +26 -0
- data/examples/rails4_root/public/500.html +26 -0
- data/examples/rails4_root/public/favicon.ico +0 -0
- data/examples/rails4_root/public/images/rails.png +0 -0
- data/examples/rails4_root/public/javascripts/application.js +2 -0
- data/examples/rails4_root/public/javascripts/controls.js +965 -0
- data/examples/rails4_root/public/javascripts/dragdrop.js +974 -0
- data/examples/rails4_root/public/javascripts/effects.js +1123 -0
- data/examples/rails4_root/public/javascripts/prototype.js +4874 -0
- data/examples/rails4_root/public/javascripts/rails.js +109 -0
- data/examples/rails4_root/public/robots.txt +5 -0
- data/examples/rails4_root/script/cucumber +10 -0
- data/examples/rails4_root/script/delayed_job +5 -0
- data/examples/rails4_root/script/rails +9 -0
- data/examples/rails4_root/spec/controllers/welcome_controller_spec.rb +20 -0
- data/examples/rails4_root/spec/models/user_mailer_spec.rb +47 -0
- data/examples/rails4_root/spec/spec_helper.rb +20 -0
- data/examples/rails4_root/test/mailers/user_mailer_classic_test.rb +27 -0
- data/examples/rails4_root/test/mailers/user_mailer_spec_test.rb +29 -0
- data/examples/rails4_root/test/test_helper.rb +10 -0
- data/{rails_generators → examples/rails4_root/vendor/plugins/email_spec/rails_generators}/email_spec/email_spec_generator.rb +0 -0
- data/{rails_generators → examples/rails4_root/vendor/plugins/email_spec/rails_generators}/email_spec/templates/email_steps.rb +22 -18
- data/examples/sinatra_root/Gemfile +15 -0
- data/examples/sinatra_root/Gemfile.lock +95 -0
- data/examples/sinatra_root/config.ru +4 -0
- data/examples/sinatra_root/features/errors.feature +40 -0
- data/examples/sinatra_root/features/example.feature +93 -0
- data/examples/sinatra_root/features/step_definitions/email_steps.rb +210 -0
- data/examples/sinatra_root/features/step_definitions/user_steps.rb +26 -0
- data/examples/sinatra_root/features/step_definitions/web_steps.rb +219 -0
- data/examples/sinatra_root/features/support/env.rb +21 -0
- data/examples/sinatra_root/features/support/paths.rb +29 -0
- data/examples/sinatra_root/lib/example_sinatra_app.rb +45 -0
- data/features/rails4_app.feature +32 -0
- data/features/sinatra_app.feature +14 -0
- data/features/step_definitions/app_steps.rb +58 -0
- data/features/support/env.rb +16 -0
- data/lib/email_spec.rb +1 -1
- data/lib/email_spec/deliveries.rb +0 -1
- data/lib/email_spec/email_viewer.rb +1 -1
- data/lib/email_spec/helpers.rb +16 -5
- data/lib/email_spec/matchers.rb +2 -1
- data/lib/email_spec/version.rb +3 -0
- data/lib/generators/email_spec/steps/templates/email_steps.rb +24 -20
- data/spec/email_spec/email_viewer_spec.rb +20 -0
- data/spec/email_spec/helpers_spec.rb +316 -0
- data/spec/email_spec/mail_ext_spec.rb +34 -0
- data/spec/email_spec/matchers_spec.rb +513 -0
- data/spec/spec_helper.rb +24 -0
- metadata +161 -150
- data/lib/email_spec/background_processes.rb +0 -45
- data/lib/generators/email_spec/steps/USAGE +0 -5
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: 71884a93a565ccd5661239e779088aa6c052abf9
|
4
|
+
data.tar.gz: 659560fc32d6199538fbeb76a2f394c1dc83929a
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: eaefa127ba14d110085e4c0b8d55d24454a16844bb31fa76e8b9384a22fb79cff4940f49811eb29b71d23c7f6b36cfb02a7391a0d380d3e407531b355bf338a7
|
7
|
+
data.tar.gz: d29d7ae4854dcbc1033dc5127a040404a6739f3ee34b25ebcc1d3066196a241a15ec10b5585d70ecef38d90029eb379bd9b5c6fc80d9cf601107ea2b559431ac
|
data/History.txt
CHANGED
@@ -1,3 +1,21 @@
|
|
1
|
+
== 2.0.0 2015-01-15
|
2
|
+
|
3
|
+
* Upgraded to RSpec 3.1 (Daniel Doubrovkine)
|
4
|
+
* Remove integration of Delayed Job (@jeroenvandijk)
|
5
|
+
* Better coverage for `#reply_to` (@akshayrawat)
|
6
|
+
* Decode encoded links (@deadlyicon)
|
7
|
+
# Add Ruby 2.1.0 to Travis (@salimane)
|
8
|
+
* Upgraded Rspec and Cucumber (@dblock)
|
9
|
+
* Don't assume Rspec is always available (@myobie)
|
10
|
+
* Fix unread emails for cached deliverys (@thickpaddy)
|
11
|
+
* Better link matching with regexp (@ronaldsalas)
|
12
|
+
* Signal non backwards compatible release with version 2.0.0 (@etagwerker)
|
13
|
+
* Upgraded mail dependency (@etagwerker)
|
14
|
+
* Better documentation for new Rspec syntax (@etagwerker)
|
15
|
+
* Updated Travis configuration to solve broken builds (@schmierkov)
|
16
|
+
* Fixed Rspec warnings and removed rails_generators from repo (@mauro-oto)
|
17
|
+
* Added coverage for links surrounded by tags (@mauro-oto)
|
18
|
+
|
1
19
|
== 1.6.0 2014-05-27
|
2
20
|
|
3
21
|
* New RSpec matcher API support (Morton Jonuschat)
|
data/README.md
CHANGED
@@ -1,30 +1,22 @@
|
|
1
1
|
|
2
|
-
[![Build Status](https://secure.travis-ci.org/
|
2
|
+
[![Build Status](https://secure.travis-ci.org/email-spec/email-spec.png)](http://travis-ci.org/email-spec/email-spec)
|
3
3
|
|
4
4
|
## Email Spec
|
5
5
|
|
6
|
-
A collection of matchers for RSpec
|
6
|
+
A collection of matchers for RSpec, MiniTest and Cucumber steps to make testing emails go smoothly.
|
7
7
|
|
8
8
|
This library works with ActionMailer and Pony. When using it with ActionMailer it works with
|
9
|
-
|
9
|
+
ActiveRecord Mailer, and action_mailer_cache_delivery.
|
10
10
|
|
11
11
|
If you are testing emails in conjunction with an automated browser solution, like Selenium,
|
12
12
|
you will want to use [action_mailer_cache_delivery](http://rubygems.org/gems/action_mailer_cache_delivery) in your test environment. (This is
|
13
13
|
because your test process and server processes are distinct and therefore need an
|
14
|
-
intermediate store for the emails.)
|
14
|
+
intermediate store for the emails.) ActiveRecord Mailer will also work but
|
15
15
|
you generally don't want to include those projects unless you need them in production.
|
16
16
|
|
17
|
-
## Setup
|
18
|
-
|
19
|
-
```bash
|
20
|
-
script/plugin install git://github.com/bmabey/email-spec.git
|
21
|
-
```
|
22
|
-
|
23
17
|
### Gem Setup
|
24
18
|
|
25
19
|
```ruby
|
26
|
-
gem install email_spec
|
27
|
-
|
28
20
|
# Gemfile
|
29
21
|
group :test do
|
30
22
|
gem 'email_spec'
|
@@ -64,7 +56,7 @@ Scenario: A new person signs up
|
|
64
56
|
And "quentin@example.com" should receive an email # Specify who should receive the email
|
65
57
|
```
|
66
58
|
|
67
|
-
### RSpec
|
59
|
+
### RSpec (3.1+)
|
68
60
|
|
69
61
|
First you need to require email_spec in your spec_helper.rb:
|
70
62
|
|
@@ -135,6 +127,16 @@ end
|
|
135
127
|
|
136
128
|
If you're using [Turnip](https://github.com/jnicklas/turnip), you might be interested in this [conversion of the Cucumber steps into Turnip steps](https://github.com/jmuheim/transition/blob/master/spec/support/steps/email_steps.rb).
|
137
129
|
|
130
|
+
## Background Jobs
|
131
|
+
|
132
|
+
If you are using a background job, you might need to use a step to process the jobs. Another alternative is to use an inline statement for your scenario.
|
133
|
+
|
134
|
+
For example, for DelayedJob:
|
135
|
+
|
136
|
+
```ruby
|
137
|
+
Delayed::Worker.delay_jobs = false
|
138
|
+
```
|
139
|
+
|
138
140
|
## Usage
|
139
141
|
|
140
142
|
### Cucumber
|
@@ -168,7 +170,7 @@ Verify that the mailer is used correctly in the controller (this would apply to
|
|
168
170
|
describe "POST /signup (#signup)" do
|
169
171
|
it "should deliver the signup email" do
|
170
172
|
# expect
|
171
|
-
UserMailer.
|
173
|
+
expect(UserMailer).to(receive(:deliver_signup).with("email@example.com", "Jimmy Bean"))
|
172
174
|
# when
|
173
175
|
post :signup, "Email" => "email@example.com", "Name" => "Jimmy Bean"
|
174
176
|
end
|
@@ -189,19 +191,19 @@ describe "Signup Email" do
|
|
189
191
|
end
|
190
192
|
|
191
193
|
it "should be set to be delivered to the email passed in" do
|
192
|
-
@email.
|
194
|
+
expect(@email).to deliver_to("jojo@yahoo.com")
|
193
195
|
end
|
194
196
|
|
195
197
|
it "should contain the user's message in the mail body" do
|
196
|
-
@email.
|
198
|
+
expect(@email).to have_body_text(/Jojo Binks/)
|
197
199
|
end
|
198
200
|
|
199
201
|
it "should contain a link to the confirmation link" do
|
200
|
-
@email.
|
202
|
+
expect(@email).to have_body_text(/#{confirm_account_url}/)
|
201
203
|
end
|
202
204
|
|
203
205
|
it "should have the correct subject" do
|
204
|
-
@email.
|
206
|
+
expect(@email).to have_subject(/Account confirmation/)
|
205
207
|
end
|
206
208
|
|
207
209
|
end
|
@@ -217,7 +219,7 @@ This checks that the Reply-To header's email address (the bob@example.com of
|
|
217
219
|
|
218
220
|
```ruby
|
219
221
|
email = UserMailer.create_signup("jojo@yahoo.com", "Jojo Binks")
|
220
|
-
email.
|
222
|
+
expect(email).to reply_to("support@myapp.com")
|
221
223
|
```
|
222
224
|
|
223
225
|
|
@@ -229,7 +231,7 @@ This checks that the To header's email addresses (the bob@example.com of
|
|
229
231
|
|
230
232
|
```ruby
|
231
233
|
email = UserMailer.create_signup("jojo@yahoo.com", "Jojo Binks")
|
232
|
-
email.
|
234
|
+
expect(email).to deliver_to("jojo@yahoo.com")
|
233
235
|
```
|
234
236
|
|
235
237
|
|
@@ -241,7 +243,7 @@ This checks that the From header's email address (the bob@example.com of
|
|
241
243
|
|
242
244
|
```ruby
|
243
245
|
email = UserMailer.create_signup("jojo@yahoo.com", "Jojo Binks")
|
244
|
-
email.
|
246
|
+
expect(email).to deliver_from("sally@yahoo.com")
|
245
247
|
```
|
246
248
|
|
247
249
|
|
@@ -252,7 +254,7 @@ This checks that the BCC header's email addresses (the bob@example.com of
|
|
252
254
|
|
253
255
|
```ruby
|
254
256
|
email = UserMailer.create_signup("jojo@yahoo.com", "Jojo Binks")
|
255
|
-
email.
|
257
|
+
expect(email).to bcc_to("sue@yahoo.com", "bill@yahoo.com")
|
256
258
|
```
|
257
259
|
|
258
260
|
|
@@ -263,7 +265,7 @@ This checks that the CC header's email addresses (the bob@example.com of
|
|
263
265
|
|
264
266
|
```ruby
|
265
267
|
email = UserMailer.create_signup("jojo@yahoo.com", "Jojo Binks")
|
266
|
-
email.
|
268
|
+
expect(email).to cc_to("sue@yahoo.com", "bill@yahoo.com")
|
267
269
|
```
|
268
270
|
|
269
271
|
|
@@ -273,7 +275,7 @@ This checks that the Subject header's value is set to the given subject.
|
|
273
275
|
|
274
276
|
```ruby
|
275
277
|
email = UserMailer.create_signup("jojo@yahoo.com", "Jojo Binks")
|
276
|
-
email.
|
278
|
+
expect(email).to have_subject("Welcome!")
|
277
279
|
```
|
278
280
|
|
279
281
|
|
@@ -285,7 +287,7 @@ This checks that one of the given emails' subjects includes the subject.
|
|
285
287
|
```ruby
|
286
288
|
email = UserMailer.create_signup("jojo@yahoo.com", "Jojo Binks")
|
287
289
|
email2 = UserMailer.forgot_password("jojo@yahoo.com", "Jojo Binks")
|
288
|
-
[email, email2].
|
290
|
+
expect([email, email2]).to include_email_with_subject("Welcome!")
|
289
291
|
```
|
290
292
|
|
291
293
|
|
@@ -296,7 +298,7 @@ This checks that the text of the body has the given body.
|
|
296
298
|
|
297
299
|
```ruby
|
298
300
|
email = UserMailer.create_signup("jojo@yahoo.com", "Jojo Binks")
|
299
|
-
email.
|
301
|
+
expect(email).to have_body_text(/Hi Jojo Binks,/)
|
300
302
|
```
|
301
303
|
|
302
304
|
|
@@ -306,7 +308,7 @@ This checks that the expected key/value pair is in the headers of the email.
|
|
306
308
|
|
307
309
|
```ruby
|
308
310
|
email = UserMailer.create_signup("jojo@yahoo.com", "Jojo Binks")
|
309
|
-
email.
|
311
|
+
expect(email).to have_header("X-Campaign", "1234abc")
|
310
312
|
```
|
311
313
|
|
312
314
|
#### Using the helpers when not testing in isolation
|
@@ -341,4 +343,4 @@ assert_must deliver_to("jojo@yahoo.com"), email
|
|
341
343
|
|
342
344
|
Ben Mabey, Aaron Gibralter, Mischa Fierer
|
343
345
|
|
344
|
-
Please see History.txt for upcoming
|
346
|
+
Please see History.txt for upcoming changesets and other contributors.
|
@@ -0,0 +1,19 @@
|
|
1
|
+
source 'http://rubygems.org'
|
2
|
+
|
3
|
+
gem "rake", "~> 10.3.2"
|
4
|
+
gem 'rails', '4.2.3'
|
5
|
+
gem 'sqlite3'
|
6
|
+
|
7
|
+
gem 'delayed_job', '~> 4.0.6'
|
8
|
+
gem 'delayed_job_active_record'
|
9
|
+
gem 'mimetype-fu', :require => 'mimetype_fu'
|
10
|
+
gem "minitest-rails"
|
11
|
+
|
12
|
+
group :test do
|
13
|
+
gem "cucumber-rails", :require => false
|
14
|
+
gem "database_cleaner"
|
15
|
+
gem 'capybara'
|
16
|
+
gem "rspec-rails"
|
17
|
+
gem "minitest-matchers"
|
18
|
+
gem "email_spec", :path => "../../", :require => "email_spec"
|
19
|
+
end
|
@@ -0,0 +1,180 @@
|
|
1
|
+
PATH
|
2
|
+
remote: ../../
|
3
|
+
specs:
|
4
|
+
email_spec (2.0.0)
|
5
|
+
htmlentities (~> 4.3.3)
|
6
|
+
launchy (~> 2.1)
|
7
|
+
mail (~> 2.6.3)
|
8
|
+
|
9
|
+
GEM
|
10
|
+
remote: http://rubygems.org/
|
11
|
+
specs:
|
12
|
+
actionmailer (4.2.3)
|
13
|
+
actionpack (= 4.2.3)
|
14
|
+
actionview (= 4.2.3)
|
15
|
+
activejob (= 4.2.3)
|
16
|
+
mail (~> 2.5, >= 2.5.4)
|
17
|
+
rails-dom-testing (~> 1.0, >= 1.0.5)
|
18
|
+
actionpack (4.2.3)
|
19
|
+
actionview (= 4.2.3)
|
20
|
+
activesupport (= 4.2.3)
|
21
|
+
rack (~> 1.6)
|
22
|
+
rack-test (~> 0.6.2)
|
23
|
+
rails-dom-testing (~> 1.0, >= 1.0.5)
|
24
|
+
rails-html-sanitizer (~> 1.0, >= 1.0.2)
|
25
|
+
actionview (4.2.3)
|
26
|
+
activesupport (= 4.2.3)
|
27
|
+
builder (~> 3.1)
|
28
|
+
erubis (~> 2.7.0)
|
29
|
+
rails-dom-testing (~> 1.0, >= 1.0.5)
|
30
|
+
rails-html-sanitizer (~> 1.0, >= 1.0.2)
|
31
|
+
activejob (4.2.3)
|
32
|
+
activesupport (= 4.2.3)
|
33
|
+
globalid (>= 0.3.0)
|
34
|
+
activemodel (4.2.3)
|
35
|
+
activesupport (= 4.2.3)
|
36
|
+
builder (~> 3.1)
|
37
|
+
activerecord (4.2.3)
|
38
|
+
activemodel (= 4.2.3)
|
39
|
+
activesupport (= 4.2.3)
|
40
|
+
arel (~> 6.0)
|
41
|
+
activesupport (4.2.3)
|
42
|
+
i18n (~> 0.7)
|
43
|
+
json (~> 1.7, >= 1.7.7)
|
44
|
+
minitest (~> 5.1)
|
45
|
+
thread_safe (~> 0.3, >= 0.3.4)
|
46
|
+
tzinfo (~> 1.1)
|
47
|
+
addressable (2.3.8)
|
48
|
+
arel (6.0.0)
|
49
|
+
builder (3.2.2)
|
50
|
+
capybara (2.4.4)
|
51
|
+
mime-types (>= 1.16)
|
52
|
+
nokogiri (>= 1.3.3)
|
53
|
+
rack (>= 1.0.0)
|
54
|
+
rack-test (>= 0.5.4)
|
55
|
+
xpath (~> 2.0)
|
56
|
+
cucumber (1.3.20)
|
57
|
+
builder (>= 2.1.2)
|
58
|
+
diff-lcs (>= 1.1.3)
|
59
|
+
gherkin (~> 2.12)
|
60
|
+
multi_json (>= 1.7.5, < 2.0)
|
61
|
+
multi_test (>= 0.1.2)
|
62
|
+
cucumber-rails (1.4.2)
|
63
|
+
capybara (>= 1.1.2, < 3)
|
64
|
+
cucumber (>= 1.3.8, < 2)
|
65
|
+
mime-types (>= 1.16, < 3)
|
66
|
+
nokogiri (~> 1.5)
|
67
|
+
rails (>= 3, < 5)
|
68
|
+
database_cleaner (1.4.1)
|
69
|
+
delayed_job (4.0.6)
|
70
|
+
activesupport (>= 3.0, < 5.0)
|
71
|
+
delayed_job_active_record (4.0.3)
|
72
|
+
activerecord (>= 3.0, < 5.0)
|
73
|
+
delayed_job (>= 3.0, < 4.1)
|
74
|
+
diff-lcs (1.2.5)
|
75
|
+
erubis (2.7.0)
|
76
|
+
gherkin (2.12.2)
|
77
|
+
multi_json (~> 1.3)
|
78
|
+
globalid (0.3.5)
|
79
|
+
activesupport (>= 4.1.0)
|
80
|
+
htmlentities (4.3.3)
|
81
|
+
i18n (0.7.0)
|
82
|
+
json (1.8.3)
|
83
|
+
launchy (2.4.3)
|
84
|
+
addressable (~> 2.3)
|
85
|
+
loofah (2.0.2)
|
86
|
+
nokogiri (>= 1.5.9)
|
87
|
+
mail (2.6.3)
|
88
|
+
mime-types (>= 1.16, < 3)
|
89
|
+
mime-types (2.6.1)
|
90
|
+
mimetype-fu (0.1.2)
|
91
|
+
mini_portile (0.6.2)
|
92
|
+
minitest (5.7.0)
|
93
|
+
minitest-matchers (1.4.1)
|
94
|
+
minitest (~> 5.0)
|
95
|
+
minitest-rails (2.2.0)
|
96
|
+
minitest (~> 5.7)
|
97
|
+
railties (~> 4.1)
|
98
|
+
multi_json (1.11.1)
|
99
|
+
multi_test (0.1.2)
|
100
|
+
nokogiri (1.6.6.2)
|
101
|
+
mini_portile (~> 0.6.0)
|
102
|
+
rack (1.6.4)
|
103
|
+
rack-test (0.6.3)
|
104
|
+
rack (>= 1.0)
|
105
|
+
rails (4.2.3)
|
106
|
+
actionmailer (= 4.2.3)
|
107
|
+
actionpack (= 4.2.3)
|
108
|
+
actionview (= 4.2.3)
|
109
|
+
activejob (= 4.2.3)
|
110
|
+
activemodel (= 4.2.3)
|
111
|
+
activerecord (= 4.2.3)
|
112
|
+
activesupport (= 4.2.3)
|
113
|
+
bundler (>= 1.3.0, < 2.0)
|
114
|
+
railties (= 4.2.3)
|
115
|
+
sprockets-rails
|
116
|
+
rails-deprecated_sanitizer (1.0.3)
|
117
|
+
activesupport (>= 4.2.0.alpha)
|
118
|
+
rails-dom-testing (1.0.6)
|
119
|
+
activesupport (>= 4.2.0.beta, < 5.0)
|
120
|
+
nokogiri (~> 1.6.0)
|
121
|
+
rails-deprecated_sanitizer (>= 1.0.1)
|
122
|
+
rails-html-sanitizer (1.0.2)
|
123
|
+
loofah (~> 2.0)
|
124
|
+
railties (4.2.3)
|
125
|
+
actionpack (= 4.2.3)
|
126
|
+
activesupport (= 4.2.3)
|
127
|
+
rake (>= 0.8.7)
|
128
|
+
thor (>= 0.18.1, < 2.0)
|
129
|
+
rake (10.3.2)
|
130
|
+
rspec-core (3.3.1)
|
131
|
+
rspec-support (~> 3.3.0)
|
132
|
+
rspec-expectations (3.3.0)
|
133
|
+
diff-lcs (>= 1.2.0, < 2.0)
|
134
|
+
rspec-support (~> 3.3.0)
|
135
|
+
rspec-mocks (3.3.1)
|
136
|
+
diff-lcs (>= 1.2.0, < 2.0)
|
137
|
+
rspec-support (~> 3.3.0)
|
138
|
+
rspec-rails (3.3.2)
|
139
|
+
actionpack (>= 3.0, < 4.3)
|
140
|
+
activesupport (>= 3.0, < 4.3)
|
141
|
+
railties (>= 3.0, < 4.3)
|
142
|
+
rspec-core (~> 3.3.0)
|
143
|
+
rspec-expectations (~> 3.3.0)
|
144
|
+
rspec-mocks (~> 3.3.0)
|
145
|
+
rspec-support (~> 3.3.0)
|
146
|
+
rspec-support (3.3.0)
|
147
|
+
sprockets (3.2.0)
|
148
|
+
rack (~> 1.0)
|
149
|
+
sprockets-rails (2.3.2)
|
150
|
+
actionpack (>= 3.0)
|
151
|
+
activesupport (>= 3.0)
|
152
|
+
sprockets (>= 2.8, < 4.0)
|
153
|
+
sqlite3 (1.3.10)
|
154
|
+
thor (0.19.1)
|
155
|
+
thread_safe (0.3.5)
|
156
|
+
tzinfo (1.2.2)
|
157
|
+
thread_safe (~> 0.1)
|
158
|
+
xpath (2.0.0)
|
159
|
+
nokogiri (~> 1.3)
|
160
|
+
|
161
|
+
PLATFORMS
|
162
|
+
ruby
|
163
|
+
|
164
|
+
DEPENDENCIES
|
165
|
+
capybara
|
166
|
+
cucumber-rails
|
167
|
+
database_cleaner
|
168
|
+
delayed_job (~> 4.0.6)
|
169
|
+
delayed_job_active_record
|
170
|
+
email_spec!
|
171
|
+
mimetype-fu
|
172
|
+
minitest-matchers
|
173
|
+
minitest-rails
|
174
|
+
rails (= 4.2.3)
|
175
|
+
rake (~> 10.3.2)
|
176
|
+
rspec-rails
|
177
|
+
sqlite3
|
178
|
+
|
179
|
+
BUNDLED WITH
|
180
|
+
1.11.2
|
@@ -0,0 +1,11 @@
|
|
1
|
+
# Add your own tasks in files placed in lib/tasks ending in .rake,
|
2
|
+
# for example lib/tasks/capistrano.rake, and they will automatically be available to Rake.
|
3
|
+
|
4
|
+
require File.expand_path('../config/application', __FILE__)
|
5
|
+
|
6
|
+
require 'rake'
|
7
|
+
require 'rake/testtask'
|
8
|
+
require 'rdoc/task'
|
9
|
+
require 'delayed/tasks'
|
10
|
+
|
11
|
+
Rails4Root::Application.load_tasks
|
@@ -0,0 +1,18 @@
|
|
1
|
+
class WelcomeController < ApplicationController
|
2
|
+
def signup
|
3
|
+
UserMailer.signup(params['Email'], params['Name']).deliver_now
|
4
|
+
end
|
5
|
+
|
6
|
+
def confirm
|
7
|
+
end
|
8
|
+
|
9
|
+
def newsletter
|
10
|
+
Delayed::Job.enqueue(NotifierJob.new(:newsletter, params['Email'],
|
11
|
+
params['Name']))
|
12
|
+
end
|
13
|
+
|
14
|
+
def attachments
|
15
|
+
UserMailer.email_with_attachment(params['Email'], params['Name'])
|
16
|
+
.deliver_now
|
17
|
+
end
|
18
|
+
end
|