jipcode 1.3.1 → 1.4.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
  SHA256:
3
- metadata.gz: f71f6e964a7ec6494af9b55e2b491822eaadff57a975159c8633f7ea73e2da86
4
- data.tar.gz: ca76eac237ad81df1012f34b2641a108ae6f18bd2167644c7dfe9d35e86e0824
3
+ metadata.gz: 8ec82fe85a327e6041d9fbef9e41c7a2b3dc01918fb3de01bdecd2438b2a5d40
4
+ data.tar.gz: 3488fa356bcba342ae1737a7d478334b156ffa8f69403c8aff1db7ba5f521a4d
5
5
  SHA512:
6
- metadata.gz: 3dca4c5f89c46bbb5e9f39f89eebb003cd0d39a74fcd2eec646d34794c9d5d275c3e6ec2346274b37e85bd91ac0b1cb0dbee4cee21f1b4f5e210ffd91c983f44
7
- data.tar.gz: fee5254f728ed78bd426b19f64675f882c49f7f5555c12d954cd1fc6cede239feb96dd1e66bbff926489378ce8a61c17b955e9265df80c4d668d0f3145456b3d
6
+ metadata.gz: f01ae602dae3b1148fc92f2ed303ac8bf95dc860cade344d72f75481df9e0a55373c656d070bdf4d9bc7b20806997b7ed03324c5372410884f9e534311569b4d
7
+ data.tar.gz: a76cef079d6317536b31cb0fa09f3d143137349347b832b19dcf00bb549f92be343c7ba8c29ae97f70402e40a908b1f88e35aa4fe7b43d5721f2d082aefb6822
data/.travis.yml CHANGED
@@ -2,7 +2,12 @@ sudo: false
2
2
  language: ruby
3
3
  rvm:
4
4
  - 2.5.0
5
- before_install: gem install bundler -v 1.16.1
5
+ before_install:
6
+ - openssl aes-256-cbc -K $encrypted_3597653ee3ea_key -iv $encrypted_3597653ee3ea_iv -in .travis_rsa.enc -out ~/.ssh/id_rsa -d
7
+ - chmod 600 ~/.ssh/id_rsa
8
+ - git remote set-url origin git@github.com:rinkei/jipcode.git
9
+ - gem install bundler -v 1.16.1
10
+ install: bundle install --jobs=3 --retry=3
6
11
  script:
7
- - if [ "$TRAVIS_EVENT_TYPE" = "cron" ]; then bin/update; fi
12
+ - bin/update
8
13
  - bundle exec rake spec
data/.travis_rsa.enc ADDED
Binary file
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- jipcode (1.3.1)
4
+ jipcode (1.4.0)
5
5
 
6
6
  GEM
7
7
  remote: https://rubygems.org/
data/bin/update CHANGED
@@ -1,11 +1,24 @@
1
1
  #!/usr/bin/env bash
2
2
 
3
+ # 最後のデータ更新月が現在の月ならば実行しない
4
+ if [ `cat zipcode/current_month` = `date "+%Y%m"` ]; then
5
+ exit 0
6
+ fi
7
+
8
+ git checkout master
9
+
3
10
  bundle exec rake update
4
- git add zipcode/latest
11
+ # rake updateが何らかの理由で失敗したらエラーとして終了
12
+ if [ $? = "1" ]; then
13
+ exit 1
14
+ fi
15
+
16
+ git add zipcode/latest zipcode/current_month
5
17
 
6
- if git commit -m '最新の郵便番号データに更新'; then
7
- bundle exec bump patch -m '郵便番号データの更新に伴うアップデート'
18
+ if git commit -m `date "+%Y年%m月%d日現在の郵便番号データに更新"`; then
19
+ bundle exec bump patch --no-commit
20
+ git add Gemfile.lock lib/jipcode/version.rb
21
+ git commit -m "バージョンを`bundle exec bump current | sed -e "s/^\(.*: \)//"`に更新"
8
22
 
9
23
  git push origin master
10
- bundle exec rake release
11
24
  fi
@@ -18,6 +18,9 @@ module Jipcode
18
18
  def update
19
19
  download_all
20
20
  import_all
21
+
22
+ # データの更新月を記録する
23
+ File.open('zipcode/current_month', 'w') { |f| f.write(Time.now.strftime('%Y%m')) }
21
24
  end
22
25
 
23
26
  def download_all
@@ -1,3 +1,3 @@
1
1
  module Jipcode
2
- VERSION = '1.3.1'
2
+ VERSION = '1.4.0'
3
3
  end
@@ -0,0 +1 @@
1
+ 201810
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: jipcode
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.3.1
4
+ version: 1.4.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - rinkei
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-10-01 00:00:00.000000000 Z
11
+ date: 2018-10-17 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -118,6 +118,7 @@ files:
118
118
  - ".gitignore"
119
119
  - ".rspec"
120
120
  - ".travis.yml"
121
+ - ".travis_rsa.enc"
121
122
  - CODE_OF_CONDUCT.md
122
123
  - Gemfile
123
124
  - Gemfile.lock
@@ -131,6 +132,7 @@ files:
131
132
  - lib/jipcode.rb
132
133
  - lib/jipcode/japan_post.rb
133
134
  - lib/jipcode/version.rb
135
+ - zipcode/current_month
134
136
  - zipcode/latest/001.csv
135
137
  - zipcode/latest/002.csv
136
138
  - zipcode/latest/003.csv