mongomodel 0.1.4 → 0.1.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.
@@ -1,10 +1,14 @@
1
1
  module MongoModel
2
2
  module Translation
3
- extend ActiveModel::Translation
3
+ extend ActiveSupport::Concern
4
4
 
5
- # Set the i18n scope to overwrite ActiveModel.
6
- def i18n_scope #:nodoc:
7
- :mongomodel
5
+ module ClassMethods
6
+ include ActiveModel::Translation
7
+
8
+ # Set the i18n scope to overwrite ActiveModel.
9
+ def i18n_scope #:nodoc:
10
+ :mongomodel
11
+ end
8
12
  end
9
13
  end
10
14
  end
@@ -11,8 +11,7 @@ module MongoModel
11
11
  include Attributes
12
12
  include Properties
13
13
 
14
- extend Translation
15
-
14
+ include Translation
16
15
  include Validations
17
16
  include Callbacks
18
17
 
@@ -1,3 +1,3 @@
1
1
  module MongoModel
2
- VERSION = "0.1.4"
2
+ VERSION = "0.1.5"
3
3
  end
@@ -0,0 +1,9 @@
1
+ require 'spec_helper'
2
+
3
+ module MongoModel
4
+ specs_for(Document, EmbeddedDocument) do
5
+ it "should use correct i18n scope" do
6
+ described_class.i18n_scope.should == :mongomodel
7
+ end
8
+ end
9
+ end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mongomodel
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.4
4
+ version: 0.1.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Sam Pohlenz
@@ -9,7 +9,7 @@ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
 
12
- date: 2010-02-16 00:00:00 +10:30
12
+ date: 2010-02-19 00:00:00 +10:30
13
13
  default_executable: console
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
@@ -135,6 +135,7 @@ files:
135
135
  - spec/mongomodel/concerns/properties_spec.rb
136
136
  - spec/mongomodel/concerns/serialization/json_serialization_spec.rb
137
137
  - spec/mongomodel/concerns/timestamps_spec.rb
138
+ - spec/mongomodel/concerns/translation_spec.rb
138
139
  - spec/mongomodel/concerns/validations_spec.rb
139
140
  - spec/mongomodel/document/callbacks_spec.rb
140
141
  - spec/mongomodel/document/dynamic_finders_spec.rb
@@ -209,6 +210,7 @@ test_files:
209
210
  - spec/mongomodel/concerns/properties_spec.rb
210
211
  - spec/mongomodel/concerns/serialization/json_serialization_spec.rb
211
212
  - spec/mongomodel/concerns/timestamps_spec.rb
213
+ - spec/mongomodel/concerns/translation_spec.rb
212
214
  - spec/mongomodel/concerns/validations_spec.rb
213
215
  - spec/mongomodel/document/callbacks_spec.rb
214
216
  - spec/mongomodel/document/dynamic_finders_spec.rb