fsquare 1.0.5 → 1.0.6

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: b402652ef2ebc3c04ef1a6ff1ae9ee7f3efb0db5
4
- data.tar.gz: 7014b29da09d44a9522664c5a26ab1a5e3ae2e30
3
+ metadata.gz: 68a8f6e51409cf710105c73cd45823d6b763562e
4
+ data.tar.gz: 08b9fef8d18d2e4487b2ca0aa01d17f0f9e34c32
5
5
  SHA512:
6
- metadata.gz: 1bcad5f6037f559b7ad11952a0528dc78691cc6ab621842e94179139b21d1f4dff426a688b5478d2428f2053ed34fd3326dafa69d1fc4d8b83f5b731266a1d72
7
- data.tar.gz: 93c2d9d4843da7f0b9753f12cb61d6871b96cd2032a5c321b12f8f5199b1e34f7161bc7f2ce8dce8916cc3551e1f5d95eb39d6ed0b7d0190099dd383ce209a9e
6
+ metadata.gz: bd9cf64f8bc57b72a0eac43a4c0dbc221a3eac6919425b9fc806f54e8e77060421e56b02d3506774bde12d9fe9dce20c5dd679c8a5c6449e86567ad68f821540
7
+ data.tar.gz: 57fc024a26fb14e13375451ec152270469ca3d75f329e8cd468fc4f01bbf997990cdfe583a4000d7a1bbbda33dd34e73595b6707b134abc2e929fec10cde59d6
Binary file
@@ -1,3 +1,3 @@
1
1
  module Fsquare
2
- VERSION = "1.0.5"
2
+ VERSION = "1.0.6"
3
3
  end
data/lib/fsquare.rb CHANGED
@@ -12,15 +12,15 @@ module Fsquare
12
12
  def self.request_data(path, data)
13
13
  cacheKey = path + data.to_s
14
14
  Rails.cache.fetch(cacheKey, :expires => 24.hour) do
15
- if data.nil? || data['v'].nil?
15
+ if data.nil? || data[:v].nil?
16
16
  raise "'v' is a required field in Foursquare API. You need to pass the value for 'v' in your data variable. Please see Foursquare API documentation for more information"
17
17
  end
18
- v = data['v'].strftime "%Y%m%d"
18
+ v = data[:v].strftime "%Y%m%d"
19
19
 
20
20
  if @@clientId.nil? || @clientSecret.nil?
21
21
  raise "client_id or client_secret is not defined. Please call initialize()"
22
22
  end
23
- search_url = "https://api.foursquare.com#{path}&client_id=#{@@clientId}&client_secret=#{@@clientSecret}&" + JSON.parse(data)
23
+ search_url = "https://api.foursquare.com#{path}&client_id=#{@@clientId}&client_secret=#{@@clientSecret}&" + data.to_query
24
24
  result = HTTParty.get(search_url)
25
25
  result['response']
26
26
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fsquare
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.5
4
+ version: 1.0.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Terry Won
@@ -51,6 +51,7 @@ files:
51
51
  - README.md
52
52
  - Rakefile
53
53
  - fsquare.gemspec
54
+ - lib/.fsquare.rb.swp
54
55
  - lib/fsquare.rb
55
56
  - lib/fsquare/version.rb
56
57
  homepage: ''