e1505to_VATcalc 0.1.0 → 0.2.0

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
  SHA1:
3
- metadata.gz: f6dc657dba45b0145f205d32d31121bca4e48625
4
- data.tar.gz: b637f506eebc5b8816791e940118a864f810975d
3
+ metadata.gz: e76b72b0d959c6ff54df81942431e7c37749548f
4
+ data.tar.gz: dc2b2ed53cb9a2d9f93d92e858dbf68a577d625e
5
5
  SHA512:
6
- metadata.gz: 33777bd9a06aadc65b7cd931ca7cf2f1dcdfc5f5c53ffa779bf494682b8d7456ee5618fe3b4d973169484d4cd0d1ff9bd01cd2ab89fab272b89fbd0435ab818e
7
- data.tar.gz: 7b277984beb2111fa3ad64e3da1e6483a68e7f414487847edf777b93369666c898c99d439e48ced80060f4b4cc1ea2eddc68b6bcc262847f1f7a665302f1588c
6
+ metadata.gz: bde611f4c7230e8519e55962f8bb78dbb6887656d786eafea165ed8b4137875c8ca7f298e7655f97657a68dfc9520285f1bb4b27778b5d48955dc7f8a292aefa
7
+ data.tar.gz: 5b4824088dc4fd43bf32429165acd150ece982b8247cc484c0a3f86d669136b086c5fe6d2aeddb7f1662da4f227a40192504bd107afa3d6c6e55b8160696ee3a
data/Gemfile CHANGED
@@ -1,4 +1,4 @@
1
1
  source 'https://rubygems.org'
2
2
 
3
- # Specify your gem's dependencies in e1505to_VATcalc.gemspec
3
+ # Specify your gem's dependencies in e1505to_okamura.gemspec
4
4
  gemspec
data/README.md CHANGED
@@ -1,6 +1,6 @@
1
- # E1505toVATcalc
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/e1505to_VATcalc`. To experiment with that code, run `bin/console` for an interactive prompt.
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 'e1505to_VATcalc'
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 e1505to_VATcalc
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]/e1505to_VATcalc. 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.
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
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env ruby
2
2
 
3
3
  require "bundler/setup"
4
- require "e1505to_VATcalc"
4
+ require "e1505to_okamura"
5
5
 
6
6
  # You can add fixtures and/or initialization code here to make experimenting
7
7
  # with your gem easier. You can also use a different console, if you like.
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env ruby
2
- require "e1505to_VATcalc"
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 E1505toVATcalc.new_method(price,date)
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 'e1505to_VATcalc/version'
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 = E1505toVATcalc::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/e1505to_vatcalc.git"
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
- # if spec.respond_to?(:metadata)
20
- # spec.metadata['allowed_push_host'] = "TODO: Set to 'https://rubygems.org'"
21
- # else
22
- # raise "RubyGems 2.0 or newer is required to protect against public gem pushes."
23
- # end
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 "e1505to_VATcalc/version"
1
+ require "e1505to_okamura/version"
2
2
  require "bigdecimal"
3
3
 
4
- module E1505toVATcalc
4
+ module E1505toOkamura
5
5
  # Your code goes here...
6
- def self.new_method(price,date)
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
- print ( (BigDecimal( price ) * taxrt).floor )
21
- puts " (taxin)"
22
- end
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
@@ -1,3 +1,3 @@
1
- module E1505toVATcalc
1
+ module E1505toOkamura
2
2
  VERSION = "0.1.0"
3
3
  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.1.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-07-07 00:00:00.000000000 Z
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/run_e1505to_VATcalc
70
+ - bin/run_e1505to_okamura
71
71
  - bin/setup
72
- - e1505to_VATcalc.gemspec
73
- - lib/e1505to_VATcalc.rb
74
- - lib/e1505to_VATcalc/version.rb
75
- homepage: https://github.com/okamuratakeshi/e1505to_vatcalc.git
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: {}