activesupport 2.3.8 → 2.3.9.pre

Sign up to get free protection for your applications and to get access to all the features.

Potentially problematic release.


This version of activesupport might be problematic. Click here for more details.

Files changed (66) hide show
  1. data/CHANGELOG +11 -0
  2. data/lib/active_support/core_ext/array/grouping.rb +1 -1
  3. data/lib/active_support/core_ext/array/random_access.rb +24 -4
  4. data/lib/active_support/core_ext/class.rb +1 -0
  5. data/lib/active_support/core_ext/class/attribute.rb +67 -0
  6. data/lib/active_support/core_ext/enumerable.rb +1 -1
  7. data/lib/active_support/core_ext/kernel/singleton_class.rb +13 -0
  8. data/lib/active_support/core_ext/module/remove_method.rb +6 -0
  9. data/lib/active_support/core_ext/object/misc.rb +3 -0
  10. data/lib/active_support/core_ext/range/blockless_step.rb +1 -1
  11. data/lib/active_support/core_ext/string/output_safety.rb +0 -11
  12. data/lib/active_support/dependencies.rb +36 -12
  13. data/lib/active_support/deprecation.rb +7 -0
  14. data/lib/active_support/json/backends/yajl.rb +1 -1
  15. data/lib/active_support/ordered_hash.rb +6 -0
  16. data/lib/active_support/testing/performance.rb +1 -1
  17. data/lib/active_support/values/time_zone.rb +5 -1
  18. data/lib/active_support/vendor.rb +2 -2
  19. data/lib/active_support/vendor/{i18n-0.3.7 → i18n-0.4.1}/i18n.rb +92 -105
  20. data/lib/active_support/vendor/{i18n-0.3.7 → i18n-0.4.1}/i18n/backend.rb +5 -4
  21. data/lib/active_support/vendor/i18n-0.4.1/i18n/backend/active_record.rb +61 -0
  22. data/lib/active_support/vendor/{i18n-0.3.7 → i18n-0.4.1}/i18n/backend/active_record/missing.rb +4 -6
  23. data/lib/active_support/vendor/{i18n-0.3.7 → i18n-0.4.1}/i18n/backend/active_record/store_procs.rb +0 -0
  24. data/lib/active_support/vendor/{i18n-0.3.7 → i18n-0.4.1}/i18n/backend/active_record/translation.rb +8 -3
  25. data/lib/active_support/vendor/{i18n-0.3.7 → i18n-0.4.1}/i18n/backend/base.rb +55 -84
  26. data/lib/active_support/vendor/{i18n-0.3.7 → i18n-0.4.1}/i18n/backend/cache.rb +1 -0
  27. data/lib/active_support/vendor/{i18n-0.3.7 → i18n-0.4.1}/i18n/backend/cascade.rb +0 -1
  28. data/lib/active_support/vendor/{i18n-0.3.7 → i18n-0.4.1}/i18n/backend/chain.rb +3 -1
  29. data/lib/active_support/vendor/{i18n-0.3.7 → i18n-0.4.1}/i18n/backend/cldr.rb +0 -0
  30. data/lib/active_support/vendor/{i18n-0.3.7 → i18n-0.4.1}/i18n/backend/fallbacks.rb +0 -0
  31. data/lib/active_support/vendor/i18n-0.4.1/i18n/backend/flatten.rb +113 -0
  32. data/lib/active_support/vendor/{i18n-0.3.7 → i18n-0.4.1}/i18n/backend/gettext.rb +0 -0
  33. data/lib/active_support/vendor/{i18n-0.3.7 → i18n-0.4.1}/i18n/backend/interpolation_compiler.rb +8 -4
  34. data/lib/active_support/vendor/i18n-0.4.1/i18n/backend/key_value.rb +102 -0
  35. data/lib/active_support/vendor/i18n-0.4.1/i18n/backend/memoize.rb +48 -0
  36. data/lib/active_support/vendor/{i18n-0.3.7 → i18n-0.4.1}/i18n/backend/metadata.rb +5 -13
  37. data/lib/active_support/vendor/{i18n-0.3.7 → i18n-0.4.1}/i18n/backend/pluralization.rb +0 -0
  38. data/lib/active_support/vendor/i18n-0.4.1/i18n/backend/simple.rb +87 -0
  39. data/lib/active_support/vendor/i18n-0.4.1/i18n/backend/transliterator.rb +98 -0
  40. data/lib/active_support/vendor/i18n-0.4.1/i18n/config.rb +84 -0
  41. data/lib/active_support/vendor/i18n-0.4.1/i18n/core_ext/hash.rb +29 -0
  42. data/lib/active_support/vendor/{i18n-0.3.7 → i18n-0.4.1}/i18n/core_ext/string/interpolate.rb +3 -4
  43. data/lib/active_support/vendor/{i18n-0.3.7 → i18n-0.4.1}/i18n/exceptions.rb +0 -0
  44. data/lib/active_support/vendor/{i18n-0.3.7 → i18n-0.4.1}/i18n/gettext.rb +2 -0
  45. data/lib/active_support/vendor/{i18n-0.3.7/i18n/helpers/gettext.rb → i18n-0.4.1/i18n/gettext/helpers.rb} +2 -2
  46. data/lib/active_support/vendor/{i18n-0.3.7 → i18n-0.4.1}/i18n/gettext/po_parser.rb +0 -0
  47. data/lib/active_support/vendor/{i18n-0.3.7 → i18n-0.4.1}/i18n/locale.rb +0 -0
  48. data/lib/active_support/vendor/{i18n-0.3.7 → i18n-0.4.1}/i18n/locale/fallbacks.rb +0 -0
  49. data/lib/active_support/vendor/{i18n-0.3.7 → i18n-0.4.1}/i18n/locale/tag.rb +0 -0
  50. data/lib/active_support/vendor/{i18n-0.3.7 → i18n-0.4.1}/i18n/locale/tag/parents.rb +0 -0
  51. data/lib/active_support/vendor/{i18n-0.3.7 → i18n-0.4.1}/i18n/locale/tag/rfc4646.rb +0 -0
  52. data/lib/active_support/vendor/{i18n-0.3.7 → i18n-0.4.1}/i18n/locale/tag/simple.rb +0 -0
  53. data/lib/active_support/vendor/i18n-0.4.1/i18n/version.rb +3 -0
  54. data/lib/active_support/version.rb +1 -1
  55. data/lib/active_support/whiny_nil.rb +1 -1
  56. metadata +48 -43
  57. data/lib/active_support/vendor/i18n-0.3.7/i18n/backend/active_record.rb +0 -66
  58. data/lib/active_support/vendor/i18n-0.3.7/i18n/backend/fast.rb +0 -69
  59. data/lib/active_support/vendor/i18n-0.3.7/i18n/backend/helpers.rb +0 -68
  60. data/lib/active_support/vendor/i18n-0.3.7/i18n/backend/links.rb +0 -34
  61. data/lib/active_support/vendor/i18n-0.3.7/i18n/backend/simple.rb +0 -22
  62. data/lib/active_support/vendor/i18n-0.3.7/i18n/core_ext/hash/except.rb +0 -8
  63. data/lib/active_support/vendor/i18n-0.3.7/i18n/core_ext/hash/slice.rb +0 -8
  64. data/lib/active_support/vendor/i18n-0.3.7/i18n/core_ext/object/meta_class.rb +0 -5
  65. data/lib/active_support/vendor/i18n-0.3.7/i18n/helpers.rb +0 -5
  66. data/lib/active_support/vendor/i18n-0.3.7/i18n/version.rb +0 -3
