typogruby 1.0.9 → 1.0.10

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.
data/Gemfile CHANGED
@@ -1,10 +1,3 @@
1
- source :rubyforge
2
- gem 'rubypants'
1
+ source :rubygems
2
+ gemspec
3
3
 
4
- group :development, :test do
5
- gem 'yard'
6
- gem 'jeweler'
7
- gem 'rake'
8
- gem 'aruba'
9
- gem 'cucumber'
10
- end
@@ -1,43 +1,55 @@
1
+ PATH
2
+ remote: .
3
+ specs:
4
+ typogruby (1.0.10)
5
+ rubypants
6
+
1
7
  GEM
2
8
  remote: http://rubygems.org/
3
9
  specs:
4
- aruba (0.2.4)
5
- background_process
6
- cucumber (~> 0.9.3)
7
- background_process (1.2)
8
- builder (2.1.2)
9
- cucumber (0.9.3)
10
- builder (~> 2.1.2)
10
+ aruba (0.3.2)
11
+ childprocess (~> 0.1.6)
12
+ cucumber (~> 0.10.0)
13
+ rspec (~> 2.3.0)
14
+ bluecloth (2.0.11)
15
+ builder (3.0.0)
16
+ childprocess (0.1.7)
17
+ ffi (~> 0.6.3)
18
+ cucumber (0.10.0)
19
+ builder (>= 2.1.2)
11
20
  diff-lcs (~> 1.1.2)
12
- gherkin (~> 2.2.9)
21
+ gherkin (~> 2.3.2)
13
22
  json (~> 1.4.6)
14
23
  term-ansicolor (~> 1.0.5)
15
24
  diff-lcs (1.1.2)
16
- gemcutter (0.6.1)
17
- gherkin (2.2.9)
25
+ ffi (0.6.3)
26
+ rake (>= 0.8.7)
27
+ gherkin (2.3.3)
18
28
  json (~> 1.4.6)
19
- term-ansicolor (~> 1.0.5)
20
- git (1.2.5)
21
- jeweler (1.4.0)
22
- gemcutter (>= 0.1.0)
23
- git (>= 1.2.5)
24
- rubyforge (>= 2.0.0)
25
29
  json (1.4.6)
26
- json_pure (1.4.6)
27
30
  rake (0.8.7)
28
- rubyforge (2.0.4)
29
- json_pure (>= 1.1.7)
31
+ rcov (0.9.9)
32
+ rspec (2.3.0)
33
+ rspec-core (~> 2.3.0)
34
+ rspec-expectations (~> 2.3.0)
35
+ rspec-mocks (~> 2.3.0)
36
+ rspec-core (2.3.1)
37
+ rspec-expectations (2.3.0)
38
+ diff-lcs (~> 1.1.2)
39
+ rspec-mocks (2.3.0)
30
40
  rubypants (0.2.0)
31
41
  term-ansicolor (1.0.5)
32
- yard (0.6.1)
42
+ yard (0.6.4)
33
43
 
34
44
  PLATFORMS
35
45
  ruby
36
46
 
37
47
  DEPENDENCIES
38
48
  aruba
49
+ bluecloth
39
50
  cucumber
40
- jeweler
41
51
  rake
42
- rubypants
52
+ rcov
53
+ rspec
54
+ typogruby!
43
55
  yard
data/HISTORY.md CHANGED
@@ -1,5 +1,14 @@
1
1
  # Changelog
2
2
 
3
+ ## 1.0.10
4
+
5
+ * Decoupled jeweler, which is no longer a dependency.
6
+ * Various minor documentation issues and internal refactorings
7
+
8
+ ## 1.0.9
9
+
10
+ * Bugfix: ignore caps in HTML attribute values
11
+
3
12
  ## 1.0.8
4
13
 
5
14
  * Allow command-line output to disk via -o option
