typogruby 1.0.17 → 1.0.18

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: da19ab76a8cf4a14d847a7a7aa60ecce3cec196d
4
- data.tar.gz: cc8b80624af026ed7cff5b4c3627ec3e8deed6f2
3
+ metadata.gz: 3faaea964e7ce6b76ea2def232a6e5eb8302a3ba
4
+ data.tar.gz: 71a76ed538de0804824c9859e4d5d693a1a3f55e
5
5
  SHA512:
6
- metadata.gz: c44b8842370ea8c280db66b8c16cc23639e08b1d8daf30387dda0377e5c2b4d5fa1d2dfc7c350b6835cfc354162bb4580328127ddcc83250760e164f09c20e95
7
- data.tar.gz: c3fe4fccdf6610464f85aea2939704d11205624da18d2ad2dd0a71a69e2fe5336aeb246aff29639a90c05802651e3fd9d108f6c95649d38e34449f5f9073ceb4
6
+ metadata.gz: ce85d0af751af1e8c3482302c365ee5b2b49744e1ecb223233a9e7f974a4ccf791b200ccdbccf763e32429d7065da632f04a9d2012a228ed8780a5a96c78635f
7
+ data.tar.gz: 28180701c3f7e28e16843031522f38392101dd81040c38347b06ca6771ac208322fbfe1f907a0876e3404aee94baeeb8efb3def9ff49eb162d0913aa4c484ce9
@@ -1,41 +1,46 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- typogruby (1.0.17)
4
+ typogruby (1.0.18)
5
5
  rubypants
6
6
 
7
7
  GEM
8
8
  remote: https://rubygems.org/
9
9
  specs:
10
- aruba (0.5.3)
10
+ aruba (0.6.2)
11
11
  childprocess (>= 0.3.6)
12
12
  cucumber (>= 1.1.1)
13
13
  rspec-expectations (>= 2.7.0)
14
14
  bluecloth (2.2.0)
15
15
  builder (3.2.2)
16
- childprocess (0.3.9)
16
+ childprocess (0.5.5)
17
17
  ffi (~> 1.0, >= 1.0.11)
18
- cucumber (1.3.6)
18
+ cucumber (1.3.18)
19
19
  builder (>= 2.1.2)
20
20
  diff-lcs (>= 1.1.3)
21
- gherkin (~> 2.12.0)
22
- multi_json (~> 1.7.5)
23
- multi_test (>= 0.0.2)
24
- diff-lcs (1.2.4)
25
- ffi (1.9.0)
26
- gherkin (2.12.1)
21
+ gherkin (~> 2.12)
22
+ multi_json (>= 1.7.5, < 2.0)
23
+ multi_test (>= 0.1.1)
24
+ diff-lcs (1.2.5)
25
+ ffi (1.9.6)
26
+ gherkin (2.12.2)
27
27
  multi_json (~> 1.3)
28
- multi_json (1.7.9)
29
- multi_test (0.0.2)
30
- rake (10.1.0)
31
- rspec (2.14.1)
32
- rspec-core (~> 2.14.0)
33
- rspec-expectations (~> 2.14.0)
34
- rspec-mocks (~> 2.14.0)
35
- rspec-core (2.14.5)
36
- rspec-expectations (2.14.2)
37
- diff-lcs (>= 1.1.3, < 2.0)
38
- rspec-mocks (2.14.3)
28
+ minitest (5.5.1)
29
+ multi_json (1.10.1)
30
+ multi_test (0.1.1)
31
+ rake (10.4.2)
32
+ rspec (3.1.0)
33
+ rspec-core (~> 3.1.0)
34
+ rspec-expectations (~> 3.1.0)
35
+ rspec-mocks (~> 3.1.0)
36
+ rspec-core (3.1.7)
37
+ rspec-support (~> 3.1.0)
38
+ rspec-expectations (3.1.2)
39
+ diff-lcs (>= 1.2.0, < 2.0)
40
+ rspec-support (~> 3.1.0)
41
+ rspec-mocks (3.1.3)
42
+ rspec-support (~> 3.1.0)
43
+ rspec-support (3.1.2)
39
44
  rubypants (0.2.0)
40
45
 
41
46
  PLATFORMS
@@ -45,6 +50,7 @@ DEPENDENCIES
45
50
  aruba
46
51
  bluecloth
47
52
  cucumber
53
+ minitest
48
54
  rake
49
55
  rspec
50
56
  typogruby!
