foursquare2 1.3.1 → 1.3.2

Sign up to get free protection for your applications and to get access to all the features.
data/Rakefile CHANGED
@@ -25,7 +25,7 @@ Jeweler::RubygemsDotOrgTasks.new
25
25
  require 'rake/testtask'
26
26
  Rake::TestTask.new(:test) do |test|
27
27
  test.libs << 'lib' << 'test'
28
- test.pattern = 'test/**/test_*.rb'
28
+ test.test_files = FileList['test/**/test_*.rb']
29
29
  test.verbose = true
30
30
  end
31
31
 
data/VERSION CHANGED
@@ -1 +1 @@
1
- 1.3.1
1
+ 1.3.2
data/foursquare2.gemspec CHANGED
@@ -5,7 +5,7 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{foursquare2}
8
- s.version = "1.3.1"
8
+ s.version = "1.3.2"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Matt Mueller", "Marco Moura"]
@@ -28,7 +28,6 @@ Gem::Specification.new do |s|
28
28
  "lib/foursquare2/api_error.rb",
29
29
  "lib/foursquare2/checkins.rb",
30
30
  "lib/foursquare2/client.rb",
31
- "lib/foursquare2/hash.rb",
32
31
  "lib/foursquare2/photos.rb",
33
32
  "lib/foursquare2/settings.rb",
34
33
  "lib/foursquare2/specials.rb",
data/lib/foursquare2.rb CHANGED
@@ -13,7 +13,7 @@ module Foursquare2
13
13
  tip << check_tip if check_tip.text.downcase.include? term.downcase
14
14
  end
15
15
  end
16
- {:count => tip.count,:items => tip}
16
+ Hashie::Mash.new({:count => tip.count, :items => tip })
17
17
  end
18
18
 
19
19
  end
@@ -26,7 +26,6 @@ module Foursquare2
26
26
  require 'foursquare2/checkins'
27
27
  require 'foursquare2/venues'
28
28
  require 'foursquare2/client'
29
- require 'foursquare2/hash'
30
29
  require 'foursquare2/api_error'
31
30
 
32
31
  end
data/test/helper.rb CHANGED
@@ -12,6 +12,7 @@ require 'shoulda'
12
12
  require 'matchy'
13
13
  require 'fakeweb'
14
14
  require 'json'
15
+ require 'hashie'
15
16
 
16
17
  $LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '..', 'lib'))
17
18
  $LOAD_PATH.unshift(File.dirname(__FILE__))
@@ -35,7 +36,7 @@ def fixture_file(filename, options={})
35
36
 
36
37
  case File.extname(file_path)
37
38
  when '.json'
38
- options[:parse] ? JSON.parse(fixture) : fixture
39
+ options[:parse] ? Hashie::Mash.new(JSON.parse(fixture)) : fixture
39
40
  else
40
41
  fixture
41
42
  end
data/test/test_venues.rb CHANGED
@@ -41,15 +41,16 @@ class TestVenues < Test::Unit::TestCase
41
41
 
42
42
  should "get tips from a venue only with some term" do
43
43
  stub_get("https://api.foursquare.com/v2/venues/4c94a45c82b56dcb47cad0aa/tips?oauth_token=#{@client.oauth_token}", "venue_tips.json")
44
- tips = @client.venue_tips('4c94a45c82b56dcb47cad0aa', {:query => "legal"})
45
- tips.items.count.should == 1
44
+ tips = @client.venue_tips('4c94a45c82b56dcb47cad0aa', {:query => "legal"})
45
+ tips[:count].should == 1
46
46
  tips.items.first.id.should == "4c94a45c82b56dcb47cad0aa"
47
47
  end
48
48
 
49
49
  should "get tips from a venue only with some term case sensitive" do
50
50
  stub_get("https://api.foursquare.com/v2/venues/4c94a45c82b56dcb47cad0aa/tips?oauth_token=#{@client.oauth_token}", "venue_tips.json")
51
51
  tips = @client.venue_tips('4c94a45c82b56dcb47cad0aa', {:query => "LEGAL"})
52
- tips.items.count.should == 1
52
+
53
+ tips.items.size.should == 1
53
54
  tips.items.first.id.should == "4c94a45c82b56dcb47cad0aa"
54
55
  end
55
56
 
@@ -57,7 +58,7 @@ class TestVenues < Test::Unit::TestCase
57
58
  stub_get("https://api.foursquare.com/v2/venues/4c94a45c82b56dcb47cad0aa/tips?oauth_token=#{@client.oauth_token}", "venue_tips.json")
58
59
  tips = @client.venue_tips('4c94a45c82b56dcb47cad0aa', {:query => "lorem"})
59
60
 
60
- tips.items.count.should == 0
61
+ tips[:items].size.should == 0
61
62
  end
62
63
 
63
64
  should "allow venues to be explored" do
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: foursquare2
3
3
  version: !ruby/object:Gem::Version
4
- hash: 25
4
+ hash: 31
5
5
  prerelease:
6
6
  segments:
7
7
  - 1
8
8
  - 3
9
- - 1
10
- version: 1.3.1
9
+ - 2
10
+ version: 1.3.2
11
11
  platform: ruby
12
12
  authors:
13
13
  - Matt Mueller
@@ -228,7 +228,6 @@ files:
228
228
  - lib/foursquare2/api_error.rb
229
229
  - lib/foursquare2/checkins.rb
230
230
  - lib/foursquare2/client.rb
231
- - lib/foursquare2/hash.rb
232
231
  - lib/foursquare2/photos.rb
233
232
  - lib/foursquare2/settings.rb
234
233
  - lib/foursquare2/specials.rb
@@ -1,7 +0,0 @@
1
- class ::Hash
2
- def method_missing(name)
3
- return self[name] if key? name
4
- self.each { |k,v| return v if k.to_s.to_sym == name }
5
- super.method_missing name
6
- end
7
- end