spree_core 3.6.4 → 3.6.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/spree/core/version.rb +1 -1
- data/lib/spree/money.rb +13 -5
- data/spree_core.gemspec +2 -1
- metadata +18 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 7f129d2d6881d6fa1ef3a6992d2db0c1a28333b69322b19a25cd25d93c14f089
|
4
|
+
data.tar.gz: 327da3039ddc3d5f97388b4a3a5ed8dfcc20809be70ac4803924cee55a197b12
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 744a4b31bf809fefd364890da0ff201fc9cbd90a0c6173fa0a2a93f163ad5eb9323b7e7d15d592de5ee986044409a56b580172e7cb80ac1d6460a937deb0de2a
|
7
|
+
data.tar.gz: 3b0558e6e90ddd99fc521eba0c7b7221e6532e2e1ae7f78f8a06128183dc596f60954437425f290cb3a31e3718b12c5db30b76d79d2362699dccf13203ba9216
|
data/lib/spree/core/version.rb
CHANGED
data/lib/spree/money.rb
CHANGED
@@ -2,6 +2,8 @@
|
|
2
2
|
|
3
3
|
require 'money'
|
4
4
|
|
5
|
+
Money.locale_backend = :i18n
|
6
|
+
|
5
7
|
module Spree
|
6
8
|
class Money
|
7
9
|
class <<self
|
@@ -30,13 +32,19 @@ module Spree
|
|
30
32
|
@money.format(@options)
|
31
33
|
end
|
32
34
|
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
35
|
+
# 1) prevent blank, breaking spaces
|
36
|
+
# 2) prevent escaping of HTML character entities
|
37
|
+
def to_html(opts = { html: true })
|
38
|
+
# html option is deprecated and we need to fallback to html_wrap
|
39
|
+
opts[:html_wrap] = opts[:html]
|
40
|
+
opts.delete(:html)
|
41
|
+
|
42
|
+
output = money.format(@options.merge(opts))
|
43
|
+
if opts[:html_wrap]
|
44
|
+
output.gsub!(/<\/?[^>]*>/, '') # we don't want wrap every element in span
|
38
45
|
output = output.sub(' ', ' ').html_safe
|
39
46
|
end
|
47
|
+
|
40
48
|
output
|
41
49
|
end
|
42
50
|
|
data/spree_core.gemspec
CHANGED
@@ -30,7 +30,8 @@ Gem::Specification.new do |s|
|
|
30
30
|
s.add_dependency 'friendly_id', '~> 5.2.1'
|
31
31
|
s.add_dependency 'highline', '~> 1.6.18' # Necessary for the install generator
|
32
32
|
s.add_dependency 'kaminari', '~> 1.0.1'
|
33
|
-
s.add_dependency '
|
33
|
+
s.add_dependency 'money', '~> 6.13'
|
34
|
+
s.add_dependency 'monetize', '~> 1.9'
|
34
35
|
s.add_dependency 'paperclip', '~> 6.0.0'
|
35
36
|
s.add_dependency 'paranoia', '~> 2.4.1'
|
36
37
|
s.add_dependency 'premailer-rails'
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: spree_core
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.6.
|
4
|
+
version: 3.6.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Sean Schofield
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-
|
11
|
+
date: 2018-11-06 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activemerchant
|
@@ -150,20 +150,34 @@ dependencies:
|
|
150
150
|
- - "~>"
|
151
151
|
- !ruby/object:Gem::Version
|
152
152
|
version: 1.0.1
|
153
|
+
- !ruby/object:Gem::Dependency
|
154
|
+
name: money
|
155
|
+
requirement: !ruby/object:Gem::Requirement
|
156
|
+
requirements:
|
157
|
+
- - "~>"
|
158
|
+
- !ruby/object:Gem::Version
|
159
|
+
version: '6.13'
|
160
|
+
type: :runtime
|
161
|
+
prerelease: false
|
162
|
+
version_requirements: !ruby/object:Gem::Requirement
|
163
|
+
requirements:
|
164
|
+
- - "~>"
|
165
|
+
- !ruby/object:Gem::Version
|
166
|
+
version: '6.13'
|
153
167
|
- !ruby/object:Gem::Dependency
|
154
168
|
name: monetize
|
155
169
|
requirement: !ruby/object:Gem::Requirement
|
156
170
|
requirements:
|
157
171
|
- - "~>"
|
158
172
|
- !ruby/object:Gem::Version
|
159
|
-
version: '1.
|
173
|
+
version: '1.9'
|
160
174
|
type: :runtime
|
161
175
|
prerelease: false
|
162
176
|
version_requirements: !ruby/object:Gem::Requirement
|
163
177
|
requirements:
|
164
178
|
- - "~>"
|
165
179
|
- !ruby/object:Gem::Version
|
166
|
-
version: '1.
|
180
|
+
version: '1.9'
|
167
181
|
- !ruby/object:Gem::Dependency
|
168
182
|
name: paperclip
|
169
183
|
requirement: !ruby/object:Gem::Requirement
|