jp_prefecture 0.8.0 → 0.8.1
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/.travis.yml +10 -1
- data/CHANGELOG.md +4 -0
- data/README.md +9 -7
- data/jp_prefecture.gemspec +1 -0
- data/lib/jp_prefecture/prefecture.rb +2 -0
- data/lib/jp_prefecture/version.rb +1 -1
- data/spec/prefecture_spec.rb +14 -0
- data/spec/spec_helper.rb +5 -0
- metadata +17 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c6636c60d594d140725ac2f9b01c6724b66328e3
|
4
|
+
data.tar.gz: dfb83ab23f2bb8be09afc748d17f3b51180e2e7b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d8e91fddb44bc5cfbce465c541a5ca3312afaf8412900fbf122591a64a2215f1b29900d4437149a800be5d67ba28e0ceaaa37cae7c1c7cfe8d2eeafdfaa257d8
|
7
|
+
data.tar.gz: c5fa940c3614cb491f32f5bf740e2140a02dde3ca8f42af4bb8adcdf5da941ad09470f298042702760a07afeabc3d507237e6349805655368d801e0b286f3791
|
data/.travis.yml
CHANGED
data/CHANGELOG.md
CHANGED
@@ -1,3 +1,7 @@
|
|
1
|
+
## 0.8.1 (Mar 30, 2016)
|
2
|
+
|
3
|
+
* `JpPrefecture::Prefecture.find(name: name)` に `nil` や空文字を渡した時に `nil` を返す (Issue [#18](https://github.com/chocoby/jp_prefecture/issues/18)/PR [#19](https://github.com/chocoby/jp_prefecture/pull/19)/[@k-motoyan](https://github.com/k-motoyan))
|
4
|
+
|
1
5
|
## 0.8.0 (Sep 07, 2014)
|
2
6
|
|
3
7
|
* 都道府県情報に八地方区分情報を追加 (PR [#14](https://github.com/chocoby/jp_prefecture/pull/14)/[@kkosuge](https://github.com/kkosuge))
|
data/README.md
CHANGED
@@ -1,8 +1,10 @@
|
|
1
1
|
# JpPrefecture
|
2
2
|
|
3
|
-
[](https://rubygems.org/gems/jp_prefecture)
|
4
|
+
[](https://travis-ci.org/chocoby/jp_prefecture)
|
5
|
+
[](https://coveralls.io/r/chocoby/jp_prefecture)
|
6
|
+
[](https://codeclimate.com/github/chocoby/jp_prefecture)
|
7
|
+
[](https://gemnasium.com/chocoby/jp_prefecture)
|
6
8
|
|
7
9
|
https://rubygems.org/gems/jp_prefecture
|
8
10
|
|
@@ -178,10 +180,10 @@ end
|
|
178
180
|
|
179
181
|
GitHub の [Issues](https://github.com/chocoby/jp_prefecture/issues) を参照してください。
|
180
182
|
|
181
|
-
##
|
183
|
+
## サポートしているバージョン
|
182
184
|
|
183
|
-
* Ruby: 1.9.3 / 2.0 / 2.1
|
184
|
-
* Rails: 3.2 / 4.0 / 4.1
|
185
|
+
* Ruby: 1.9.3 / 2.0.0 / 2.1 / 2.2 / 2.3
|
186
|
+
* Rails: 3.2 / 4.0 / 4.1 / 4.2
|
185
187
|
|
186
188
|
## Contributing
|
187
189
|
|
@@ -206,4 +208,4 @@ https://github.com/chocoby/jp_prefecture
|
|
206
208
|
|
207
209
|
## ライセンス
|
208
210
|
|
209
|
-
MIT
|
211
|
+
[MIT License](http://chocoby.mit-license.org/)
|
data/jp_prefecture.gemspec
CHANGED
data/spec/prefecture_spec.rb
CHANGED
@@ -127,6 +127,20 @@ describe JpPrefecture::Prefecture do
|
|
127
127
|
JpPrefecture::Prefecture.find(name: name)
|
128
128
|
expect(name).to eq 'hokkaido'
|
129
129
|
end
|
130
|
+
|
131
|
+
context '空の文字列が与えられた場合' do
|
132
|
+
it 'nilを返すこと' do
|
133
|
+
actual = JpPrefecture::Prefecture.find(name: '')
|
134
|
+
expect(actual).to be_nil
|
135
|
+
end
|
136
|
+
end
|
137
|
+
|
138
|
+
context 'nilが与えられた場合' do
|
139
|
+
it 'nilを返すこと' do
|
140
|
+
actual = JpPrefecture::Prefecture.find(name: nil)
|
141
|
+
expect(actual).to be_nil
|
142
|
+
end
|
143
|
+
end
|
130
144
|
end
|
131
145
|
|
132
146
|
context 'zip の場合' do
|
data/spec/spec_helper.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: jp_prefecture
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.8.
|
4
|
+
version: 0.8.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- chocoby
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2016-03-30 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rake
|
@@ -66,6 +66,20 @@ dependencies:
|
|
66
66
|
- - ">="
|
67
67
|
- !ruby/object:Gem::Version
|
68
68
|
version: '0'
|
69
|
+
- !ruby/object:Gem::Dependency
|
70
|
+
name: coveralls
|
71
|
+
requirement: !ruby/object:Gem::Requirement
|
72
|
+
requirements:
|
73
|
+
- - ">="
|
74
|
+
- !ruby/object:Gem::Version
|
75
|
+
version: '0'
|
76
|
+
type: :development
|
77
|
+
prerelease: false
|
78
|
+
version_requirements: !ruby/object:Gem::Requirement
|
79
|
+
requirements:
|
80
|
+
- - ">="
|
81
|
+
- !ruby/object:Gem::Version
|
82
|
+
version: '0'
|
69
83
|
description: Convert japan prefecture code(JIS X 0402 based) into prefecture name.
|
70
84
|
email:
|
71
85
|
- chocoby@gmail.com
|
@@ -119,7 +133,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
119
133
|
version: '0'
|
120
134
|
requirements: []
|
121
135
|
rubyforge_project:
|
122
|
-
rubygems_version: 2.
|
136
|
+
rubygems_version: 2.4.5.1
|
123
137
|
signing_key:
|
124
138
|
specification_version: 4
|
125
139
|
summary: Convert japan prefecture code into prefecture name
|