fcoury-octopi 0.0.11 → 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,4 +1,4 @@
1
1
  ---
2
2
  :major: 0
3
- :minor: 0
4
- :patch: 11
3
+ :minor: 1
4
+ :patch: 0
@@ -48,6 +48,7 @@ module Octopi
48
48
  group = $1
49
49
  else
50
50
  key, value = line.split("=")
51
+ value ||= ''
51
52
  (config[group]||={})[key.strip] = value.strip
52
53
  end
53
54
  end
@@ -153,7 +154,7 @@ module Octopi
153
154
  begin
154
155
  trace "POST", "/#{format}#{path}", params
155
156
  submit(path, params, format) do |path, params, format|
156
- resp = self.class.post "/#{format}#{path}", :query => params
157
+ resp = self.class.post "/#{format}#{path}", :body => params
157
158
  resp
158
159
  end
159
160
  rescue RetryableAPIError => e
@@ -5,11 +5,12 @@ module Octopi
5
5
 
6
6
  resource_path "/repos/show/:id"
7
7
 
8
- def self.find(user, repo)
8
+ def self.find(user, repo, api=ANONYMOUS_API)
9
9
  user = user.login if user.is_a? User
10
10
  repo = repo.name if repo.is_a? Repository
11
11
  self.validate_args(user => :user, repo => :repo)
12
- find_plural([user,repo,'branches'], :resource){
12
+ api = ANONYMOUS_API if repo.is_a?(Repository) && !repo.private
13
+ find_plural([user,repo,'branches'], :resource, api){
13
14
  |i| {:name => i.first, :hash => i.last }
14
15
  }
15
16
  end
@@ -17,7 +17,7 @@ module Octopi
17
17
  # repo.branches.each { |r| puts r.name }
18
18
  #
19
19
  def branches
20
- Branch.find(self.owner, self.name)
20
+ Branch.find(self.owner, self.name,api)
21
21
  end
22
22
 
23
23
  # Returns all tags for the Repository
@@ -2,11 +2,11 @@
2
2
 
3
3
  Gem::Specification.new do |s|
4
4
  s.name = %q{octopi}
5
- s.version = "0.0.11"
5
+ s.version = "0.1.0"
6
6
 
7
7
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
8
8
  s.authors = ["Felipe Coury"]
9
- s.date = %q{2009-06-02}
9
+ s.date = %q{2009-07-21}
10
10
  s.email = %q{felipe.coury@gmail.com}
11
11
  s.extra_rdoc_files = [
12
12
  "LICENSE",
@@ -40,11 +40,12 @@ Gem::Specification.new do |s|
40
40
  "test/octopi_test.rb",
41
41
  "test/test_helper.rb"
42
42
  ]
43
+ s.has_rdoc = true
43
44
  s.homepage = %q{http://github.com/fcoury/octopi}
44
45
  s.rdoc_options = ["--charset=UTF-8"]
45
46
  s.require_paths = ["lib"]
46
47
  s.rubyforge_project = %q{octopi}
47
- s.rubygems_version = %q{1.3.3}
48
+ s.rubygems_version = %q{1.3.2}
48
49
  s.summary = %q{A Ruby interface to GitHub API v2}
49
50
  s.test_files = [
50
51
  "test/octopi_test.rb",
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fcoury-octopi
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.11
4
+ version: 0.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Felipe Coury
@@ -9,7 +9,7 @@ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
 
12
- date: 2009-06-02 00:00:00 -07:00
12
+ date: 2009-07-21 00:00:00 -07:00
13
13
  default_executable:
14
14
  dependencies: []
15
15
 
@@ -49,7 +49,7 @@ files:
49
49
  - octopi.gemspec
50
50
  - test/octopi_test.rb
51
51
  - test/test_helper.rb
52
- has_rdoc: false
52
+ has_rdoc: true
53
53
  homepage: http://github.com/fcoury/octopi
54
54
  post_install_message:
55
55
  rdoc_options: