tax_jp 0.3.6 → 0.3.7

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: d77a547f4e16902a5639eae0178dcdb91cfd7356
4
- data.tar.gz: 92c349f324104173b7ef999c57cd51b1f7d62241
3
+ metadata.gz: f514ff01d23156f9ab588d31282bbebeb256af61
4
+ data.tar.gz: c4bfe3ead6faedc349a85cea00403a5ea1231916
5
5
  SHA512:
6
- metadata.gz: 3ce76ecc82475cfa9a9a672c0d8549f5c9fbd6b5bbe3a9e227928d2e9e4d7bd9f2c5bb5a5eb3bff5cbafac0f0e760363a779b1c1c8971a6d8a4beb0d882d444d
7
- data.tar.gz: 7360fd4ba2bdab4a506339c3b4ec09305146040371791b09c4d6b833ef786bdc778227b590a9b431411fdc27a86a24eec85a30da690d7f6088fa7bfcac668b7b
6
+ metadata.gz: 36e272a7fa405b8716e80fab966d1e1852dbf702494883d82a92c7c5bb13d7e166036bdf9f43837f510747bf710fd8e80b298a493fce7c81ab96c0cdec180ffa
7
+ data.tar.gz: 8bfa1c21a4f053745733f1ffe71d760003360adfb25d1d3a9c0b8d7e14dcd58536b7a7234ce2c336231dc44ab7b4f93ce69939e9e5e2a4d4a0d3e0bee355eef4
data/.gitignore CHANGED
@@ -13,3 +13,4 @@
13
13
  *.a
14
14
  mkmf.log
15
15
  /.project
16
+ /.buildpath
data/.travis.yml CHANGED
@@ -2,7 +2,7 @@ sudo: false
2
2
  language: ruby
3
3
  rvm:
4
4
  - 2.3.1
5
- - 2.2.5
5
+ - 2.2.6
6
6
  - 2.1.9
7
7
  before_install:
8
8
  gem install bundler
data/HISTORY.md CHANGED
@@ -1,3 +1,17 @@
1
+ # バージョン 0.3.7
2
+ リリース日: 2017-05-19
3
+
4
+ ### 修正
5
+ * 元号
6
+ * 和暦取得時に年号なしを指定する引数 only_year を追加
7
+
8
+ # バージョン 0.3.6
9
+ リリース日: 2017-03-17
10
+
11
+ ### 追加
12
+ * 社会保険
13
+ * 平成29年3月分(4月納付分)からの健康保険料率
14
+
1
15
  # バージョン 0.3.4
2
16
  リリース日: 2016-10-17
3
17
 
@@ -29,7 +43,7 @@
29
43
  * 厚生年金の等級30以上の計算
30
44
 
31
45
  ### 修正
32
- * 2016年3月の健康保険料の間違いを修正
46
+ * 平成28年3月の健康保険料の間違いを修正
33
47
 
34
48
  # バージョン 0.3.0
35
49
  リリース日: 2016-05-12
data/lib/tax_jp/gengou.rb CHANGED
@@ -19,21 +19,25 @@ module TaxJp
19
19
  return (start_year + year_jp.to_i - 1).to_s
20
20
  end
21
21
 
22
- def self.to_wareki(year)
22
+ def self.to_wareki(year, only_year: false)
23
23
  return nil unless year.present?
24
-
24
+
25
25
  target_year = nil
26
26
  @@_gengou.keys.sort.each do |start_year|
27
27
  break if start_year.to_i > year.to_i
28
28
  target_year = start_year
29
29
  end
30
-
30
+
31
31
  return nil unless target_year
32
-
32
+
33
33
  gengou = @@_gengou[target_year]
34
- year_jp = year - target_year + 1
35
-
36
- return gengou + (year_jp == 1 ? '元' : year_jp.to_s)
34
+ year_jp = year - target_year + 1
35
+
36
+ if only_year
37
+ year_jp.to_s
38
+ else
39
+ gengou + (year_jp == 1 ? '元' : year_jp.to_s)
40
+ end
37
41
  end
38
42
 
39
43
  end
@@ -1,3 +1,3 @@
1
1
  module TaxJp
2
- VERSION = '0.3.6'
2
+ VERSION = '0.3.7'
3
3
  end
data/tax_jp.gemspec CHANGED
@@ -25,5 +25,5 @@ Gem::Specification.new do |s|
25
25
  s.add_development_dependency 'closer', '~> 0.3'
26
26
  s.add_development_dependency 'minitest', '~> 5.10'
27
27
  s.add_development_dependency 'rake', '~> 12.0'
28
- s.add_development_dependency 'rails', '>= 4.0', '< 5.0.0'
28
+ s.add_development_dependency 'rails', '>= 4.0', '< 5.1.0'
29
29
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: tax_jp
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.6
4
+ version: 0.3.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - ichylinux
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2017-03-17 00:00:00.000000000 Z
12
+ date: 2017-05-19 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: sqlite3
@@ -90,7 +90,7 @@ dependencies:
90
90
  version: '4.0'
91
91
  - - "<"
92
92
  - !ruby/object:Gem::Version
93
- version: 5.0.0
93
+ version: 5.1.0
94
94
  type: :development
95
95
  prerelease: false
96
96
  version_requirements: !ruby/object:Gem::Requirement
@@ -100,7 +100,7 @@ dependencies:
100
100
  version: '4.0'
101
101
  - - "<"
102
102
  - !ruby/object:Gem::Version
103
- version: 5.0.0
103
+ version: 5.1.0
104
104
  description: 税金計算ライブラリ
105
105
  email:
106
106
  - ichylinux@gmail.com
@@ -205,7 +205,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
205
205
  version: '0'
206
206
  requirements: []
207
207
  rubyforge_project:
208
- rubygems_version: 2.6.4
208
+ rubygems_version: 2.6.11
209
209
  signing_key:
210
210
  specification_version: 4
211
211
  summary: 税金計算ライブラリ