single_table_globalize3 0.0.4 → 0.0.5

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 33ca5e81c9622281ce0a4674c337e6fa0399641f
4
- data.tar.gz: 066d2a063adac33286d5597776e065b0de92e4a6
3
+ metadata.gz: 4a249e699b4a4fba43f7f42436c3fdeabb9a8ed8
4
+ data.tar.gz: 12559aeece0779a75754950ba83ed245e23b0f6a
5
5
  SHA512:
6
- metadata.gz: 54898f214c051bff48fb7969c4d1817da7903a0da432fa6c8b1c916c7bdacb02b00d6dee27f37824351eefc9086e3890296ddb052cd7b0f081346be5825a4d71
7
- data.tar.gz: 2b8b6a664a08362909499b4ea9b2dba7593449101b1b1a6dd16cf2d91f9a8ebb8ac80e7c40da1c599d58fc94beed3b7ae417d45e65ed5d5c44d1cf5e7e37e8f3
6
+ metadata.gz: 3929d655873ced54b08a9d5688e08f0bcb9dfd1657198f6f239f06b47d91e406b8a1f18a157faf1116fca0f389784c8cf7b2ceff375bcd3592692f0a6e5fe11f
7
+ data.tar.gz: c8ef7a0aaeee09a997998273739882f08d52741ae2ec668cfbe950a39dc5866c9e952472abcbd2baf3ee915635d26465c42680b231a6f5b904603786bc320ffb
@@ -1,66 +1,77 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- single_table_globalize3 (0.0.3)
5
- activemodel (~> 3.0.0)
6
- activerecord (~> 3.0.0)
4
+ single_table_globalize3 (0.0.4)
5
+ activemodel (>= 3.0.0)
6
+ activerecord (>= 3.0.0)
7
7
  paper_trail (~> 2)
8
8
 
9
9
  GEM
10
10
  remote: https://rubygems.org/
11
11
  specs:
12
- abstract (1.0.0)
13
- actionpack (3.0.20)
14
- activemodel (= 3.0.20)
15
- activesupport (= 3.0.20)
16
- builder (~> 2.1.2)
17
- erubis (~> 2.6.6)
18
- i18n (~> 0.5.0)
19
- rack (~> 1.2.5)
20
- rack-mount (~> 0.6.14)
21
- rack-test (~> 0.5.7)
22
- tzinfo (~> 0.3.23)
23
- activemodel (3.0.20)
24
- activesupport (= 3.0.20)
25
- builder (~> 2.1.2)
26
- i18n (~> 0.5.0)
27
- activerecord (3.0.20)
28
- activemodel (= 3.0.20)
29
- activesupport (= 3.0.20)
30
- arel (~> 2.0.10)
31
- tzinfo (~> 0.3.23)
32
- activesupport (3.0.20)
33
- arel (2.0.10)
34
- builder (2.1.2)
12
+ actionpack (3.2.12)
13
+ activemodel (= 3.2.12)
14
+ activesupport (= 3.2.12)
15
+ builder (~> 3.0.0)
16
+ erubis (~> 2.7.0)
17
+ journey (~> 1.0.4)
18
+ rack (~> 1.4.5)
19
+ rack-cache (~> 1.2)
20
+ rack-test (~> 0.6.1)
21
+ sprockets (~> 2.2.1)
22
+ activemodel (3.2.12)
23
+ activesupport (= 3.2.12)
24
+ builder (~> 3.0.0)
25
+ activerecord (3.2.12)
26
+ activemodel (= 3.2.12)
27
+ activesupport (= 3.2.12)
28
+ arel (~> 3.0.2)
29
+ tzinfo (~> 0.3.29)
30
+ activesupport (3.2.12)
31
+ i18n (~> 0.6)
32
+ multi_json (~> 1.0)
33
+ arel (3.0.2)
34
+ builder (3.0.4)
35
35
  database_cleaner (0.6.7)
36
- erubis (2.6.6)
37
- abstract (>= 1.0.0)
38
- i18n (0.5.0)
36
+ erubis (2.7.0)
37
+ hike (1.2.1)
38
+ i18n (0.6.4)
39
+ journey (1.0.4)
39
40
  json (1.7.7)
40
41
  metaclass (0.0.1)
41
42
  mocha (0.13.2)
42
43
  metaclass (~> 0.0.1)
44
+ multi_json (1.6.1)
43
45
  paper_trail (2.7.1)
