shouhizei 0.4.1 → 0.4.2

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
  SHA256:
3
- metadata.gz: f45019d28ff15a00ce3faf066ec02753e69197cc981c6cfcfbd0452d9138ac8b
4
- data.tar.gz: a2e0d547c3146788e0196655c670b31d318f3bb08b2c38c976ffb0925dbde58c
3
+ metadata.gz: 6ef6731e3fb3577d055759d95880c0bd2ea34462a1de924d350e949289908387
4
+ data.tar.gz: 99fbe2a638554ce7e119146bb543629c8bc64dc056dc7282cd5ca7af01ff6e71
5
5
  SHA512:
6
- metadata.gz: e6f60633c993238cb1fd1c73c59571a8a733fea802ccaef7e118367d45caf1448b3a05be1f379e958a44378992fc7e7132c4614bea4dcea89893ce1613678493
7
- data.tar.gz: 820741df77f2395e6c40e34e8890661270f6fe2f03a91606ed6f0cc45a1d7daff42a5bdba41e534e84084070ba03bf101506470df301e7567d3f58b3630aca99
6
+ metadata.gz: 0717df91339d58a29e7a6327a7b5cd73d431841bbfb6c1f24f40fcc94adae5cded6ad18eea88f6e61fdfd559080396cc1b70fefbf4390bdaf6e8f5018562eef4
7
+ data.tar.gz: 2f3b7cb1a2909e1f7c606316adb361e6b88982bb6ad4273281b960ff5306e62bcaa60b0fd26f88d66cfde194c924af67bb3954a771a9504fe19b63f5a5c1f1b8
data/.travis.yml CHANGED
@@ -1,9 +1,10 @@
1
1
  language: ruby
2
2
  rvm:
3
- - 2.5.3
4
- - 2.4.5
5
3
  - 2.3.8
6
- - ruby-2.6.0-preview2
4
+ - 2.4.5
5
+ - 2.5.5
6
+ - 2.6.2
7
+ - ruby-head
7
8
 
8
9
  deploy:
9
10
  provider: rubygems
data/README.md CHANGED
@@ -63,8 +63,11 @@ This considers local timezone and changes to `'Asia/Tokyo'` by using `ActiveSupp
63
63
  Calculation tax included price.
64
64
  Return value class is Integer.
65
65
  ```ruby
66
- Shouhizei.including(price: 100, date: Time.zone.local(2014, 4, 1))
66
+ Shouhizei.including(price: 100, time: Time.zone.local(2014, 4, 1))
67
67
  => 108 # return value class is Integer
68
+
69
+ Shouhizei.including(price: 100, time: Time.zone.local(2019, 10, 1), reduced: true)
70
+ => 108 # return value with reduced tax in Integer
68
71
  ```
69
72
 
70
73
  Configuration how to deal fraction round up or round down.
@@ -88,7 +91,7 @@ To install this gem onto your local machine, run `bundle exec rake install`. To
88
91
 
89
92
  ## Contributing
90
93
 
91
- Bug reports and pull requests are welcome on GitHub at https://github.com/[USERNAME]/shouhizei. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [Contributor Covenant](http://contributor-covenant.org) code of conduct.
94
+ Bug reports and pull requests are welcome on GitHub at https://github.com/colorbox/shouhizei. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [Contributor Covenant](http://contributor-covenant.org) code of conduct.
92
95
 
93
96
  ## License
94
97
 
data/lib/shouhizei.rb CHANGED
@@ -18,8 +18,8 @@ module Shouhizei
18
18
  0.0r
19
19
  end
20
20
 
21
- def self.including(price:, time: Time.current)
22
- including_price = price + price * rate_on(time)
21
+ def self.including(price:, time: Time.current, reduced: false)
22
+ including_price = price + price * rate_on(time, reduced: reduced)
23
23
  return including_price.round if config[:rounding] == Round
24
24
  return including_price.ceil if config[:rounding] == RoundUp
25
25
  including_price.floor
@@ -1,3 +1,3 @@
1
1
  module Shouhizei
2
- VERSION = '0.4.1'
2
+ VERSION = '0.4.2'
3
3
  end
data/shouhizei.gemspec CHANGED
@@ -19,7 +19,7 @@ Gem::Specification.new do |spec|
19
19
  spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
20
20
  spec.require_paths = ["lib"]
21
21
 
22
- spec.add_development_dependency "bundler", "~> 1.15"
22
+ spec.add_development_dependency "bundler"
23
23
  spec.add_development_dependency "minitest", "~> 5.0"
24
24
  spec.add_development_dependency "rake", "~> 10.0"
25
25
  spec.add_development_dependency "timecop", "~> 0.9"
metadata CHANGED
@@ -1,29 +1,29 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: shouhizei
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.1
4
+ version: 0.4.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - colorbox
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2018-11-28 00:00:00.000000000 Z
11
+ date: 2019-03-26 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - "~>"
17
+ - - ">="
18
18
  - !ruby/object:Gem::Version
19
- version: '1.15'
19
+ version: '0'
20
20
  type: :development
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
- - - "~>"
24
+ - - ">="
25
25
  - !ruby/object:Gem::Version
26
- version: '1.15'
26
+ version: '0'
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: minitest
29
29
  requirement: !ruby/object:Gem::Requirement
@@ -119,8 +119,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
119
119
  - !ruby/object:Gem::Version
120
120
  version: '0'
121
121
  requirements: []
122
- rubyforge_project:
123
- rubygems_version: 2.7.8
122
+ rubygems_version: 3.0.3
124
123
  signing_key:
125
124
  specification_version: 4
126
125
  summary: This gem support to calculate Japan consumption tax