globalize 4.0.0.alpha.1 → 4.0.0.alpha.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +10 -10
- data/lib/globalize/active_record/relation.rb +12 -12
- metadata +5 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 0ca26136a9b1c4d772eee00815f732b7025d3b95
|
4
|
+
data.tar.gz: 93b43c38d7a582487fa95042633d2cfc3776a0b4
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: cd0c34e725155990db83147a41fe87df89439655fad2093970543c63773545b2dd72ebb5908ce42b60aa0ac0c5971f4856490df5d6a62d0c44b7563b4e87beb4
|
7
|
+
data.tar.gz: 25c39ad5e9cff3855f782b715d83be94cc44ffe88b87ad4db5aafea7f975808dddb78bc56a7571d6954464f8d9b5013295047d8bf9d2b0eb4dcb7bacf5d82791
|
data/Gemfile.lock
CHANGED
@@ -1,22 +1,22 @@
|
|
1
1
|
GIT
|
2
2
|
remote: git://github.com/airblade/paper_trail.git
|
3
|
-
revision:
|
3
|
+
revision: 44f2380ec6cd45c15a8b654d5e7d694499c6e11c
|
4
4
|
branch: master
|
5
5
|
specs:
|
6
|
-
paper_trail (3.0.0.
|
6
|
+
paper_trail (3.0.0.beta2)
|
7
7
|
activerecord (>= 3.0, < 5.0)
|
8
8
|
|
9
9
|
GIT
|
10
10
|
remote: git://github.com/bmabey/database_cleaner.git
|
11
|
-
revision:
|
11
|
+
revision: 6da38c4c1a565bbcc62ed9b84c2574537c6ebae2
|
12
12
|
branch: master
|
13
13
|
specs:
|
14
|
-
database_cleaner (1.
|
14
|
+
database_cleaner (1.2.0)
|
15
15
|
|
16
16
|
PATH
|
17
17
|
remote: .
|
18
18
|
specs:
|
19
|
-
globalize (4.0.0.alpha.
|
19
|
+
globalize (4.0.0.alpha.2)
|
20
20
|
activemodel (>= 4.0.0)
|
21
21
|
activerecord (>= 4.0.0)
|
22
22
|
paper_trail (~> 3.0.0.beta)
|
@@ -39,20 +39,20 @@ GEM
|
|
39
39
|
multi_json (~> 1.3)
|
40
40
|
thread_safe (~> 0.1)
|
41
41
|
tzinfo (~> 0.3.37)
|
42
|
-
arel (4.0.
|
42
|
+
arel (4.0.1)
|
43
43
|
atomic (1.1.14)
|
44
44
|
atomic (1.1.14-java)
|
45
45
|
builder (3.1.4)
|
46
46
|
coderay (1.0.9)
|
47
47
|
ffi (1.9.0-java)
|
48
48
|
i18n (0.6.5)
|
49
|
-
json (1.8.
|
50
|
-
json (1.8.
|
49
|
+
json (1.8.1)
|
50
|
+
json (1.8.1-java)
|
51
51
|
method_source (0.8.2)
|
52
52
|
minitest (4.7.5)
|
53
53
|
minitest-colorize (0.0.5)
|
54
54
|
minitest (>= 2.0)
|
55
|
-
multi_json (1.8.
|
55
|
+
multi_json (1.8.2)
|
56
56
|
pry (0.9.12.2)
|
57
57
|
coderay (~> 1.0.5)
|
58
58
|
method_source (~> 0.8)
|
@@ -75,7 +75,7 @@ GEM
|
|
75
75
|
atomic
|
76
76
|
thread_safe (0.1.3-java)
|
77
77
|
atomic
|
78
|
-
tzinfo (0.3.
|
78
|
+
tzinfo (0.3.38)
|
79
79
|
|
80
80
|
PLATFORMS
|
81
81
|
java
|
@@ -5,10 +5,10 @@ module Globalize
|
|
5
5
|
attr_accessor :translations_reload_needed
|
6
6
|
|
7
7
|
class WhereChain < ::ActiveRecord::QueryMethods::WhereChain
|
8
|
-
def not(*
|
9
|
-
if @scope.parse_translated_conditions
|
8
|
+
def not(opts, *rest)
|
9
|
+
if parsed = @scope.parse_translated_conditions(opts)
|
10
10
|
@scope.translations_reload_needed = true
|
11
|
-
@scope.with_translations_in_this_locale.where.not(*
|
11
|
+
@scope.with_translations_in_this_locale.where.not(parsed, *rest)
|
12
12
|
else
|
13
13
|
super
|
14
14
|
end
|
@@ -18,17 +18,17 @@ module Globalize
|
|
18
18
|
def where(opts = :chain, *rest)
|
19
19
|
if opts == :chain
|
20
20
|
WhereChain.new(spawn)
|
21
|
-
elsif parse_translated_conditions
|
21
|
+
elsif parsed = parse_translated_conditions(opts)
|
22
22
|
self.translations_reload_needed = true
|
23
|
-
super.with_translations_in_this_locale
|
23
|
+
super(parsed, *rest).with_translations_in_this_locale
|
24
24
|
else
|
25
25
|
super
|
26
26
|
end
|
27
27
|
end
|
28
28
|
|
29
29
|
def exists?(conditions = :none)
|
30
|
-
if parse_translated_conditions
|
31
|
-
with_translations_in_this_locale.exists?(
|
30
|
+
if parsed = parse_translated_conditions(conditions)
|
31
|
+
with_translations_in_this_locale.exists?(parsed)
|
32
32
|
else
|
33
33
|
super
|
34
34
|
end
|
@@ -38,7 +38,7 @@ module Globalize
|
|
38
38
|
eval <<-END_RUBY
|
39
39
|
def #{method_name}
|
40
40
|
super.tap do |f|
|
41
|
-
if translations_reload_needed
|
41
|
+
if f && translations_reload_needed
|
42
42
|
f.translations.reload
|
43
43
|
translations_reload_needed = false
|
44
44
|
end
|
@@ -51,11 +51,11 @@ module Globalize
|
|
51
51
|
with_translations(Globalize.locale)
|
52
52
|
end
|
53
53
|
|
54
|
-
def parse_translated_conditions
|
54
|
+
def parse_translated_conditions(opts)
|
55
55
|
if opts.is_a?(Hash) && (keys = opts.symbolize_keys.keys & translated_attribute_names).present?
|
56
|
-
|
57
|
-
|
58
|
-
|
56
|
+
opts = opts.dup
|
57
|
+
keys.each { |key| opts[translated_column_name(key)] = opts.delete(key) || opts.delete(key.to_s) }
|
58
|
+
opts
|
59
59
|
end
|
60
60
|
end
|
61
61
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: globalize
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 4.0.0.alpha.
|
4
|
+
version: 4.0.0.alpha.2
|
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-10-
|
17
|
+
date: 2013-10-24 00:00:00.000000000 Z
|
18
18
|
dependencies:
|
19
19
|
- !ruby/object:Gem::Dependency
|
20
20
|
name: activerecord
|
@@ -142,7 +142,7 @@ dependencies:
|
|
142
142
|
- - '>='
|
143
143
|
- !ruby/object:Gem::Version
|
144
144
|
version: '0'
|
145
|
-
description: Rails I18n de-facto standard library for ActiveRecord
|
145
|
+
description: Rails I18n de-facto standard library for ActiveRecord model/data translation.
|
146
146
|
email: nobody@globalize-rails.org
|
147
147
|
executables: []
|
148
148
|
extensions: []
|
@@ -172,7 +172,7 @@ files:
|
|
172
172
|
- Gemfile.lock
|
173
173
|
- LICENSE
|
174
174
|
- Rakefile
|
175
|
-
homepage: http://github.com/
|
175
|
+
homepage: http://github.com/globalize/globalize
|
176
176
|
licenses:
|
177
177
|
- MIT
|
178
178
|
metadata: {}
|
@@ -195,6 +195,6 @@ rubyforge_project: '[none]'
|
|
195
195
|
rubygems_version: 2.1.0
|
196
196
|
signing_key:
|
197
197
|
specification_version: 4
|
198
|
-
summary: Rails I18n de-facto standard library for ActiveRecord
|
198
|
+
summary: Rails I18n de-facto standard library for ActiveRecord model/data translation
|
199
199
|
test_files: []
|
200
200
|
has_rdoc:
|