shouhizei 0.4.1 → 0.4.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.travis.yml +4 -3
- data/README.md +5 -2
- data/lib/shouhizei.rb +2 -2
- data/lib/shouhizei/version.rb +1 -1
- data/shouhizei.gemspec +1 -1
- metadata +7 -8
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6ef6731e3fb3577d055759d95880c0bd2ea34462a1de924d350e949289908387
|
4
|
+
data.tar.gz: 99fbe2a638554ce7e119146bb543629c8bc64dc056dc7282cd5ca7af01ff6e71
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0717df91339d58a29e7a6327a7b5cd73d431841bbfb6c1f24f40fcc94adae5cded6ad18eea88f6e61fdfd559080396cc1b70fefbf4390bdaf6e8f5018562eef4
|
7
|
+
data.tar.gz: 2f3b7cb1a2909e1f7c606316adb361e6b88982bb6ad4273281b960ff5306e62bcaa60b0fd26f88d66cfde194c924af67bb3954a771a9504fe19b63f5a5c1f1b8
|
data/.travis.yml
CHANGED
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,
|
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/
|
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
|
data/lib/shouhizei/version.rb
CHANGED
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"
|
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.
|
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:
|
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: '
|
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: '
|
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
|
-
|
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
|