mongoid_i18n 0.1.0 → 0.1.1
Sign up to get free protection for your applications and to get access to all the features.
- data/VERSION +1 -0
- data/lib/mongoid/i18n/localized_criteria.rb +2 -7
- data/mongoid_i18n.gemspec +69 -0
- metadata +4 -2
data/VERSION
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
0.1.1
|
@@ -2,13 +2,8 @@ module Mongoid
|
|
2
2
|
module I18n
|
3
3
|
class LocalizedCriteria < Mongoid::Criteria
|
4
4
|
def where(selector = nil)
|
5
|
-
|
6
|
-
|
7
|
-
@selector.update("$where" => selector)
|
8
|
-
else
|
9
|
-
@selector.update(selector ? selector.expand_complex_criteria : {})
|
10
|
-
expand_localized_fields_in_selector if @selector.is_a?(Hash)
|
11
|
-
end
|
5
|
+
super
|
6
|
+
expand_localized_fields_in_selector if selector.is_a?(Hash)
|
12
7
|
self
|
13
8
|
end
|
14
9
|
|
@@ -0,0 +1,69 @@
|
|
1
|
+
# Generated by jeweler
|
2
|
+
# DO NOT EDIT THIS FILE DIRECTLY
|
3
|
+
# Instead, edit Jeweler::Tasks in Rakefile, and run the gemspec command
|
4
|
+
# -*- encoding: utf-8 -*-
|
5
|
+
|
6
|
+
Gem::Specification.new do |s|
|
7
|
+
s.name = %q{mongoid_i18n}
|
8
|
+
s.version = "0.1.1"
|
9
|
+
|
10
|
+
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
|
+
s.authors = ["Rodrigo Álvarez"]
|
12
|
+
s.date = %q{2010-05-03}
|
13
|
+
s.description = %q{This gem aims to be a transparent way to deal with localizable fields.
|
14
|
+
Basically use localized_field() instead of field() and that's it.
|
15
|
+
It will take care of locales for you when using find.
|
16
|
+
}
|
17
|
+
s.email = %q{papipo@gmail.com}
|
18
|
+
s.extra_rdoc_files = [
|
19
|
+
"LICENSE",
|
20
|
+
"README.rdoc"
|
21
|
+
]
|
22
|
+
s.files = [
|
23
|
+
".document",
|
24
|
+
".gitignore",
|
25
|
+
"Gemfile",
|
26
|
+
"LICENSE",
|
27
|
+
"README.rdoc",
|
28
|
+
"Rakefile",
|
29
|
+
"VERSION",
|
30
|
+
"lib/mongoid/i18n.rb",
|
31
|
+
"lib/mongoid/i18n/localized_criteria.rb",
|
32
|
+
"lib/mongoid/i18n/localized_field.rb",
|
33
|
+
"lib/mongoid/i18n/patches.rb",
|
34
|
+
"mongoid_i18n.gemspec",
|
35
|
+
"spec/.rspec",
|
36
|
+
"spec/integration/mongoid/i18n_spec.rb",
|
37
|
+
"spec/spec_helper.rb",
|
38
|
+
"spec/unit/mongoid/i18n/localized_criteria_spec.rb",
|
39
|
+
"spec/unit/mongoid/i18n_spec.rb"
|
40
|
+
]
|
41
|
+
s.homepage = %q{http://github.com/Papipo/mongoid_i18n}
|
42
|
+
s.rdoc_options = ["--charset=UTF-8"]
|
43
|
+
s.require_paths = ["lib"]
|
44
|
+
s.rubygems_version = %q{1.3.6}
|
45
|
+
s.summary = %q{Mongoid plugin to deal with localizable fields}
|
46
|
+
s.test_files = [
|
47
|
+
"spec/integration/mongoid/i18n_spec.rb",
|
48
|
+
"spec/spec_helper.rb",
|
49
|
+
"spec/unit/mongoid/i18n/localized_criteria_spec.rb",
|
50
|
+
"spec/unit/mongoid/i18n_spec.rb"
|
51
|
+
]
|
52
|
+
|
53
|
+
if s.respond_to? :specification_version then
|
54
|
+
current_version = Gem::Specification::CURRENT_SPECIFICATION_VERSION
|
55
|
+
s.specification_version = 3
|
56
|
+
|
57
|
+
if Gem::Version.new(Gem::RubyGemsVersion) >= Gem::Version.new('1.2.0') then
|
58
|
+
s.add_runtime_dependency(%q<mongoid>, ["= 2.0.0.beta4"])
|
59
|
+
s.add_development_dependency(%q<rspec>, ["= 2.0.0.beta.8"])
|
60
|
+
else
|
61
|
+
s.add_dependency(%q<mongoid>, ["= 2.0.0.beta4"])
|
62
|
+
s.add_dependency(%q<rspec>, ["= 2.0.0.beta.8"])
|
63
|
+
end
|
64
|
+
else
|
65
|
+
s.add_dependency(%q<mongoid>, ["= 2.0.0.beta4"])
|
66
|
+
s.add_dependency(%q<rspec>, ["= 2.0.0.beta.8"])
|
67
|
+
end
|
68
|
+
end
|
69
|
+
|
metadata
CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
|
|
5
5
|
segments:
|
6
6
|
- 0
|
7
7
|
- 1
|
8
|
-
-
|
9
|
-
version: 0.1.
|
8
|
+
- 1
|
9
|
+
version: 0.1.1
|
10
10
|
platform: ruby
|
11
11
|
authors:
|
12
12
|
- "Rodrigo \xC3\x81lvarez"
|
@@ -64,10 +64,12 @@ files:
|
|
64
64
|
- LICENSE
|
65
65
|
- README.rdoc
|
66
66
|
- Rakefile
|
67
|
+
- VERSION
|
67
68
|
- lib/mongoid/i18n.rb
|
68
69
|
- lib/mongoid/i18n/localized_criteria.rb
|
69
70
|
- lib/mongoid/i18n/localized_field.rb
|
70
71
|
- lib/mongoid/i18n/patches.rb
|
72
|
+
- mongoid_i18n.gemspec
|
71
73
|
- spec/.rspec
|
72
74
|
- spec/integration/mongoid/i18n_spec.rb
|
73
75
|
- spec/spec_helper.rb
|