fast_gettext 0.8.1 → 0.9.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (72) hide show
  1. checksums.yaml +4 -4
  2. data/lib/fast_gettext/cache.rb +42 -0
  3. data/lib/fast_gettext/storage.rb +28 -55
  4. data/lib/fast_gettext/version.rb +1 -1
  5. metadata +105 -73
  6. data/.gitignore +0 -2
  7. data/.travis.yml +0 -17
  8. data/Appraisals +0 -8
  9. data/CHANGELOG +0 -8
  10. data/Gemfile +0 -10
  11. data/Gemfile.lock +0 -52
  12. data/Rakefile +0 -25
  13. data/Readme.md +0 -261
  14. data/benchmark/base.rb +0 -46
  15. data/benchmark/baseline.rb +0 -5
  16. data/benchmark/fast_gettext.rb +0 -18
  17. data/benchmark/i18n_simple.rb +0 -8
  18. data/benchmark/ideal.rb +0 -24
  19. data/benchmark/locale/de.yml +0 -126
  20. data/benchmark/locale/de/LC_MESSAGES/large.mo +0 -0
  21. data/benchmark/misc/threadsave.rb +0 -21
  22. data/benchmark/namespace/fast_gettext.rb +0 -15
  23. data/benchmark/namespace/original.rb +0 -14
  24. data/benchmark/original.rb +0 -22
  25. data/examples/db/migration.rb +0 -22
  26. data/examples/missing_translation_logger.rb +0 -13
  27. data/fast_gettext.gemspec +0 -12
  28. data/gemfiles/rails23.gemfile +0 -14
  29. data/gemfiles/rails23.gemfile.lock +0 -56
  30. data/gemfiles/rails32.gemfile +0 -14
  31. data/gemfiles/rails32.gemfile.lock +0 -112
  32. data/gemfiles/rails40.gemfile +0 -15
  33. data/gemfiles/rails40.gemfile.lock +0 -110
  34. data/spec/aa_unconfigued_spec.rb +0 -21
  35. data/spec/cases/fake_load_path/iconv.rb +0 -2
  36. data/spec/cases/iconv_fallback.rb +0 -22
  37. data/spec/cases/interpolate_i18n_after_fast_gettext.rb +0 -7
  38. data/spec/cases/interpolate_i18n_before_fast_gettext.rb +0 -9
  39. data/spec/cases/safe_mode_can_handle_locales.rb +0 -5
  40. data/spec/fast_gettext/mo_file_spec.rb +0 -35
  41. data/spec/fast_gettext/po_file_spec.rb +0 -35
  42. data/spec/fast_gettext/storage_spec.rb +0 -386
  43. data/spec/fast_gettext/translation_repository/base_spec.rb +0 -24
  44. data/spec/fast_gettext/translation_repository/chain_spec.rb +0 -98
  45. data/spec/fast_gettext/translation_repository/db_spec.rb +0 -114
  46. data/spec/fast_gettext/translation_repository/logger_spec.rb +0 -40
  47. data/spec/fast_gettext/translation_repository/mo_spec.rb +0 -58
  48. data/spec/fast_gettext/translation_repository/po_spec.rb +0 -65
  49. data/spec/fast_gettext/translation_repository/yaml_spec.rb +0 -84
  50. data/spec/fast_gettext/translation_repository_spec.rb +0 -33
  51. data/spec/fast_gettext/translation_spec.rb +0 -363
  52. data/spec/fast_gettext/vendor/iconv_spec.rb +0 -7
  53. data/spec/fast_gettext/vendor/string_spec.rb +0 -101
  54. data/spec/fast_gettext_spec.rb +0 -51
  55. data/spec/fuzzy_locale/de/test.po +0 -22
  56. data/spec/locale/de/LC_MESSAGES/test.mo +0 -0
  57. data/spec/locale/de/LC_MESSAGES/test2.mo +0 -0
  58. data/spec/locale/de/test.po +0 -74
  59. data/spec/locale/de/test2.po +0 -64
  60. data/spec/locale/en/LC_MESSAGES/plural_test.mo +0 -0
  61. data/spec/locale/en/LC_MESSAGES/test.mo +0 -0
  62. data/spec/locale/en/plural_test.po +0 -20
  63. data/spec/locale/en/test.po +0 -59
  64. data/spec/locale/gsw_CH/LC_MESSAGES/test.mo +0 -0
  65. data/spec/locale/gsw_CH/test.po +0 -61
  66. data/spec/locale/yaml/de.yml +0 -25
  67. data/spec/locale/yaml/de2.yml +0 -25
  68. data/spec/locale/yaml/en.yml +0 -21
  69. data/spec/locale/yaml/notfound.yml +0 -2
  70. data/spec/obsolete_locale/de/test.po +0 -21
  71. data/spec/spec_helper.rb +0 -42
  72. data/spec/support/be_accessible_matcher.rb +0 -8