data/Rakefile CHANGED
@@ -1,22 +1,8 @@
1
- require 'rubygems'
2
- require 'rake'
3
- require 'bundler/setup'
4
-
5
- begin
6
- require 'jeweler'
7
- Jeweler::Tasks.new do |gem|
8
- gem.name = "typogruby"
9
- gem.summary = %Q{Improves web typography like Django's Typogrify}
10
- gem.description = %Q{Improve web typography using various text filters. This gem prevents widows and applies markup to ampersans, consecutive capitals and initial quotes.}
11
- gem.email = "arjan@arjanvandergaag.nl"
12
- gem.homepage = "http://avdgaag.github.com/typogruby"
13
- gem.authors = ["Arjan van der Gaag"]
14
- gem.add_bundler_dependencies
15
- end
16
- Jeweler::GemcutterTasks.new
17
- rescue LoadError
18
- puts "Jeweler (or a dependency) not available. Install it with: gem install jeweler"
19
- end
1
+ require 'bundler'
2
+ Bundler::GemHelper.install_tasks
3
+ Bundler.setup
4
+
5
+ task :default => :test
20
6
 
21
7
  require 'rake/testtask'
22
8
  Rake::TestTask.new(:test) do |test|
@@ -25,32 +11,70 @@ Rake::TestTask.new(:test) do |test|
25
11
  test.verbose = true
26
12
  end
27
13
 
28
- begin
29
- require 'rcov/rcovtask'
30
- Rcov::RcovTask.new do |test|
31
- test.libs << 'test'
32
- test.pattern = 'test/**/test_*.rb'
33
- test.verbose = true
14
+ require 'cucumber'
15
+ require 'cucumber/rake/task'
16
+ Cucumber::Rake::Task.new(:features) do |t|
17
+ t.cucumber_opts = "features --format pretty"
18
+ end
19
+
20
+ def read_version
21
+ @version = File.read(File.join(File.dirname(__FILE__), 'lib', 'version.rb'))[/^\s*VERSION\s+=\s+'([^']+)'$/, 1]
22
+ end
23
+
24
+ def write_version(v)
25
+ file = File.join(File.dirname(__FILE__), 'lib', 'version.rb')
26
+ contents = File.read(file).gsub(/^\s*VERSION\s+=\s+'([^']+)'/) do |m|
27
+ m.sub($1, v)
34
28
  end
35
- rescue LoadError
36
- task :rcov do
37
- abort "RCov is not available. In order to run rcov, you must: sudo gem install spicycode-rcov"
29
+ File.open(file, 'w') do |f|
30
+ f.write contents
38
31
  end
39
32
  end
40
33
 
41
- task :default => :test
34
+ desc 'Display the current version number'
35
+ task :version do
36
+ puts read_version
37
+ end
42
38
 
43
- begin
44
- require 'yard'
45
- YARD::Rake::YardocTask.new do |t|
46
- t.options = [
47
- '--files', 'LICENSE',
48
- '--files', 'HISTORY.md',
49
- '--title', 'Typogruby API documentation'
50
- ]
39
+ namespace :version do
40
+ desc 'Explicitly write a new version number'
41
+ task :write do
42
+ write_version ENV['VERSION']
51
43
  end
52
- rescue LoadError
53
- task :yardoc do
54
- abort "YARD is not available. In order to run yardoc, you must: sudo gem install yard"
44
+
45
+ namespace :bump do
46
+ desc 'Bump version number to new major'
47
+ task :major do
48
+ major, minor, patch = read_version.split('.')
49
+ major = major.to_i + 1
50
+ minor = 0
51
+ patch = 0
52
+ write_version [major, minor, patch].join('.')
53
+ end
54
+
55
+ desc 'Bump version number to new minor'
56
+ task :minor do
57
+ major, minor, patch = read_version.split('.')
58
+ minor = minor.to_i + 1
59
+ patch = 0
60
+ write_version [major, minor, patch].join('.')
61
+ end
62
+
63
+ desc 'Bump version number to new patch'
64
+ task :patch do
65
+ major, minor, patch = read_version.split('.')
66
+ patch = patch.to_i + 1
67
+ write_version [major, minor, patch].join('.')
68
+ end
55
69
  end
56
70
  end
71
+
72
+ require 'yard'
73
+ YARD::Rake::YardocTask.new do |t|
74
+ t.options = [
75
+ '--files', 'LICENSE',
76
+ '--files', 'HISTORY.md',
77
+ '--title', 'Typogruby API documentation'
78
+ ]
79
+ end
80
+
@@ -64,7 +64,8 @@ EOS
64
64
  end
65
65
 
66
66
  options.on_tail '-v', '--version', 'Display version information' do
67
- $stderr.print "Typogruby #{Typogruby.version}"
67
+ require 'version'
68
+ $stderr.print "Typogruby #{Typogruby::VERSION}"
68
69
  exit
69
70
  end
70
71
  options.parse!
@@ -14,8 +14,9 @@ Feature: various inputs
14
14
  <p>This is another file</p>
15
15
  """
16
16
 
17
+ @wip
17
18
  Scenario: take input from STDIN
18
- When I run "cat input.html | typogruby"
19
+ When I run "typogruby < input.html"
19
20
  Then the output should contain exactly:
20
21
  """