data/HISTORY.md CHANGED
@@ -1,5 +1,10 @@
1
1
  # Changelog
2
2
 
3
+ ## 1.0.18
4
+
5
+ * Added `<title>` to list of excluded tags
6
+ * Switched to Minitest for unit testing
7
+
3
8
  ## 1.0.17
4
9
 
5
10
  * Allow ampersands in capitalised words (thanks Paul Robert Lloyd)
@@ -295,7 +295,7 @@ private
295
295
  end
296
296
 
297
297
  # Array of all the senstive tags that should be ignored by all the text filters.
298
- EXCLUDED_TAGS = %w{head pre code kbd math script textarea}
298
+ EXCLUDED_TAGS = %w{head pre code kbd math script textarea title}
299
299
 
300
300
  extend self
301
301
  end
@@ -1,3 +1,3 @@
1
1
  module Typogruby
2
- VERSION = '1.0.17'
2
+ VERSION = '1.0.18'
3
3
  end
@@ -1,8 +1,8 @@
1
1
  # -*- encoding: utf-8 -*-
2
- require 'test/unit'
3
- require 'typogruby'
2
+ require 'minitest/autorun'
3
+ require File.expand_path('../../lib/typogruby', __FILE__)
4
4
 
5
- class TestTypogruby < Test::Unit::TestCase
5
+ class TypogrubyTest < Minitest::Test
6
6
  include Typogruby
7
7
 
8
8
  def test_should_replace_amps
@@ -92,9 +92,14 @@ class TestTypogruby < Test::Unit::TestCase
92
92
  assert_equal '<h1><a href="#"></a></h1>', widont('<h1><a href="#"></a></h1>')
93
93
  end
94
94
 
95
+ def test_should_ignore_caps_in_special_tags
96
+ assert_equal '<title>I like JSON</title>', caps('<title>I like JSON</title>')
97
+ end
98
+
95
99
  def test_should_ignore_widows_in_special_tags
96
100
  assert_equal '<div>Divs get no love!</div>', widont('<div>Divs get no love!</div>')
97
101
  assert_equal '<pre>Neither do PREs</pre>', widont('<pre>Neither do PREs</pre>')
102
+ assert_equal '<title>or titles</title>', widont('<title>or titles</title>')
98
103
  assert_equal '<textarea>nor text in textarea</textarea>', widont('<textarea>nor text in textarea</textarea>')
99
104
  assert_equal "<script>\nreturn window;\n</script>", widont("<script>\nreturn window;\n</script>")
100
105
  assert_equal '<div><p>But divs with paragraphs&nbsp;do!</p></div>', widont('<div><p>But divs with paragraphs do!</p></div>')
@@ -34,5 +34,6 @@ Gem::Specification.new do |s|
34
34
  s.add_development_dependency 'cucumber'
35
35
  s.add_development_dependency 'rspec'
36
36
  s.add_development_dependency 'bluecloth'
37
+ s.add_development_dependency 'minitest'
37
38
  end
38
39
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: typogruby
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.17
4
+ version: 1.0.18
5
5
  platform: ruby
6
6
  authors:
7
7
  - Arjan van der Gaag
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-08-20 00:00:00.000000000 Z
11
+ date: 2015-01-20 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rubypants
@@ -94,6 +94,20 @@ dependencies:
94
94
  - - ">="
95
95
  - !ruby/object:Gem::Version
96
96
  version: '0'
97
+ - !ruby/object:Gem::Dependency
98
+ name: minitest
99
+ requirement: !ruby/object:Gem::Requirement
100
+ requirements:
101
+ - - ">="
102
+ - !ruby/object:Gem::Version
103
+ version: '0'
104
+ type: :development
105
+ prerelease: false
106
+ version_requirements: !ruby/object:Gem::Requirement
107
+ requirements:
108
+ - - ">="
109
+ - !ruby/object:Gem::Version
110
+ version: '0'
97
111
  description: Improve web typography using various text filters. This gem prevents
98
112
  widows and applies markup to ampersans, consecutive capitals and initial quotes.
99
113
  email: arjan@arjanvandergaag.nl
@@ -147,7 +161,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
147
161
  version: '0'
148
162
  requirements: []
149
163
  rubyforge_project:
150
- rubygems_version: 2.4.1
164
+ rubygems_version: 2.4.5
151
165
  signing_key:
152
166
  specification_version: 4
153
167
  summary: Improves web typography like Django's Typogrify