lib/jeweler/commands/release_to_git.rb in jeweler-2.1.1 vs lib/jeweler/commands/release_to_git.rb in jeweler-2.1.2
- old
+ new
@@ -16,12 +16,12 @@
branch = args[:branch] || 'master'
local_branch = args[:local_branch] || branch
remote_branch = args[:remote_branch] || branch
unless clean_staging_area?
- system "git status"
- raise "Unclean staging area! Be sure to commit or .gitignore everything first. See `git status` above."
+ system 'git status'
+ raise 'Unclean staging area! Be sure to commit or .gitignore everything first. See `git status` above.'
end
repo.checkout(local_branch)
repo.push(remote, "#{local_branch}:#{remote_branch}")
@@ -33,23 +33,27 @@
repo.push(remote, release_tag)
end
end
def clean_staging_area?
- `git ls-files --deleted --modified --others --exclude-standard` == ""
+ `git ls-files --deleted --modified --others --exclude-standard` == ''
end
def release_tag
"v#{version}"
end
def release_not_tagged?
- tag = repo.tag(release_tag) rescue nil
+ tag = begin
+ repo.tag(release_tag)
+ rescue
+ nil
+ end
tag.nil?
end
def self.build_for(jeweler)
- command = self.new
+ command = new
command.base_dir = jeweler.base_dir
command.gemspec = jeweler.gemspec
command.version = jeweler.version
command.repo = jeweler.repo