get_your_rep 0.1.7 → 0.1.8
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.
- checksums.yaml +4 -4
- data/lib/get_your_rep/open_states.rb +6 -1
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: a5741d7020c669da418435c2ff212e9e8455a76a
|
|
4
|
+
data.tar.gz: acba81f8daf9d744295c298c3234428d8f3ca2ca
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 56ac5c1fd7dcda7b52667bd2fede7b00a2f239f0bad8f5738347ea26b0f19bca99cfa05b62f3134235b7b3c034c9d0ff192209c10b124a8edc133530fe76956d
|
|
7
|
+
data.tar.gz: 58d5b6313451869530e3af51c20afb1d136e43fa3405338b481e8779c5ee12d32af445d4c28ad1eb457ba29775d5f3f905156139866d0f964ed8680694b67d4d
|
|
@@ -8,7 +8,11 @@ module GetYourRep
|
|
|
8
8
|
# Initiates a chain of class method calls that will instantiate a
|
|
9
9
|
# Delegation object and return it.
|
|
10
10
|
def self.now(address)
|
|
11
|
-
@coordinates =
|
|
11
|
+
@coordinates = if address.is_a?(Array)
|
|
12
|
+
address
|
|
13
|
+
else
|
|
14
|
+
get_coordinates(address)
|
|
15
|
+
end
|
|
12
16
|
@response = get_rep
|
|
13
17
|
|
|
14
18
|
if @response.empty? || @response.is_a?(String) || @response.first['error']
|
|
@@ -68,6 +72,7 @@ module GetYourRep
|
|
|
68
72
|
def self.offices(rep)
|
|
69
73
|
rep['offices'].map do |office|
|
|
70
74
|
|
|
75
|
+
# TODO change office parsing to RegEx
|
|
71
76
|
office_hash = {}
|
|
72
77
|
office_hash[:type] = office['type']
|
|
73
78
|
address = office['address'].split("\n")
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: get_your_rep
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.1.
|
|
4
|
+
version: 0.1.8
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- msimonborg
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2016-12-
|
|
11
|
+
date: 2016-12-20 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: httparty
|