glib-web 5.0.3 → 5.0.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/glib/mailer_tester.rb +6 -5
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 66e524f15bee8e6c628653e76d1785f79410bed28efd00504e6dfeab4368e0d2
|
|
4
|
+
data.tar.gz: e7aef35ec5bdee993bef230ebda57dcbbee5c20f2b7b15633f4b2bea5aba0375
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 6cf36807eaf18d6260a603451835ccfbf449aef03ba8a37141428dc094997e6130c304756d473f198419852b504b7aad8c2fe84f36594036cf82a526857558e3
|
|
7
|
+
data.tar.gz: 40888a54de77dc4560411d06b3a05bdbf805e12b90985fd87b0a03dcce600c4029c7bd2c8c36e140c61147d060b23d1d61eb14aaaaa4e8a38b113a05ac99af1a
|
data/lib/glib/mailer_tester.rb
CHANGED
|
@@ -95,16 +95,17 @@ module Glib
|
|
|
95
95
|
# end
|
|
96
96
|
|
|
97
97
|
private
|
|
98
|
+
# ActionMailer emits CRLF per RFC 5322. Normalize CRLF → LF on both sides
|
|
99
|
+
# so snapshots stay clean LF text files and play nicely with downstream
|
|
100
|
+
# `.gitattributes` `eol=lf` rules.
|
|
98
101
|
def _assert_mail_body_unchanged(log_path, mail)
|
|
99
102
|
file = File.join(log_dir, "#{log_path}.txt")
|
|
100
103
|
|
|
101
104
|
# Use rstrip to avoid trailing space issues
|
|
102
|
-
expected = File.exist?(file) ? File.read(file).rstrip : ''
|
|
103
|
-
result = mail.html_part.body.raw_source.rstrip
|
|
105
|
+
expected = File.exist?(file) ? File.read(file).gsub("\r\n", "\n").rstrip : ''
|
|
106
|
+
result = mail.html_part.body.raw_source.gsub("\r\n", "\n").rstrip
|
|
104
107
|
|
|
105
|
-
|
|
106
|
-
logger.puts result
|
|
107
|
-
logger.close
|
|
108
|
+
File.write(file, "#{result}\n")
|
|
108
109
|
|
|
109
110
|
assert_equal expected, result, "Result mismatch! #{file.sub(/\.txt$/, '')}"
|
|
110
111
|
end
|