Permalink
Browse files

Only require github token if you are creating a repo.

  • Loading branch information...
1 parent 66962cb commit fb05ff2e52a66bd2b5328566ed4833de52e23768 @technicalpickles technicalpickles committed May 6, 2009
Showing with 6 additions and 5 deletions.
  1. +0 −1 ROADMAP
  2. +4 −2 lib/jeweler/generator.rb
  3. +2 −2 test/test_generator_initialization.rb
View
@@ -1,6 +1,5 @@
= 1.0
- * Integrate more closely with rubyforge (less generated Rakefile stuff)
* Support github user/token on generator command line
* Add command to output the Jeweler::Tasks to help with upgrading/migrating
* Improve documentation on wiki/readme
View
@@ -182,8 +182,10 @@ def use_user_git_config
raise NoGitHubUser
end
- unless git_config.has_key? 'github.token'
- raise NoGitHubToken
+ if should_create_repo
+ unless git_config.has_key? 'github.token'
+ raise NoGitHubToken
+ end
end
self.user_name = git_config['user.name']
@@ -68,9 +68,9 @@ def stub_git_config(options = {})
stub_git_config 'user.name' => @git_name, 'user.email' => @git_email, 'github.user' => @github_user
end
- should 'raise NoGitHubToken' do
+ should 'raise NoGitHubToken if creating repo' do
assert_raise Jeweler::NoGitHubToken do
- Jeweler::Generator.new(@project_name)
+ Jeweler::Generator.new(@project_name, :create_repo => true)
end
end
end

0 comments on commit fb05ff2

Please sign in to comment.