21
22
  <p><span class="dquo">&#8220;</span>This <span class="caps">IS</span> a simple&nbsp;file!</p>
@@ -1,5 +1,8 @@
1
1
  $LOAD_PATH.unshift(File.dirname(__FILE__) + '/../../lib')
2
+ Before do
3
+ @aruba_timeout_seconds = 3
4
+ end
2
5
  require 'typogruby'
3
- require 'bundler'
4
- Bundler.require :default, :test
6
+ require 'bundler/setup'
7
+ require 'aruba/cucumber'
5
8
 
@@ -6,29 +6,24 @@ $KCODE = 'U'
6
6
  # typograhy. Based on TypographyHelper by Luke Hartman and Typogrify.
7
7
  #
8
8
  # @example Using all filters
9
- # require 'typogruby'
10
- # Typogruby.improve('my text')
9
+ # require 'typogruby'
10
+ # Typogruby.improve('my text')
11
11
  #
12
12
  # @example Using a single filter
13
- # Typogruby.initial_quotes('my text')
13
+ # Typogruby.initial_quotes('my text')
14
14
  #
15
15
  # @see http://github.com/hunter/typography-helper
16
16
  # @see http://code.google.com/p/typogrify
17
17
  # @author Arjan van der Gaag <arjan.vandergaag@gmail.com>
18
18
  module Typogruby
19
19
 
20
- # Get the current gem version number
21
- # @return [String]
22
- def version
23
- File.read(File.join(File.dirname(__FILE__), *%w{.. VERSION}))
24
- end
25
-
26
20
  # Applies smartypants to a given piece of text
27
21
  #
28
22
  # @example
29
- # smartypants('The "Green" man')
30
- # # => 'The &#8220;Green&#8221; man'
23
+ # smartypants('The "Green" man')
24
+ # # => 'The &#8220;Green&#8221; man'
31
25
  #
26
+ # @see https://rubygems.org/gems/rubypants
32
27
  # @param [String] text input text
33
28
  # @return [String] input text with smartypants applied
34
29
  def smartypants(text)
@@ -39,25 +34,24 @@ module Typogruby
39
34
  # to the HTML entity and surrounds it in a span with a styled class.
40
35
  #
41
36
  # @example
42
- # amp('One & two')
43
- # # => 'One <span class="amp">&amp;</span> two'
44
- # amp('One &amp; two')
45
- # # => 'One <span class="amp">&amp;</span> two'
46
- # amp('One &#38; two')
47
- # # => 'One <span class="amp">&amp;</span> two'
48
- # amp('One&nbsp;&amp;&nbsp;two')
49
- # # => 'One&nbsp;<span class="amp">&amp;</span>&nbsp;two'
37
+ # amp('One & two')
38
+ # # => 'One <span class="amp">&amp;</span> two'
39
+ # amp('One &amp; two')
40
+ # # => 'One <span class="amp">&amp;</span> two'
41
+ # amp('One &#38; two')
42
+ # # => 'One <span class="amp">&amp;</span> two'
43
+ # amp('One&nbsp;&amp;&nbsp;two')
44
+ # # => 'One&nbsp;<span class="amp">&amp;</span>&nbsp;two'
50
45
  #
51
46
  # @example It won't mess up & that are already wrapped, in entities or URLs
52
- #
53
- # amp('One <span class="amp">&amp;</span> two')
54
- # # => 'One <span class="amp">&amp;</span> two'
55
- # amp('&ldquo;this&rdquo; & <a href="/?that&amp;test">that</a>')
56
- # # => '&ldquo;this&rdquo; <span class="amp">&amp;</span> <a href="/?that&amp;test">that</a>'
47
+ # amp('One <span class="amp">&amp;</span> two')
48
+ # # => 'One <span class="amp">&amp;</span> two'
49
+ # amp('&ldquo;this&rdquo; & <a href="/?that&amp;test">that</a>')
50
+ # # => '&ldquo;this&rdquo; <span class="amp">&amp;</span> <a href="/?that&amp;test">that</a>'
57
51
  #
58
52
  # @example It should ignore standalone amps that are in attributes
59
- # amp('<link href="xyz.html" title="One & Two">xyz</link>')
60
- # # => '<link href="xyz.html" title="One & Two">xyz</link>'
53
+ # amp('<link href="xyz.html" title="One & Two">xyz</link>')
54
+ # # => '<link href="xyz.html" title="One & Two">xyz</link>'
61
55
  #
62
56
  # @param [String] text input text
