spreewald 3.0.0 → 3.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +4 -0
- data/lib/spreewald_support/mail_finder.rb +1 -1
- data/lib/spreewald_support/version.rb +1 -1
- data/tests/rails-3_capybara-1/Gemfile.lock +1 -1
- data/tests/rails-3_capybara-2/Gemfile.lock +1 -1
- data/tests/rails-4_capybara-3/Gemfile.lock +1 -1
- data/tests/rails-6_capybara-3/Gemfile.lock +1 -1
- data/tests/rails-6_capybara-3/app/mailers/spreewald_mailer.rb +4 -0
- data/tests/shared/app/controllers/emails_controller.rb +5 -0
- data/tests/shared/app/models/mailer.rb +4 -0
- data/tests/shared/app/views/mailer/html_email_with_linebreaks.html +6 -0
- data/tests/shared/config/routes.rb +1 -0
- data/tests/shared/features/shared/email_steps.feature +17 -0
- metadata +5 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e94fff73b1219c20c1140b38f45de5a44e57da77eed6ef8fd9107c157a075c37
|
4
|
+
data.tar.gz: 0b9dab763d05e9e248c25d3e8cecb1b6493116dfd96e5c6a5c12e9a52ee417ec
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8abca9273d361112be92fecbd993efe99664baf70cb30af7a8be91d006fa89cfa9492a89d3b066a9824adde47439dda412ead601e51cd5006bbf8fd3d7185fb0
|
7
|
+
data.tar.gz: ce43a7c95abf0bc13b21baa1b23b7c14fbe05e10a7ad705efc1debb03bd7c18251d2b8acfaae38e9882d2f34278d9b8fb96860c1ba2795baf16c6d3a38fa8c7e
|
data/CHANGELOG.md
CHANGED
@@ -3,6 +3,10 @@ All notable changes to this project will be documented in this file.
|
|
3
3
|
|
4
4
|
This project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).
|
5
5
|
|
6
|
+
## 3.0.1
|
7
|
+
|
8
|
+
- Fix deduplication of linebreaks for html mails in mail finder. (see issue [#153](https://github.com/makandra/spreewald/issues/153))
|
9
|
+
|
6
10
|
## 3.0.0
|
7
11
|
|
8
12
|
### Breaking changes
|
@@ -60,7 +60,7 @@ class MailFinder
|
|
60
60
|
def email_text_body(mail, type = '')
|
61
61
|
body = if mail.html_part && type != 'plain-text'
|
62
62
|
dom = Nokogiri::HTML(mail.html_part.body.to_s)
|
63
|
-
dom.at_css('body').text.gsub(
|
63
|
+
dom.at_css('body').text.gsub(/[\r\n]+/, "\n")
|
64
64
|
elsif mail.text_part && type != 'HTML'
|
65
65
|
mail.text_part.body.to_s
|
66
66
|
else
|
@@ -10,6 +10,7 @@ Rails.application.routes.draw do
|
|
10
10
|
get '/emails/send_email_with_umlauts', to: 'emails#send_email_with_umlauts'
|
11
11
|
get '/emails/send_html_email_with_links', to: 'emails#send_html_email_with_links'
|
12
12
|
get '/emails/send_text_email_with_links', to: 'emails#send_text_email_with_links'
|
13
|
+
get '/emails/send_html_email_with_linebreaks', to: 'emails#send_html_email_with_linebreaks'
|
13
14
|
|
14
15
|
get '/forms/checkbox_form', to: 'forms#checkbox_form'
|
15
16
|
get '/forms/disabled_elements', to: 'forms#disabled_elements'
|
@@ -269,6 +269,23 @@ Feature: Test Spreewald's email steps
|
|
269
269
|
'''
|
270
270
|
"""
|
271
271
|
|
272
|
+
When I clear my emails
|
273
|
+
And I go to "/emails/send_html_email_with_linebreaks"
|
274
|
+
|
275
|
+
Then the following multiline step should succeed:
|
276
|
+
"""
|
277
|
+
Then an email should have been sent with:
|
278
|
+
'''
|
279
|
+
From: from@example.com
|
280
|
+
Reply-To: reply-to@example.com
|
281
|
+
To: to@example.com
|
282
|
+
Subject: SUBJECT
|
283
|
+
|
284
|
+
Hello!
|
285
|
+
Bye!
|
286
|
+
'''
|
287
|
+
"""
|
288
|
+
|
272
289
|
Scenario: /^I follow the (first|second|third)? ?link in the e?mail$/ (HTML e-mail body)
|
273
290
|
When I go to "/emails/send_html_email_with_links"
|
274
291
|
And I follow the first link in the email
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: spreewald
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.0.
|
4
|
+
version: 3.0.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Tobias Kraze
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-
|
11
|
+
date: 2020-11-04 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: cucumber
|
@@ -348,6 +348,7 @@ files:
|
|
348
348
|
- tests/shared/app/views/mailer/email.text.erb
|
349
349
|
- tests/shared/app/views/mailer/email_crlf.text.erb
|
350
350
|
- tests/shared/app/views/mailer/email_with_umlauts.text.erb
|
351
|
+
- tests/shared/app/views/mailer/html_email_with_linebreaks.html
|
351
352
|
- tests/shared/app/views/mailer/html_email_with_links.haml
|
352
353
|
- tests/shared/app/views/mailer/text_email_with_links.text.erb
|
353
354
|
- tests/shared/app/views/spreewald_mailer
|
@@ -410,7 +411,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
410
411
|
- !ruby/object:Gem::Version
|
411
412
|
version: '0'
|
412
413
|
requirements: []
|
413
|
-
rubygems_version: 3.
|
414
|
+
rubygems_version: 3.0.3
|
414
415
|
signing_key:
|
415
416
|
specification_version: 4
|
416
417
|
summary: Collection of useful cucumber steps.
|
@@ -581,6 +582,7 @@ test_files:
|
|
581
582
|
- tests/shared/app/views/mailer/email.text.erb
|
582
583
|
- tests/shared/app/views/mailer/email_crlf.text.erb
|
583
584
|
- tests/shared/app/views/mailer/email_with_umlauts.text.erb
|
585
|
+
- tests/shared/app/views/mailer/html_email_with_linebreaks.html
|
584
586
|
- tests/shared/app/views/mailer/html_email_with_links.haml
|
585
587
|
- tests/shared/app/views/mailer/text_email_with_links.text.erb
|
586
588
|
- tests/shared/app/views/spreewald_mailer
|