Skip to content

Commit

Permalink
Upgrade rugged to latest version
Browse files Browse the repository at this point in the history
Changes:

   * Upgraded rugged, fixed API calls
   * Fixed deprecated call to File.exists?
   * Removed deprecated rspec config option
  • Loading branch information
vandahm committed Jul 10, 2014
1 parent fa17c6c commit d31a277
Show file tree
Hide file tree
Showing 6 changed files with 5 additions and 7 deletions.
2 changes: 1 addition & 1 deletion .ruby-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
2.0.0-p247
2.1.2
3 changes: 1 addition & 2 deletions lib/thegarage/gitx/cli/base_command.rb
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,7 @@ def initialize(*args)
def repo
@repo ||= begin
path = Dir.pwd
root_path = Rugged::Repository.discover(path)
Rugged::Repository.new(root_path)
Rugged::Repository.discover(path)
end
end

Expand Down
2 changes: 1 addition & 1 deletion lib/thegarage/gitx/cli/nuke_command.rb
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ def nuke(bad_branch)
private

def migrations_need_to_be_reverted?(bad_branch, last_known_good_tag)
return false unless File.exists?('db/migrate')
return false unless File.exist?('db/migrate')
outdated_migrations = run_cmd("git diff #{last_known_good_tag}...#{bad_branch} --name-only db/migrate").split
return false if outdated_migrations.empty?

Expand Down
2 changes: 1 addition & 1 deletion lib/thegarage/gitx/cli/start_command.rb
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ def valid_new_branch_name?(branch)
end

def remote_branches
@remote_branches ||= Rugged::Branch.each_name(repo, :remote).to_a.map { |branch| branch.split('/').last }
@remote_branches ||= repo.branches.each_name(:remote).to_a.map { |branch| branch.split('/').last }
end
end
end
Expand Down
1 change: 0 additions & 1 deletion spec/spec_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
Dir[File.join(__dir__, "support/**/*.rb")].each { |f| require f }

RSpec.configure do |config|
config.treat_symbols_as_metadata_keys_with_true_values = true
config.run_all_when_everything_filtered = true
config.filter_run :focus

Expand Down
2 changes: 1 addition & 1 deletion thegarage-gitx.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ Gem::Specification.new do |spec|
spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
spec.require_paths = ["lib"]

spec.add_runtime_dependency "rugged", '~> 0.19.0'
spec.add_runtime_dependency "rugged", '~> 0.21.0'
spec.add_runtime_dependency "rest-client", ">= 1.4.0"
spec.add_runtime_dependency "thor"

Expand Down

0 comments on commit d31a277

Please sign in to comment.