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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 3830cec3c8dd872df73d2c290854040f8f755f92f4762e64fb1dfb36330e6885
4
- data.tar.gz: 0f0923a5aca71c60ce3b80789dd4751b16d2881ae67a49a5ee1acd596fb6b7f2
3
+ metadata.gz: 9d688b4dd660b4985b7b46433e8a370bbb43cdbd4653ed23e01c33ed92b7164f
4
+ data.tar.gz: 653e4873e80d5569474c6ec1a0410dd95f3d1f077977327642b0bb04c155cec7
5
5
  SHA512:
6
- metadata.gz: f6e7bc70588ed2d7175f8f42d138bf8be7ed181d93ff838332f5dd8e3cd1ee80e7fe8ba8e2b556be164832df749084dd41d2af1e0ce16524342e9d8fe4fac070
7
- data.tar.gz: 280b9fcc0ffb2a5f78b749ff8d02e0223e5071b7fa9c08cda37dede29c6c0a026979ae457f4770544b77d9212ff78662b6e2628de12f2f328e40e8fdb32639ac
6
+ metadata.gz: 9e96f43129944e46148b6c2f80e89908a886db1169cd338d0bc5b1c2a1c7e4e8ebd925551f7eae630208646d592c121f5cf4b5d1f041b95efa73f3b4b98001b9
7
+ data.tar.gz: b03ef85c0736584e2b9fe81315be71f630cb27e8edfb7c5553b3698ddeca218378f6b5cb49df6ded86b074f325f86cc9ef46de8c884866a6c1afd8ced868403f
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- us_geo (1.0.0)
4
+ us_geo (1.0.1)
5
5
  activerecord (~> 5.0)
6
6
 
7
7
  GEM
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: 60}
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|
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module USGeo
4
- VERSION = "1.0.0"
4
+ VERSION = "1.0.1"
5
5
  end
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.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-13 00:00:00.000000000 Z
11
+ date: 2019-03-15 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activerecord