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:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 4a249e699b4a4fba43f7f42436c3fdeabb9a8ed8
|
|
4
|
+
data.tar.gz: 12559aeece0779a75754950ba83ed245e23b0f6a
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 3929d655873ced54b08a9d5688e08f0bcb9dfd1657198f6f239f06b47d91e406b8a1f18a157faf1116fca0f389784c8cf7b2ceff375bcd3592692f0a6e5fe11f
|
|
7
|
+
data.tar.gz: c8ef7a0aaeee09a997998273739882f08d52741ae2ec668cfbe950a39dc5866c9e952472abcbd2baf3ee915635d26465c42680b231a6f5b904603786bc320ffb
|
data/Gemfile.lock
CHANGED
|
@@ -1,66 +1,77 @@
|
|
|
1
1
|
PATH
|
|
2
2
|
remote: .
|
|
3
3
|
specs:
|
|
4
|
-
single_table_globalize3 (0.0.
|
|
5
|
-
activemodel (
|
|
6
|
-
activerecord (
|
|
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
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
rack (~> 1.2
|
|
20
|
-
rack-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
arel (
|
|
34
|
-
builder (
|
|
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.
|
|
37
|
-
|
|
38
|
-
i18n (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.
|
|
48
|
-
rack-
|
|
49
|
-
rack (>=
|
|
50
|
-
rack-
|
|
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.
|
|
53
|
-
actionpack (= 3.
|
|
54
|
-
activesupport (= 3.
|
|
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 (
|
|
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.
|
|
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(
|
|
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)
|
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
|
+
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-
|
|
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:
|
|
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:
|
|
214
|
-
with a single table
|
|
212
|
+
summary: Globalize3 successor which use only one table to store all the translations
|
|
215
213
|
test_files: []
|