simplegeo 0.0.3 → 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- data/.document +5 -0
- data/.gitignore +20 -7
- data/LICENSE +1 -1
- data/README.rdoc +108 -3
- data/Rakefile +14 -16
- data/VERSION +1 -1
- data/lib/simple_geo/client.rb +171 -0
- data/lib/simple_geo/connection.rb +109 -0
- data/lib/simple_geo/endpoint.rb +71 -0
- data/lib/simple_geo/hash_utils.rb +24 -0
- data/lib/simple_geo/record.rb +56 -0
- data/lib/simple_geo.rb +23 -0
- data/lib/simplegeo.rb +2 -177
- data/simplegeo.gemspec +41 -27
- data/spec/client_spec.rb +1180 -0
- data/spec/fixtures/contains.json +127 -0
- data/spec/fixtures/get_density_by_day.json +833 -0
- data/spec/fixtures/get_density_by_hour.json +36 -0
- data/spec/fixtures/get_history.json +13 -0
- data/spec/fixtures/get_nearby.json +84 -0
- data/spec/fixtures/get_record.json +38 -0
- data/spec/fixtures/get_records.json +197 -0
- data/spec/fixtures/layer_info.json +8 -0
- data/spec/fixtures/nearby_address.json +21 -0
- data/spec/fixtures/no_such_record.json +4 -0
- data/spec/fixtures/nonetype_not_iterable.json +4 -0
- data/spec/fixtures/overlaps.json +41 -0
- data/spec/spec_helper.rb +21 -7
- metadata +61 -46
- data/spec/simplegeo_spec.rb +0 -89
- data/spec/test_keys.yml +0 -2
@@ -0,0 +1,127 @@
|
|
1
|
+
[
|
2
|
+
{
|
3
|
+
"bounds":
|
4
|
+
[
|
5
|
+
-122.435188,
|
6
|
+
37.756093,
|
7
|
+
-122.42555,
|
8
|
+
37.763030999999998
|
9
|
+
],
|
10
|
+
"type": "Census Tract",
|
11
|
+
"id": "Census_Tract:06075020600:9q8yy1",
|
12
|
+
"abbr": "",
|
13
|
+
"name": "06075020600"
|
14
|
+
},
|
15
|
+
|
16
|
+
{
|
17
|
+
"bounds":
|
18
|
+
[
|
19
|
+
-123.17382499999999,
|
20
|
+
37.639829999999996,
|
21
|
+
-122.28178,
|
22
|
+
37.929823999999996
|
23
|
+
],
|
24
|
+
"type": "County",
|
25
|
+
"id": "County:San_Francisco:9q8yvv",
|
26
|
+
"abbr": "",
|
27
|
+
"name": "San Francisco"
|
28
|
+
},
|
29
|
+
|
30
|
+
{
|
31
|
+
"bounds":
|
32
|
+
[
|
33
|
+
-123.17382499999999,
|
34
|
+
37.639829999999996,
|
35
|
+
-122.28178,
|
36
|
+
37.929823999999996
|
37
|
+
],
|
38
|
+
"type": "City",
|
39
|
+
"id": "City:San_Francisco:9q8yvv",
|
40
|
+
"abbr": "",
|
41
|
+
"name": "San Francisco"
|
42
|
+
},
|
43
|
+
|
44
|
+
{
|
45
|
+
"bounds":
|
46
|
+
[
|
47
|
+
-122.612285,
|
48
|
+
37.708131000000002,
|
49
|
+
-122.28178,
|
50
|
+
37.929823999999996
|
51
|
+
],
|
52
|
+
"type": "Congressional District",
|
53
|
+
"id": "Congressional_District:Congressional_Di:9q8yyn",
|
54
|
+
"abbr": "",
|
55
|
+
"name": "Congressional District 8"
|
56
|
+
},
|
57
|
+
|
58
|
+
{
|
59
|
+
"bounds":
|
60
|
+
[
|
61
|
+
-179.14247147726383,
|
62
|
+
18.930137634111077,
|
63
|
+
179.78114994357418,
|
64
|
+
71.412179667308919
|
65
|
+
],
|
66
|
+
"type": "Country",
|
67
|
+
"id": "Country:United_States_of:9z12zg",
|
68
|
+
"abbr": "",
|
69
|
+
"name": "United States of America"
|
70
|
+
},
|
71
|
+
|
72
|
+
{
|
73
|
+
"bounds":
|
74
|
+
[
|
75
|
+
-122.428882,
|
76
|
+
37.758029999999998,
|
77
|
+
-122.42138199999999,
|
78
|
+
37.772263000000002
|
79
|
+
],
|
80
|
+
"type": "Neighborhood",
|
81
|
+
"id": "Neighborhood:Mission_Dolores:9q8yy4",
|
82
|
+
"abbr": "",
|
83
|
+
"name": "Mission Dolores"
|
84
|
+
},
|
85
|
+
|
86
|
+
{
|
87
|
+
"bounds":
|
88
|
+
[
|
89
|
+
-122.51666666668193,
|
90
|
+
37.191666666628507,
|
91
|
+
-121.73333333334497,
|
92
|
+
38.041666666640907
|
93
|
+
],
|
94
|
+
"type": "Urban Area",
|
95
|
+
"id": "Urban_Area:San_Francisco1:9q9jsg",
|
96
|
+
"abbr": "",
|
97
|
+
"name": "San Francisco1"
|
98
|
+
},
|
99
|
+
|
100
|
+
{
|
101
|
+
"bounds":
|
102
|
+
[
|
103
|
+
-122.451553,
|
104
|
+
37.746687000000001,
|
105
|
+
-122.424773,
|
106
|
+
37.770451999999999
|
107
|
+
],
|
108
|
+
"type": "Postal",
|
109
|
+
"id": "Postal:94114:9q8yvc",
|
110
|
+
"abbr": "",
|
111
|
+
"name": "94114"
|
112
|
+
},
|
113
|
+
|
114
|
+
{
|
115
|
+
"bounds":
|
116
|
+
[
|
117
|
+
-124.48200299999999,
|
118
|
+
32.528832000000001,
|
119
|
+
-114.13121099999999,
|
120
|
+
42.009516999999995
|
121
|
+
],
|
122
|
+
"type": "Province",
|
123
|
+
"id": "Province:CA:9qdguu",
|
124
|
+
"abbr": "CA",
|
125
|
+
"name": "California"
|
126
|
+
}
|
127
|
+
]
|