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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: ed945b50f0486e1208240d9fd524c037b12685736a9a1d2863ec4c0d0e8e992a
4
- data.tar.gz: b1c3007ef975798c1302289b22ee08d1110be88ae910bf1855895fdc3c30cfe8
3
+ metadata.gz: 7f129d2d6881d6fa1ef3a6992d2db0c1a28333b69322b19a25cd25d93c14f089
4
+ data.tar.gz: 327da3039ddc3d5f97388b4a3a5ed8dfcc20809be70ac4803924cee55a197b12
5
5
  SHA512:
6
- metadata.gz: 66baebd11a78c5d7013817b63aada583f38cc03b519e8993ee662312f842dc04bfca08bddcf92b4b87d09960901426ee135fc80e70334f316b3fe93892e3c9f1
7
- data.tar.gz: f0c1a4ecf0608f30a4427fe225018419073e3a617b29d351f56c7d365c071ad095ef5bddd82487a2dfcb9b1391c211550364e120c633f576b5c688ca85a9e671
6
+ metadata.gz: 744a4b31bf809fefd364890da0ff201fc9cbd90a0c6173fa0a2a93f163ad5eb9323b7e7d15d592de5ee986044409a56b580172e7cb80ac1d6460a937deb0de2a
7
+ data.tar.gz: 3b0558e6e90ddd99fc521eba0c7b7221e6532e2e1ae7f78f8a06128183dc596f60954437425f290cb3a31e3718b12c5db30b76d79d2362699dccf13203ba9216
@@ -1,5 +1,5 @@
1
1
  module Spree
2
2
  def self.version
3
- '3.6.4'
3
+ '3.6.5'
4
4
  end
5
5
  end
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
- def to_html(options = { html: true })
34
- output = @money.format(@options.merge(options))
35
- if options[:html]
36
- # 1) prevent blank, breaking spaces
37
- # 2) prevent escaping of HTML character entities
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(' ', '&nbsp;').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 'monetize', '~> 1.1'
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
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-09-06 00:00:00.000000000 Z
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.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.1'
180
+ version: '1.9'
167
181
  - !ruby/object:Gem::Dependency
168
182
  name: paperclip
169
183
  requirement: !ruby/object:Gem::Requirement