Skip to content

Commit

Permalink
Update git requirement from ~> 1.7 to >= 1.7, < 3.0
Browse files Browse the repository at this point in the history
Updates the requirements on [git](https://github.com/ruby-git/ruby-git) to permit the latest version.
- [Release notes](https://github.com/ruby-git/ruby-git/releases)
- [Changelog](https://github.com/ruby-git/ruby-git/blob/master/CHANGELOG.md)
- [Commits](ruby-git/ruby-git@v1.7.0...v2.0.0)

---
updated-dependencies:
- dependency-name: git
  dependency-type: direct:production
...
  • Loading branch information
ekohl committed Aug 5, 2024
1 parent a7b98f2 commit b6060ff
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion lib/modulesync.rb
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@ def self.update(cli_options)
# managed_modules is either an array or a hash
managed_modules.each do |puppet_module|
manage_module(puppet_module, module_files, defaults)
rescue ModuleSync::Error, Git::GitExecuteError => e
rescue ModuleSync::Error, Git::Error => e
message = e.message || 'Error during `update`'
warn "#{puppet_module.given_name}: #{message}"
exit 1 unless options[:skip_broken]
Expand Down
2 changes: 1 addition & 1 deletion lib/modulesync/repository.rb
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ def submit_changes(files, options)
repo.push('origin', branch, opts_push)
puts "Changes have been pushed to: '#{branch}'"
end
rescue Git::GitExecuteError => e
rescue Git::Error => e
raise unless e.message.match?(/working (directory|tree) clean/)

puts "There were no changes in '#{@directory}'. Not committing."
Expand Down
4 changes: 2 additions & 2 deletions lib/monkey_patches.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@

module Git
module LibMonkeyPatch
# Monkey patch set_custom_git_env_variables due to our ::Git::GitExecuteError handling.
# Monkey patch set_custom_git_env_variables due to our ::Git::Error handling.
#
# We rescue on the GitExecuteError and proceed differently based on the output of git.
# We rescue on the Git::Error and proceed differently based on the output of git.
# This way makes code language-dependent, so here we ensure that Git gem throw git commands with the "C" language
def set_custom_git_env_variables
super
Expand Down
2 changes: 1 addition & 1 deletion modulesync.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ Gem::Specification.new do |spec|
spec.add_development_dependency 'simplecov', '~> 0.22.0'
spec.add_development_dependency 'voxpupuli-rubocop', '~> 2.8.0'

spec.add_runtime_dependency 'git', '~>1.7'
spec.add_runtime_dependency 'git', '>=1.7', '<3.0'
spec.add_runtime_dependency 'gitlab', '>=4', '<6'
spec.add_runtime_dependency 'octokit', '>=4', '<9'
spec.add_runtime_dependency 'puppet-blacksmith', '>= 3.0', '< 8'
Expand Down

0 comments on commit b6060ff

Please sign in to comment.