Permalink
Browse files

Merge remote-tracking branch 'pengwynn/master' into authorizations

* pengwynn/master:
  Version bump to 1.2.1
  updated the spec for the set_public and set_private methods
  updated to use new private key, rather than the old public for repository visibility
  • Loading branch information...
2 parents 5139fd5 + 9ae45c5 commit 1dd559d706ca0996fddd4550b84f29d50b3d0313 @catsby catsby committed May 21, 2012
Showing with 9 additions and 8 deletions.
  1. +2 −2 lib/octokit/client/repositories.rb
  2. +1 −1 lib/octokit/version.rb
  3. +3 −3 octokit.gemspec
  4. +3 −2 spec/octokit/client/repositories_spec.rb
@@ -55,11 +55,11 @@ def create_repository(name, options={})
alias :create :create_repository
def set_private(repo, options={})
- update_repository repo, options.merge({ :public => false })
+ update_repository repo, options.merge({ :private => true })
end
def set_public(repo, options={})
- update_repository repo, options.merge({ :public => true })
+ update_repository repo, options.merge({ :private => false })
end
def deploy_keys(repo, options={})
View
@@ -1,3 +1,3 @@
module Octokit
- VERSION = "1.2.0".freeze unless defined?(Octokit::VERSION)
+ VERSION = "1.2.1" unless defined?(Octokit::VERSION)
end
View
@@ -15,15 +15,15 @@ Gem::Specification.new do |gem|
gem.add_development_dependency 'webmock'
gem.add_development_dependency 'yard'
gem.authors = ["Wynn Netherland", "Adam Stacoviak", "Erik Michaels-Ober"]
- gem.description = %q{Simple wrapper for the GitHub API (v2 and v3)}
+ gem.description = %q{Simple wrapper for the GitHub v3 API}
gem.email = ['wynn.netherland@gmail.com', 'adam@stacoviak.com', 'sferik@gmail.com']
gem.files = `git ls-files`.split("\n")
gem.homepage = 'https://github.com/pengwynn/octokit'
gem.name = 'octokit'
gem.platform = Gem::Platform::RUBY
gem.require_paths = ['lib']
gem.required_rubygems_version = Gem::Requirement.new('>= 1.3.6')
- gem.summary = %q{Wrapper for the GitHub API}
+ gem.summary = gem.description
gem.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
- gem.version = Octokit::VERSION.dup
+ gem.version = Octokit::VERSION
end
@@ -124,7 +124,7 @@
it "should set a repository private" do
stub_patch("/repos/sferik/rails_admin").
- with({ :name => "rails_admin", :public => false }).
+ with({ :name => "rails_admin", :private => false }).
to_return(:body => fixture("v3/repository.json"))
repository = @client.set_private("sferik/rails_admin")
repository.name.should == "rails_admin"
@@ -136,10 +136,11 @@
it "should set a repository public" do
stub_patch("/repos/sferik/rails_admin").
- with({ :name => "rails_admin", :public => false }).
+ with({ :name => "rails_admin", :private => true }).
to_return(:body => fixture("v3/repository.json"))
repository = @client.set_public("sferik/rails_admin")
repository.name.should == "rails_admin"
+ repository.private.should == false
end
end

0 comments on commit 1dd559d

Please sign in to comment.