amountable 0.2.5 → 0.2.6

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: c16626a30436789e2fd7b2f5ddf0b3a3a135b6f9
4
- data.tar.gz: e5b5d6aacdc8a7d381ae87da6338030a086cd16f
3
+ metadata.gz: 6e145cd82c4b5847530ddd449de2ec1818ae60d5
4
+ data.tar.gz: 84b68e8cf0f8cfa202179c75b7d7e75ac7d658b9
5
5
  SHA512:
6
- metadata.gz: e11a47ca33db3eda57f61a37b8f5ee362b4ee9dd8c38e289b3e8758517345e7e4a30a42d1c7b44dd6b7612150d61765e1667ee63ea92e082e01bf81034c327fc
7
- data.tar.gz: 589b2f249b8d2f4466db720d3b5f60c3a1f0195b89a4a07a58c84b7c9bd6b54cf9a0790cd2a075ab38688c362522d11ae9f6621773545ca2f720ef173304da3b
6
+ metadata.gz: 1bc432398eaa8a091f1a80654efed493fef2fdf84ee9557ccb463194538ede8b64373eb22701f61f22b408100807c796f341232120925f772540d8f60d8bf941
7
+ data.tar.gz: 218f5b307d72a04ef4022ed51193160f816abe0db742deebe086d267465b2296fcca29a3cb15837e6011a96ab08ba8508e659f1dd0a6d91d5f70ce947ba8c60d
@@ -1,4 +1,4 @@
1
- # Copyright 2015-2016, Instacart
1
+ # Copyright 2015-2017, Instacart
2
2
 
3
3
  class CreateAmounts < ActiveRecord::Migration
4
4
  def change
@@ -1,4 +1,4 @@
1
- # Copyright 2015-2016, Instacart
1
+ # Copyright 2015-2017, Instacart
2
2
 
3
3
  module Amountable
4
4
  extend ActiveSupport::Autoload
@@ -1,4 +1,4 @@
1
- # Copyright 2015-2016, Instacart
1
+ # Copyright 2015-2017, Instacart
2
2
 
3
3
  module Amountable
4
4
  class Amount < ActiveRecord::Base
@@ -1,4 +1,4 @@
1
- # Copyright 2015-2016, Instacart
1
+ # Copyright 2015-2017, Instacart
2
2
 
3
3
  module Amountable
4
4
  module JsonbMethods
@@ -41,7 +41,7 @@ module Amountable
41
41
 
42
42
  def get_set(name)
43
43
  value = attribute(amounts_column_name).to_h['sets'].to_h[name.to_s].to_h
44
- Money.new(value['cents'].to_i, value['currency'] || 'USD')
44
+ Money.new(value['cents'].to_i, value['currency'])
45
45
  end
46
46
 
47
47
  def set_json(json)
@@ -1,4 +1,4 @@
1
- # Copyright 2015-2016, Instacart
1
+ # Copyright 2015-2017, Instacart
2
2
 
3
3
  module Amountable
4
4
  class NilAmount
@@ -1,4 +1,4 @@
1
- # Copyright 2015-2016, Instacart
1
+ # Copyright 2015-2017, Instacart
2
2
 
3
3
  module Amountable
4
4
  module Operations
@@ -1,4 +1,4 @@
1
- # Copyright 2015-2016, Instacart
1
+ # Copyright 2015-2017, Instacart
2
2
 
3
3
  module Amountable
4
4
  module TableMethods
@@ -1,5 +1,5 @@
1
- # Copyright 2015-2016, Instacart
1
+ # Copyright 2015-2017, Instacart
2
2
 
3
3
  module Amountable
4
- VERSION = '0.2.5'
4
+ VERSION = '0.2.6'
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: amountable
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.5
4
+ version: 0.2.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Emmanuel Turlay
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-08-17 00:00:00.000000000 Z
11
+ date: 2017-10-11 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activerecord