44
46
  activerecord (~> 3.0)
45
47
  railties (~> 3.0)
46
48
  pathname_local (0.0.2)
47
- rack (1.2.8)
48
- rack-mount (0.6.14)
49
- rack (>= 1.0.0)
50
- rack-test (0.5.7)
49
+ rack (1.4.5)
50
+ rack-cache (1.2)
51
+ rack (>= 0.4)
52
+ rack-ssl (1.3.3)
53
+ rack
54
+ rack-test (0.6.2)
51
55
  rack (>= 1.0)
52
- railties (3.0.20)
53
- actionpack (= 3.0.20)
54
- activesupport (= 3.0.20)
56
+ railties (3.2.12)
57
+ actionpack (= 3.2.12)
58
+ activesupport (= 3.2.12)
59
+ rack-ssl (~> 1.3.2)
55
60
  rake (>= 0.8.7)
56
61
  rdoc (~> 3.4)
57
- thor (~> 0.14.4)
62
+ thor (>= 0.14.6, < 2.0)
58
63
  rake (10.0.3)
59
64
  rdoc (3.12.2)
60
65
  json (~> 1.4)
66
+ sprockets (2.2.2)
67
+ hike (~> 1.2)
68
+ multi_json (~> 1.0)
69
+ rack (~> 1.0)
70
+ tilt (~> 1.1, != 1.3.0)
61
71
  sqlite3 (1.3.7)
62
72
  test_declarative (0.0.5)
63
- thor (0.14.6)
73
+ thor (0.17.0)
74
+ tilt (1.3.5)
64
75
  tzinfo (0.3.37)
65
76
 
66
77
  PLATFORMS
@@ -86,9 +86,8 @@ module SingleTableGlobalize3
86
86
  end
87
87
 
88
88
  def translation_for(locale, name, build_if_missing = true)
89
- translation_caches[locale] ||= {}
89
+ translation_caches[locale] ||= HashWithIndifferentAccess.new
90
90
  translation_caches[locale][name] ||= (translations.detect{|t| t.locale == locale && t.attribute_name == name.to_s}) ||
91
- (translations.attribute(name).with_locale(locale).first) ||
92
91
  (translations.build(:locale => locale, :attribute_name => name) if build_if_missing)
93
92
  end
94
93
 
@@ -97,13 +96,13 @@ module SingleTableGlobalize3
97
96
  translations.select{|t| t.locale.to_s == locale.to_s }
98
97
  else
99
98
  translations.with_locale(locale)
100
- end.inject({}) do |hash, t|
99
+ end.inject(HashWithIndifferentAccess.new) do |hash, t|
101
100
  hash.update(t.attribute_name => t)
102
101
  end
103
102
  end
104
103
 
105
104
  def translation_caches
106
- @translation_caches ||= {}
105
+ @translation_caches ||= HashWithIndifferentAccess.new
107
106
  end
108
107
 
109
108
  def globalize_fallbacks(locale)
@@ -1,3 +1,3 @@
1
1
  module SingleTableGlobalize3
2
- VERSION = '0.0.4'
2
+ VERSION = '0.0.5'
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: single_table_globalize3
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.4
4
+ version: 0.0.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Sven Fuchs
@@ -14,7 +14,7 @@ authors:
14
14
  autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
- date: 2013-03-15 00:00:00.000000000 Z
17
+ date: 2013-03-19 00:00:00.000000000 Z
18
18
  dependencies:
19
19
  - !ruby/object:Gem::Dependency
20
20
  name: activerecord
@@ -156,8 +156,7 @@ dependencies:
156
156
  - - '>='
157
157
  - !ruby/object:Gem::Version
158
158
  version: '0'
159
- description: Rails I18n de-facto standard library for ActiveRecord 3 model/data translation
160
- with a single table.
159
+ description: Globalize3 successor which use only one table to store all the translations.
161
160
  email: trong.v.tran@gmail.com
162
161
  executables: []
163
162
  extensions: []
@@ -210,6 +209,5 @@ rubyforge_project: '[none]'
210
209
  rubygems_version: 2.0.3
211
210
  signing_key:
212
211
  specification_version: 4
213
- summary: Rails I18n de-facto standard library for ActiveRecord 3 model/data translation
214
- with a single table
212
+ summary: Globalize3 successor which use only one table to store all the translations
215
213
  test_files: []