ken_all 0.3.0 → 0.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: 4c4a38011a2ea5df20a281b8cd2c10a6b830d994d95ecd1837eb5209aebaf9de
4
- data.tar.gz: 00ff3b1ee9297e427d87c4d48d9263f30336574591dee693cf7141e23b0933d5
3
+ metadata.gz: 55d4a1ede60427c136f5c6a2cbf2388f8f098f60e0846e53f0847a2abe17307b
4
+ data.tar.gz: 2a98902d3d74ddfad2d137db398e7e7131fcef7a4d072f91c2dfb67454cd3887
5
5
  SHA512:
6
- metadata.gz: 10f8e73f52f9cfd0798b6c8b512aee056d051149bf21509946d080151a6e14bfdea23085054e2a0da16dd86d918217168c9bab1ab1d456cdec44d100c0748005
7
- data.tar.gz: cb9b7a292108fc89314df139d8d0592b2cdfe8eb56213dc605c64b47851571ff430c5389549aae880389204982a982e6ad67fd97f1cfd04a37134f07e2f71549
6
+ metadata.gz: 9d00c447625c7906fa08402868c852d7c6f2679cf25007ed0f95bac311c55b33662a9bc3b47b2189437bc38b6fca9142a2b565fa66894bcb58a7ac763fe99723
7
+ data.tar.gz: b89914e04419fa13ec8e5f979c0af460515f48c499c5ff143763d2cab235f0ba6c89d6540a3ae37ef2dc8d7ea384227015e5e2a81878e373fb6c413382987b0a
@@ -1,8 +1,8 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- ken_all (0.3.0)
5
- activerecord-import (~> 0.4)
4
+ ken_all (0.4.0)
5
+ activerecord-import (>= 0.4)
6
6
  curses (~> 1.0)
7
7
  rails (>= 3.0.9)
8
8
  rubyzip (>= 1.2)
@@ -10,107 +10,107 @@ PATH
10
10
  GEM
11
11
  remote: https://rubygems.org/
12
12
  specs:
13
- actioncable (5.2.3)
14
- actionpack (= 5.2.3)
13
+ actioncable (5.2.4.2)
14
+ actionpack (= 5.2.4.2)
15
15
  nio4r (~> 2.0)
16
16
  websocket-driver (>= 0.6.1)
17
- actionmailer (5.2.3)
18
- actionpack (= 5.2.3)
19
- actionview (= 5.2.3)
20
- activejob (= 5.2.3)
17
+ actionmailer (5.2.4.2)
18
+ actionpack (= 5.2.4.2)
19
+ actionview (= 5.2.4.2)
20
+ activejob (= 5.2.4.2)
21
21
  mail (~> 2.5, >= 2.5.4)
22
22
  rails-dom-testing (~> 2.0)
23
- actionpack (5.2.3)
24
- actionview (= 5.2.3)
25
- activesupport (= 5.2.3)
26
- rack (~> 2.0)
23
+ actionpack (5.2.4.2)
24
+ actionview (= 5.2.4.2)
25
+ activesupport (= 5.2.4.2)
26
+ rack (~> 2.0, >= 2.0.8)
27
27
  rack-test (>= 0.6.3)
28
28
  rails-dom-testing (~> 2.0)
29
29
  rails-html-sanitizer (~> 1.0, >= 1.0.2)
30
- actionview (5.2.3)
31
- activesupport (= 5.2.3)
30
+ actionview (5.2.4.2)
31
+ activesupport (= 5.2.4.2)
32
32
  builder (~> 3.1)
33
33
  erubi (~> 1.4)
34
34
  rails-dom-testing (~> 2.0)
35
35
  rails-html-sanitizer (~> 1.0, >= 1.0.3)
36
- activejob (5.2.3)
37
- activesupport (= 5.2.3)
36
+ activejob (5.2.4.2)
37
+ activesupport (= 5.2.4.2)
38
38
  globalid (>= 0.3.6)
39
- activemodel (5.2.3)
40
- activesupport (= 5.2.3)
41
- activerecord (5.2.3)
42
- activemodel (= 5.2.3)
43
- activesupport (= 5.2.3)
39
+ activemodel (5.2.4.2)
40
+ activesupport (= 5.2.4.2)
41
+ activerecord (5.2.4.2)
42
+ activemodel (= 5.2.4.2)
43
+ activesupport (= 5.2.4.2)
44
44
  arel (>= 9.0)
45
- activerecord-import (0.28.2)
45
+ activerecord-import (1.0.5)
46
46
  activerecord (>= 3.2)
47
- activestorage (5.2.3)
48
- actionpack (= 5.2.3)
49
- activerecord (= 5.2.3)
47
+ activestorage (5.2.4.2)
48
+ actionpack (= 5.2.4.2)
49
+ activerecord (= 5.2.4.2)
50
50
  marcel (~> 0.3.1)