63
57
  # @return [String] input text with ampersands wrapped
@@ -76,38 +70,38 @@ module Typogruby
76
70
  # <tt>li</tt>, <tt>dt</tt>, <tt>dd</tt>) or the end of the string.
77
71
  #
78
72
  # @example
79
- # > widont('A very simple test')
80
- # # => 'A very simple&nbsp;test'
73
+ # widont('A very simple test')
74
+ # # => 'A very simple&nbsp;test'
81
75
  #
82
76
  # @example Single word items shouldn't be changed
83
- # widont('Test')
84
- # # => 'Test'
85
- # widont(' Test')
86
- # # => ' Test'
87
- # widont('<ul><li>Test</p></li><ul>')
88
- # # => '<ul><li>Test</p></li><ul>'
89
- # widont('<ul><li> Test</p></li><ul>')
90
- # # => '<ul><li> Test</p></li><ul>'
77
+ # widont('Test')
78
+ # # => 'Test'
79
+ # widont(' Test')
80
+ # # => ' Test'
81
+ # widont('<ul><li>Test</p></li><ul>')
82
+ # # => '<ul><li>Test</p></li><ul>'
83
+ # widont('<ul><li> Test</p></li><ul>')
84
+ # # => '<ul><li> Test</p></li><ul>'
91
85
  #
92
86
  # @example Nested tags
93
- # widont('<p>In a couple of paragraphs</p><p>paragraph two</p>')
94
- # # => '<p>In a couple of&nbsp;paragraphs</p><p>paragraph&nbsp;two</p>'
95
- # widont('<h1><a href="#">In a link inside a heading</i> </a></h1>')
96
- # # => '<h1><a href="#">In a link inside a&nbsp;heading</i> </a></h1>'
97
- # widont('<h1><a href="#">In a link</a> followed by other text</h1>')
98
- # # => '<h1><a href="#">In a link</a> followed by other&nbsp;text</h1>'
87
+ # widont('<p>In a couple of paragraphs</p><p>paragraph two</p>')
88
+ # # => '<p>In a couple of&nbsp;paragraphs</p><p>paragraph&nbsp;two</p>'
89
+ # widont('<h1><a href="#">In a link inside a heading</i> </a></h1>')
90
+ # # => '<h1><a href="#">In a link inside a&nbsp;heading</i> </a></h1>'
91
+ # widont('<h1><a href="#">In a link</a> followed by other text</h1>')
92
+ # # => '<h1><a href="#">In a link</a> followed by other&nbsp;text</h1>'
99
93
  #
100
94
  # @example Empty HTMLs shouldn't error
101
- # widont('<h1><a href="#"></a></h1>')
102
- # # => '<h1><a href="#"></a></h1>'
95
+ # widont('<h1><a href="#"></a></h1>')
96
+ # # => '<h1><a href="#"></a></h1>'
103
97
  #
104
98
  # @example Excluded tags
105
- # widont('<div>Divs get no love!</div>')
106
- # # => '<div>Divs get no love!</div>'
107
- # widont('<pre>Neither do PREs</pre>')
108
- # # => '<pre>Neither do PREs</pre>'
109
- # widont('<div><p>But divs with paragraphs do!</p></div>')
110
- # # => '<div><p>But divs with paragraphs&nbsp;do!</p></div>'
99
+ # widont('<div>Divs get no love!</div>')
100
+ # # => '<div>Divs get no love!</div>'
101
+ # widont('<pre>Neither do PREs</pre>')
102
+ # # => '<pre>Neither do PREs</pre>'
103
+ # widont('<div><p>But divs with paragraphs do!</p></div>')
104
+ # # => '<div><p>But divs with paragraphs&nbsp;do!</p></div>'
111
105
  #
112
106
  # @see http://mucur.name/posts/widon-t-and-smartypants-helpers-for-rails
113
107
  # @see http://shauninman.com/archive/2006/08/22/widont_wordpress_plugin
@@ -130,22 +124,22 @@ module Typogruby
130
124
  # in a span with a styled class.
131
125
  #
132
126
  # @example
133
- # caps("A message from KU")
134
- # # => 'A message from <span class="caps">KU</span>'
127
+ # caps("A message from KU")
128
+ # # => 'A message from <span class="caps">KU</span>'
135
129
  #
136
130
  # @example Allows digits
137
- # caps("A message from 2KU2 with digits")
138
- # # => 'A message from <span class="caps">2KU2</span> with digits'
131
+ # caps("A message from 2KU2 with digits")
132
+ # # => 'A message from <span class="caps">2KU2</span> with digits'
139
133
  #
