geo_seeder 1.0.1 → 1.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
data/README.md CHANGED
@@ -83,7 +83,10 @@ location.all
83
83
  ```
84
84
 
85
85
  ### Comming Soon!
86
- * output option - call any class method with the option - output: ["attribute1", "attribute2", ...] - and it will return a hash/array of hashes with only those attributes, all ready for your merging pleasure.
86
+ * only option - call any class method with the option - only: ["attribute1", "attribute2", ...] - and it will return a hash/array of hashes with only those attributes, all ready for your merging pleasure.
87
+
88
+ ### TODO
89
+ * More thorough parsing of API response needed for metropolitan areas. Calling random with a center anywhere in NYC gives slightly unexpected/incorrect output in the city/neighborhood fields.
87
90
 
88
91
  ## Contributing
89
92
 
@@ -1,3 +1,3 @@
1
1
  module GeoSeeder
2
- VERSION = "1.0.1"
2
+ VERSION = "1.0.2"
3
3
  end
data/lib/geo_seeder.rb CHANGED
@@ -32,8 +32,10 @@ module GeoSeeder
32
32
  options["address_components"].each do |comp|
33
33
  type = comp["types"].first
34
34
  ln = comp["long_name"]
35
+
36
+ puts type
35
37
 
36
- unless eval(ADDRESS_COMPONENT_TYPES[type])
38
+ unless ADDRESS_COMPONENT_TYPES[type] && eval(ADDRESS_COMPONENT_TYPES[type])
37
39
  eval("#{ADDRESS_COMPONENT_TYPES[type]} = '#{ln}'")
38
40
  end
39
41
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: geo_seeder
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.1
4
+ version: 1.0.2
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2014-03-10 00:00:00.000000000 Z
12
+ date: 2014-03-12 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: addressable