51
- activesupport (5.2.3)
51
+ activesupport (5.2.4.2)
52
52
  concurrent-ruby (~> 1.0, >= 1.0.2)
53
53
  i18n (>= 0.7, < 2)
54
54
  minitest (~> 5.1)
55
55
  tzinfo (~> 1.1)
56
56
  arel (9.0.0)
57
- builder (3.2.3)
58
- concurrent-ruby (1.1.5)
59
- crass (1.0.5)
60
- curses (1.3.1)
57
+ builder (3.2.4)
58
+ concurrent-ruby (1.1.6)
59
+ crass (1.0.6)
60
+ curses (1.3.2)
61
61
  diff-lcs (1.3)
62
62
  erubi (1.9.0)
63
63
  ffi (1.11.1)
64
64
  globalid (0.4.2)
65
65
  activesupport (>= 4.2.0)
66
- i18n (1.7.0)
66
+ i18n (1.8.2)
67
67
  concurrent-ruby (~> 1.0)
68
68
  listen (3.2.0)
69
69
  rb-fsevent (~> 0.10, >= 0.10.3)
70
70
  rb-inotify (~> 0.9, >= 0.9.10)
71
- loofah (2.3.0)
71
+ loofah (2.5.0)
72
72
  crass (~> 1.0.2)
73
73
  nokogiri (>= 1.5.9)
74
74
  mail (2.7.1)
75
75
  mini_mime (>= 0.1.1)
76
76
  marcel (0.3.3)
77
77
  mimemagic (~> 0.3.2)
78
- method_source (0.9.2)
79
- mimemagic (0.3.3)
78
+ method_source (1.0.0)
79
+ mimemagic (0.3.5)
80
80
  mini_mime (1.0.2)
81
81
  mini_portile2 (2.4.0)
82
- minitest (5.12.2)
82
+ minitest (5.14.1)
83
83
  nio4r (2.5.2)
84
- nokogiri (1.10.4)
84
+ nokogiri (1.10.9)
85
85
  mini_portile2 (~> 2.4.0)
86
- rack (2.0.7)
86
+ rack (2.2.2)
87
87
  rack-test (1.1.0)
88
88
  rack (>= 1.0, < 3)
89
- rails (5.2.3)
90
- actioncable (= 5.2.3)
91
- actionmailer (= 5.2.3)
92
- actionpack (= 5.2.3)
93
- actionview (= 5.2.3)
94
- activejob (= 5.2.3)
95
- activemodel (= 5.2.3)
96
- activerecord (= 5.2.3)
97
- activestorage (= 5.2.3)
98
- activesupport (= 5.2.3)
89
+ rails (5.2.4.2)
90
+ actioncable (= 5.2.4.2)
91
+ actionmailer (= 5.2.4.2)
92
+ actionpack (= 5.2.4.2)
93
+ actionview (= 5.2.4.2)
94
+ activejob (= 5.2.4.2)
95
+ activemodel (= 5.2.4.2)
96
+ activerecord (= 5.2.4.2)
97
+ activestorage (= 5.2.4.2)
98
+ activesupport (= 5.2.4.2)
99
99
  bundler (>= 1.3.0)
100
- railties (= 5.2.3)
100
+ railties (= 5.2.4.2)
101
101
  sprockets-rails (>= 2.0.0)
102
102
  rails-dom-testing (2.0.3)
103
103
  activesupport (>= 4.2.0)
104
104
  nokogiri (>= 1.6)
105
105
  rails-html-sanitizer (1.3.0)
106
106
  loofah (~> 2.3)
107
- railties (5.2.3)
108
- actionpack (= 5.2.3)
109
- activesupport (= 5.2.3)
107
+ railties (5.2.4.2)
108
+ actionpack (= 5.2.4.2)
109
+ activesupport (= 5.2.4.2)
110
110
  method_source
111
111
  rake (>= 0.8.7)
112
112
  thor (>= 0.19.0, < 2.0)
113
- rake (13.0.0)
113
+ rake (13.0.1)
114
114
  rb-fsevent (0.10.3)
115
115
  rb-inotify (0.10.0)
116
116
  ffi (~> 1.0)
@@ -131,7 +131,7 @@ GEM
131
131
  rspec-mocks (~> 3.9.0)
132
132
  rspec-support (~> 3.9.0)
133
133
  rspec-support (3.9.0)
134
- rubyzip (2.0.0)
134
+ rubyzip (2.3.0)
135
135
  sprockets (4.0.0)
136
136
  concurrent-ruby (~> 1.0)
137
137
  rack (> 1, < 3)
@@ -140,9 +140,9 @@ GEM
140
140
  activesupport (>= 4.0)
141
141
  sprockets (>= 3.0.0)
142
142
  sqlite3 (1.4.1)
143
- thor (0.20.3)
143
+ thor (1.0.1)
144
144
  thread_safe (0.3.6)
145
- tzinfo (1.2.5)
145
+ tzinfo (1.2.7)
146
146
  thread_safe (~> 0.1)
