jp_prefecture 0.8.0 → 1.0.0.rc1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/CHANGELOG.md +69 -12
- data/LICENSE +17 -18
- data/README.md +59 -50
- data/README_EN.md +221 -0
- data/data/zip.yml +10 -5
- data/lib/jp_prefecture.rb +6 -5
- data/lib/jp_prefecture/base.rb +3 -2
- data/lib/jp_prefecture/config.rb +2 -4
- data/lib/jp_prefecture/mapping.rb +2 -2
- data/lib/jp_prefecture/prefecture.rb +75 -100
- data/lib/jp_prefecture/prefecture/finder.rb +71 -0
- data/lib/jp_prefecture/version.rb +3 -1
- data/lib/jp_prefecture/zip_mapping.rb +6 -6
- metadata +121 -44
- data/.gitignore +0 -18
- data/.rspec +0 -2
- data/.travis.yml +0 -4
- data/.yardopts +0 -2
- data/Gemfile +0 -3
- data/Rakefile +0 -74
- data/jp_prefecture.gemspec +0 -22
- data/spec/base_spec.rb +0 -81
- data/spec/config_spec.rb +0 -18
- data/spec/fixtures/prefecture.yml +0 -148
- data/spec/jp_prefecture_spec.rb +0 -36
- data/spec/mapping_spec.rb +0 -10
- data/spec/prefecture_spec.rb +0 -149
- data/spec/spec_helper.rb +0 -30
- data/spec/zip_mapping_spec.rb +0 -10
data/spec/spec_helper.rb
DELETED
@@ -1,30 +0,0 @@
|
|
1
|
-
# coding: utf-8
|
2
|
-
require 'jp_prefecture'
|
3
|
-
require "active_record"
|
4
|
-
|
5
|
-
RSpec.configure do |config|
|
6
|
-
config.before(:suite) do
|
7
|
-
setup_db
|
8
|
-
end
|
9
|
-
|
10
|
-
config.after(:suite) do
|
11
|
-
teardown_db
|
12
|
-
end
|
13
|
-
end
|
14
|
-
|
15
|
-
def setup_db
|
16
|
-
ActiveRecord::Base.establish_connection adapter: "sqlite3", database: ":memory:"
|
17
|
-
|
18
|
-
ActiveRecord::Schema.define(version: 1) do
|
19
|
-
create_table :places do |t|
|
20
|
-
t.integer :prefecture_code
|
21
|
-
t.integer :prefecture_id
|
22
|
-
end
|
23
|
-
end
|
24
|
-
end
|
25
|
-
|
26
|
-
def teardown_db
|
27
|
-
ActiveRecord::Base.connection.tables.each do |table|
|
28
|
-
ActiveRecord::Base.connection.drop_table(table)
|
29
|
-
end
|
30
|
-
end
|