get_your_rep 0.1.7 → 0.1.8

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
  SHA1:
3
- metadata.gz: 467eb20c6e5784807ccc88f2b29ee68286782eb2
4
- data.tar.gz: f728164e861d9a7cfa6c4ff302abc7faaac9cbc8
3
+ metadata.gz: a5741d7020c669da418435c2ff212e9e8455a76a
4
+ data.tar.gz: acba81f8daf9d744295c298c3234428d8f3ca2ca
5
5
  SHA512:
6
- metadata.gz: 7f2d15c8cb5ccf50d0683f39d219387f6e0b84039a4cb50e998b70bd6bda954d55fc77fa45347391df1d229c01aa101febd48d54d7e5188effdec78709754059
7
- data.tar.gz: ce25d3bb659d585fc4b93f9ed3e8672e235eec7fa9584a827e6a62c48af11968b164d7dc1c79da354b0b4b883e70141a9328683cb50a3e5cc06658bb2cfa34ee
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 = get_coordinates(address)
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.7
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-18 00:00:00.000000000 Z
11
+ date: 2016-12-20 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: httparty