typographer 0.3.2

Sign up to get free protection for your applications and to get access to all the features.
data/Changelog ADDED
@@ -0,0 +1,6 @@
1
+ ==v.0.0.1
2
+
3
+ Replace quotes
4
+ Replace dash between words to —
5
+ Add non-brace space after small words
6
+ Insert <span class="nobr"></span> around small words separated by dash
data/Gemfile ADDED
@@ -0,0 +1,2 @@
1
+ source :rubygems
2
+ gemspec
data/README.rdoc ADDED
@@ -0,0 +1,31 @@
1
+ ==Typographer
2
+
3
+ Simple plugin to make text more readable by applying some typographic rules to string. It is intended to use for russian texts, but some english typography rules are also supported.
4
+
5
+ ==Example
6
+
7
+ You can use <tt>ty</tt> helper in your views:
8
+
9
+ ty 'This is a page title'
10
+ # => 'This is&nbsp;a&nbsp;page title'
11
+
12
+ You can define custom formats for typography rules:
13
+
14
+ TypographerHelper.register(:article, [TypographerHelper::Parsers::SimpleFormat, TypographerHelper::Parsers::Basic])
15
+
16
+ And use it:
17
+
18
+ ty 'This is article text with custom typography', :article
19
+
20
+ Plugin also replaces h and simple_format helpers to apply typography to their results.
21
+
22
+ ==Installation
23
+
24
+ In your <tt>Gemfile</tt> add
25
+
26
+ gem 'typographer'
27
+
28
+ and run <tt>bundle install</tt>.
29
+
30
+ Copyright (c) 2008 Igor Gladkoborodov, released under the MIT license
31
+ Modified by Antony Versal
data/Rakefile ADDED
@@ -0,0 +1,6 @@
1
+ require "rspec/core/rake_task"
2
+
3
+ desc "Test typography plugin."
4
+ RSpec::Core::RakeTask.new(:spec)
5
+
6
+ task :default => :spec
data/init.rb ADDED
@@ -0,0 +1,5 @@
1
+ # encoding: utf-8
2
+ require 'typographer'
3
+
4
+ ActionView::Base.send :include, TypographerHelper
5
+
@@ -0,0 +1,8 @@
1
+ # encoding: utf-8
2
+ require 'action_view'
3
+
4
+ module ActionView::Helpers::TextHelper
5
+ def ty(text, type = :default)
6
+ TypographerHelper.parse text.to_s, type
7
+ end
8
+ end
@@ -0,0 +1,101 @@
1
+ # encoding: utf-8
2
+ module TypographerHelper
3
+ module Parsers
4
+ class Basic
5
+ def initialize(options = {})
6
+ @options = options.merge({})
7
+ end
8
+
9
+ def parse(string)
10
+ #apostrophe
11
+ # Here comes 1.9 compatibility.
12
+ # My eyes bleed !!
13
+
14
+ string= string.gsub(/“/,'&#132;')
15
+ string.gsub!(/”/,'&#147;')
16
+
17
+ if Regexp.instance_methods.include?(:encoding)
18
+ string.gsub!(/(\p{Word})'(\p{Word})/, '\1&#146;\2')
19
+
20
+ #russian quotes
21
+ string = replace_quotes string, '&laquo;', '&raquo;', '&#132;', '&#147;', 'а-яА-Я'
22
+
23
+ #english quotes
24
+ string = replace_quotes string
25
+
26
+ #mdash
27
+ string.gsub!(/--/, '&mdash;')
28
+ string.gsub!(/(\p{Word}|;|,)\s+(—|–|-)\s*(\p{Word})/, '\1&nbsp;&mdash; \3')
29
+ string.gsub!(/\s+&mdash;/, '&nbsp;&mdash;')
30
+
31
+ #nobr
32
+ #around dash-separated words (что-то)
33
+ string.gsub!(/(^|\s)((\p{Word}|0-9){1,3})-((\p{Word}|0-9){1,3})($|\s)/, '\1<span class="nobr">\2-\4</span>\6')
34
+ #1980-x почему-то
35
+ string.gsub!(/(^|\s)((\p{Word}|0-9)+)-((\p{Word}|0-9){1,3})($|\s)/, '\1<span class="nobr">\2-\4</span>\6')
36
+
37
+ #non brake space
38
+ string.gsub!(/(^|\s|\()(\p{Word}{1,2})\s+([^\s])/i, '\1\2&nbsp;\3')
39
+ string.gsub!(/(^|\s|\()&([A-Za-z0-9]{2,8}|#[\d]*);(\p{Word}{1,2})\s+([^\s])/i, '\1&\2;\3&nbsp;\4') #entities
40
+ string.gsub!(/(&nbsp;|&#161;)(\p{Word}{1,2})\s+([^\s])/i, '\1\2&nbsp;\3\4')
41
+ else
42
+ string.gsub!(/(\w)'(\w)/, '\1&#146;\2')
43
+
44
+ #russian quotes
45
+ string = replace_quotes string, '&laquo;', '&raquo;', '&#132;', '&#147;', 'а-яА-Я'
46
+
47
+ #english quotes
48
+ string = replace_quotes string
49
+
50
+ #mdash
51
+ string.gsub!(/--/, '&mdash;')
52
+ string.gsub!(/(\w|;|,)\s+(—|–|-)\s*(\w)/, '\1&nbsp;&mdash; \3')
53
+ string.gsub!(/\s+&mdash;/, '&nbsp;&mdash;')
54
+
55
+ #nobr
56
+ #around dash-separated words (что-то)
57
+ string.gsub!(/(^|\s)((\w|0-9){1,3})-((\w|0-9){1,3})($|\s)/, '\1<span class="nobr">\2-\4</span>\6')
58
+ #1980-x почему-то
59
+ string.gsub!(/(^|\s)((\w|0-9)+)-((\w|0-9){1,3})($|\s)/, '\1<span class="nobr">\2-\4</span>\6')
60
+
61
+ #non brake space
62
+ string.gsub!(/(^|\s|\()(\w{1,2})\s+([^\s])/i, '\1\2&nbsp;\3')
63
+ string.gsub!(/(^|\s|\()&([A-Za-z0-9]{2,8}|#[\d]*);(\w{1,2})\s+([^\s])/i, '\1&\2;\3&nbsp;\4') #entities
64
+ string.gsub!(/(&nbsp;|&#161;)(\w{1,2})\s+([^\s])/i, '\1\2&nbsp;\3\4')
65
+ end
66
+
67
+ string
68
+ end
69
+
70
+ def replace_quotes(string, left1 = '&#147;', right1 = '&#148;', left2 = '&#145;', right2 = '&#146;', letters = 'a-zA-Z')
71
+ str = string.dup
72
+
73
+ replace_quotes = lambda do
74
+ old_str = str.dup
75
+ str.gsub!(Regexp.new("(\"|\'|&quot;)((\s*<[^>]+>\s*)?[#{letters}]((<[^>]+>)|.)*?[^\\s])\\1", Regexp::MULTILINE | Regexp::IGNORECASE)) do |match|
76
+ inside, before, after = $2, $`, $'
77
+ if after.match(/^([^<]+>|>)/) || before.match(/<[^>]+$/) #inside tag
78
+ match
79
+ else
80
+ "#{left1}#{inside}#{right1}"
81
+ end
82
+ end
83
+ old_str != str
84
+ end
85
+ while replace_quotes.call do end
86
+
87
+ # second level
88
+ str.gsub!('&', "\0&")
89
+ replace_second_level_quotes = lambda do
90
+ str.gsub! Regexp.new("#{left1}([^\0`]*)\0#{left1}([^\0]*)\0#{right1}", Regexp::MULTILINE | Regexp::IGNORECASE) do
91
+ "#{left1}#{$1}#{left2}#{$2}#{right2}"
92
+ end
93
+ end
94
+ while replace_second_level_quotes.call do end
95
+ str.gsub!("\0", '')
96
+
97
+ str
98
+ end
99
+ end
100
+ end
101
+ end
@@ -0,0 +1,19 @@
1
+ # encoding: utf-8
2
+ require 'action_view'
3
+
4
+ module TypographerHelper
5
+ module Parsers
6
+ class SimpleFormat
7
+ include ActionView::Helpers::TextHelper
8
+ include ActionView::Helpers::TagHelper
9
+
10
+ def initialize(options = {})
11
+ @options = options
12
+ end
13
+
14
+ def parse(string)
15
+ self.simple_format string, @options
16
+ end
17
+ end
18
+ end
19
+ end
@@ -0,0 +1,5 @@
1
+ # encoding: utf-8
2
+ module TypographerHelper
3
+ GEM_NAME = "typographer"
4
+ VERSION = "0.3.2"
5
+ end
@@ -0,0 +1,52 @@
1
+ # encoding: utf-8
2
+ require "typographer/helper"
3
+
4
+ module TypographerHelper
5
+ mattr_reader :registry
6
+
7
+ def self.register(name, elements)
8
+ @@registry ||= {}
9
+ @@registry[name.to_sym] = get_parsers elements
10
+ end
11
+
12
+ def self.parse(string, type = :default)
13
+ @@registry[type].each do |parser|
14
+ string = parser.parse string
15
+ end
16
+
17
+ string
18
+ end
19
+
20
+ module Parsers
21
+ end
22
+
23
+ private
24
+ #It can get as parameter:
25
+ # => Class
26
+ # => Symbol
27
+ # => Object
28
+ def self.get_parsers(elements)
29
+ result = []
30
+
31
+ elements.each do |element|
32
+ if (element.is_a? Class)
33
+ element = element.new
34
+ elsif (element.is_a? String)
35
+ cls = TypographerHelper::Parsers.name + '::' + element.to_s.split("::").last
36
+ #Fails here of class doesn`t exist
37
+ cls = cls.constantize
38
+ element = cls.new
39
+ end
40
+
41
+ result.push element
42
+ end
43
+
44
+ result
45
+ end
46
+ end
47
+
48
+ require "typographer/parsers/basic"
49
+ require "typographer/parsers/simple_format"
50
+
51
+ TypographerHelper.register(:default, [TypographerHelper::Parsers::Basic])
52
+
@@ -0,0 +1,5 @@
1
+ # encoding: utf-8
2
+ $KCODE = 'u'
3
+ require 'rubygems'
4
+ require 'bundler'
5
+ Bundler.require(:default, :development)
@@ -0,0 +1,182 @@
1
+ # encoding: utf-8
2
+ require 'spec_helper'
3
+
4
+ describe TypographerHelper, 'with typographer' do
5
+ include ActionView::Helpers::TextHelper
6
+ include ActionView::Helpers::TagHelper
7
+
8
+ it "should have t helper" do
9
+ ty('typographer me please').should == 'typographer me&nbsp;please'
10
+ end
11
+
12
+ it "should typographer output of h helper" do
13
+ h('Typographer & &amp;').should == 'Typographer &amp; &amp;amp;'
14
+ end
15
+
16
+ it "should work with custom-added formats" do
17
+ TypographerHelper.register(:simple, [TypographerHelper::Parsers::SimpleFormat, TypographerHelper::Parsers::Basic])
18
+ ty("I'm first\n\nAnd I&nbsp;am&nbsp;second", :simple).should == "<p>I&#146;m first</p>\n\n<p>And I&nbsp;am&nbsp;second</p>"
19
+ end
20
+
21
+ it "should return '<p></p>' (simple_format of empty string) on simple_format(nil)" do
22
+ simple_format(nil).should == "<p></p>"
23
+ end
24
+
25
+ it "should make russian quotes for quotes with first russian letter" do
26
+ ty('"текст"').should == '&laquo;текст&raquo;'
27
+ ty('Text "текст" text').should == 'Text &laquo;текст&raquo; text'
28
+ ty('Text "текст" text "Другой текст" ').should == 'Text &laquo;текст&raquo; text &laquo;Другой текст&raquo; '
29
+ end
30
+
31
+ it "should make russian quotes for quotes with first russian letter, beginning with html tag" do
32
+ ty('"<a href="#link">те</a>кст"').should == '&laquo;<a href="#link">те</a>кст&raquo;'
33
+ ty('Text "<b>те</b>кст" text').should == 'Text &laquo;<b>те</b>кст&raquo; text'
34
+ end
35
+
36
+ it "should make russian quotes for quotes with html tag" do
37
+ ty('Текст "Начало текста <a href="#link">те</a>кст"').should == 'Текст &laquo;Начало текста <a href="#link">те</a>кст&raquo;'
38
+ end
39
+
40
+ it "should do the same with single quotes" do
41
+ ty('\'текст\'').should == '&laquo;текст&raquo;'
42
+ ty('Text \'текст\' text').should == 'Text &laquo;текст&raquo; text'
43
+ ty('Text \'текст\' text \'Другой текст\' ').should == 'Text &laquo;текст&raquo; text &laquo;Другой текст&raquo; '
44
+ end
45
+
46
+ it "should create second-level russian quotes" do
47
+ ty('Текст "в кавычках "второго уровня""').should == 'Текст &laquo;в&nbsp;кавычках &#132;второго уровня&#147;&raquo;'
48
+ end
49
+
50
+ it "should make english quotes for quotes with first non-russian letter" do
51
+ ty('"text"').should == '&#147;text&#148;'
52
+ ty('Text "text" text').should == 'Text &#147;text&#148; text'
53
+ ty('Text "text" text "Another text" ').should == 'Text &#147;text&#148; text &#147;Another text&#148; '
54
+ end
55
+
56
+ it "should do the same with single quotes" do
57
+ ty('\'text\'').should == '&#147;text&#148;'
58
+ ty('Text \'text\' text').should == 'Text &#147;text&#148; text'
59
+ ty('Text \'text\' text \'Another text\' ').should == 'Text &#147;text&#148; text &#147;Another text&#148; '
60
+ end
61
+
62
+ it "should create second-level english quotes" do
63
+ ty('Text "in quotes "second level""').should == 'Text &#147;in&nbsp;quotes &#145;second level&#146;&#148;'
64
+ end
65
+
66
+
67
+ it "should not replace quotes inside html tags" do
68
+ ty('<a href="ссылка">ссылка</a>').should == '<a href="ссылка">ссылка</a>'
69
+ ty('<a href=\'ссылка\'>"ссылка"</a>').should == '<a href=\'ссылка\'>&laquo;ссылка&raquo;</a>'
70
+
71
+ ty('<a href=\'link\'>link</a>').should == '<a href=\'link\'>link</a>'
72
+ ty('<a href="link">"link"</a>').should == '<a href="link">&#147;link&#148;</a>'
73
+
74
+ ty(' one">One</a> <a href="two"></a> <a href="three" ').should == ' one">One</a> <a href="two"></a> <a href="three" '
75
+ end
76
+
77
+ it "should make english and russian quotes in the same string" do
78
+ ty('"Кавычки" and "Quotes"').should == '&laquo;Кавычки&raquo; and &#147;Quotes&#148;'
79
+ ty('"Quotes" и "Кавычки"').should == '&#147;Quotes&#148; и&nbsp;&laquo;Кавычки&raquo;'
80
+
81
+ ty('"Кавычки "второго уровня"" and "Quotes "second level""').should == '&laquo;Кавычки &#132;второго уровня&#147;&raquo; and &#147;Quotes &#145;second level&#146;&#148;'
82
+ ty('"Quotes "second level"" и "Кавычки "второго уровня""').should == '&#147;Quotes &#145;second level&#146;&#148; и&nbsp;&laquo;Кавычки &#132;второго уровня&#147;&raquo;'
83
+ end
84
+
85
+ it "should make (“”) quotes in the same string" do
86
+ ty('“Кавычки” and “Quotes”').should == '&#132;Кавычки&#147; and &#132;Quotes&#147;'
87
+ end
88
+
89
+ it "should replace -- to &mdash;" do
90
+ ty('Replace -- to mdash please').should == 'Replace&nbsp;&mdash; to&nbsp;mdash please'
91
+ end
92
+
93
+ it "should replace \"word - word\" to \"word&nbsp;&mdash; word\"" do
94
+ ty('word - word').should == 'word&nbsp;&mdash; word'
95
+ end
96
+
97
+ it "should insert &nbsp; before each &mdash; if it has empty space before" do
98
+ ty('Before &mdash; after').should == 'Before&nbsp;&mdash; after'
99
+ ty('Before &mdash; after').should == 'Before&nbsp;&mdash; after'
100
+ ty('Before&mdash;after').should == 'Before&mdash;after'
101
+ end
102
+
103
+
104
+ it "should insert &nbsp; after small words" do
105
+ ty('an apple').should == 'an&nbsp;apple'
106
+ end
107
+
108
+ it "should insert &nbsp; after small words" do
109
+ ty('I want to be a scientist').should == 'I&nbsp;want to&nbsp;be&nbsp;a&nbsp;scientist'
110
+ end
111
+
112
+ it "should insert &nbsp; after small words with ( or dash before it" do
113
+ ty('Apple (an orange)').should == 'Apple (an&nbsp;orange)'
114
+ end
115
+
116
+ it "should not insert &nbsp; after small words if it has not space after" do
117
+ ty('Хорошо бы.').should == 'Хорошо бы.'
118
+ ty('Хорошо бы').should == 'Хорошо бы'
119
+ ty('Хорошо бы. Иногда').should == 'Хорошо бы. Иногда'
120
+ end
121
+
122
+ it "should insert <span class=\"nobr\"></span> around small words separated by dash" do
123
+ ty('Мне фигово что-то').should == 'Мне фигово <span class="nobr">что-то</span>'
124
+ ty('Как-то мне плохо').should == '<span class="nobr">Как-то</span> мне плохо'
125
+ ty('хуе-мое').should == '<span class="nobr">хуе-мое</span>'
126
+ end
127
+
128
+ it "should not insert <span class=\"nobr\"></span> around words separated by dash if both of them are bigger than 3 letters" do
129
+ ty('мальчик-девочка').should == 'мальчик-девочка'
130
+ end
131
+
132
+ it "should replace single quote between letters to apostrophe" do
133
+ ty('I\'m here').should == 'I&#146;m here'
134
+ end
135
+
136
+
137
+ it "should typographer real world examples" do
138
+ ty('"Читаешь -- "Прокопьев любил солянку" -- и долго не можешь понять, почему солянка написана с маленькой буквы, ведь "Солянка" -- известный московский клуб."').should == '&laquo;Читаешь&nbsp;&mdash; &#132;Прокопьев любил солянку&#147;&nbsp;&mdash; и&nbsp;долго не&nbsp;можешь понять, почему солянка написана с&nbsp;маленькой буквы, ведь &#132;Солянка&#147;&nbsp;&mdash; известный московский клуб.&raquo;'
139
+ end
140
+
141
+ it "should typographer real world examples" do
142
+ ty('"Заебалоооооо" противостояние образует сет, в частности, "тюремные психозы", индуцируемые при различных психопатологических типологиях.').should == '&laquo;Заебалоооооо&raquo; противостояние образует сет, в&nbsp;частности, &laquo;тюремные психозы&raquo;, индуцируемые при различных психопатологических типологиях.'
143
+ end
144
+
145
+ it "should typographer real world examples" do
146
+ ty('"They are the most likely habitat that we\'re going to get to in the foreseeable future," said NASA Ames Research Center\'s Aaron Zent, the lead scientist for the probe being used to look for unfrozen water.').should == '&#147;They are the most likely habitat that we&#146;re going to&nbsp;get to&nbsp;in&nbsp;the foreseeable future,&#148; said NASA Ames Research Center&#146;s Aaron Zent, the lead scientist for the probe being used to&nbsp;look for unfrozen water.'
147
+ end
148
+
149
+ it "should typographer real wordl examples" do
150
+ ty('Фирменный стиль: от полиграфии к интернет-решениям (в рамках выставки «Дизайн и Реклама 2009»)').should == 'Фирменный стиль: от&nbsp;полиграфии к&nbsp;интернет-решениям (в&nbsp;рамках выставки «Дизайн и&nbsp;Реклама 2009»)'
151
+ end
152
+
153
+ it "should typographer real world examples" do
154
+ ty('решениям (в рамках выставки').should == 'решениям (в&nbsp;рамках выставки'
155
+ end
156
+
157
+ it "should typographer real world examples" do
158
+ ty('Реанимация живописи: «новые дикие» и «трансавангард» в ситуации арт-рынка 1980-х').should == 'Реанимация живописи: «новые дикие» и&nbsp;«трансавангард» в&nbsp;ситуации арт-рынка <span class="nobr">1980-х</span>'
159
+ end
160
+
161
+ it "should typographer real world examples" do
162
+ ty('«Искусство после философии&raquo; – концептуальные стратегии Джозефа Кошута и Харальда Зеемана').should == '«Искусство после философии&raquo;&nbsp;&mdash; концептуальные стратегии Джозефа Кошута и&nbsp;Харальда Зеемана'
163
+ end
164
+
165
+ it "should typographer real world examples" do
166
+ ty('Испанцы говорят, что целовать мужчину без усов, - всё равно что есть яйцо без соли').should == 'Испанцы говорят, что целовать мужчину без усов,&nbsp;&mdash; всё равно что есть яйцо без соли'
167
+ end
168
+
169
+ it "should typographer nested quotes properly" do
170
+ text = %{<p>&quot;Кто-то прибежал&quot; Кто-то прибежал Кто-то прибежал Кто-то прибежал Кто-то прибежал Кто-то прибежал Кто-то прибежал Кто-то прибежал Кто-то прибежал</p><p>&quot;Кто-то прибежал Кто-то прибежал&quot; &nbsp;Кто-то прибежал &laquo;Кто-то прибежал К&raquo;</p>}
171
+ expected_text = %{<p>&laquo;Кто-то прибежал&raquo; <span class=\"nobr\">Кто-то</span> прибежал <span class=\"nobr\">Кто-то</span> прибежал <span class=\"nobr\">Кто-то</span> прибежал <span class=\"nobr\">Кто-то</span> прибежал <span class=\"nobr\">Кто-то</span> прибежал <span class=\"nobr\">Кто-то</span> прибежал <span class=\"nobr\">Кто-то</span> прибежал <span class=\"nobr\">Кто-то</span> прибежал</p><p>&laquo;Кто-то прибежал <span class=\"nobr\">Кто-то</span> прибежал&raquo; &nbsp;Кто-то прибежал &laquo;Кто-то прибежал К&raquo;</p>}
172
+ ty(text).should == expected_text
173
+ end
174
+
175
+ it "should typographer nested quotes properly on real-world examples" do
176
+ text = %{<p>Об очередном ляпе &laquo;налоговой библии&raquo; пишет в своей статье для &laquo;ЗН в Украине&raquo; пишет кандидат юридических наук, доцент кандидат юридических наук, доцент Данил Гетманцев.</p><p>&laquo;Даже при последующем выполнении плательщиком требований налоговой службы его счета будут находиться под арестом&raquo;</p>}
177
+ expected_text = %{<p>Об очередном ляпе &laquo;налоговой библии&raquo; пишет в&nbsp;своей статье для &laquo;ЗН&nbsp;в&nbsp;Украине&raquo; пишет кандидат юридических наук, доцент кандидат юридических наук, доцент Данил Гетманцев.</p><p>&laquo;Даже при последующем выполнении плательщиком требований налоговой службы его счета будут находиться под арестом&raquo;</p>}
178
+ ty(text).should == expected_text
179
+ end
180
+
181
+ end
182
+
metadata ADDED
@@ -0,0 +1,116 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: typographer
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.3.2
5
+ prerelease:
6
+ platform: ruby
7
+ authors:
8
+ - Dmitry Shaposhnik
9
+ - Anton Versal
10
+ - Igor Gladkoborodov
11
+ - Pravosud Pavel
12
+ autorequire:
13
+ bindir: bin
14
+ cert_chain: []
15
+ date: 2011-07-18 00:00:00.000000000 +03:00
16
+ default_executable:
17
+ dependencies:
18
+ - !ruby/object:Gem::Dependency
19
+ name: actionpack
20
+ requirement: &77801750 !ruby/object:Gem::Requirement
21
+ none: false
22
+ requirements:
23
+ - - ! '>='
24
+ - !ruby/object:Gem::Version
25
+ version: '0'
26
+ type: :runtime
27
+ prerelease: false
28
+ version_requirements: *77801750
29
+ - !ruby/object:Gem::Dependency
30
+ name: rspec
31
+ requirement: &77801490 !ruby/object:Gem::Requirement
32
+ none: false
33
+ requirements:
34
+ - - ! '>='
35
+ - !ruby/object:Gem::Version
36
+ version: 2.0.0
37
+ type: :development
38
+ prerelease: false
39
+ version_requirements: *77801490
40
+ - !ruby/object:Gem::Dependency
41
+ name: autotest
42
+ requirement: &77801280 !ruby/object:Gem::Requirement
43
+ none: false
44
+ requirements:
45
+ - - ! '>='
46
+ - !ruby/object:Gem::Version
47
+ version: '0'
48
+ type: :development
49
+ prerelease: false
50
+ version_requirements: *77801280
51
+ - !ruby/object:Gem::Dependency
52
+ name: ruby-debug19
53
+ requirement: &77801030 !ruby/object:Gem::Requirement
54
+ none: false
55
+ requirements:
56
+ - - ! '>='
57
+ - !ruby/object:Gem::Version
58
+ version: '0'
59
+ type: :development
60
+ prerelease: false
61
+ version_requirements: *77801030
62
+ description: ! 'This gem makes text more readable by applying some typographic rules
63
+ to string.
64
+
65
+ This is a fork of original typography gem.'
66
+ email:
67
+ - dmitry@shaposhnik.name
68
+ - ant.ver@gmail.com
69
+ - igor@workisfun.ru
70
+ executables: []
71
+ extensions: []
72
+ extra_rdoc_files:
73
+ - README.rdoc
74
+ files:
75
+ - lib/typographer.rb
76
+ - lib/typographer/parsers/basic.rb
77
+ - lib/typographer/parsers/simple_format.rb
78
+ - lib/typographer/helper.rb
79
+ - lib/typographer/version.rb
80
+ - spec/spec_helper.rb
81
+ - spec/typography_spec.rb
82
+ - README.rdoc
83
+ - Rakefile
84
+ - Changelog
85
+ - Gemfile
86
+ - init.rb
87
+ has_rdoc: true
88
+ homepage: https://github.com/Slotos/typographer
89
+ licenses: []
90
+ post_install_message:
91
+ rdoc_options:
92
+ - --main
93
+ - README.rdoc
94
+ require_paths:
95
+ - lib
96
+ required_ruby_version: !ruby/object:Gem::Requirement
97
+ none: false
98
+ requirements:
99
+ - - ! '>='
100
+ - !ruby/object:Gem::Version
101
+ version: '0'
102
+ required_rubygems_version: !ruby/object:Gem::Requirement
103
+ none: false
104
+ requirements:
105
+ - - ! '>='
106
+ - !ruby/object:Gem::Version
107
+ version: '0'
108
+ requirements: []
109
+ rubyforge_project: ''
110
+ rubygems_version: 1.6.2
111
+ signing_key:
112
+ specification_version: 3
113
+ summary: typographer-0.3.2
114
+ test_files:
115
+ - spec/spec_helper.rb
116
+ - spec/typography_spec.rb