Skip to content

Commit 53bda28

Browse files
ekohlbastelfreak
authored andcommitted
Update git requirement from ~> 1.7 to >= 1.7, < 3.0
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 ...
1 parent db0520f commit 53bda28

File tree

4 files changed

+5
-5
lines changed

4 files changed

+5
-5
lines changed

lib/modulesync.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -178,7 +178,7 @@ def self.update(cli_options)
178178
# managed_modules is either an array or a hash
179179
managed_modules.each do |puppet_module|
180180
manage_module(puppet_module, module_files, defaults)
181-
rescue ModuleSync::Error, Git::GitExecuteError => e
181+
rescue ModuleSync::Error, Git::Error => e
182182
message = e.message || 'Error during `update`'
183183
warn "#{puppet_module.given_name}: #{message}"
184184
exit 1 unless options[:skip_broken]

lib/modulesync/repository.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,7 @@ def submit_changes(files, options)
158158
repo.push('origin', branch, opts_push)
159159
puts "Changes have been pushed to: '#{branch}'"
160160
end
161-
rescue Git::GitExecuteError => e
161+
rescue Git::Error => e
162162
raise unless e.message.match?(/working (directory|tree) clean/)
163163

164164
puts "There were no changes in '#{@directory}'. Not committing."

lib/monkey_patches.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@
22

33
module Git
44
module LibMonkeyPatch
5-
# Monkey patch set_custom_git_env_variables due to our ::Git::GitExecuteError handling.
5+
# Monkey patch set_custom_git_env_variables due to our ::Git::Error handling.
66
#
7-
# We rescue on the GitExecuteError and proceed differently based on the output of git.
7+
# We rescue on the Git::Error and proceed differently based on the output of git.
88
# This way makes code language-dependent, so here we ensure that Git gem throw git commands with the "C" language
99
def set_custom_git_env_variables
1010
super

modulesync.gemspec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ Gem::Specification.new do |spec|
2525
spec.add_development_dependency 'simplecov', '~> 0.22.0'
2626
spec.add_development_dependency 'voxpupuli-rubocop', '~> 3.0.0'
2727

28-
spec.add_dependency 'git', '~>1.7'
28+
spec.add_dependency 'git', '~> 1.7', '< 4'
2929
spec.add_dependency 'gitlab', '>=4', '<6'
3030
spec.add_dependency 'octokit', '>=4', '<10'
3131
spec.add_dependency 'puppet-blacksmith', '>= 3.0', '< 9'

0 commit comments

Comments
 (0)