mongoid_money_field 4.0.6 → 4.0.7
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +25 -21
- data/lib/mongoid_money_field/version.rb +1 -1
- data/lib/mongoid_money_field.rb +5 -1
- metadata +31 -31
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 13fd2be521b2ea8721b0531787b531f57f3d7467
|
4
|
+
data.tar.gz: 3de18d51cfc1ce923353f25e68cabc840bf4c927
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3d8f6dc6e7c7c7ca33a7dd84855b633f69a303535f34e7bfc3d34b381a4cbd2fdd33f08f7ef153375ed2fba7f0f0e3ceb1106fc2ce9c2bfa709a7766f6e032f9
|
7
|
+
data.tar.gz: 0e02e71d00c15d529ea6011278e960312d18d6d94713ea55c07ec9bed5155a77b279231950b234220170509ef8a83ed22f3b6d036043ee90c39943b660b236e7
|
data/Gemfile.lock
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
mongoid_money_field (4.0.
|
4
|
+
mongoid_money_field (4.0.7)
|
5
5
|
monetize
|
6
6
|
money (~> 6.1.0.beta1)
|
7
7
|
mongoid (>= 3.0.0)
|
@@ -9,21 +9,21 @@ PATH
|
|
9
9
|
GEM
|
10
10
|
remote: https://rubygems.org/
|
11
11
|
specs:
|
12
|
-
activemodel (3.2.
|
13
|
-
activesupport (= 3.2.
|
12
|
+
activemodel (3.2.19)
|
13
|
+
activesupport (= 3.2.19)
|
14
14
|
builder (~> 3.0.0)
|
15
|
-
activesupport (3.2.
|
15
|
+
activesupport (3.2.19)
|
16
16
|
i18n (~> 0.6, >= 0.6.4)
|
17
17
|
multi_json (~> 1.0)
|
18
18
|
builder (3.0.4)
|
19
|
-
database_cleaner (1.
|
19
|
+
database_cleaner (1.3.0)
|
20
20
|
diff-lcs (1.2.5)
|
21
|
-
docile (1.1.
|
22
|
-
i18n (0.6.
|
21
|
+
docile (1.1.5)
|
22
|
+
i18n (0.6.11)
|
23
23
|
json (1.8.1)
|
24
|
-
monetize (0.
|
24
|
+
monetize (0.3.0)
|
25
25
|
money (~> 6.1.0.beta1)
|
26
|
-
money (6.1.
|
26
|
+
money (6.1.1)
|
27
27
|
i18n (~> 0.6.4)
|
28
28
|
mongoid (3.1.6)
|
29
29
|
activemodel (~> 3.2)
|
@@ -35,25 +35,29 @@ GEM
|
|
35
35
|
rake
|
36
36
|
rspec (>= 2.14)
|
37
37
|
moped (1.5.2)
|
38
|
-
multi_json (1.
|
38
|
+
multi_json (1.10.1)
|
39
39
|
origin (1.1.0)
|
40
|
-
rake (10.
|
40
|
+
rake (10.3.2)
|
41
41
|
rdoc (4.1.1)
|
42
42
|
json (~> 1.4)
|
43
|
-
rspec (
|
44
|
-
rspec-core (~>
|
45
|
-
rspec-expectations (~>
|
46
|
-
rspec-mocks (~>
|
47
|
-
rspec-core (
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
43
|
+
rspec (3.0.0)
|
44
|
+
rspec-core (~> 3.0.0)
|
45
|
+
rspec-expectations (~> 3.0.0)
|
46
|
+
rspec-mocks (~> 3.0.0)
|
47
|
+
rspec-core (3.0.3)
|
48
|
+
rspec-support (~> 3.0.0)
|
49
|
+
rspec-expectations (3.0.3)
|
50
|
+
diff-lcs (>= 1.2.0, < 2.0)
|
51
|
+
rspec-support (~> 3.0.0)
|
52
|
+
rspec-mocks (3.0.3)
|
53
|
+
rspec-support (~> 3.0.0)
|
54
|
+
rspec-support (3.0.3)
|
55
|
+
simplecov (0.9.0)
|
52
56
|
docile (~> 1.1.0)
|
53
57
|
multi_json
|
54
58
|
simplecov-html (~> 0.8.0)
|
55
59
|
simplecov-html (0.8.0)
|
56
|
-
tzinfo (0.3.
|
60
|
+
tzinfo (0.3.40)
|
57
61
|
|
58
62
|
PLATFORMS
|
59
63
|
ruby
|
data/lib/mongoid_money_field.rb
CHANGED
@@ -53,7 +53,11 @@ module Mongoid
|
|
53
53
|
write_attribute(name, nil)
|
54
54
|
else
|
55
55
|
if opts[:default_currency].nil?
|
56
|
-
|
56
|
+
if value.is_a?(Hash)
|
57
|
+
money = Money.new(value['cents'], value['currency_iso'])
|
58
|
+
else
|
59
|
+
money = value.to_money
|
60
|
+
end
|
57
61
|
else
|
58
62
|
old_default = Money.default_currency
|
59
63
|
Money.default_currency = Money::Currency.new(opts[:default_currency])
|
metadata
CHANGED
@@ -1,153 +1,153 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: mongoid_money_field
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 4.0.
|
4
|
+
version: 4.0.7
|
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-
|
11
|
+
date: 2014-07-30 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: mongoid
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
|
-
- -
|
17
|
+
- - ">="
|
18
18
|
- !ruby/object:Gem::Version
|
19
19
|
version: 3.0.0
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
|
-
- -
|
24
|
+
- - ">="
|
25
25
|
- !ruby/object:Gem::Version
|
26
26
|
version: 3.0.0
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: monetize
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
|
-
- -
|
31
|
+
- - ">="
|
32
32
|
- !ruby/object:Gem::Version
|
33
33
|
version: '0'
|
34
34
|
type: :runtime
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
|
-
- -
|
38
|
+
- - ">="
|
39
39
|
- !ruby/object:Gem::Version
|
40
40
|
version: '0'
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
42
|
name: money
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
44
44
|
requirements:
|
45
|
-
- - ~>
|
45
|
+
- - "~>"
|
46
46
|
- !ruby/object:Gem::Version
|
47
47
|
version: 6.1.0.beta1
|
48
48
|
type: :runtime
|
49
49
|
prerelease: false
|
50
50
|
version_requirements: !ruby/object:Gem::Requirement
|
51
51
|
requirements:
|
52
|
-
- - ~>
|
52
|
+
- - "~>"
|
53
53
|
- !ruby/object:Gem::Version
|
54
54
|
version: 6.1.0.beta1
|
55
55
|
- !ruby/object:Gem::Dependency
|
56
56
|
name: rake
|
57
57
|
requirement: !ruby/object:Gem::Requirement
|
58
58
|
requirements:
|
59
|
-
- -
|
59
|
+
- - ">="
|
60
60
|
- !ruby/object:Gem::Version
|
61
61
|
version: '0'
|
62
62
|
type: :development
|
63
63
|
prerelease: false
|
64
64
|
version_requirements: !ruby/object:Gem::Requirement
|
65
65
|
requirements:
|
66
|
-
- -
|
66
|
+
- - ">="
|
67
67
|
- !ruby/object:Gem::Version
|
68
68
|
version: '0'
|
69
69
|
- !ruby/object:Gem::Dependency
|
70
70
|
name: bundler
|
71
71
|
requirement: !ruby/object:Gem::Requirement
|
72
72
|
requirements:
|
73
|
-
- -
|
73
|
+
- - ">="
|
74
74
|
- !ruby/object:Gem::Version
|
75
75
|
version: '0'
|
76
76
|
type: :development
|
77
77
|
prerelease: false
|
78
78
|
version_requirements: !ruby/object:Gem::Requirement
|
79
79
|
requirements:
|
80
|
-
- -
|
80
|
+
- - ">="
|
81
81
|
- !ruby/object:Gem::Version
|
82
82
|
version: '0'
|
83
83
|
- !ruby/object:Gem::Dependency
|
84
84
|
name: rspec
|
85
85
|
requirement: !ruby/object:Gem::Requirement
|
86
86
|
requirements:
|
87
|
-
- -
|
87
|
+
- - ">="
|
88
88
|
- !ruby/object:Gem::Version
|
89
89
|
version: '0'
|
90
90
|
type: :development
|
91
91
|
prerelease: false
|
92
92
|
version_requirements: !ruby/object:Gem::Requirement
|
93
93
|
requirements:
|
94
|
-
- -
|
94
|
+
- - ">="
|
95
95
|
- !ruby/object:Gem::Version
|
96
96
|
version: '0'
|
97
97
|
- !ruby/object:Gem::Dependency
|
98
98
|
name: rdoc
|
99
99
|
requirement: !ruby/object:Gem::Requirement
|
100
100
|
requirements:
|
101
|
-
- -
|
101
|
+
- - ">="
|
102
102
|
- !ruby/object:Gem::Version
|
103
103
|
version: '0'
|
104
104
|
type: :development
|
105
105
|
prerelease: false
|
106
106
|
version_requirements: !ruby/object:Gem::Requirement
|
107
107
|
requirements:
|
108
|
-
- -
|
108
|
+
- - ">="
|
109
109
|
- !ruby/object:Gem::Version
|
110
110
|
version: '0'
|
111
111
|
- !ruby/object:Gem::Dependency
|
112
112
|
name: simplecov
|
113
113
|
requirement: !ruby/object:Gem::Requirement
|
114
114
|
requirements:
|
115
|
-
- -
|
115
|
+
- - ">="
|
116
116
|
- !ruby/object:Gem::Version
|
117
117
|
version: '0'
|
118
118
|
type: :development
|
119
119
|
prerelease: false
|
120
120
|
version_requirements: !ruby/object:Gem::Requirement
|
121
121
|
requirements:
|
122
|
-
- -
|
122
|
+
- - ">="
|
123
123
|
- !ruby/object:Gem::Version
|
124
124
|
version: '0'
|
125
125
|
- !ruby/object:Gem::Dependency
|
126
126
|
name: database_cleaner
|
127
127
|
requirement: !ruby/object:Gem::Requirement
|
128
128
|
requirements:
|
129
|
-
- -
|
129
|
+
- - ">="
|
130
130
|
- !ruby/object:Gem::Version
|
131
131
|
version: '0'
|
132
132
|
type: :development
|
133
133
|
prerelease: false
|
134
134
|
version_requirements: !ruby/object:Gem::Requirement
|
135
135
|
requirements:
|
136
|
-
- -
|
136
|
+
- - ">="
|
137
137
|
- !ruby/object:Gem::Version
|
138
138
|
version: '0'
|
139
139
|
- !ruby/object:Gem::Dependency
|
140
140
|
name: mongoid-rspec
|
141
141
|
requirement: !ruby/object:Gem::Requirement
|
142
142
|
requirements:
|
143
|
-
- -
|
143
|
+
- - ">="
|
144
144
|
- !ruby/object:Gem::Version
|
145
145
|
version: '0'
|
146
146
|
type: :development
|
147
147
|
prerelease: false
|
148
148
|
version_requirements: !ruby/object:Gem::Requirement
|
149
149
|
requirements:
|
150
|
-
- -
|
150
|
+
- - ">="
|
151
151
|
- !ruby/object:Gem::Version
|
152
152
|
version: '0'
|
153
153
|
description: Use RubyMoney with mongoid
|
@@ -157,12 +157,12 @@ executables: []
|
|
157
157
|
extensions: []
|
158
158
|
extra_rdoc_files: []
|
159
159
|
files:
|
160
|
-
- .document
|
161
|
-
- .gitignore
|
162
|
-
- .rspec
|
163
|
-
- .ruby-gemset
|
164
|
-
- .ruby-version
|
165
|
-
- .travis.yml
|
160
|
+
- ".document"
|
161
|
+
- ".gitignore"
|
162
|
+
- ".rspec"
|
163
|
+
- ".ruby-gemset"
|
164
|
+
- ".ruby-version"
|
165
|
+
- ".travis.yml"
|
166
166
|
- Gemfile
|
167
167
|
- Gemfile.lock
|
168
168
|
- LICENSE.txt
|
@@ -205,17 +205,17 @@ require_paths:
|
|
205
205
|
- lib
|
206
206
|
required_ruby_version: !ruby/object:Gem::Requirement
|
207
207
|
requirements:
|
208
|
-
- -
|
208
|
+
- - ">="
|
209
209
|
- !ruby/object:Gem::Version
|
210
210
|
version: '0'
|
211
211
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
212
212
|
requirements:
|
213
|
-
- -
|
213
|
+
- - ">="
|
214
214
|
- !ruby/object:Gem::Version
|
215
215
|
version: '0'
|
216
216
|
requirements: []
|
217
217
|
rubyforge_project:
|
218
|
-
rubygems_version: 2.2.
|
218
|
+
rubygems_version: 2.2.2
|
219
219
|
signing_key:
|
220
220
|
specification_version: 4
|
221
221
|
summary: Use RubyMoney with mongoid
|