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.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/lib/glib/mailer_tester.rb +6 -5
  3. metadata +1 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 4f8b29b4f537ee6bf84d38fb8e0e9731b66a6f7dd39cc7498d2dc38680b47832
4
- data.tar.gz: e6b063e4098ef285461c961c166ce3bb18f54749b20e83a27ccea15480f37c43
3
+ metadata.gz: 66e524f15bee8e6c628653e76d1785f79410bed28efd00504e6dfeab4368e0d2
4
+ data.tar.gz: e7aef35ec5bdee993bef230ebda57dcbbee5c20f2b7b15633f4b2bea5aba0375
5
5
  SHA512:
6
- metadata.gz: 68b869bf225f42361ee6e2aa10004101469ed51298961dd5acd86a33305c6a475a864788071e44d2d1fc6fa6253a0d198279936052ccb127a4d74b4bbf6cf164
7
- data.tar.gz: c7204c91732b75735519b7242ee04d481ef11a938f0194963f3eaeb21b2c8e3d65c45e29c1b7a45398440eb4475126dfcf51397ff09e5a725d12b7714c28ea4f
6
+ metadata.gz: 6cf36807eaf18d6260a603451835ccfbf449aef03ba8a37141428dc094997e6130c304756d473f198419852b504b7aad8c2fe84f36594036cf82a526857558e3
7
+ data.tar.gz: 40888a54de77dc4560411d06b3a05bdbf805e12b90985fd87b0a03dcce600c4029c7bd2c8c36e140c61147d060b23d1d61eb14aaaaa4e8a38b113a05ac99af1a
@@ -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
- logger = File.open(file, 'w')
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
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: glib-web
3
3
  version: !ruby/object:Gem::Version
4
- version: 5.0.3
4
+ version: 5.0.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - ''