tax_jp 0.0.2 → 0.0.3

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: b5b375cdd3727a9c8bee68031b1560da186ed1a9
4
- data.tar.gz: 8ef8f993b9596eca59e00a55580c9fa4a6565916
3
+ metadata.gz: 854b81f9988e6485e08fd1cb4eb106be06105b7c
4
+ data.tar.gz: 8e08125e3d8d069d3d40f0bbb770bb17750a4133
5
5
  SHA512:
6
- metadata.gz: 8d3343da904434d5fc552317ff601495cb33e675da3a8009ca7b55d651668b127634ffa9f9f3e3873f02d5b148db0da27719a5c559b8ced62491cb9c44afef98
7
- data.tar.gz: 62214dbfafb23629b915b97ee50c6ae0d47756fd10a5fafc484668929d251df369a4ec4b3e52e3419fd35f17163d12736c1c2babd3fc4212c6d7fec8ad5df6b7
6
+ metadata.gz: 4587da63c0df075c11fc488d95f2d0e53b2a3e7fc0cb3864f85f2911a44f28486376f354635ee6cb6a884e3e10217e0937c7b743b9b5dee8ae23a4fcba935dd2
7
+ data.tar.gz: 989f920686927131aff99f789dafce45968d80b3cec4b1ab4a56603a952bb1cb33cbb8e9f982b87e94549ece689ceae995c15bd9386bf9bda89ad0eb2c5b1a1c
data/Gemfile CHANGED
@@ -1,3 +1,5 @@
1
1
  source 'https://rubygems.org'
2
2
 
3
3
  gemspec
4
+
5
+ gem 'closer'
data/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # TaxJp
2
2
 
3
- 消費税計算ライブラリ
3
+ 税金計算ライブラリ
4
4
 
5
5
  ## Installation
6
6
 
data/Rakefile CHANGED
@@ -1,2 +1,2 @@
1
1
  require "bundler/gem_tasks"
2
-
2
+ require 'closer/tasks'
@@ -0,0 +1 @@
1
+ /reports/
@@ -0,0 +1,4 @@
1
+ もし /^(.*?)における、(.*?)円に対する消費税額は、(.*?)円です$/ do |date, amount, tax_amount|
2
+ rate = TaxJp.get_rate_on(date)
3
+ assert_equal tax_amount.to_i, amount.to_i * rate
4
+ end
@@ -0,0 +1 @@
1
+ require 'tax_jp'
@@ -0,0 +1,11 @@
1
+ # language: ja
2
+
3
+ 機能: 消費税
4
+
5
+ シナリオアウトライン: 消費税の計算
6
+ * <年月日>における、<金額>円に対する消費税額は、<消費税>円です
7
+ 例:
8
+ | 年月日 | 金額 | 消費税 |
9
+ | 2014-03-31 | 1000 | 50 |
10
+ | 2014-04-01 | 1000 | 80 |
11
+
@@ -1,5 +1,5 @@
1
1
  module TaxJp
2
- module Calculation
2
+ module ConsumptionTax
3
3
 
4
4
  def get_rate_on(date, options = {})
5
5
  if (date.is_a?(String))
@@ -0,0 +1,6 @@
1
+ module TaxJp
2
+ module Rails
3
+ class Engine < ::Rails::Engine
4
+ end
5
+ end
6
+ end
@@ -0,0 +1,6 @@
1
+ module TaxJp
2
+ module Rails
3
+ class Railtie < ::Rails::Railtie
4
+ end
5
+ end
6
+ end
@@ -1,3 +1,3 @@
1
1
  module TaxJp
2
- VERSION = "0.0.2"
2
+ VERSION = '0.0.3'
3
3
  end
data/lib/tax_jp.rb CHANGED
@@ -1,8 +1,12 @@
1
1
  require 'tax_jp/version'
2
2
  require 'tax_jp/const'
3
- require 'tax_jp/engine'
4
- require 'tax_jp/railtie'
3
+
4
+ if defined?(Rails)
5
+ require 'tax_jp/rails/engine'
6
+ require 'tax_jp/rails/railtie'
7
+ end
5
8
 
6
9
  module TaxJp
7
- extend TaxJp::Calculation
10
+ require 'tax_jp/consumption_tax'
11
+ extend TaxJp::ConsumptionTax
8
12
  end
data/tax_jp.gemspec CHANGED
@@ -7,10 +7,10 @@ Gem::Specification.new do |spec|
7
7
  spec.version = TaxJp::VERSION
8
8
  spec.authors = ["ichy"]
9
9
  spec.email = ["ichylinux@gmail.com"]
10
- spec.summary = %q{消費税計算ライブラリ}
11
- spec.description = %q{消費税計算ライブラリ}
12
- spec.homepage = ""
13
- spec.license = "MIT"
10
+ spec.summary = %q{税金計算ライブラリ}
11
+ spec.description = %q{税金計算ライブラリ}
12
+ spec.homepage = 'https://github.com/hybitz/tax_jp'
13
+ spec.license = 'MIT'
14
14
 
15
15
  spec.files = `git ls-files -z`.split("\x0")
16
16
  spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
@@ -20,8 +20,6 @@ Gem::Specification.new do |spec|
20
20
  spec.required_ruby_version = '~> 2.0'
21
21
 
22
22
  spec.add_development_dependency "bundler", "~> 1.7"