140
134
  # @example Ignores HTML attributes
141
- # caps('Download <a href="file.doc" title="PDF document">this file</a>')
142
- # # => 'Download <a href="file.doc" title="PDF document">this file</a>'
135
+ # caps('Download <a href="file.doc" title="PDF document">this file</a>')
136
+ # # => 'Download <a href="file.doc" title="PDF document">this file</a>'
143
137
  #
144
138
  # @example All caps with with apostrophes in them shouldn't break. Only handles dump apostrophes though.
145
- # caps("JIMMY'S")
146
- # # => '<span class="caps">JIMMY\\'S</span>'
147
- # caps("<i>D.O.T.</i>HE34T<b>RFID</b>")
148
- # # => '<i><span class="caps">D.O.T.</span></i><span class="caps">HE34T</span><b><span class="caps">RFID</span></b>'
139
+ # caps("JIMMY'S")
140
+ # # => '<span class="caps">JIMMY\\'S</span>'
141
+ # caps("<i>D.O.T.</i>HE34T<b>RFID</b>")
142
+ # # => '<i><span class="caps">D.O.T.</span></i><span class="caps">HE34T</span><b><span class="caps">RFID</span></b>'
149
143
  #
150
144
  # @param [String] text input text
151
145
  # @return [String] input text with caps wrapped
@@ -179,18 +173,18 @@ module Typogruby
179
173
  # with a span that can be styled.
180
174
  #
181
175
  # @example
182
- # initial_quotes('"With primes"')
183
- # # => '<span class="dquo">"</span>With primes"'
184
- # initial_quotes("'With single primes'")
185
- # # => '<span class="quo">\\'</span>With single primes\\''
176
+ # initial_quotes('"With primes"')
177
+ # # => '<span class="dquo">"</span>With primes"'
178
+ # initial_quotes("'With single primes'")
179
+ # # => '<span class="quo">\\'</span>With single primes\\''
186
180
  #
187
181
  # @example With primes and links
188
- # initial_quotes('<a href="#">"With primes and a link"</a>')
189
- # # => '<a href="#"><span class="dquo">"</span>With primes and a link"</a>'
182
+ # initial_quotes('<a href="#">"With primes and a link"</a>')
183
+ # # => '<a href="#"><span class="dquo">"</span>With primes and a link"</a>'
190
184
  #
191
185
  # @example with Smartypants-quotes
192
- # initial_quotes('&#8220;With smartypanted quotes&#8221;')
193
- # # => '<span class="dquo">&#8220;</span>With smartypanted quotes&#8221;'
186
+ # initial_quotes('&#8220;With smartypanted quotes&#8221;')
187
+ # # => '<span class="dquo">&#8220;</span>With smartypanted quotes&#8221;'
194
188
  #
195
189
  # @param [String] text input text
196
190
  # @return [String] input text with initial quotes wrapped
@@ -204,7 +198,7 @@ module Typogruby
204
198
  # Converts special characters (excluding HTML tags) to HTML entities.
205
199
  #
206
200
  # @example
207
- # entities("Aloë Vera") # => "Alo&euml; Vera"
201
+ # entities("Aloë Vera") # => "Alo&euml; Vera"
208
202
  #
209
203
  # @param [String] text input text
210
204
  # @return [String] input text with all special characters converted to
@@ -230,6 +224,7 @@ module Typogruby
230
224
  end
231
225
 
232
226
  # main function to do all the functions from the method.
227
+ #
233
228
  # @param [String] text input text
234
229
  # @return [String] input text with all filters applied
235
230
  def improve(text)
@@ -240,6 +235,7 @@ private
240
235
 
241
236
  # Convert characters from the map in ./lib/characters.txt
242
237
  # Code taken from TextMate HTML bundle
238
+ #
243
239
  # @param [String] text input text
244
240
  # @return [String] input text with all special characters converted to
245
241
  # HTML entities.
@@ -265,6 +261,11 @@ private
265
261
  # method. This will preprocess the text and replace any inline scripts
266
262
  # with a MD5 hash of its entire contents. Then the filter is called,
267
263
  # and then the hashes are replaced back with their original content.
264
+ #
265
+ # @yield [hashed_text] Hands you the input text with all script tags
266
+ # hashed. The block's result will be unhashed and then returned.
267
+ # @param [String] text
268
+ # @return [String] input with script tags restored
268
269
  def ignore_scripts(text)
269
270
  @ignored_scripts = {}
