e1505to_VATcalc 0.1.0 → 0.2.0
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 +4 -4
- data/Gemfile +1 -1
- data/README.md +5 -5
- data/bin/console +1 -1
- data/bin/{run_e1505to_VATcalc → run_e1505to_okamura} +2 -2
- data/{e1505to_VATcalc.gemspec → e1505to_okamura.gemspec} +11 -11
- data/lib/{e1505to_VATcalc.rb → e1505to_okamura.rb} +16 -6
- data/lib/{e1505to_VATcalc → e1505to_okamura}/version.rb +1 -1
- metadata +7 -7
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e76b72b0d959c6ff54df81942431e7c37749548f
|
4
|
+
data.tar.gz: dc2b2ed53cb9a2d9f93d92e858dbf68a577d625e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: bde611f4c7230e8519e55962f8bb78dbb6887656d786eafea165ed8b4137875c8ca7f298e7655f97657a68dfc9520285f1bb4b27778b5d48955dc7f8a292aefa
|
7
|
+
data.tar.gz: 5b4824088dc4fd43bf32429165acd150ece982b8247cc484c0a3f86d669136b086c5fe6d2aeddb7f1662da4f227a40192504bd107afa3d6c6e55b8160696ee3a
|
data/Gemfile
CHANGED
data/README.md
CHANGED
@@ -1,6 +1,6 @@
|
|
1
|
-
#
|
1
|
+
# E1505toOkamura
|
2
2
|
|
3
|
-
Welcome to your new gem! In this directory, you'll find the files you need to be able to package up your Ruby library into a gem. Put your Ruby code in the file `lib/
|
3
|
+
Welcome to your new gem! In this directory, you'll find the files you need to be able to package up your Ruby library into a gem. Put your Ruby code in the file `lib/e1505to_okamura`. To experiment with that code, run `bin/console` for an interactive prompt.
|
4
4
|
|
5
5
|
TODO: Delete this and the text above, and describe your gem
|
6
6
|
|
@@ -9,7 +9,7 @@ TODO: Delete this and the text above, and describe your gem
|
|
9
9
|
Add this line to your application's Gemfile:
|
10
10
|
|
11
11
|
```ruby
|
12
|
-
gem '
|
12
|
+
gem 'e1505to_okamura'
|
13
13
|
```
|
14
14
|
|
15
15
|
And then execute:
|
@@ -18,7 +18,7 @@ And then execute:
|
|
18
18
|
|
19
19
|
Or install it yourself as:
|
20
20
|
|
21
|
-
$ gem install
|
21
|
+
$ gem install e1505to_okamura
|
22
22
|
|
23
23
|
## Usage
|
24
24
|
|
@@ -32,7 +32,7 @@ To install this gem onto your local machine, run `bundle exec rake install`. To
|
|
32
32
|
|
33
33
|
## Contributing
|
34
34
|
|
35
|
-
Bug reports and pull requests are welcome on GitHub at https://github.com/[USERNAME]/
|
35
|
+
Bug reports and pull requests are welcome on GitHub at https://github.com/[USERNAME]/e1505to_okamura. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [Contributor Covenant](contributor-covenant.org) code of conduct.
|
36
36
|
|
37
37
|
|
38
38
|
## License
|
data/bin/console
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
#!/usr/bin/env ruby
|
2
|
-
require "
|
2
|
+
require "e1505to_okamura"
|
3
3
|
|
4
4
|
if ARGV.size != 2
|
5
5
|
STDERR.print "Usage: ruby#{$0} price shipping_date(YYYYMMDD)\n"
|
@@ -9,4 +9,4 @@ end
|
|
9
9
|
#puts "SHIPPING DATE:" + ARGV[1]
|
10
10
|
price = ARGV[0].to_i
|
11
11
|
date = ARGV[1].to_i
|
12
|
-
puts
|
12
|
+
puts E1505toOkamura.new_method(price,date)
|
@@ -1,26 +1,26 @@
|
|
1
1
|
# coding: utf-8
|
2
2
|
lib = File.expand_path('../lib', __FILE__)
|
3
3
|
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
4
|
-
require '
|
4
|
+
require 'e1505to_okamura/version'
|
5
5
|
|
6
|
-
Gem::Specification.new do |spec|
|
6
|
+
Gem::Specification.new do |spec|
|
7
7
|
spec.name = "e1505to_VATcalc"
|
8
|
-
spec.version =
|
8
|
+
spec.version = "0.2.0"
|
9
9
|
spec.authors = ["Okamura Takeshi"]
|
10
10
|
spec.email = ["tkc.okamura80@gmail.com"]
|
11
|
-
|
12
|
-
spec.summary = %q{This is Test4-2.}
|
11
|
+
|
12
|
+
spec.summary = %q{This is Test4-2.}
|
13
13
|
spec.description = %q{This is calcurator for japanese VAT.}
|
14
|
-
spec.homepage = "https://github.com/okamuratakeshi/
|
14
|
+
spec.homepage = "https://github.com/okamuratakeshi/e1505to_okamura.git"
|
15
15
|
spec.license = "MIT"
|
16
16
|
|
17
17
|
# Prevent pushing this gem to RubyGems.org by setting 'allowed_push_host', or
|
18
18
|
# delete this section to allow pushing this gem to any host.
|
19
|
-
#
|
20
|
-
#
|
21
|
-
#
|
22
|
-
#
|
23
|
-
#
|
19
|
+
# if spec.respond_to?(:metadata)
|
20
|
+
# spec.metadata['allowed_push_host'] = "http://rubygems.org/gems/hola"
|
21
|
+
# else
|
22
|
+
# raise "RubyGems 2.0 or newer is required to protect against public gem pushes."
|
23
|
+
# end
|
24
24
|
|
25
25
|
spec.files = `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
|
26
26
|
spec.bindir = "exe"
|
@@ -1,9 +1,14 @@
|
|
1
|
-
require "
|
1
|
+
require "e1505to_okamura/version"
|
2
2
|
require "bigdecimal"
|
3
3
|
|
4
|
-
module
|
4
|
+
module E1505toOkamura
|
5
5
|
# Your code goes here...
|
6
|
-
|
6
|
+
print 'Please set price(without tax) : '
|
7
|
+
price = gets.chomp.to_i
|
8
|
+
|
9
|
+
print 'Please set sales_date : '
|
10
|
+
date = gets.chomp.to_i
|
11
|
+
|
7
12
|
#日付を元に消費税率を設定
|
8
13
|
if date < 19890401 then
|
9
14
|
taxrt = BigDecimal("1.00")
|
@@ -17,7 +22,12 @@ module E1505toVATcalc
|
|
17
22
|
taxrt = BigDecimal("1.10")
|
18
23
|
end
|
19
24
|
#価格*(1+税率)
|
20
|
-
|
21
|
-
|
22
|
-
|
25
|
+
|
26
|
+
price_wt = ( (BigDecimal( price ) * taxrt).floor )
|
27
|
+
|
28
|
+
print "Price with tax is "
|
29
|
+
print price_wt
|
30
|
+
print " at "
|
31
|
+
print date
|
32
|
+
puts "."
|
23
33
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: e1505to_VATcalc
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Okamura Takeshi
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-
|
11
|
+
date: 2015-08-08 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -67,12 +67,12 @@ files:
|
|
67
67
|
- README.md
|
68
68
|
- Rakefile
|
69
69
|
- bin/console
|
70
|
-
- bin/
|
70
|
+
- bin/run_e1505to_okamura
|
71
71
|
- bin/setup
|
72
|
-
-
|
73
|
-
- lib/
|
74
|
-
- lib/
|
75
|
-
homepage: https://github.com/okamuratakeshi/
|
72
|
+
- e1505to_okamura.gemspec
|
73
|
+
- lib/e1505to_okamura.rb
|
74
|
+
- lib/e1505to_okamura/version.rb
|
75
|
+
homepage: https://github.com/okamuratakeshi/e1505to_okamura.git
|
76
76
|
licenses:
|
77
77
|
- MIT
|
78
78
|
metadata: {}
|