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:  
     | 
| 
       4 
     | 
    
         
            -
              data.tar.gz:  
     | 
| 
      
 3 
     | 
    
         
            +
              metadata.gz: c1a870d19ccdee1b66bdcfc8431b71b2971c591b
         
     | 
| 
      
 4 
     | 
    
         
            +
              data.tar.gz: 01983efed8028edb27168eb1619d9a44554d6aa1
         
     | 
| 
       5 
5 
     | 
    
         
             
            SHA512:
         
     | 
| 
       6 
     | 
    
         
            -
              metadata.gz:  
     | 
| 
       7 
     | 
    
         
            -
              data.tar.gz:  
     | 
| 
      
 6 
     | 
    
         
            +
              metadata.gz: 90cc690f16ba45a9460e68e5dc8cef80b705310acebeb86b4067fbda24eacb709891dd2d2ef5d220edbf493af32ddd000be7f9f057a40787d7246a51a8199b96
         
     | 
| 
      
 7 
     | 
    
         
            +
              data.tar.gz: cd44fd1fa2c07cd5105ca27e51a8ca2b6d20fff21b2d18e7bca6eae31d27dbe52944059ecd2d56edce00f825825350dbb3f5de44ff73030a8a110d43f75f18c3
         
     | 
    
        data/leafly_api_wrapper.gemspec
    CHANGED
    
    
| 
         @@ -12,10 +12,11 @@ module LeaflyApiWrapper 
     | 
|
| 
       12 
12 
     | 
    
         
             
                  :customMarker, :customMarker2x, :mapMarker, :specials
         
     | 
| 
       13 
13 
     | 
    
         | 
| 
       14 
14 
     | 
    
         
             
                def initialize(data)
         
     | 
| 
       15 
     | 
    
         
            -
                  @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']
         
     | 
| 
         @@ -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. 
     | 
| 
      
 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- 
     | 
| 
      
 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: ' 
     | 
| 
      
 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: ' 
     | 
| 
      
 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
         
     |