270
271
  modified_text = text.gsub(/<script[^>]*>.*?<\/script>/mi) do |script|
@@ -0,0 +1,3 @@
1
+ module Typogruby
2
+ VERSION = '1.0.10'
3
+ end
@@ -1,79 +1,40 @@
1
- # Generated by jeweler
2
- # DO NOT EDIT THIS FILE DIRECTLY
3
- # Instead, edit Jeweler::Tasks in Rakefile, and run the gemspec command
4
1
  # -*- encoding: utf-8 -*-
5
2
 
6
- Gem::Specification.new do |s|
7
- s.name = %q{typogruby}
8
- s.version = "1.0.9"
3
+ require 'lib/version'
9
4
 
10
- s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
- s.authors = ["Arjan van der Gaag"]
12
- s.date = %q{2011-02-14}
13
- s.default_executable = %q{typogruby}
5
+ Gem::Specification.new do |s|
6
+ # Metadata
7
+ s.name = 'typogruby'
8
+ s.version = Typogruby::VERSION
9
+ s.platform = Gem::Platform::RUBY
10
+ s.authors = ['Arjan van der Gaag']
11
+ s.email = %q{arjan@arjanvandergaag.nl}
14
12
  s.description = %q{Improve web typography using various text filters. This gem prevents widows and applies markup to ampersans, consecutive capitals and initial quotes.}