@@ -1,2 +0,0 @@
1
- xx:
2
- simple: FUUUU
@@ -1,21 +0,0 @@
1
- # SOME DESCRIPTIVE TITLE.
2
- # Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
3
- # This file is distributed under the same license as the PACKAGE package.
4
- # FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
5
- #
6
- #, fuzzy
7
- msgid ""
8
- msgstr ""
9
- "Project-Id-Version: version 0.0.1\n"
10
- "POT-Creation-Date: 2009-02-26 19:50+0100\n"
11
- "PO-Revision-Date: 2009-02-18 14:53+0100\n"
12
- "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
13
- "Language-Team: LANGUAGE <LL@li.org>\n"
14
- "MIME-Version: 1.0\n"
15
- "Content-Type: text/plain; charset=UTF-8\n"
16
- "Content-Transfer-Encoding: 8bit\n"
17
- "Plural-Forms: nplurals=INTEGER; plural=EXPRESSION;\n"
18
-
19
- #: app/helpers/translation_helper.rb:3
20
- #~ msgid "%{relative_time} ago"
21
- #~ msgstr "vor %{relative_time}"
data/spec/spec_helper.rb DELETED
@@ -1,42 +0,0 @@
1
- # $VERBOSE = true # ignore complaints in spec files
2
-
3
- # ---- requirements
4
- $LOAD_PATH.unshift File.expand_path("../lib", File.dirname(__FILE__))
5
- require 'fast_gettext'
6
-
7
- # ---- revert to defaults
8
- RSpec.configure do |config|
9
- config.before do
10
- FastGettext.default_available_locales = nil
11
- FastGettext.available_locales = nil
12
- FastGettext.locale = 'de'
13
- end
14
- end
15
-
16
- def default_setup
17
- # make sure all tests are really independent
18
- Thread.current[:fast_gettext_text_domain] = nil
19
- Thread.current[:fast_gettext__locale] = nil
20
- Thread.current[:fast_gettext_available_locales] = nil
21
- Thread.current[:fast_gettext_pluralisation_rule] = nil
22
- Thread.current[:fast_gettext_current_cache] = nil
23
- FastGettext.send(:class_variable_set, :@@translation_repositories, {})
24
- FastGettext.send(:class_variable_set, :@@caches, {})
25
- FastGettext.add_text_domain('test',:path=>File.join(File.dirname(__FILE__),'locale'))
26
- FastGettext.text_domain = 'test'
27
- FastGettext.available_locales = ['en','de','gsw_CH']
28
- FastGettext.locale = 'de'
29
- FastGettext.send(:update_current_cache)
30
- end
31
-
32
- def pending_if(condition, *args)
33
- if condition
34
- pending(*args) { yield }
35
- else
36
- yield
37
- end
38
- end
39
-
40
- def setup_extra_domain
41
- FastGettext.add_text_domain('test2',:path=>File.join(File.dirname(__FILE__),'locale'))
42
- end
@@ -1,8 +0,0 @@
1
- RSpec::Matchers.define :be_accessible do |attribute|
2
- match do |response|
3
- response.class.accessible_attributes.include?(attribute.to_s)
4
- end
5
- description { "be accessible :#{attribute}" }
6
- failure_message_for_should { ":#{attribute} should be accessible" }
7
- failure_message_for_should_not { ":#{attribute} should not be accessible" }
8
- end