mongoid_money_field 5.1.0 → 5.2.0

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: 8d597501e969ab92ffc3a6958e242515f734da04
4
- data.tar.gz: 8605ccc7c7666f68cd05f37937f206e5f8e61430
3
+ metadata.gz: 24b9899833c2b5c8039757b9cee3964333e3883a
4
+ data.tar.gz: e6350015be4ed57d7a5e9e5d052fc6ad0f83ed29
5
5
  SHA512:
6
- metadata.gz: 61a4e7253dc18ff0f3e05edc1385a03ec3fe5f684b2f9b9757070429d4c5dc0025e41d47c0fe4a520f34de1ce0a6e0ff8b7bc0a7e4a5c7efd344717cf1e3191f
7
- data.tar.gz: f61ba0e48c01a9a32eeac0f5bf5e272790e4288c558de3f0926094d27f562300a45eeea770918af3a64356ac339fe1e84352dc75e7ca9010deac6872d9a5dbf0
6
+ metadata.gz: 0dd93ee6e9400cb2322a3273c2a7a1d55a1aab5828d08825c521c910d75245ef01b1cef6a3a4a5b1fef0930e28343677237b04bc3b7226b261e4ec19bb821b81
7
+ data.tar.gz: d3a185d812fa39e31740faeffd10530630502541969be1d0accee20d2fe8c376184e95c286a5f4237baae653c1666c9d927997a148f7609ef3cb4dc94726ccd2
data/.travis.yml CHANGED
@@ -3,9 +3,9 @@ language: ruby
3
3
  services: mongodb
4
4
 
5
5
  gemfile:
6
- - gemfiles/money51-mongoid31.gemfile
7
- - gemfiles/money51-mongoid4.gemfile
8
-
6
+ - gemfiles/money6-mongoid31.gemfile
7
+ - gemfiles/money6-mongoid4.gemfile
8
+
9
9
  rvm:
10
10
  - 1.9.3
11
11
  - 2.0.0
@@ -1,6 +1,5 @@
1
1
  source "https://rubygems.org"
2
2
 
3
3
  gem "mongoid", '~> 3.1.0'
4
- gem "money", "~> 6.0.0.pre5"
5
4
 
6
5
  gemspec path: "../"
@@ -1,6 +1,5 @@
1
1
  source "https://rubygems.org"
2
2
 
3
3
  gem "mongoid", github: "mongoid/mongoid", branch: "master"
4
- gem "money", "~> 6.0.0.pre5"
5
4
 
6
5
  gemspec path: "../"
@@ -1,19 +1,28 @@
1
1
  require 'rails_admin/adapters/mongoid'
2
- require 'rails_admin/config/fields/types/string'
2
+ begin
3
+ require 'rails_admin/adapters/mongoid/property'
4
+ rescue Exception => e
5
+ end
6
+
3
7
  module RailsAdmin
4
8
  module Adapters
5
9
  module Mongoid
6
- alias_method :type_lookup_without_money, :type_lookup
7
- def type_lookup(name, field)
8
- if field.type.to_s == 'Money' || field.type.class.name == 'MoneyType'
9
- { :type => :money_field }
10
- else
11
- type_lookup_without_money(name, field)
10
+ class Property
11
+ alias_method :type_without_money_field, :type
12
+ def type
13
+ if property.type.to_s == 'Money' || property.type.class.name == 'MoneyType'
14
+ :money_field
15
+ else
16
+ type_without_money_field
17
+ end
12
18
  end
13
19
  end
14
20
  end
15
21
  end
22
+ end
16
23
 
24
+ require 'rails_admin/config/fields/types/string'
25
+ module RailsAdmin
17
26
  module Config
18
27
  module Fields
19
28
  module Types
@@ -39,4 +48,3 @@ module RailsAdmin
39
48
  end
40
49
  end
41
50
  end
42
-
@@ -1,3 +1,3 @@
1
1
  module MongoidMoneyField
2
- VERSION = "5.1.0"
2
+ VERSION = "5.2.0"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mongoid_money_field
3
3
  version: !ruby/object:Gem::Version
4
- version: 5.1.0
4
+ version: 5.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Gleb Tv
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-02-13 00:00:00.000000000 Z
11
+ date: 2014-04-16 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: mongoid
@@ -168,8 +168,6 @@ files:
168
168
  - LICENSE.txt
169
169
  - README.rdoc
170
170
  - Rakefile
171
- - gemfiles/money51-mongoid31.gemfile
172
- - gemfiles/money51-mongoid4.gemfile
173
171
  - gemfiles/money6-mongoid31.gemfile
174
172
  - gemfiles/money6-mongoid4.gemfile
175
173
  - lib/mongoid_money_field.rb
@@ -1,6 +0,0 @@
1
- source "http://rubygems.org"
2
-
3
- gem 'mongoid', '~> 3.1.0'
4
- gem "money", "~> 5.1.1"
5
-
6
- gemspec path: "../"
@@ -1,6 +0,0 @@
1
- source "https://rubygems.org"
2
-
3
- gem "mongoid", github: "mongoid/mongoid", branch: "master"
4
- gem "money", "~> 5.1.1"
5
-
6
- gemspec path: "../"