23
- spec.add_dependency "activesupport", '>= 3.2.0', '< 5.0.0'
24
- spec.add_dependency "actionpack", '>= 3.2.0', '< 5.0.0'
25
- spec.add_dependency "railties", '>= 3.2.0', '< 5.0.0'
23
+ spec.add_development_dependency "closer", "~> 0.0.1"
26
24
  spec.add_development_dependency "rake", "~> 10.0"
27
25
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: tax_jp
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.2
4
+ version: 0.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - ichy
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-10-17 00:00:00.000000000 Z
11
+ date: 2014-12-12 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -25,65 +25,19 @@ dependencies:
25
25
  - !ruby/object:Gem::Version
26
26
  version: '1.7'
27
27
  - !ruby/object:Gem::Dependency
28
- name: activesupport
28
+ name: closer
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
- - - ">="
32
- - !ruby/object:Gem::Version
33
- version: 3.2.0
34
- - - "<"
35
- - !ruby/object:Gem::Version
36
- version: 5.0.0
37
- type: :runtime
38
- prerelease: false
39
- version_requirements: !ruby/object:Gem::Requirement
40
- requirements:
41
- - - ">="
42
- - !ruby/object:Gem::Version
43
- version: 3.2.0
44
- - - "<"
45
- - !ruby/object:Gem::Version
46
- version: 5.0.0
47
- - !ruby/object:Gem::Dependency
48
- name: actionpack
49
- requirement: !ruby/object:Gem::Requirement
50
- requirements:
51
- - - ">="
52
- - !ruby/object:Gem::Version
53
- version: 3.2.0
54
- - - "<"
55
- - !ruby/object:Gem::Version
56
- version: 5.0.0
57
- type: :runtime
58
- prerelease: false
59
- version_requirements: !ruby/object:Gem::Requirement
60
- requirements:
61
- - - ">="
62
- - !ruby/object:Gem::Version
63
- version: 3.2.0
64
- - - "<"
65
- - !ruby/object:Gem::Version
66
- version: 5.0.0
67
- - !ruby/object:Gem::Dependency
68
- name: railties
69
- requirement: !ruby/object:Gem::Requirement
70
- requirements:
71
- - - ">="
72
- - !ruby/object:Gem::Version
73
- version: 3.2.0
74
- - - "<"
31
+ - - "~>"
75
32
  - !ruby/object:Gem::Version
76
- version: 5.0.0
77
- type: :runtime
33
+ version: 0.0.1
34
+ type: :development
78
35
  prerelease: false
79
36
  version_requirements: !ruby/object:Gem::Requirement
80
37
  requirements:
81
- - - ">="
82
- - !ruby/object:Gem::Version
83
- version: 3.2.0
84
- - - "<"
38
+ - - "~>"
85
39
  - !ruby/object:Gem::Version
86
- version: 5.0.0
40
+ version: 0.0.1
87
41
  - !ruby/object:Gem::Dependency
88
42
  name: rake
89
43
  requirement: !ruby/object:Gem::Requirement
@@ -98,7 +52,7 @@ dependencies:
98
52
  - - "~>"
99
53
  - !ruby/object:Gem::Version
100
54
  version: '10.0'
101
- description: "消費税計算ライブラリ"
55
+ description: "税金計算ライブラリ"
102
56
  email:
103
57
  - ichylinux@gmail.com
104
58
  executables: []
@@ -112,14 +66,18 @@ files:
112
66
  - Rakefile
113
67
  - app/assets/javascripts/tax.js
114
68
  - app/assets/javascripts/tax_jp.js
69
+ - features/.gitignore
70
+ - features/step_definitions/consumption_tax.rb
71
+ - features/support/env.rb
72
+ - features/消費税.feature
115
73
  - lib/tax_jp.rb
116
- - lib/tax_jp/calculation.rb
117
74
  - lib/tax_jp/const.rb
118
- - lib/tax_jp/engine.rb
119
- - lib/tax_jp/railtie.rb
75
+ - lib/tax_jp/consumption_tax.rb
76
+ - lib/tax_jp/rails/engine.rb
77
+ - lib/tax_jp/rails/railtie.rb
120
78
  - lib/tax_jp/version.rb
121
79
  - tax_jp.gemspec
122
- homepage: ''
80
+ homepage: https://github.com/hybitz/tax_jp
123
81
  licenses:
124
82
  - MIT
125
83
  metadata: {}
@@ -139,8 +97,12 @@ required_rubygems_version: !ruby/object:Gem::Requirement
139
97
  version: '0'
140
98
  requirements: []
141
99
  rubyforge_project:
142
- rubygems_version: 2.4.1
100
+ rubygems_version: 2.4.2
143
101
  signing_key:
144
102
  specification_version: 4
145
- summary: "消費税計算ライブラリ"
146
- test_files: []
103
+ summary: "税金計算ライブラリ"
104
+ test_files:
105
+ - features/.gitignore
106
+ - features/step_definitions/consumption_tax.rb
107
+ - features/support/env.rb
108
+ - features/消費税.feature
data/lib/tax_jp/engine.rb DELETED
@@ -1,4 +0,0 @@
1
- module TaxJp
2
- class Engine < ::Rails::Engine
3
- end
4
- end
@@ -1,6 +0,0 @@
1
- require_relative 'calculation'
2
-
3
- module TaxJp
4
- class Railtie < ::Rails::Railtie
5
- end
6
- end