octopussy 0.0.1
Sign up to get free protection for your applications and to get access to all the features.
- data/.document +5 -0
- data/.gitignore +21 -0
- data/LICENSE +20 -0
- data/README.markdown +64 -0
- data/Rakefile +59 -0
- data/VERSION +1 -0
- data/changelog.markdown +5 -0
- data/lib/octopussy.rb +134 -0
- data/lib/octopussy/client.rb +393 -0
- data/lib/octopussy/repo.rb +33 -0
- data/test/fixtures/blob.json +10 -0
- data/test/fixtures/branches.json +6 -0
- data/test/fixtures/close_issue.json +1 -0
- data/test/fixtures/collaborators.json +1 -0
- data/test/fixtures/comment.json +1 -0
- data/test/fixtures/emails.json +1 -0
- data/test/fixtures/followers.json +3 -0
- data/test/fixtures/full_user.json +27 -0
- data/test/fixtures/issue.json +14 -0
- data/test/fixtures/issues.json +50 -0
- data/test/fixtures/keys.json +1 -0
- data/test/fixtures/labels.json +1 -0
- data/test/fixtures/languages.json +1 -0
- data/test/fixtures/network.json +26 -0
- data/test/fixtures/network_data.json +1 -0
- data/test/fixtures/network_meta.json +109 -0
- data/test/fixtures/open_issue.json +1 -0
- data/test/fixtures/raw_git_data.json +7 -0
- data/test/fixtures/reopen_issue.json +1 -0
- data/test/fixtures/repo.json +14 -0
- data/test/fixtures/repo_search.json +452 -0
- data/test/fixtures/repos.json +830 -0
- data/test/fixtures/search.json +44 -0
- data/test/fixtures/tags.json +8 -0
- data/test/fixtures/trees.json +140 -0
- data/test/fixtures/user.json +16 -0
- data/test/helper.rb +45 -0
- data/test/test_octopussy.rb +397 -0
- data/test/test_repo.rb +42 -0
- metadata +156 -0
data/test/test_repo.rb
ADDED
@@ -0,0 +1,42 @@
|
|
1
|
+
require 'helper'
|
2
|
+
|
3
|
+
class TestRepo < Test::Unit::TestCase
|
4
|
+
context "when passed a string containg a forward slash" do
|
5
|
+
setup do
|
6
|
+
@repo = 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
|
+
end
|
20
|
+
|
21
|
+
context "when passed a hash" do
|
22
|
+
|
23
|
+
should "should set username and repo" do
|
24
|
+
repo = Repo.new({:username => 'pengwynn', :name => 'linkedin'})
|
25
|
+
repo.name.should == "linkedin"
|
26
|
+
repo.username.should == "pengwynn"
|
27
|
+
end
|
28
|
+
end
|
29
|
+
|
30
|
+
context "when passed a Repo" do
|
31
|
+
|
32
|
+
should "description" do
|
33
|
+
repo = Repo.new(Repo.new('pengwynn/linkedin'))
|
34
|
+
repo.name.should == "linkedin"
|
35
|
+
repo.username.should == "pengwynn"
|
36
|
+
end
|
37
|
+
end
|
38
|
+
|
39
|
+
|
40
|
+
|
41
|
+
|
42
|
+
end
|
metadata
ADDED
@@ -0,0 +1,156 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: octopussy
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.0.1
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Wynn Netherland
|
8
|
+
- Adam Stacoviak
|
9
|
+
autorequire:
|
10
|
+
bindir: bin
|
11
|
+
cert_chain: []
|
12
|
+
|
13
|
+
date: 2009-12-12 00:00:00 -06:00
|
14
|
+
default_executable:
|
15
|
+
dependencies:
|
16
|
+
- !ruby/object:Gem::Dependency
|
17
|
+
name: hashie
|
18
|
+
type: :runtime
|
19
|
+
version_requirement:
|
20
|
+
version_requirements: !ruby/object:Gem::Requirement
|
21
|
+
requirements:
|
22
|
+
- - ~>
|
23
|
+
- !ruby/object:Gem::Version
|
24
|
+
version: 0.1.3
|
25
|
+
version:
|
26
|
+
- !ruby/object:Gem::Dependency
|
27
|
+
name: httparty
|
28
|
+
type: :runtime
|
29
|
+
version_requirement:
|
30
|
+
version_requirements: !ruby/object:Gem::Requirement
|
31
|
+
requirements:
|
32
|
+
- - ~>
|
33
|
+
- !ruby/object:Gem::Version
|
34
|
+
version: 0.4.5
|
35
|
+
version:
|
36
|
+
- !ruby/object:Gem::Dependency
|
37
|
+
name: thoughtbot-shoulda
|
38
|
+
type: :development
|
39
|
+
version_requirement:
|
40
|
+
version_requirements: !ruby/object:Gem::Requirement
|
41
|
+
requirements:
|
42
|
+
- - ">="
|
43
|
+
- !ruby/object:Gem::Version
|
44
|
+
version: 2.10.1
|
45
|
+
version:
|
46
|
+
- !ruby/object:Gem::Dependency
|
47
|
+
name: jnunemaker-matchy
|
48
|
+
type: :development
|
49
|
+
version_requirement:
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - "="
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: 0.4.0
|
55
|
+
version:
|
56
|
+
- !ruby/object:Gem::Dependency
|
57
|
+
name: mocha
|
58
|
+
type: :development
|
59
|
+
version_requirement:
|
60
|
+
version_requirements: !ruby/object:Gem::Requirement
|
61
|
+
requirements:
|
62
|
+
- - "="
|
63
|
+
- !ruby/object:Gem::Version
|
64
|
+
version: 0.9.4
|
65
|
+
version:
|
66
|
+
- !ruby/object:Gem::Dependency
|
67
|
+
name: fakeweb
|
68
|
+
type: :development
|
69
|
+
version_requirement:
|
70
|
+
version_requirements: !ruby/object:Gem::Requirement
|
71
|
+
requirements:
|
72
|
+
- - ">="
|
73
|
+
- !ruby/object:Gem::Version
|
74
|
+
version: 1.2.5
|
75
|
+
version:
|
76
|
+
description: Simple wrapper for the GitHub API v2
|
77
|
+
email: wynn.netherland@gmail.com
|
78
|
+
executables: []
|
79
|
+
|
80
|
+
extensions: []
|
81
|
+
|
82
|
+
extra_rdoc_files:
|
83
|
+
- LICENSE
|
84
|
+
- README.markdown
|
85
|
+
files:
|
86
|
+
- .document
|
87
|
+
- .gitignore
|
88
|
+
- LICENSE
|
89
|
+
- README.markdown
|
90
|
+
- Rakefile
|
91
|
+
- VERSION
|
92
|
+
- changelog.markdown
|
93
|
+
- lib/octopussy.rb
|
94
|
+
- lib/octopussy/client.rb
|
95
|
+
- lib/octopussy/repo.rb
|
96
|
+
- test/fixtures/blob.json
|
97
|
+
- test/fixtures/branches.json
|
98
|
+
- test/fixtures/close_issue.json
|
99
|
+
- test/fixtures/collaborators.json
|
100
|
+
- test/fixtures/comment.json
|
101
|
+
- test/fixtures/emails.json
|
102
|
+
- test/fixtures/followers.json
|
103
|
+
- test/fixtures/full_user.json
|
104
|
+
- test/fixtures/issue.json
|
105
|
+
- test/fixtures/issues.json
|
106
|
+
- test/fixtures/keys.json
|
107
|
+
- test/fixtures/labels.json
|
108
|
+
- test/fixtures/languages.json
|
109
|
+
- test/fixtures/network.json
|
110
|
+
- test/fixtures/network_data.json
|
111
|
+
- test/fixtures/network_meta.json
|
112
|
+
- test/fixtures/open_issue.json
|
113
|
+
- test/fixtures/raw_git_data.json
|
114
|
+
- test/fixtures/reopen_issue.json
|
115
|
+
- test/fixtures/repo.json
|
116
|
+
- test/fixtures/repo_search.json
|
117
|
+
- test/fixtures/repos.json
|
118
|
+
- test/fixtures/search.json
|
119
|
+
- test/fixtures/tags.json
|
120
|
+
- test/fixtures/trees.json
|
121
|
+
- test/fixtures/user.json
|
122
|
+
- test/helper.rb
|
123
|
+
- test/test_octopussy.rb
|
124
|
+
- test/test_repo.rb
|
125
|
+
has_rdoc: true
|
126
|
+
homepage: http://github.com/pengwynn/octopussy
|
127
|
+
licenses: []
|
128
|
+
|
129
|
+
post_install_message:
|
130
|
+
rdoc_options:
|
131
|
+
- --charset=UTF-8
|
132
|
+
require_paths:
|
133
|
+
- lib
|
134
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
135
|
+
requirements:
|
136
|
+
- - ">="
|
137
|
+
- !ruby/object:Gem::Version
|
138
|
+
version: "0"
|
139
|
+
version:
|
140
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
141
|
+
requirements:
|
142
|
+
- - ">="
|
143
|
+
- !ruby/object:Gem::Version
|
144
|
+
version: "0"
|
145
|
+
version:
|
146
|
+
requirements: []
|
147
|
+
|
148
|
+
rubyforge_project:
|
149
|
+
rubygems_version: 1.3.5
|
150
|
+
signing_key:
|
151
|
+
specification_version: 3
|
152
|
+
summary: Simple wrapper for the GitHub API
|
153
|
+
test_files:
|
154
|
+
- test/helper.rb
|
155
|
+
- test/test_octopussy.rb
|
156
|
+
- test/test_repo.rb
|