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.
Files changed (50) hide show
  1. data/History.txt +9 -0
  2. data/Manifest.txt +22 -15
  3. data/README.txt +54 -41
  4. data/Rakefile.rb +9 -26
  5. data/TODO.txt +2 -3
  6. data/WHAT_HAS_CHANGED.txt +44 -0
  7. data/init.rb +20 -2
  8. data/lib/countries/countries.rb +1 -0
  9. data/lib/datetime/datetime.rb +1 -0
  10. data/lib/gilenson/bluecloth_extra.rb +7 -0
  11. data/lib/gilenson/gilenson.rb +39 -30
  12. data/lib/gilenson/helper.rb +34 -0
  13. data/lib/gilenson/maruku_extra.rb +19 -0
  14. data/lib/gilenson/rdiscount_extra.rb +7 -0
  15. data/lib/gilenson/redcloth_extra.rb +42 -0
  16. data/lib/integration/integration.rb +1 -11
  17. data/lib/integration/rails_date_helper_override.rb +103 -105
  18. data/lib/integration/rails_pre_filter.rb +1 -0
  19. data/lib/pluralizer/pluralizer.rb +14 -13
  20. data/lib/rutils.rb +15 -25
  21. data/lib/transliteration/bidi.rb +15 -72
  22. data/lib/transliteration/simple.rb +1 -0
  23. data/lib/transliteration/transliteration.rb +11 -9
  24. data/lib/version.rb +5 -0
  25. data/test/extras/integration_bluecloth.rb +13 -0
  26. data/test/extras/integration_maruku.rb +15 -0
  27. data/test/{test_rails_filter.rb → extras/integration_rails_filter.rb} +3 -1
  28. data/test/extras/integration_rails_gilenson_helpers.rb +80 -0
  29. data/test/{test_rails_helpers.rb → extras/integration_rails_helpers.rb} +15 -3
  30. data/test/extras/integration_rdiscount.rb +15 -0
  31. data/test/extras/integration_redcloth3.rb +18 -0
  32. data/test/extras/integration_redcloth4.rb +19 -0
  33. data/test/run_tests.rb +2 -2
  34. data/test/{t_datetime.rb → test_datetime.rb} +1 -2
  35. data/test/{t_gilenson.rb → test_gilenson.rb} +15 -6
  36. data/test/test_integration.rb +22 -0
  37. data/test/test_integration_flag.rb +18 -0
  38. data/test/{t_pluralize.rb → test_pluralize.rb} +3 -2
  39. data/test/{t_rutils_base.rb → test_rutils_base.rb} +1 -0
  40. data/test/test_transliteration.rb +53 -0
  41. metadata +35 -26
  42. data/lib/integration/blue_cloth_override.rb +0 -12
  43. data/lib/integration/red_cloth_four.rb +0 -24
  44. data/lib/integration/red_cloth_override.rb +0 -7
  45. data/lib/integration/red_cloth_three.rb +0 -25
  46. data/test/t_integration.rb +0 -46
  47. data/test/t_transliteration.rb +0 -109
  48. data/test/test_integration_bluecloth.rb +0 -17
  49. data/test/test_integration_redcloth3.rb +0 -31
  50. 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>И вот&#160;&#171;они пошли туда&#187;, и&#160;шли шли&#160;шли</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>И&#160;вот &#171;они пошли туда&#187;, и&#160;шли шли&#160;шли</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>И вот &#8220;они пошли туда&#8221;, и шли шли шли</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>И вот&#160;&#171;они пошли туда&#187;, и&#160;шли шли&#160;шли</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&#160;<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>И вот &#8220;они пошли туда&#8221;, и шли шли шли</p>",
28
- RedCloth.new('И вот "они пошли туда", и шли шли шли').to_html
29
-
30
- end
31
- end