octopussy 0.2.4 → 0.3.0
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.
- data/lib/octopussy.rb +1 -1
- data/lib/octopussy/client.rb +11 -1
- metadata +4 -4
data/lib/octopussy.rb
CHANGED
data/lib/octopussy/client.rb
CHANGED
@@ -257,7 +257,17 @@ module Octopussy
|
|
257
257
|
response = self.class.get("/repos/show/#{repo.username}/#{repo.name}", :query => auth_params)
|
258
258
|
Hashie::Mash.new(response).repository
|
259
259
|
end
|
260
|
-
|
260
|
+
|
261
|
+
# pass options without the "values[x]" descriped in the API docs:
|
262
|
+
# set_repo_info('user/repo', :description => "hey!", :has_wiki => false)
|
263
|
+
def set_repo_info(repo, options)
|
264
|
+
repo = Repo.new(repo)
|
265
|
+
# post body needs to be "values[has_wiki]=false"
|
266
|
+
response = self.class.post("/repos/show/#{repo.username}/#{repo.name}",
|
267
|
+
:body => options.keys.reduce({}) { |a,v| a["values[#{v}]"] = options[v]; a }.merge(auth_params))
|
268
|
+
Hashie::Mash.new(response).repository
|
269
|
+
end
|
270
|
+
|
261
271
|
def list_repos(username = nil)
|
262
272
|
if username.nil? && !@login.nil?
|
263
273
|
username = login
|
metadata
CHANGED
@@ -4,9 +4,9 @@ version: !ruby/object:Gem::Version
|
|
4
4
|
prerelease: false
|
5
5
|
segments:
|
6
6
|
- 0
|
7
|
-
-
|
8
|
-
-
|
9
|
-
version: 0.
|
7
|
+
- 3
|
8
|
+
- 0
|
9
|
+
version: 0.3.0
|
10
10
|
platform: ruby
|
11
11
|
authors:
|
12
12
|
- Wynn Netherland
|
@@ -15,7 +15,7 @@ autorequire:
|
|
15
15
|
bindir: bin
|
16
16
|
cert_chain: []
|
17
17
|
|
18
|
-
date: 2010-
|
18
|
+
date: 2010-09-01 00:00:00 -05:00
|
19
19
|
default_executable:
|
20
20
|
dependencies:
|
21
21
|
- !ruby/object:Gem::Dependency
|