opsb-octopussy 0.3.0

Sign up to get free protection for your applications and to get access to all the features.
data/test/repo_test.rb ADDED
@@ -0,0 +1,51 @@
1
+ require File.dirname(__FILE__) + '/helper'
2
+
3
+ class RepoTest < Test::Unit::TestCase
4
+ context "when passed a string containg a forward slash" do
5
+ setup do
6
+ @repo = Octopussy::Repo.new("pengwynn/linkedin")
7
+ end
8
+
9
+ should "set the username and repo name" do
10
+ @repo.name.should == "linkedin"
11
+ @repo.username.should == "pengwynn"
12
+ end
13
+
14
+ should "repond to user and repo" do
15
+ @repo.repo.should == "linkedin"
16
+ @repo.user.should == "pengwynn"
17
+ end
18
+
19
+ should "render slug as string" do
20
+ @repo.slug.should == "pengwynn/linkedin"
21
+ @repo.to_s.should == @repo.slug
22
+ end
23
+
24
+ should "render url as string" do
25
+ @repo.url.should == 'http://github.com/pengwynn/linkedin'
26
+ end
27
+
28
+ end
29
+
30
+ context "when passed a hash" do
31
+
32
+ should "should set username and repo" do
33
+ repo = Octopussy::Repo.new({:username => 'pengwynn', :name => 'linkedin'})
34
+ repo.name.should == "linkedin"
35
+ repo.username.should == "pengwynn"
36
+ end
37
+ end
38
+
39
+ context "when passed a Repo" do
40
+
41
+ should "set username and repo" do
42
+ repo = Octopussy::Repo.new( Octopussy::Repo.new('pengwynn/linkedin'))
43
+ repo.name.should == "linkedin"
44
+ repo.username.should == "pengwynn"
45
+ end
46
+ end
47
+
48
+
49
+
50
+
51
+ end
metadata ADDED
@@ -0,0 +1,173 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: opsb-octopussy
3
+ version: !ruby/object:Gem::Version
4
+ hash: 19
5
+ prerelease: false
6
+ segments:
7
+ - 0
8
+ - 3
9
+ - 0
10
+ version: 0.3.0
11
+ platform: ruby
12
+ authors:
13
+ - Wynn Netherland
14
+ - Adam Stacoviak
15
+ autorequire:
16
+ bindir: bin
17
+ cert_chain: []
18
+
19
+ date: 2010-09-01 00:00:00 +01:00
20
+ default_executable:
21
+ dependencies:
22
+ - !ruby/object:Gem::Dependency
23
+ version_requirements: &id001 !ruby/object:Gem::Requirement
24
+ none: false
25
+ requirements:
26
+ - - ~>
27
+ - !ruby/object:Gem::Version
28
+ hash: 23
29
+ segments:
30
+ - 0
31
+ - 2
32
+ - 0
33
+ version: 0.2.0
34
+ name: hashie
35
+ requirement: *id001
36
+ prerelease: false
37
+ type: :runtime
38
+ - !ruby/object:Gem::Dependency
39
+ version_requirements: &id002 !ruby/object:Gem::Requirement
40
+ none: false
41
+ requirements:
42
+ - - ">="
43
+ - !ruby/object:Gem::Version
44
+ hash: 15
45
+ segments:
46
+ - 0
47
+ - 5
48
+ - 2
49
+ version: 0.5.2
50
+ name: httparty
51
+ requirement: *id002
52
+ prerelease: false
53
+ type: :runtime
54
+ - !ruby/object:Gem::Dependency
55
+ version_requirements: &id003 !ruby/object:Gem::Requirement
56
+ none: false
57
+ requirements:
58
+ - - ~>
59
+ - !ruby/object:Gem::Version
60
+ hash: 39
61
+ segments:
62
+ - 2
63
+ - 10
64
+ - 0
65
+ version: 2.10.0
66
+ name: shoulda
67
+ requirement: *id003
68
+ prerelease: false
69
+ type: :development
70
+ - !ruby/object:Gem::Dependency
71
+ version_requirements: &id004 !ruby/object:Gem::Requirement
72
+ none: false
73
+ requirements:
74
+ - - "="
75
+ - !ruby/object:Gem::Version
76
+ hash: 15
77
+ segments:
78
+ - 0
79
+ - 4
80
+ - 0
81
+ version: 0.4.0
82
+ name: jnunemaker-matchy
83
+ requirement: *id004
84
+ prerelease: false
85
+ type: :development
86
+ - !ruby/object:Gem::Dependency
87
+ version_requirements: &id005 !ruby/object:Gem::Requirement
88
+ none: false
89
+ requirements:
90
+ - - ">="
91
+ - !ruby/object:Gem::Version
92
+ hash: 51
93
+ segments:
94
+ - 0
95
+ - 9
96
+ - 4
97
+ version: 0.9.4
98
+ name: mocha
99
+ requirement: *id005
100
+ prerelease: false
101
+ type: :development
102
+ - !ruby/object:Gem::Dependency
103
+ version_requirements: &id006 !ruby/object:Gem::Requirement
104
+ none: false
105
+ requirements:
106
+ - - ">="
107
+ - !ruby/object:Gem::Version
108
+ hash: 21
109
+ segments:
110
+ - 1
111
+ - 2
112
+ - 5
113
+ version: 1.2.5
114
+ name: fakeweb
115
+ requirement: *id006
116
+ prerelease: false
117
+ type: :development
118
+ description: Simple wrapper for the GitHub API v2
119
+ email: wynn.netherland@gmail.com
120
+ executables: []
121
+
122
+ extensions: []
123
+
124
+ extra_rdoc_files: []
125
+
126
+ files:
127
+ - lib/octopussy/client.rb
128
+ - lib/octopussy/event.rb
129
+ - lib/octopussy/repo.rb
130
+ - lib/octopussy.rb
131
+ - test/helper.rb
132
+ - test/octopussy_test.rb
133
+ - test/repo_test.rb
134
+ has_rdoc: true
135
+ homepage: http://wynnnetherland.com/projects/octopussy/
136
+ licenses: []
137
+
138
+ post_install_message:
139
+ rdoc_options: []
140
+
141
+ require_paths:
142
+ - lib
143
+ required_ruby_version: !ruby/object:Gem::Requirement
144
+ none: false
145
+ requirements:
146
+ - - ">="
147
+ - !ruby/object:Gem::Version
148
+ hash: 3
149
+ segments:
150
+ - 0
151
+ version: "0"
152
+ required_rubygems_version: !ruby/object:Gem::Requirement
153
+ none: false
154
+ requirements:
155
+ - - ">="
156
+ - !ruby/object:Gem::Version
157
+ hash: 23
158
+ segments:
159
+ - 1
160
+ - 3
161
+ - 6
162
+ version: 1.3.6
163
+ requirements: []
164
+
165
+ rubyforge_project:
166
+ rubygems_version: 1.3.7
167
+ signing_key:
168
+ specification_version: 3
169
+ summary: Wrapper for the Octopussy API
170
+ test_files:
171
+ - test/helper.rb
172
+ - test/octopussy_test.rb
173
+ - test/repo_test.rb