stack_overflow 0.0.7 → 0.0.8

Sign up to get free protection for your applications and to get access to all the features.
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- stack_overflow (0.0.6)
4
+ stack_overflow (0.0.7)
5
5
 
6
6
  GEM
7
7
  remote: http://rubygems.org/
@@ -1,3 +1,3 @@
1
1
  module StackOverflow
2
- VERSION = "0.0.7"
2
+ VERSION = "0.0.8"
3
3
  end
@@ -22,6 +22,7 @@ class StackOverflow
22
22
 
23
23
  def self.get_user(user_id)
24
24
  result = get(@@URL + "users/#{user_id}?key=#{@@API_KEY}")
25
+ return nil if result["users"].nil?
25
26
  result["users"].first
26
27
  end
27
28
 
@@ -29,11 +29,20 @@ describe StackOverflow do
29
29
  end
30
30
 
31
31
  describe "get user" do
32
- before(:each) do
33
- @user = StackOverflow.get_user(60336)
32
+ context "60336" do
33
+ before(:each) do
34
+ @user = StackOverflow.get_user(60336)
35
+ end
36
+ it { @user.should_not be_nil }
37
+ it { @user["display_name"].should == "JB."}
38
+ end
39
+
40
+ context "Jared314" do
41
+ before(:each) do
42
+ @user = StackOverflow.get_user("Jared314")
43
+ end
44
+ it { @user.should be_nil }
34
45
  end
35
- it { @user.should_not be_nil }
36
- it { @user["display_name"].should == "JB"}
37
46
  end
38
47
 
39
48
  describe "get users" do
metadata CHANGED
@@ -1,12 +1,8 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: stack_overflow
3
3
  version: !ruby/object:Gem::Version
4
- prerelease: false
5
- segments:
6
- - 0
7
- - 0
8
- - 7
9
- version: 0.0.7
4
+ prerelease:
5
+ version: 0.0.8
10
6
  platform: ruby
11
7
  authors:
12
8
  - Jonathan Birkholz
@@ -14,8 +10,7 @@ autorequire:
14
10
  bindir: bin
15
11
  cert_chain: []
16
12
 
17
- date: 2011-06-02 00:00:00 -05:00
18
- default_executable:
13
+ date: 2011-10-31 00:00:00 Z
19
14
  dependencies:
20
15
  - !ruby/object:Gem::Dependency
21
16
  name: rspec
@@ -25,8 +20,6 @@ dependencies:
25
20
  requirements:
26
21
  - - ">="
27
22
  - !ruby/object:Gem::Version
28
- segments:
29
- - 0
30
23
  version: "0"
31
24
  type: :development
32
25
  version_requirements: *id001
@@ -38,8 +31,6 @@ dependencies:
38
31
  requirements:
39
32
  - - ">="
40
33
  - !ruby/object:Gem::Version
41
- segments:
42
- - 0
43
34
  version: "0"
44
35
  type: :development
45
36
  version_requirements: *id002
@@ -51,8 +42,6 @@ dependencies:
51
42
  requirements:
52
43
  - - ">="
53
44
  - !ruby/object:Gem::Version
54
- segments:
55
- - 0
56
45
  version: "0"
57
46
  type: :development
58
47
  version_requirements: *id003
@@ -77,7 +66,6 @@ files:
77
66
  - spec/spec_helper.rb
78
67
  - spec/stack_overflow_spec.rb
79
68
  - stack_overflow.gemspec
80
- has_rdoc: true
81
69
  homepage: http://rubygems.org/gems/stack_overflow
82
70
  licenses: []
83
71
 
@@ -91,21 +79,17 @@ required_ruby_version: !ruby/object:Gem::Requirement
91
79
  requirements:
92
80
  - - ">="
93
81
  - !ruby/object:Gem::Version
94
- segments:
95
- - 0
96
82
  version: "0"
97
83
  required_rubygems_version: !ruby/object:Gem::Requirement
98
84
  none: false
99
85
  requirements:
100
86
  - - ">="
101
87
  - !ruby/object:Gem::Version
102
- segments:
103
- - 0
104
88
  version: "0"
105
89
  requirements: []
106
90
 
107
91
  rubyforge_project: stack_overflow
108
- rubygems_version: 1.3.7
92
+ rubygems_version: 1.8.8
109
93
  signing_key:
110
94
  specification_version: 3
111
95
  summary: HTTParty over the StackOverflow API