us_geo 1.0.0 → 1.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/lib/us_geo/place.rb +3 -3
- data/lib/us_geo/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 9d688b4dd660b4985b7b46433e8a370bbb43cdbd4653ed23e01c33ed92b7164f
|
4
|
+
data.tar.gz: 653e4873e80d5569474c6ec1a0410dd95f3d1f077977327642b0bb04c155cec7
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9e96f43129944e46148b6c2f80e89908a886db1169cd338d0bc5b1c2a1c7e4e8ebd925551f7eae630208646d592c121f5cf4b5d1f041b95efa73f3b4b98001b9
|
7
|
+
data.tar.gz: b03ef85c0736584e2b9fe81315be71f630cb27e8edfb7c5553b3698ddeca218378f6b5cb49df6ded86b074f325f86cc9ef46de8c884866a6c1afd8ced868403f
|
data/Gemfile.lock
CHANGED
data/lib/us_geo/place.rb
CHANGED
@@ -14,7 +14,7 @@ module USGeo
|
|
14
14
|
|
15
15
|
has_many :place_counties, foreign_key: :place_geoid, inverse_of: :place, dependent: :destroy
|
16
16
|
has_many :counties, through: :place_counties
|
17
|
-
|
17
|
+
|
18
18
|
belongs_to :primary_county, foreign_key: :primary_county_geoid, class_name: "USGeo::County"
|
19
19
|
belongs_to :urban_area, foreign_key: :urban_area_geoid, optional: true, class_name: "USGeo::UrbanArea"
|
20
20
|
belongs_to :state, foreign_key: :state_code, inverse_of: :places
|
@@ -24,7 +24,7 @@ module USGeo
|
|
24
24
|
validates :primary_county_geoid, length: {is: 5}
|
25
25
|
validates :urban_area_geoid, length: {is: 5}, allow_nil: true
|
26
26
|
validates :name, length: {maximum: 60}
|
27
|
-
validates :short_name, length: {maximum:
|
27
|
+
validates :short_name, length: {maximum: 30}
|
28
28
|
validates :fips_class_code, length: {is: 2}
|
29
29
|
validates :land_area, numericality: true, allow_nil: true
|
30
30
|
validates :water_area, numericality: true, allow_nil: true
|
@@ -34,7 +34,7 @@ module USGeo
|
|
34
34
|
class << self
|
35
35
|
def load!(uri = nil)
|
36
36
|
location = data_uri(uri || "places.csv")
|
37
|
-
|
37
|
+
|
38
38
|
import! do
|
39
39
|
load_data_file(location) do |row|
|
40
40
|
load_record!(geoid: row["GEOID"]) do |record|
|
data/lib/us_geo/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: us_geo
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Brian Durand
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-03-
|
11
|
+
date: 2019-03-15 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activerecord
|