philnash-octopi 0.0.11 → 0.0.12

Sign up to get free protection for your applications and to get access to all the features.
data/VERSION.yml CHANGED
@@ -1,4 +1,4 @@
1
1
  ---
2
2
  :major: 0
3
3
  :minor: 0
4
- :patch: 11
4
+ :patch: 12
data/lib/octopi/branch.rb CHANGED
@@ -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
data/octopi.gemspec CHANGED
@@ -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.0.12"
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-06-05}
10
10
  s.email = %q{felipe.coury@gmail.com}
11
11
  s.extra_rdoc_files = [
12
12
  "LICENSE",
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: philnash-octopi
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.11
4
+ version: 0.0.12
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-06-05 00:00:00 -07:00
13
13
  default_executable:
14
14
  dependencies: []
15
15