147
147
  websocket-driver (0.7.1)
148
148
  websocket-extensions (>= 0.1.0)
@@ -154,7 +154,7 @@ PLATFORMS
154
154
  DEPENDENCIES
155
155
  ken_all!
156
156
  listen
157
- rails (~> 5.2)
157
+ rails (= 5.2.4.2)
158
158
  rspec-rails
159
159
  sqlite3
160
160
 
@@ -20,12 +20,12 @@ Gem::Specification.new do |s|
20
20
  s.test_files = s.files.grep(%r{^(test|spec|features)/})
21
21
  s.require_paths = ['lib']
22
22
 
23
- s.add_dependency "activerecord-import","~> 0.4"
23
+ s.add_dependency "activerecord-import",">= 0.4"
24
24
  s.add_dependency "rails", ">= 3.0.9"
25
25
  s.add_dependency "rubyzip", '>= 1.2'
26
26
  s.add_dependency "curses", '~> 1.0'
27
27
  s.add_development_dependency 'listen'
28
28
  s.add_development_dependency "sqlite3"
29
29
  s.add_development_dependency "rspec-rails"
30
- s.add_development_dependency 'rails', '~> 5.2'
30
+ s.add_development_dependency 'rails', '5.2.4.2'
31
31
  end
@@ -7,18 +7,18 @@ module KenAll
7
7
  class Import
8
8
  URI = "http://www.post.japanpost.jp/zipcode/dl/kogaki/zip/ken_all.zip"
9
9
 
10
- def initialize(opt = {visualize: true})
10
+ def initialize(opt = { visualize: true })
11
11
  @visualizer = KenAll::Visualizer.new(opt[:visualize])
12
- if old_schema?
13
- error = <<EOS
14
- KenAll Error.
15
- This project is using old schema information.
16
- Type First.
17
- $ rake ken_all:install:migrations
18
- $ rake db:migrate
19
- EOS
20
- raise KenAll::OldSchemaException.new(error)
21
- end
12
+ return unless old_schema?
13
+
14
+ error = <<~ERROR
15
+ KenAll Error.
16
+ This project is using old schema information.
17
+ Type First.
18
+ $ rake ken_all:install:migrations
19
+ $ rake db:migrate
20
+ ERROR
21
+ raise KenAll::OldSchemaException.new(error)
22
22
  end
23
23
 
24
24
  def from_net
@@ -97,9 +97,11 @@ EOS
97
97
  end
98
98
  end
99
99
 
100
- def old_schema?
101
- column = KenAll::PostalCode.columns.select{|v| v.name == 'address1'}.first
102
- !(column.sql_type =~ /text/)
103
- end
100
+ private
101
+
102
+ def old_schema?
103
+ column = KenAll::PostalCode.columns.find { |v| v.name == 'address1' }
104
+ column.sql_type !~ /text/
105
+ end
104
106
  end
105
107
  end
@@ -1,3 +1,3 @@
1
1
  module KenAll
2
- VERSION = "0.3.0"
2
+ VERSION = "0.4.0"
3
3
  end
@@ -97,7 +97,7 @@ EOS
97
97
  context 'スキーマ情報が古い場合' do
98
98
  let(:column){ double('Column', sql_type: 'varchar(255)') }
99
99
  before do
100
- allow(KenAll::PostalCode.columns).to receive(:select) { [column] }
100
+ allow(KenAll::PostalCode.columns).to receive(:find) { column }
101
101
  end
102
102
  it '例外が発生すること' do
103
103
  expect {KenAll::Import.new}.to raise_error(KenAll::OldSchemaException)
metadata CHANGED
@@ -1,27 +1,27 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ken_all
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.0
4
+ version: 0.4.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Yamamoto Kazuhisa
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-10-16 00:00:00.000000000 Z
11
+ date: 2020-05-21 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activerecord-import
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - "~>"
17
+ - - ">="
18
18
  - !ruby/object:Gem::Version
19
19
  version: '0.4'
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
- - - "~>"
24
+ - - ">="
25
25
  - !ruby/object:Gem::Version
26
26
  version: '0.4'
27
27
  - !ruby/object:Gem::Dependency
@@ -112,16 +112,16 @@ dependencies:
112
112
  name: rails
113
113
  requirement: !ruby/object:Gem::Requirement
114
114
  requirements:
115
- - - "~>"
115
+ - - '='
116
116
  - !ruby/object:Gem::Version
117
- version: '5.2'
117
+ version: 5.2.4.2
118
118
  type: :development
119
119
  prerelease: false
120
120
  version_requirements: !ruby/object:Gem::Requirement
121
121
  requirements:
122
- - - "~>"
122
+ - - '='
123
123
  - !ruby/object:Gem::Version
124
- version: '5.2'
124
+ version: 5.2.4.2
125
125
  description: Japanese postal code tools.
126
126
  email:
127
127
  - ak.hisashi@gmail.com