letter_opener_web 1.1.1 → 1.1.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 26ada71a6fd80681d7272fe6de79d089d34b0464
4
- data.tar.gz: 526c8509ad5b7ce76453c264b8b436a0f82955dc
3
+ metadata.gz: 748f7585d505b4b67ca5233b1ba66a64f2e7c36c
4
+ data.tar.gz: daaa6a77e9ce24dc9c2074d9e876fb4c611e3ef3
5
5
  SHA512:
6
- metadata.gz: d55ba88a2fed065dd9ba7580221a880a112ebdcd97cf41a9b1cae5a735486c13f040db5f9aafc12bbabf552aa7c3c9a638c79284107439ca00f131cb6c8f7415
7
- data.tar.gz: 3f76e6581920c07d2d7c40c0d8eb3719a49633158089ad41ea2d9fec0fa3e8f7c86bca1971c9bc48a6352f6284774be6fb968573d2255144d1ae66c699590a9d
6
+ metadata.gz: 2b6dc02e0341d730d0aac32c3f048aaf99a61dd510b9c3eabd544de4c04de1184fff4f931324cac5fbd3edda2250a23b4abc55ae33f79c4bbac4fd620352e5f8
7
+ data.tar.gz: a627b71d467033c5b99cf1e1e63c5ff685faf52f5d12f6abcfbcdad2f2c2fedf62aef1a260e0cd678ae4fcda0d9e426224445c1623b553693c306ce05f04d98b
data/CHANGELOG.md CHANGED
@@ -1,3 +1,7 @@
1
+ ## [1.1.2](https://github.com/fgrehm/letter_opener_web/compare/v1.1.1...v1.1.2) (Dec 12, 2013)
2
+
3
+ - Nicely handle empty links [#18](https://github.com/fgrehm/letter_opener_web/pull/18)
4
+
1
5
  ## [1.1.1](https://github.com/fgrehm/letter_opener_web/compare/v1.1.0...v1.1.1) (Oct 15, 2013)
2
6
 
3
7
  - Fix deprecation warning on Rails 4 [#17](https://github.com/fgrehm/letter_opener_web/pull/17)
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- letter_opener_web (1.1.1)
4
+ letter_opener_web (1.1.2)
5
5
  letter_opener (~> 1.0)
6
6
  rails (>= 3.2)
7
7
 
data/README.md CHANGED
@@ -87,3 +87,5 @@ ideas on [this pull request](https://github.com/ryanb/letter_opener/pull/12).
87
87
  3. Commit your changes (`git commit -am 'Add some feature'`)
88
88
  4. Push to the branch (`git push origin my-new-feature`)
89
89
  5. Create new Pull Request
90
+
91
+ [![Bitdeli Badge](https://d2weczhvl823v0.cloudfront.net/fgrehm/letter_opener_web/trend.png)](https://bitdeli.com/free "Bitdeli Badge")
@@ -74,6 +74,7 @@ module LetterOpenerWeb
74
74
  xml = REXML::Document.new(fixed_link).root
75
75
  unless xml.attributes['href'] =~ /(plain|rich).html/
76
76
  xml.attributes['target'] = '_blank'
77
+ xml.add_text('') unless xml.text
77
78
  contents.gsub!(link, xml.to_s)
78
79
  end
79
80
  end
data/demo/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: ../
3
3
  specs:
4
- letter_opener_web (1.1.1)
4
+ letter_opener_web (1.1.2)
5
5
  letter_opener (~> 1.0)
6
6
  rails (>= 3.2)
7
7
 
@@ -1,3 +1,3 @@
1
1
  module LetterOpenerWeb
2
- VERSION = "1.1.1"
2
+ VERSION = "1.1.2"
3
3
  end
@@ -12,6 +12,7 @@ Rich text for #{mail_id}
12
12
  Link text
13
13
  </a>
14
14
  <a href='fooo.html'>Bar</a>
15
+ <a href="example.html" class="blank"></a>
15
16
  MAIL
16
17
  end
17
18
 
@@ -42,6 +43,11 @@ MAIL
42
43
  return pending 'This spec if failing randomly on ruby 1.8' if RUBY_VERSION =~ /^1.8/
43
44
  subject.should include("<a href='a-link.html' target='_blank'>\n <img src='an-image.jpg'/>\n Link text\n</a>")
44
45
  end
46
+
47
+ it 'always rewrites links with a closing tag rather than making them selfclosing' do
48
+ return pending 'This spec if failing randomly on ruby 1.8' if RUBY_VERSION =~ /^1.8/
49
+ subject.should include("<a class='blank' href='example.html' target='_blank'></a>")
50
+ end
45
51
  end
46
52
 
47
53
  describe 'plain text version' do
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: letter_opener_web
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.1
4
+ version: 1.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Fabio Rehm
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2013-10-15 00:00:00.000000000 Z
11
+ date: 2013-12-13 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails