rutils 0.2.5 → 1.0.0
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/History.txt +9 -0
- data/Manifest.txt +22 -15
- data/README.txt +54 -41
- data/Rakefile.rb +9 -26
- data/TODO.txt +2 -3
- data/WHAT_HAS_CHANGED.txt +44 -0
- data/init.rb +20 -2
- data/lib/countries/countries.rb +1 -0
- data/lib/datetime/datetime.rb +1 -0
- data/lib/gilenson/bluecloth_extra.rb +7 -0
- data/lib/gilenson/gilenson.rb +39 -30
- data/lib/gilenson/helper.rb +34 -0
- data/lib/gilenson/maruku_extra.rb +19 -0
- data/lib/gilenson/rdiscount_extra.rb +7 -0
- data/lib/gilenson/redcloth_extra.rb +42 -0
- data/lib/integration/integration.rb +1 -11
- data/lib/integration/rails_date_helper_override.rb +103 -105
- data/lib/integration/rails_pre_filter.rb +1 -0
- data/lib/pluralizer/pluralizer.rb +14 -13
- data/lib/rutils.rb +15 -25
- data/lib/transliteration/bidi.rb +15 -72
- data/lib/transliteration/simple.rb +1 -0
- data/lib/transliteration/transliteration.rb +11 -9
- data/lib/version.rb +5 -0
- data/test/extras/integration_bluecloth.rb +13 -0
- data/test/extras/integration_maruku.rb +15 -0
- data/test/{test_rails_filter.rb → extras/integration_rails_filter.rb} +3 -1
- data/test/extras/integration_rails_gilenson_helpers.rb +80 -0
- data/test/{test_rails_helpers.rb → extras/integration_rails_helpers.rb} +15 -3
- data/test/extras/integration_rdiscount.rb +15 -0
- data/test/extras/integration_redcloth3.rb +18 -0
- data/test/extras/integration_redcloth4.rb +19 -0
- data/test/run_tests.rb +2 -2
- data/test/{t_datetime.rb → test_datetime.rb} +1 -2
- data/test/{t_gilenson.rb → test_gilenson.rb} +15 -6
- data/test/test_integration.rb +22 -0
- data/test/test_integration_flag.rb +18 -0
- data/test/{t_pluralize.rb → test_pluralize.rb} +3 -2
- data/test/{t_rutils_base.rb → test_rutils_base.rb} +1 -0
- data/test/test_transliteration.rb +53 -0
- metadata +35 -26
- data/lib/integration/blue_cloth_override.rb +0 -12
- data/lib/integration/red_cloth_four.rb +0 -24
- data/lib/integration/red_cloth_override.rb +0 -7
- data/lib/integration/red_cloth_three.rb +0 -25
- data/test/t_integration.rb +0 -46
- data/test/t_transliteration.rb +0 -109
- data/test/test_integration_bluecloth.rb +0 -17
- data/test/test_integration_redcloth3.rb +0 -31
- data/test/test_integration_redcloth4.rb +0 -31
@@ -1,17 +0,0 @@
|
|
1
|
-
# Интеграция с BlueCloth - Markdown
|
2
|
-
# Сам Markdown никакой обработки типографики не производит (это делает RubyPants, но вряд ли его кто-то юзает на практике)
|
3
|
-
class MarkdownIntegrationTest < Test::Unit::TestCase
|
4
|
-
def test_integration_markdown
|
5
|
-
raise "You must have BlueCloth to test Markdown integration" and return if $skip_bluecloth
|
6
|
-
|
7
|
-
RuTils::overrides = true
|
8
|
-
assert RuTils.overrides_enabled?
|
9
|
-
assert_equal "<p>И вот «они пошли туда», и шли шли шли</p>",
|
10
|
-
BlueCloth.new('И вот "они пошли туда", и шли шли шли').to_html
|
11
|
-
|
12
|
-
RuTils::overrides = false
|
13
|
-
assert !RuTils.overrides_enabled?
|
14
|
-
assert_equal "<p>И вот \"они пошли туда\", и шли шли шли</p>",
|
15
|
-
BlueCloth.new('И вот "они пошли туда", и шли шли шли').to_html
|
16
|
-
end
|
17
|
-
end
|
@@ -1,31 +0,0 @@
|
|
1
|
-
# Интеграция с RedCloth - Textile.
|
2
|
-
# Нужно иметь в виду что Textile осуществляет свою обработку типографики, которую мы подменяем!
|
3
|
-
class Redcloth3IntegrationTest < Test::Unit::TestCase
|
4
|
-
def test_integration_textile
|
5
|
-
raise "You must have RedCloth to test Textile integration" and return if $skip_redcloth
|
6
|
-
|
7
|
-
RuTils::overrides = true
|
8
|
-
assert RuTils.overrides_enabled?
|
9
|
-
|
10
|
-
assert_equal "<p>И вот «они пошли туда», и шли шли шли</p>",
|
11
|
-
RedCloth.new('И вот "они пошли туда", и шли шли шли').to_html
|
12
|
-
|
13
|
-
RuTils::overrides = false
|
14
|
-
assert !RuTils::overrides_enabled?
|
15
|
-
assert_equal '<p><strong>strong text</strong> and <em>emphasized text</em></p>',
|
16
|
-
RedCloth.new("*strong text* and _emphasized text_").to_html,
|
17
|
-
"Spaces should be preserved without RuTils"
|
18
|
-
|
19
|
-
RuTils::overrides = true
|
20
|
-
assert RuTils.overrides_enabled?
|
21
|
-
assert_equal '<p><strong>strong text</strong> and <em>emphasized text</em></p>',
|
22
|
-
RedCloth.new("*strong text* and _emphasized text_").to_html,
|
23
|
-
"Spaces should be preserved"
|
24
|
-
|
25
|
-
RuTils::overrides = false
|
26
|
-
assert !RuTils.overrides_enabled?
|
27
|
-
assert_equal "<p>И вот “они пошли туда”, и шли шли шли</p>",
|
28
|
-
RedCloth.new('И вот "они пошли туда", и шли шли шли').to_html
|
29
|
-
|
30
|
-
end
|
31
|
-
end
|
@@ -1,31 +0,0 @@
|
|
1
|
-
# Интеграция с RedCloth - Textile.
|
2
|
-
# Нужно иметь в виду что Textile осуществляет свою обработку типографики, которую мы подменяем!
|
3
|
-
class Redcloth4IntegrationTest < Test::Unit::TestCase
|
4
|
-
def test_integration_textile
|
5
|
-
raise "You must have RedCloth to test Textile integration" and return if $skip_redcloth
|
6
|
-
|
7
|
-
RuTils::overrides = true
|
8
|
-
assert RuTils.overrides_enabled?
|
9
|
-
|
10
|
-
assert_equal "<p>И вот «они пошли туда», и шли шли шли</p>",
|
11
|
-
RedCloth.new('И вот "они пошли туда", и шли шли шли').to_html
|
12
|
-
|
13
|
-
RuTils::overrides = false
|
14
|
-
assert !RuTils::overrides_enabled?
|
15
|
-
assert_equal '<p><strong>strong text</strong> and <em>emphasized text</em></p>',
|
16
|
-
RedCloth.new("*strong text* and _emphasized text_").to_html,
|
17
|
-
"Spaces should be preserved without RuTils"
|
18
|
-
|
19
|
-
RuTils::overrides = true
|
20
|
-
assert RuTils.overrides_enabled?
|
21
|
-
assert_equal '<p><strong>strong text</strong> and <em>emphasized text</em></p>',
|
22
|
-
RedCloth.new("*strong text* and _emphasized text_").to_html,
|
23
|
-
"Spaces should be preserved"
|
24
|
-
|
25
|
-
RuTils::overrides = false
|
26
|
-
assert !RuTils.overrides_enabled?
|
27
|
-
assert_equal "<p>И вот “они пошли туда”, и шли шли шли</p>",
|
28
|
-
RedCloth.new('И вот "они пошли туда", и шли шли шли').to_html
|
29
|
-
|
30
|
-
end
|
31
|
-
end
|