leafly_api_wrapper 0.0.1 → 0.0.3

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: c559658b77daa7ccdcab84fbb7bcc0d1abda53db
4
- data.tar.gz: aeb8c678b9f6f7d7ab4fc896b3f0949d8d575a08
3
+ metadata.gz: c1a870d19ccdee1b66bdcfc8431b71b2971c591b
4
+ data.tar.gz: 01983efed8028edb27168eb1619d9a44554d6aa1
5
5
  SHA512:
6
- metadata.gz: 7be06f9bf97b7f7ee90ba09674b487fcd28addf0b49bf52e780b9a9f67e3313040397e53d1192a0f57d9b1cd5a1deedece8d7f9a143f64a80ea30e72cee01387
7
- data.tar.gz: 8d954f4c645dc668f23face0fdf16a58e1071f6f69e7a2c0da976ce0f05abb4ce4db25dfc6c11bc8bd1212d21f675c6e2ecf2610ccc1c19e0816a95a41db5dc1
6
+ metadata.gz: 90cc690f16ba45a9460e68e5dc8cef80b705310acebeb86b4067fbda24eacb709891dd2d2ef5d220edbf493af32ddd000be7f9f057a40787d7246a51a8199b96
7
+ data.tar.gz: cd44fd1fa2c07cd5105ca27e51a8ca2b6d20fff21b2d18e7bca6eae31d27dbe52944059ecd2d56edce00f825825350dbb3f5de44ff73030a8a110d43f75f18c3
@@ -24,5 +24,5 @@ Gem::Specification.new do |spec|
24
24
  spec.add_development_dependency 'webmock', '~> 0'
25
25
 
26
26
  spec.add_dependency 'faraday', '~> 0'
27
- spec.add_dependency 'json', '~> 0'
27
+ spec.add_dependency 'json', '~> 1'
28
28
  end
@@ -12,10 +12,11 @@ module LeaflyApiWrapper
12
12
  :customMarker, :customMarker2x, :mapMarker, :specials
13
13
 
14
14
  def initialize(data)
15
- @id = data['id']
15
+ @id = data['id']
16
16
  @name = data['name']
17
17
  @slug = data['slug']
18
- @address = "#{data['address1']} #{data['address2']}"
18
+ @address = "#{data['address1']} #{data['address2']}".strip
19
+ @address = "#{data['address']} #{data['locationLabel']}".strip if @address.empty?
19
20
  @hours = data['hours']
20
21
  @phone = data['phone']
21
22
  @locationLabel = data['locationLabel']
@@ -1,3 +1,3 @@
1
1
  module LeaflyApiWrapper
2
- VERSION = "0.0.1"
2
+ VERSION = "0.0.3"
3
3
  end
@@ -24,6 +24,13 @@ describe LeaflyApiWrapper do
24
24
  end
25
25
  end
26
26
 
27
+ it 'should set the address' do
28
+ VCR.use_cassette('locations_near_point') do
29
+ res = LeaflyApiWrapper::Location.near(33.749, -117.874, take: 10)
30
+ expect(res.first.address).to eq('Lake Forest,CA')
31
+ end
32
+ end
33
+
27
34
  it 'should get location details' do
28
35
  VCR.use_cassette('locations_detail') do
29
36
  location = LeaflyApiWrapper::Location.get('denver-relief')
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: leafly_api_wrapper
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Oscar Siniscalchi
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-03-10 00:00:00.000000000 Z
11
+ date: 2015-03-17 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -86,14 +86,14 @@ dependencies:
86
86
  requirements:
87
87
  - - "~>"
88
88
  - !ruby/object:Gem::Version
89
- version: '0'
89
+ version: '1'
90
90
  type: :runtime
91
91
  prerelease: false
92
92
  version_requirements: !ruby/object:Gem::Requirement
93
93
  requirements:
94
94
  - - "~>"
95
95
  - !ruby/object:Gem::Version
96
- version: '0'
96
+ version: '1'
97
97
  description: A simple API ruby wrapper to interact with leapfly api locations
98
98
  email:
99
99
  - oscarsiniscalchi@gmail.com