lib/autowow/features/gem.rb in autowow-0.13.2 vs lib/autowow/features/gem.rb in autowow-0.14.0
- old
+ new
@@ -10,11 +10,11 @@
include Commands::Gem
include Commands::Vcs
include Executor
def gem_release(version_bump = nil)
- if quiet.run!("gem push").out.clean_lines.select { |line| line.match(/Enter your RubyGems.org credentials/) }.any?
+ unless rubygems_credentials_set?
logger.error("Set RubyGems credentials first via `gem push`")
return
end
pretty_with_output.run(git_status)
start_branch = Vcs.working_branch
@@ -44,9 +44,13 @@
pretty.run("git commit -m \"Changes README to development version\"")
pretty.run(push)
end
pretty_with_output.run(git_status)
+ end
+
+ def rubygems_credentials_set?
+ !quiet.run!("gem push --silent").err.clean_lines.blank?
end
def gem_clean
pretty_with_output.run(clean)
end