@@ -1,34 +0,0 @@
1
- module I18n
2
- module Backend
3
- module Links
4
- protected
5
- def links(locale)
6
- @links ||= {}
7
- @links[locale.to_sym] ||= {}
8
- end
9
-
10
- def store_link(locale, key, link)
11
- links(locale)[key.to_s] = link.to_s
12
- end
13
-
14
- def resolve_link(locale, key)
15
- key = key.to_s
16
- links = self.links(locale)
17
-
18
- if links.key?(key)
19
- links[key]
20
- elsif link = find_link(locale, key)
21
- store_link(locale, key, key.gsub(*link))
22
- else
23
- key
24
- end
25
- end
26
-
27
- def find_link(locale, key)
28
- links(locale).each do |from, to|
29
- return [from, to] if key[0, from.length] == from
30
- end && nil
31
- end
32
- end
33
- end
34
- end
@@ -1,22 +0,0 @@
1
- # encoding: utf-8
2
-
3
- # Stub class for the Simple backend. The actual implementation is provided by
4
- # the backend Base class. This makes it easier to extend the Simple backend's
5
- # behaviour by including modules. E.g.:
6
- #
7
- # module I18n::Backend::Pluralization
8
- # def pluralize(*args)
9
- # # extended pluralization logic
10
- # super
11
- # end
12
- # end
13
- #
14
- # I18n::Backend::Simple.send(:include, I18n::Backend::Pluralization)
15
-
16
- module I18n
17
- module Backend
18
- class Simple
19
- include Base
20
- end
21
- end
22
- end
@@ -1,8 +0,0 @@
1
- # from facets (http://facets.rubyforge.org)
2
- require 'i18n/core_ext/hash/slice'
3
-
4
- class Hash
5
- def except(*less_keys)
6
- slice(*keys - less_keys)
7
- end
8
- end unless Hash.method_defined?(:except)
@@ -1,8 +0,0 @@
1
- # from facets (http://facets.rubyforge.org)
2
- class Hash
3
- def slice(*keep_keys)
4
- h = {}
5
- keep_keys.each { |key| h[key] = fetch(key) }
6
- h
7
- end
8
- end unless Hash.new.respond_to?(:slice)
@@ -1,5 +0,0 @@
1
- Object.class_eval do
2
- def meta_class
3
- class << self; self; end
4
- end
5
- end unless Object.method_defined?(:meta_class)
@@ -1,5 +0,0 @@
1
- module I18n
2
- module Helpers
3
- autoload :Gettext, 'i18n/helpers/gettext'
4
- end
5
- end
@@ -1,3 +0,0 @@
1
- module I18n
2
- VERSION = "0.3.7"
3
- end