15
- s.email = %q{arjan@arjanvandergaag.nl}
16
- s.executables = ["typogruby"]
17
- s.extra_rdoc_files = [
18
- "LICENSE",
19
- "README.md"
20
- ]
21
- s.files = [
22
- ".document",
23
- ".gitignore",
24
- "Gemfile",
25
- "Gemfile.lock",
26
- "HISTORY.md",
27
- "LICENSE",
28
- "README.md",
29
- "Rakefile",
30
- "VERSION",
31
- "bin/typogruby",
32
- "features/ignoring.feature",
33
- "features/inputs.feature",
34
- "features/selective_filtering.feature",
35
- "features/simple.feature",
36
- "features/support/env.rb",
37
- "lib/characters.txt",
38
- "lib/typogruby.rb",
39
- "test/test_typogruby.rb",
40
- "typogrify.gemspec",
41
- "typogruby.gemspec"
42
- ]
43
- s.homepage = %q{http://avdgaag.github.com/typogruby}
44
- s.rdoc_options = ["--charset=UTF-8"]
13
+ s.homepage = %q{http://avdgaag.github.com/typogruby}
14
+ s.summary = %q{Improves web typography like Django's Typogrify}
15
+
16
+ # Files
17
+ s.files = `git ls-files`.split("\n")
18
+ s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
19
+ s.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
45
20
  s.require_paths = ["lib"]
46
- s.rubygems_version = %q{1.5.0}
47
- s.summary = %q{Improves web typography like Django's Typogrify}
48
- s.test_files = [
49
- "test/test_typogruby.rb"
50
- ]
51
21
 
52
- if s.respond_to? :specification_version then
53
- s.specification_version = 3
22
+ # Rdoc
23
+ s.rdoc_options = ['--charset=UTF-8']
24
+ s.extra_rdoc_files = [
25
+ 'LICENSE',
26
+ 'README.md',
27
+ 'HISTORY.md'
28
+ ]
54
29
 
55
- if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
56
- s.add_runtime_dependency(%q<rubypants>, [">= 0"])
57
- s.add_development_dependency(%q<yard>, [">= 0"])
58
- s.add_development_dependency(%q<jeweler>, [">= 0"])
59
- s.add_development_dependency(%q<rake>, [">= 0"])
60
- s.add_development_dependency(%q<aruba>, [">= 0"])
61
- s.add_development_dependency(%q<cucumber>, [">= 0"])
62
- else
63
- s.add_dependency(%q<rubypants>, [">= 0"])
64
- s.add_dependency(%q<yard>, [">= 0"])
65
- s.add_dependency(%q<jeweler>, [">= 0"])
66
- s.add_dependency(%q<rake>, [">= 0"])
67
- s.add_dependency(%q<aruba>, [">= 0"])
68
- s.add_dependency(%q<cucumber>, [">= 0"])
69
- end
70
- else
71
- s.add_dependency(%q<rubypants>, [">= 0"])
72
- s.add_dependency(%q<yard>, [">= 0"])
73
- s.add_dependency(%q<jeweler>, [">= 0"])
74
- s.add_dependency(%q<rake>, [">= 0"])
75
- s.add_dependency(%q<aruba>, [">= 0"])
76
- s.add_dependency(%q<cucumber>, [">= 0"])
77
- end
30
+ # Dependencies
31
+ s.add_runtime_dependency('rubypants', ['>= 0'])
32
+ s.add_development_dependency('yard', ['>= 0'])
33
+ s.add_development_dependency('rake', ['>= 0'])
34
+ s.add_development_dependency('aruba', ['>= 0'])
35
+ s.add_development_dependency('cucumber', ['>= 0'])
36
+ s.add_development_dependency('rcov', ['>= 0'])
37
+ s.add_development_dependency('rspec', ['>= 0'])
38
+ s.add_development_dependency('bluecloth', ['>= 0'])
78
39
  end
79
40
 
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: typogruby
3
3
  version: !ruby/object:Gem::Version
4
- hash: 5
4
+ hash: 3
5
5
  prerelease:
6
6
  segments:
7
7
  - 1
8
8
  - 0
9
- - 9
10
- version: 1.0.9
9
+ - 10
10
+ version: 1.0.10
11
11
  platform: ruby
12
12
  authors:
13
13
  - Arjan van der Gaag
@@ -15,11 +15,12 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2011-02-14 00:00:00 +01:00
19
- default_executable: typogruby
18
+ date: 2011-02-15 00:00:00 +01:00
19
+ default_executable:
20
20
  dependencies:
21
21
  - !ruby/object:Gem::Dependency
22
- type: :runtime
22
+ name: rubypants
23
+ prerelease: false
23
24
  requirement: &id001 !ruby/object:Gem::Requirement
24
25
  none: false
25
26
  requirements:
@@ -29,11 +30,11 @@ dependencies:
29
30
  segments:
30
31
  - 0
31
32
  version: "0"
32
- name: rubypants
33
+ type: :runtime
33
34
  version_requirements: *id001
34
- prerelease: false
35
35
  - !ruby/object:Gem::Dependency
36
- type: :development
36
+ name: yard
37
+ prerelease: false
37
38
  requirement: &id002 !ruby/object:Gem::Requirement
38
39
  none: false
39
40
  requirements:
@@ -43,11 +44,11 @@ dependencies:
43
44
  segments:
44
45
  - 0
45
46
  version: "0"
46
- name: yard
47
+ type: :development
47
48
  version_requirements: *id002
48
- prerelease: false
49
49
  - !ruby/object:Gem::Dependency
50
- type: :development
50
+ name: rake
51
+ prerelease: false
51
52
  requirement: &id003 !ruby/object:Gem::Requirement
52
53
  none: false
53
54
  requirements:
@@ -57,11 +58,11 @@ dependencies:
57
58
  segments:
58
59
  - 0
59
60
  version: "0"
60
- name: jeweler
61
+ type: :development
61
62
  version_requirements: *id003
62
- prerelease: false
63
63
  - !ruby/object:Gem::Dependency
64
- type: :development
64
+ name: aruba
65
+ prerelease: false
65
66
  requirement: &id004 !ruby/object:Gem::Requirement
66
67
  none: false
67
68
  requirements:
@@ -71,11 +72,11 @@ dependencies:
71
72
  segments:
72
73
  - 0
73
74
  version: "0"
74
- name: rake
75
+ type: :development
75
76
  version_requirements: *id004
76
- prerelease: false
77
77
  - !ruby/object:Gem::Dependency
78
- type: :development
78
+ name: cucumber
79
+ prerelease: false
79
80
  requirement: &id005 !ruby/object:Gem::Requirement
80
81
  none: false
81
82
  requirements:
@@ -85,11 +86,11 @@ dependencies:
85
86
  segments:
86
87
  - 0
87
88
  version: "0"
88
- name: aruba
89
+ type: :development
89
90
  version_requirements: *id005
90
- prerelease: false
91
91
  - !ruby/object:Gem::Dependency
92
- type: :development
92
+ name: rcov
93
+ prerelease: false
93
94
  requirement: &id006 !ruby/object:Gem::Requirement
94
95
  none: false
95
96
  requirements:
@@ -99,9 +100,36 @@ dependencies:
99
100
  segments:
100
101
  - 0
101
102
  version: "0"
102
- name: cucumber
103
+ type: :development
103
104
  version_requirements: *id006
105
+ - !ruby/object:Gem::Dependency
106
+ name: rspec
107
+ prerelease: false
108
+ requirement: &id007 !ruby/object:Gem::Requirement
109
+ none: false
110
+ requirements:
111
+ - - ">="
112
+ - !ruby/object:Gem::Version
113
+ hash: 3
114
+ segments:
115
+ - 0
116
+ version: "0"
117
+ type: :development
118
+ version_requirements: *id007
119
+ - !ruby/object:Gem::Dependency
120
+ name: bluecloth
104
121
  prerelease: false
122
+ requirement: &id008 !ruby/object:Gem::Requirement
123
+ none: false
124
+ requirements:
125
+ - - ">="
126
+ - !ruby/object:Gem::Version
127
+ hash: 3
128
+ segments:
129
+ - 0
130
+ version: "0"
131
+ type: :development
132
+ version_requirements: *id008
105
133
  description: Improve web typography using various text filters. This gem prevents widows and applies markup to ampersans, consecutive capitals and initial quotes.
106
134
  email: arjan@arjanvandergaag.nl
107
135
  executables:
@@ -111,6 +139,7 @@ extensions: []
111
139
  extra_rdoc_files:
112
140
  - LICENSE
113
141
  - README.md
142
+ - HISTORY.md
114
143
  files:
115
144
  - .document
116
145
  - .gitignore
@@ -120,7 +149,6 @@ files:
120
149
  - LICENSE
121
150
  - README.md
122
151
  - Rakefile
123
- - VERSION
124
152
  - bin/typogruby
125
153
  - features/ignoring.feature
126
154
  - features/inputs.feature
@@ -129,8 +157,8 @@ files:
129
157
  - features/support/env.rb
130
158
  - lib/characters.txt
131
159
  - lib/typogruby.rb
160
+ - lib/version.rb
132
161
  - test/test_typogruby.rb
133
- - typogrify.gemspec
134
162
  - typogruby.gemspec
135
163
  has_rdoc: true
136
164
  homepage: http://avdgaag.github.com/typogruby
@@ -167,4 +195,9 @@ signing_key:
167
195
  specification_version: 3
168
196
  summary: Improves web typography like Django's Typogrify
169
197
  test_files:
198
+ - features/ignoring.feature
199
+ - features/inputs.feature
200
+ - features/selective_filtering.feature
201
+ - features/simple.feature
202
+ - features/support/env.rb
170
203
  - test/test_typogruby.rb
data/VERSION DELETED
@@ -1 +0,0 @@
1
- 1.0.9
@@ -1,56 +0,0 @@
1
- # Generated by jeweler
2
- # DO NOT EDIT THIS FILE DIRECTLY
3
- # Instead, edit Jeweler::Tasks in Rakefile, and run the gemspec command
4
- # -*- encoding: utf-8 -*-
5
-
6
- Gem::Specification.new do |s|
7
- s.name = %q{typogrify}
8
- s.version = "1.0.0"
9
-
10
- s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
- s.authors = ["Arjan van der Gaag"]
12
- s.date = %q{2010-07-26}
13
- s.description = %q{Improve web typography using various text filters. This gem prevents widows and applies markup to ampersans, consecutive capitals and initial quotes.}
14
- s.email = %q{arjan@arjanvandergaag.nl}
15
- s.extra_rdoc_files = [
16
- "LICENSE",
17
- "README.md"
18
- ]
19
- s.files = [
20
- ".document",
21
- ".gitignore",
22
- "LICENSE",
23
- "README.md",
24
- "Rakefile",
25
- "VERSION",
26
- "lib/typogrify.rb",
27
- "test/helper.rb",
28
- "test/test_typogrify.rb"
29
- ]
30
- s.homepage = %q{http://avdgaag.github.com/typogrify}
31
- s.rdoc_options = ["--charset=UTF-8"]
32
- s.require_paths = ["lib"]
33
- s.rubygems_version = %q{1.3.7}
34
- s.summary = %q{Improves web typography like Django's Typogrify}
35
- s.test_files = [
36
- "test/helper.rb",
37
- "test/test_typogrify.rb"
38
- ]
39
-
40
- if s.respond_to? :specification_version then
41
- current_version = Gem::Specification::CURRENT_SPECIFICATION_VERSION
42
- s.specification_version = 3
43
-
44
- if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
45
- s.add_development_dependency(%q<yard>, [">= 0"])
46
- s.add_runtime_dependency(%q<rubypants>, [">= 0"])
47
- else
48
- s.add_dependency(%q<yard>, [">= 0"])
49
- s.add_dependency(%q<rubypants>, [">= 0"])
50
- end
51
- else
52
- s.add_dependency(%q<yard>, [">= 0"])
53
- s.add_dependency(%q<rubypants>, [">= 0"])
54
- end
55
- end
56
-