shopify-money 0.14.1 → 0.14.2

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: 628a1b8f14e70dcedec1976591b8bbdb210c76378990410e787495fb4e04665f
4
- data.tar.gz: d8f6d21d893ab98611560fd3f6c438faa81e0f78a4687849d2a55f49bb3846f2
3
+ metadata.gz: 9b719c9a9971dd875ee577e791f2caf49c146c9a08cdc5f9b415a8b1359645fc
4
+ data.tar.gz: f1e2d5250c520dd76491f2adacb6d6a9f99f91ae2fc1529c9fe9d58589d4172b
5
5
  SHA512:
6
- metadata.gz: 22899e9e95b0040419a10c6275ec6a01e7d32c68e7336c749c82a4ba7af943189146bbfef3ce1b487d462f28600231700262014ba709c10fef61e47d1346115a
7
- data.tar.gz: 3d070488e54598ea4a5bc2c6c8d1a9a47b59290993d92ad1ae80f89e1094da2e8609f82c50eac8cfc6dea11184259134b416406085172651599cfacd567fe38b
6
+ metadata.gz: 907fa206d1f4405be598d50f7d72591ab6f048c1b2b454a281d1789d958ef9ff659aacf2a440f6c7ec29f7e607e793667edb0e7dd29cd411688cb8899d917371
7
+ data.tar.gz: 809321fe1d30b417bed08a20719d576eb28f478edaa00e919dea0be995bc37897534563574404e689a1da9f8ce374908abb84d6ce426b07f45df039e30674f7c
@@ -7,9 +7,6 @@ branches:
7
7
  rvm:
8
8
  - 2.7
9
9
  - 2.6
10
- - 2.5
11
- - 2.4
12
- - 2.3
13
10
  before_install:
14
11
  # https://github.com/travis-ci/travis-ci/issues/8978#issuecomment-354036443
15
12
  - gem update --system
data/Gemfile CHANGED
@@ -1,6 +1,7 @@
1
+ # frozen_string_literal: true
1
2
  source "https://rubygems.org"
2
3
 
3
4
  gem "pry-byebug", require: false
4
- gem 'codecov', require: false
5
+ gem 'rubocop', "~> 0.81.0", require: false
5
6
 
6
7
  gemspec
data/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # money
2
2
 
