typographer 0.3.2
Sign up to get free protection for your applications and to get access to all the features.
- data/Changelog +6 -0
- data/Gemfile +2 -0
- data/README.rdoc +31 -0
- data/Rakefile +6 -0
- data/init.rb +5 -0
- data/lib/typographer/helper.rb +8 -0
- data/lib/typographer/parsers/basic.rb +101 -0
- data/lib/typographer/parsers/simple_format.rb +19 -0
- data/lib/typographer/version.rb +5 -0
- data/lib/typographer.rb +52 -0
- data/spec/spec_helper.rb +5 -0
- data/spec/typography_spec.rb +182 -0
- metadata +116 -0
data/Changelog
ADDED
data/Gemfile
ADDED
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 a 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
data/init.rb
ADDED
@@ -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(/“/,'„')
|
15
|
+
string.gsub!(/”/,'“')
|
16
|
+
|
17
|
+
if Regexp.instance_methods.include?(:encoding)
|
18
|
+
string.gsub!(/(\p{Word})'(\p{Word})/, '\1’\2')
|
19
|
+
|
20
|
+
#russian quotes
|
21
|
+
string = replace_quotes string, '«', '»', '„', '“', 'а-яА-Я'
|
22
|
+
|
23
|
+
#english quotes
|
24
|
+
string = replace_quotes string
|
25
|
+
|
26
|
+
#mdash
|
27
|
+
string.gsub!(/--/, '—')
|
28
|
+
string.gsub!(/(\p{Word}|;|,)\s+(—|–|-)\s*(\p{Word})/, '\1 — \3')
|
29
|
+
string.gsub!(/\s+—/, ' —')
|
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 \3')
|
39
|
+
string.gsub!(/(^|\s|\()&([A-Za-z0-9]{2,8}|#[\d]*);(\p{Word}{1,2})\s+([^\s])/i, '\1&\2;\3 \4') #entities
|
40
|
+
string.gsub!(/( |¡)(\p{Word}{1,2})\s+([^\s])/i, '\1\2 \3\4')
|
41
|
+
else
|
42
|
+
string.gsub!(/(\w)'(\w)/, '\1’\2')
|
43
|
+
|
44
|
+
#russian quotes
|
45
|
+
string = replace_quotes string, '«', '»', '„', '“', 'а-яА-Я'
|
46
|
+
|
47
|
+
#english quotes
|
48
|
+
string = replace_quotes string
|
49
|
+
|
50
|
+
#mdash
|
51
|
+
string.gsub!(/--/, '—')
|
52
|
+
string.gsub!(/(\w|;|,)\s+(—|–|-)\s*(\w)/, '\1 — \3')
|
53
|
+
string.gsub!(/\s+—/, ' —')
|
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 \3')
|
63
|
+
string.gsub!(/(^|\s|\()&([A-Za-z0-9]{2,8}|#[\d]*);(\w{1,2})\s+([^\s])/i, '\1&\2;\3 \4') #entities
|
64
|
+
string.gsub!(/( |¡)(\w{1,2})\s+([^\s])/i, '\1\2 \3\4')
|
65
|
+
end
|
66
|
+
|
67
|
+
string
|
68
|
+
end
|
69
|
+
|
70
|
+
def replace_quotes(string, left1 = '“', right1 = '”', left2 = '‘', right2 = '’', letters = 'a-zA-Z')
|
71
|
+
str = string.dup
|
72
|
+
|
73
|
+
replace_quotes = lambda do
|
74
|
+
old_str = str.dup
|
75
|
+
str.gsub!(Regexp.new("(\"|\'|")((\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
|
data/lib/typographer.rb
ADDED
@@ -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
|
+
|
data/spec/spec_helper.rb
ADDED
@@ -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 please'
|
10
|
+
end
|
11
|
+
|
12
|
+
it "should typographer output of h helper" do
|
13
|
+
h('Typographer & &').should == 'Typographer & &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 am second", :simple).should == "<p>I’m first</p>\n\n<p>And I am 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 == '«текст»'
|
27
|
+
ty('Text "текст" text').should == 'Text «текст» text'
|
28
|
+
ty('Text "текст" text "Другой текст" ').should == 'Text «текст» text «Другой текст» '
|
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 == '«<a href="#link">те</a>кст»'
|
33
|
+
ty('Text "<b>те</b>кст" text').should == 'Text «<b>те</b>кст» text'
|
34
|
+
end
|
35
|
+
|
36
|
+
it "should make russian quotes for quotes with html tag" do
|
37
|
+
ty('Текст "Начало текста <a href="#link">те</a>кст"').should == 'Текст «Начало текста <a href="#link">те</a>кст»'
|
38
|
+
end
|
39
|
+
|
40
|
+
it "should do the same with single quotes" do
|
41
|
+
ty('\'текст\'').should == '«текст»'
|
42
|
+
ty('Text \'текст\' text').should == 'Text «текст» text'
|
43
|
+
ty('Text \'текст\' text \'Другой текст\' ').should == 'Text «текст» text «Другой текст» '
|
44
|
+
end
|
45
|
+
|
46
|
+
it "should create second-level russian quotes" do
|
47
|
+
ty('Текст "в кавычках "второго уровня""').should == 'Текст «в кавычках „второго уровня“»'
|
48
|
+
end
|
49
|
+
|
50
|
+
it "should make english quotes for quotes with first non-russian letter" do
|
51
|
+
ty('"text"').should == '“text”'
|
52
|
+
ty('Text "text" text').should == 'Text “text” text'
|
53
|
+
ty('Text "text" text "Another text" ').should == 'Text “text” text “Another text” '
|
54
|
+
end
|
55
|
+
|
56
|
+
it "should do the same with single quotes" do
|
57
|
+
ty('\'text\'').should == '“text”'
|
58
|
+
ty('Text \'text\' text').should == 'Text “text” text'
|
59
|
+
ty('Text \'text\' text \'Another text\' ').should == 'Text “text” text “Another text” '
|
60
|
+
end
|
61
|
+
|
62
|
+
it "should create second-level english quotes" do
|
63
|
+
ty('Text "in quotes "second level""').should == 'Text “in quotes ‘second level’”'
|
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=\'ссылка\'>«ссылка»</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">“link”</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 == '«Кавычки» and “Quotes”'
|
79
|
+
ty('"Quotes" и "Кавычки"').should == '“Quotes” и «Кавычки»'
|
80
|
+
|
81
|
+
ty('"Кавычки "второго уровня"" and "Quotes "second level""').should == '«Кавычки „второго уровня“» and “Quotes ‘second level’”'
|
82
|
+
ty('"Quotes "second level"" и "Кавычки "второго уровня""').should == '“Quotes ‘second level’” и «Кавычки „второго уровня“»'
|
83
|
+
end
|
84
|
+
|
85
|
+
it "should make (“”) quotes in the same string" do
|
86
|
+
ty('“Кавычки” and “Quotes”').should == '„Кавычки“ and „Quotes“'
|
87
|
+
end
|
88
|
+
|
89
|
+
it "should replace -- to —" do
|
90
|
+
ty('Replace -- to mdash please').should == 'Replace — to mdash please'
|
91
|
+
end
|
92
|
+
|
93
|
+
it "should replace \"word - word\" to \"word — word\"" do
|
94
|
+
ty('word - word').should == 'word — word'
|
95
|
+
end
|
96
|
+
|
97
|
+
it "should insert before each — if it has empty space before" do
|
98
|
+
ty('Before — after').should == 'Before — after'
|
99
|
+
ty('Before — after').should == 'Before — after'
|
100
|
+
ty('Before—after').should == 'Before—after'
|
101
|
+
end
|
102
|
+
|
103
|
+
|
104
|
+
it "should insert after small words" do
|
105
|
+
ty('an apple').should == 'an apple'
|
106
|
+
end
|
107
|
+
|
108
|
+
it "should insert after small words" do
|
109
|
+
ty('I want to be a scientist').should == 'I want to be a scientist'
|
110
|
+
end
|
111
|
+
|
112
|
+
it "should insert after small words with ( or dash before it" do
|
113
|
+
ty('Apple (an orange)').should == 'Apple (an orange)'
|
114
|
+
end
|
115
|
+
|
116
|
+
it "should not insert 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’m here'
|
134
|
+
end
|
135
|
+
|
136
|
+
|
137
|
+
it "should typographer real world examples" do
|
138
|
+
ty('"Читаешь -- "Прокопьев любил солянку" -- и долго не можешь понять, почему солянка написана с маленькой буквы, ведь "Солянка" -- известный московский клуб."').should == '«Читаешь — „Прокопьев любил солянку“ — и долго не можешь понять, почему солянка написана с маленькой буквы, ведь „Солянка“ — известный московский клуб.»'
|
139
|
+
end
|
140
|
+
|
141
|
+
it "should typographer real world examples" do
|
142
|
+
ty('"Заебалоооооо" противостояние образует сет, в частности, "тюремные психозы", индуцируемые при различных психопатологических типологиях.').should == '«Заебалоооооо» противостояние образует сет, в частности, «тюремные психозы», индуцируемые при различных психопатологических типологиях.'
|
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 == '“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.'
|
147
|
+
end
|
148
|
+
|
149
|
+
it "should typographer real wordl examples" do
|
150
|
+
ty('Фирменный стиль: от полиграфии к интернет-решениям (в рамках выставки «Дизайн и Реклама 2009»)').should == 'Фирменный стиль: от полиграфии к интернет-решениям (в рамках выставки «Дизайн и Реклама 2009»)'
|
151
|
+
end
|
152
|
+
|
153
|
+
it "should typographer real world examples" do
|
154
|
+
ty('решениям (в рамках выставки').should == 'решениям (в рамках выставки'
|
155
|
+
end
|
156
|
+
|
157
|
+
it "should typographer real world examples" do
|
158
|
+
ty('Реанимация живописи: «новые дикие» и «трансавангард» в ситуации арт-рынка 1980-х').should == 'Реанимация живописи: «новые дикие» и «трансавангард» в ситуации арт-рынка <span class="nobr">1980-х</span>'
|
159
|
+
end
|
160
|
+
|
161
|
+
it "should typographer real world examples" do
|
162
|
+
ty('«Искусство после философии» – концептуальные стратегии Джозефа Кошута и Харальда Зеемана').should == '«Искусство после философии» — концептуальные стратегии Джозефа Кошута и Харальда Зеемана'
|
163
|
+
end
|
164
|
+
|
165
|
+
it "should typographer real world examples" do
|
166
|
+
ty('Испанцы говорят, что целовать мужчину без усов, - всё равно что есть яйцо без соли').should == 'Испанцы говорят, что целовать мужчину без усов, — всё равно что есть яйцо без соли'
|
167
|
+
end
|
168
|
+
|
169
|
+
it "should typographer nested quotes properly" do
|
170
|
+
text = %{<p>"Кто-то прибежал" Кто-то прибежал Кто-то прибежал Кто-то прибежал Кто-то прибежал Кто-то прибежал Кто-то прибежал Кто-то прибежал Кто-то прибежал</p><p>"Кто-то прибежал Кто-то прибежал" Кто-то прибежал «Кто-то прибежал К»</p>}
|
171
|
+
expected_text = %{<p>«Кто-то прибежал» <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>«Кто-то прибежал <span class=\"nobr\">Кто-то</span> прибежал» Кто-то прибежал «Кто-то прибежал К»</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>Об очередном ляпе «налоговой библии» пишет в своей статье для «ЗН в Украине» пишет кандидат юридических наук, доцент кандидат юридических наук, доцент Данил Гетманцев.</p><p>«Даже при последующем выполнении плательщиком требований налоговой службы его счета будут находиться под арестом»</p>}
|
177
|
+
expected_text = %{<p>Об очередном ляпе «налоговой библии» пишет в своей статье для «ЗН в Украине» пишет кандидат юридических наук, доцент кандидат юридических наук, доцент Данил Гетманцев.</p><p>«Даже при последующем выполнении плательщиком требований налоговой службы его счета будут находиться под арестом»</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
|