3
- [![Build Status](https://travis-ci.org/Shopify/money.svg?branch=master)](https://travis-ci.org/Shopify/money) [![codecov](https://codecov.io/gh/Shopify/money/branch/master/graph/badge.svg)](https://codecov.io/gh/Shopify/money)
3
+ [![Build Status](https://travis-ci.org/Shopify/money.svg?branch=master)](https://travis-ci.org/Shopify/money)
4
4
 
5
5
 
6
6
  money_column expects a DECIMAL(21,3) database field.
@@ -139,6 +139,25 @@ currency on the model or attribute level.
139
139
  There are no validations generated. You can add these for the specified money
140
140
  and currency attributes as you normally would for any other.
141
141
 
142
+ ## Rubocop
143
+
144
+ A RuboCop rule to enforce the presence of a currency using static analysis is available.
145
+
146
+ Add to your `.rubocop.yml`
147
+ ```yaml
148
+ require:
149
+ - money
150
+
151
+ Money/MissingCurrency:
152
+ Enabled: true
153
+ ```
154
+
155
+ If your application is currently handling only one currency, it can autocorrect this by specifying a currency under the `Enabled` line:
156
+
157
+ ```yaml
158
+ ReplacementCurrency: 'CAD'
159
+ ```
160
+
142
161
  ## Contributing to money
143
162
 
144
163
  - Check out the latest master to make sure the feature hasn't been implemented or the bug hasn't been fixed yet
data/Rakefile CHANGED
@@ -1,4 +1,5 @@
1
1
  # encoding: utf-8
2
+ # frozen_string_literal: true
2
3
 
3
4
  begin
4
5
  require 'bundler/gem_tasks'
@@ -1,4 +1,5 @@
1
1
  #!/usr/bin/env ruby
2
+ # frozen_string_literal: true
2
3
 
3
4
  require "bundler/setup"
4
5
  require "money"
data/dev.yml CHANGED
@@ -3,7 +3,7 @@
3
3
  ---
4
4
  name: money
5
5
  up:
6
- - ruby: 2.5.3
6
+ - ruby: 2.6.6
7
7
  - bundler
8
8
  commands:
9
9
  test: bundle exec rspec
@@ -1,3 +1,4 @@
1
+ # frozen_string_literal: true
1
2
  require_relative 'money/money_parser'
2
3
  require_relative 'money/helpers'
3
4
  require_relative 'money/currency'
@@ -10,3 +11,5 @@ require_relative 'money/accounting_money_parser'
10
11
  require_relative 'money/core_extensions'
11
12
  require_relative 'money_accessor'
12
13
  require_relative 'money_column' if defined?(ActiveRecord)
14
+
15
+ require_relative 'rubocop/cop/money' if defined?(RuboCop)
@@ -1,3 +1,4 @@
1
+ # frozen_string_literal: true
1
2
  require 'delegate'
2
3
 
3
4
  class Money
@@ -1,3 +1,4 @@
1
+ # frozen_string_literal: true
1
2
  # Allows Writing of 100.to_money for +Numeric+ types
2
3
  # 100.to_money => #<Money @cents=10000>
3
4
  # 100.37.to_money => #<Money @cents=10037>
@@ -1,3 +1,4 @@
1
+ # frozen_string_literal: true
1
2
  require "money/currency/loader"
2
3
 
3
4
  class Money
@@ -1,3 +1,4 @@
1
+ # frozen_string_literal: true
1
2
  require 'json'
2
3
 
3
4
  class Money
@@ -1,3 +1,4 @@
1
+ # frozen_string_literal: true
1
2
  Money.class_eval do
2
3
  ACTIVE_SUPPORT_DEFINED = defined?(ActiveSupport)
3
4
 
@@ -1,3 +1,4 @@
1
+ # frozen_string_literal: true
1
2
  class Money
2
3
  class Error < StandardError
3
4
  end
@@ -5,7 +5,6 @@ class Money
5
5
  module Helpers
6
6
  module_function
7
7
 
8
- NUMERIC_REGEX = /\A\s*[\+\-]?(\d+|\d*\.\d+)\s*\z/
9
8
  DECIMAL_ZERO = BigDecimal(0).freeze
10
9
  MAX_DECIMAL = 21
11
10
 
@@ -25,7 +24,11 @@ class Money
25
24
  when Rational
26
25
  BigDecimal(num, MAX_DECIMAL)
27
26
  when String
28
- string_to_decimal(num)
27
+ decimal = BigDecimal(num, exception: false)
28
+ return decimal if decimal
29
+
30
+ Money.deprecate("using Money.new('#{num}') is deprecated and will raise an ArgumentError in the next major release")
31
+ DECIMAL_ZERO
29
32
  else
30
33
  raise ArgumentError, "could not parse as decimal #{num.inspect}"
31
34
  end
@@ -54,18 +57,5 @@ class Money
54
57
  raise ArgumentError, "could not parse as currency #{currency.inspect}"
55
58
  end
56
59
  end
57
-
58
- def string_to_decimal(num)
59
- if num =~ NUMERIC_REGEX
60
- return BigDecimal(num)
61
- end
62
-
63
- Money.deprecate("using Money.new('#{num}') is deprecated and will raise an ArgumentError in the next major release")
64
- begin
65
- BigDecimal(num)
66
- rescue ArgumentError
67
- DECIMAL_ZERO
68
- end
69
- end
70
60
  end
71
61
  end
@@ -1,3 +1,4 @@
1
+ # frozen_string_literal: true
1
2
  require 'forwardable'
2
3
 
3
4
  class Money
@@ -30,8 +31,8 @@ class Money
30
31
  end
31
32
  alias_method :empty, :zero
32
33
 
33
- def parse(*args)
34
- parser.parse(*args)
34
+ def parse(*args, **kwargs)
35
+ parser.parse(*args, **kwargs)
35
36
  end
36
37
 
37
38
  def from_cents(cents, currency = nil)
@@ -1,3 +1,4 @@
1
+ # frozen_string_literal: true
1
2
  class Money
2
3
  class NullCurrency
3
4
 
@@ -1,3 +1,4 @@
1
+ # frozen_string_literal: true
1
2
  class Money
2
- VERSION = "0.14.1"
3
+ VERSION = "0.14.2"
3
4
  end
@@ -1,3 +1,4 @@
1
+ # frozen_string_literal: true
1
2
  module MoneyAccessor
2
3
  def self.included(base)
3
4
  base.extend(ClassMethods)
@@ -1,3 +1,4 @@
1
+ # frozen_string_literal: true
1
2
  require_relative 'money_column/active_record_hooks'
2
3
  require_relative 'money_column/active_record_type'
3
4
  require_relative 'money_column/railtie'
@@ -1,3 +1,4 @@
1
+ # frozen_string_literal: true
1
2
  module MoneyColumn
2
3
  module ActiveRecordHooks
3
4
  def self.included(base)
@@ -57,7 +58,7 @@ module MoneyColumn
57
58
  if options[:currency_read_only]
58
59
  currency_source = Money::Helpers.value_to_currency(currency_raw_source)
59
60
  if currency_raw_source && !money.currency.compatible?(currency_source)
60
- Money.deprecate("[money_column] currency mismatch between #{currency_source} and #{money.currency}.")
61
+ Money.deprecate("[money_column] currency mismatch between #{currency_source} and #{money.currency} in column #{column}.")
61
62
  end
62
63
  else
63
64
  self[options[:currency_column]] = money.currency.to_s unless money.no_currency?
@@ -1,3 +1,4 @@
1
+ # frozen_string_literal: true
1
2
  class MoneyColumn::ActiveRecordType < ActiveRecord::Type::Decimal
2
3
  def serialize(money)
3
4
  return nil unless money
@@ -1,3 +1,4 @@
1
+ # frozen_string_literal: true
1
2
  module MoneyColumn
2
3
  class Railtie < Rails::Railtie
3
4
  ActiveSupport.on_load :active_record do
@@ -0,0 +1,3 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'rubocop/cop/money/missing_currency'
@@ -0,0 +1,75 @@
1
+ # frozen_string_literal: true
2
+
3
+ module RuboCop
4
+ module Cop
5
+ module Money
6
+ class MissingCurrency < Cop
7
+ # `Money.new()` without a currency argument cannot guarantee correctness:
8
+ # - no error raised for cross-currency computation (e.g. 5 CAD + 5 USD)
9
+ # - #subunits returns wrong values for 0 and 3 decimals currencies
10
+ #
11
+ # @example
12
+ # # bad
13
+ # Money.new(123.45)
14
+ # Money.new
15
+ # "1,234.50".to_money
16
+ #
17
+ # # good
18
+ # Money.new(123.45, 'CAD')
19
+ # "1,234.50".to_money('CAD')
20
+ #
21
+
22
+ def_node_matcher :money_new, <<~PATTERN
23
+ (send (const nil? :Money) {:new :from_amount :from_cents} $...)
24
+ PATTERN
25
+
26
+ def_node_matcher :to_money_without_currency?, <<~PATTERN
27
+ (send _ :to_money)
28
+ PATTERN
29
+
30
+ def_node_matcher :to_money_block?, <<~PATTERN
31
+ (send _ _ (block_pass (sym :to_money)))
32
+ PATTERN
33
+
34
+ def on_send(node)
35
+ money_new(node) do |_amount, currency_arg|
36
+ return if currency_arg
37
+
38
+ add_offense(node, message: 'Money is missing currency argument')
39
+ end
40
+
41
+ if to_money_block?(node) || to_money_without_currency?(node)
42
+ add_offense(node, message: 'to_money is missing currency argument')
43
+ end
44
+ end
45
+
46
+ def autocorrect(node)
47
+ currency = cop_config['ReplacementCurrency']
48
+ return unless currency
49
+
50
+ receiver, method, _ = *node
51
+
52
+ lambda do |corrector|
53
+ money_new(node) do |amount, currency_arg|
54
+ return if currency_arg
55
+
56
+ corrector.replace(
57
+ node.loc.expression,
58
+ "#{receiver.source}.#{method}(#{amount&.source || 0}, '#{currency}')"
59
+ )
60
+ end
61
+
62
+ if to_money_without_currency?(node)
63
+ corrector.insert_after(node.loc.expression, "('#{currency}')")
64
+ elsif to_money_block?(node)
65
+ corrector.replace(
66
+ node.loc.expression,
67
+ "#{receiver.source}.#{method} { |x| x.to_money('#{currency}') }"
68
+ )
69
+ end
70
+ end
71
+ end
72
+ end
73
+ end
74
+ end
75
+ end
@@ -0,0 +1,2 @@
1
+ # frozen_string_literal: true
2
+ require_relative 'money'
@@ -1,4 +1,5 @@
1
1
  # -*- encoding: utf-8 -*-
2
+ # frozen_string_literal: true
2
3
  require_relative "lib/money/version"
3
4
 
4
5
  Gem::Specification.new do |s|
@@ -12,13 +13,16 @@ Gem::Specification.new do |s|
12
13
  s.licenses = "MIT"
13
14
  s.summary = "Shopify's money gem"
14
15
 
16
+ s.metadata['allowed_push_host'] = "https://rubygems.org"
17
+
15
18
  s.add_development_dependency("bundler", ">= 1.5")
16
19
  s.add_development_dependency("simplecov", ">= 0")
17
- s.add_development_dependency("rails", "~> 5.0")
20
+ s.add_development_dependency("rails", "~> 6.0")
18
21
  s.add_development_dependency("rspec", "~> 3.2")
19
22
  s.add_development_dependency("database_cleaner", "~> 1.6")
20
- s.add_development_dependency("sqlite3", "~> 1.3.6")
21
- s.add_development_dependency("bigdecimal", "~> 1.4.4")
23
+ s.add_development_dependency("sqlite3", "~> 1.4.2")
24
+
25
+ s.required_ruby_version = '>= 2.6'
22
26
 
23
27
  s.files = `git ls-files`.split($/)
24
28
  s.executables = s.files.grep(%r{^bin/}) { |f| File.basename(f) }
@@ -1,3 +1,4 @@
1
+ # frozen_string_literal: true
1
2
  require 'spec_helper'
2
3
 
3
4
  RSpec.describe AccountingMoneyParser do
@@ -1,3 +1,4 @@
1
+ # frozen_string_literal: true
1
2
  require 'spec_helper'
2
3
 
3
4
  RSpec.describe "Allocator" do
@@ -1,3 +1,4 @@
1
+ # frozen_string_literal: true
1
2
  require 'spec_helper'
2
3
 
3
4
  RSpec.shared_examples_for "an object supporting to_money" do
@@ -1,3 +1,4 @@
1
+ # frozen_string_literal: true
1
2
  require 'spec_helper'
2
3
 
3
4
  RSpec.describe Money::Currency::Loader do
@@ -1,3 +1,4 @@
1
+ # frozen_string_literal: true
1
2
  require 'spec_helper'
2
3
 
3
4
  RSpec.describe "Currency" do
@@ -1,3 +1,4 @@
1
+ # frozen_string_literal: true
1
2
  require 'spec_helper'
2
3
 
3
4
  RSpec.describe Money::Helpers do
@@ -49,12 +50,6 @@ RSpec.describe Money::Helpers do
49
50
  expect(subject.value_to_decimal('invalid')).to eq(0)
50
51
  end
51
52
 
52
- it 'returns the bigdecimal representation of numbers while they are deprecated' do
53
- expect(Money).to receive(:deprecate).exactly(2).times
54
- expect(subject.value_to_decimal('0.00123e3')).to eq(amount)
55
- expect(subject.value_to_decimal("0.123e1")).to eq(amount)
56
- end
57
-
58
53
  it 'raises on invalid object' do
59
54
  expect { subject.value_to_decimal(OpenStruct.new(amount: 1)) }.to raise_error(ArgumentError)
60
55
  end
@@ -1,3 +1,4 @@
1
+ # frozen_string_literal: true
1
2
  require 'spec_helper'
2
3
 
3
4
  class NormalObject
@@ -1,3 +1,4 @@
1
+ # frozen_string_literal: true
1
2
  require 'spec_helper'
2
3
 
3
4
  class MoneyRecord < ActiveRecord::Base
@@ -1,3 +1,4 @@
1
+ # frozen_string_literal: true
1
2
  require 'spec_helper'
2
3
 
3
4
  RSpec.describe MoneyParser do
@@ -1,3 +1,4 @@
1
+ # frozen_string_literal: true
1
2
  require 'spec_helper'
2
3
  require 'yaml'
3
4
 
@@ -1,3 +1,4 @@
1
+ # frozen_string_literal: true
1
2
  require 'spec_helper'
2
3
 
3
4
  RSpec.describe "NullCurrency" do
@@ -0,0 +1,108 @@
1
+ # frozen_string_literal: true
2
+
3
+ require_relative '../../../rubocop_helper'
4
+ require 'rubocop/cop/money/missing_currency'
5
+
6
+ RSpec.describe RuboCop::Cop::Money::MissingCurrency do
7
+ subject(:cop) { described_class.new(config) }
8
+
9
+ let(:config) { RuboCop::Config.new }
10
+
11
+ describe '#on_send' do
12
+ it 'registers an offense for Money.new without a currency argument' do
13
+ expect_offense(<<~RUBY)
14
+ Money.new(1)
15
+ ^^^^^^^^^^^^ Money is missing currency argument
16
+ RUBY
17
+ end
18
+
19
+ it 'does not register an offense for Money.new with currency argument' do
20
+ expect_no_offenses(<<~RUBY)
21
+ Money.new(1, 'CAD')
22
+ RUBY
23
+ end
24
+
25
+ it 'registers an offense for Money.new without a currency argument' do
26
+ expect_offense(<<~RUBY)
27
+ Money.new
28
+ ^^^^^^^^^ Money is missing currency argument
29
+ RUBY
30
+ end
31
+
32
+ it 'registers an offense for Money.from_amount without a currency argument' do
33
+ expect_offense(<<~RUBY)
34
+ Money.from_amount(1)
35
+ ^^^^^^^^^^^^^^^^^^^^ Money is missing currency argument
36
+ RUBY
37
+ end
38
+
39
+ it 'does not register an offense for Money.from_amount with currency argument' do
40
+ expect_no_offenses(<<~RUBY)
41
+ Money.from_amount(1, 'CAD')
42
+ RUBY
43
+ end
44
+
45
+ it 'registers an offense for Money.from_cents without a currency argument' do
46
+ expect_offense(<<~RUBY)
47
+ Money.from_cents(1)
48
+ ^^^^^^^^^^^^^^^^^^^ Money is missing currency argument
49
+ RUBY
50
+ end
51
+
52
+ it 'does not register an offense for Money.from_cents with currency argument' do
53
+ expect_no_offenses(<<~RUBY)
54
+ Money.from_cents(1, 'CAD')
55
+ RUBY
56
+ end
57
+
58
+ it 'registers an offense for to_money without a currency argument' do
59
+ expect_offense(<<~RUBY)
60
+ '1'.to_money
61
+ ^^^^^^^^^^^^ to_money is missing currency argument
62
+ RUBY
63
+ end
64
+
65
+ it 'does not register an offense for to_money with currency argument' do
66
+ expect_no_offenses(<<~RUBY)
67
+ '1'.to_money('CAD')
68
+ RUBY
69
+ end
70
+
71
+ it 'registers an offense for to_money block pass form' do
72
+ expect_offense(<<~RUBY)
73
+ ['1'].map(&:to_money)
74
+ ^^^^^^^^^^^^^^^^^^^^^ to_money is missing currency argument
75
+ RUBY
76
+ end
77
+ end
78
+
79
+ describe '#autocorrect' do
80
+ let(:config) do
81
+ RuboCop::Config.new(
82
+ 'Money/MissingCurrency' => {
83
+ 'ReplacementCurrency' => 'CAD'
84
+ }
85
+ )
86
+ end
87
+
88
+ it 'corrects Money.new without currency' do
89
+ new_source = autocorrect_source('Money.new(1)')
90
+ expect(new_source).to eq("Money.new(1, 'CAD')")
91
+ end
92
+
93
+ it 'corrects Money.new without amount or currency' do
94
+ new_source = autocorrect_source('Money.new')
95
+ expect(new_source).to eq("Money.new(0, 'CAD')")
96
+ end
97
+
98
+ it 'corrects to_money without currency' do
99
+ new_source = autocorrect_source('1.to_money')
100
+ expect(new_source).to eq("1.to_money('CAD')")
101
+ end
102
+
103
+ it 'corrects to_money block pass form' do
104
+ new_source = autocorrect_source("['1'].map(&:to_money)")
105
+ expect(new_source).to eq("['1'].map { |x| x.to_money('CAD') }")
106
+ end
107
+ end
108
+ end
@@ -0,0 +1,10 @@
1
+ # frozen_string_literal: true
2
+
3
+ require_relative 'spec_helper'
4
+
5
+ require 'rubocop'
6
+ require 'rubocop/rspec/support'
7
+
8
+ RSpec.configure do |config|
9
+ config.include RuboCop::RSpec::ExpectOffense
10
+ end
@@ -1,3 +1,4 @@
1
+ # frozen_string_literal: true
1
2
  ActiveRecord::Schema.define do
2
3
  create_table "money_records", :force => true do |t|
3
4
  t.decimal "price", precision: 20, scale: 3, default: '0.000'
@@ -1,14 +1,10 @@
1
+ # frozen_string_literal: true
1
2
  require 'simplecov'
2
3
  SimpleCov.minimum_coverage 100
3
4
  SimpleCov.start do
4
5
  add_filter "/spec/"
5
6
  end
6
7
 
7
- if ENV['CI'] == 'true'
8
- require 'codecov'
9
- SimpleCov.formatter = SimpleCov::Formatter::Codecov
10
- end
11
-
12
8
  $LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '..', 'lib'))
13
9
  $LOAD_PATH.unshift(File.dirname(__FILE__))
14
10
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: shopify-money
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.14.1
4
+ version: 0.14.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Shopify Inc
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-02-04 00:00:00.000000000 Z
11
+ date: 2020-05-29 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -44,14 +44,14 @@ dependencies:
44
44
  requirements:
45
45
  - - "~>"
46
46
  - !ruby/object:Gem::Version
47
- version: '5.0'
47
+ version: '6.0'
48
48
  type: :development
49
49
  prerelease: false
50
50
  version_requirements: !ruby/object:Gem::Requirement
51
51
  requirements:
52
52
  - - "~>"
53
53
  - !ruby/object:Gem::Version
54
- version: '5.0'
54
+ version: '6.0'
55
55
  - !ruby/object:Gem::Dependency
56
56
  name: rspec
57
57
  requirement: !ruby/object:Gem::Requirement
@@ -86,28 +86,14 @@ dependencies:
86
86
  requirements:
87
87
  - - "~>"
88
88
  - !ruby/object:Gem::Version
89
- version: 1.3.6
89
+ version: 1.4.2
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
- version: 1.3.6
97
- - !ruby/object:Gem::Dependency
98
- name: bigdecimal
99
- requirement: !ruby/object:Gem::Requirement
100
- requirements:
101
- - - "~>"
102
- - !ruby/object:Gem::Version
103
- version: 1.4.4
104
- type: :development
105
- prerelease: false
106
- version_requirements: !ruby/object:Gem::Requirement
107
- requirements:
108
- - - "~>"
109
- - !ruby/object:Gem::Version
110
- version: 1.4.4
96
+ version: 1.4.2
111
97
  description: Manage money in Shopify with a class that wont lose pennies during division!
112
98
  email: gems@shopify.com
113
99
  executables:
@@ -147,6 +133,9 @@ files:
147
133
  - lib/money_column/active_record_hooks.rb
148
134
  - lib/money_column/active_record_type.rb
149
135
  - lib/money_column/railtie.rb
136
+ - lib/rubocop/cop/money.rb
137
+ - lib/rubocop/cop/money/missing_currency.rb
138
+ - lib/shopify-money.rb
150
139
  - money.gemspec
151
140
  - spec/accounting_money_parser_spec.rb
152
141
  - spec/allocator_spec.rb
@@ -159,12 +148,15 @@ files:
159
148
  - spec/money_parser_spec.rb
160
149
  - spec/money_spec.rb
161
150
  - spec/null_currency_spec.rb
151
+ - spec/rubocop/cop/money/missing_currency_spec.rb
152
+ - spec/rubocop_helper.rb
162
153
  - spec/schema.rb
163
154
  - spec/spec_helper.rb
164
155
  homepage: https://github.com/Shopify/money
165
156
  licenses:
166
157
  - MIT
167
- metadata: {}
158
+ metadata:
159
+ allowed_push_host: https://rubygems.org
168
160
  post_install_message:
169
161
  rdoc_options: []
170
162
  require_paths:
@@ -173,7 +165,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
173
165
  requirements:
174
166
  - - ">="
175
167
  - !ruby/object:Gem::Version
176
- version: '0'
168
+ version: '2.6'
177
169
  required_rubygems_version: !ruby/object:Gem::Requirement
178
170
  requirements:
179
171
  - - ">="
@@ -196,5 +188,7 @@ test_files:
196
188
  - spec/money_parser_spec.rb
197
189
  - spec/money_spec.rb
198
190
  - spec/null_currency_spec.rb
191
+ - spec/rubocop/cop/money/missing_currency_spec.rb
192
+ - spec/rubocop_helper.rb
199
193
  - spec/schema.rb
200
194
  - spec/spec_helper.rb