eac_git 0.5.0 → 0.6.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 4e93bc1263137fa2c49da54b4d9e126e66d18a366f3905600123aa29a7d1433b
4
- data.tar.gz: e3b1255fcb3afbb74564e8b5e6518066d45c5c4f95a980a302fae55db5e07e4a
3
+ metadata.gz: bf9327d87f6a011e773ef9631b373680cd3a24d08cffe26322ce674f65c886bf
4
+ data.tar.gz: d645885dfa9b7173007e35184f24404092c40a5c06d917e3a246d45019b44eef
5
5
  SHA512:
6
- metadata.gz: c0093f9f61cca73f4335c53c0e1c454ecb13e35a133d20f575de5c671da4687cd7d0722cfac8d6a5f8507da6dec1a5dd83063fcbd0d18b94bb27044d5cfa9d06
7
- data.tar.gz: b7dad37d8394f54b5077fa34933a54a6319275f81544b9c097272a8758261d147a42e04812861f6cfdddebc6778b50a3d04d6e6de996be48234e0bbeb553934b
6
+ metadata.gz: c11a55e02341d674725d85dd0921dca0ad97ed067586e71ab2821d3d4ebc0c4941f74e3648c43cbe7bf136e9d925035c10c102fb7bf8b6fc59d49ad757a1f256
7
+ data.tar.gz: e6ee32ee1cb05a9c14173d3d5df118791b6841a9a9d4bddaff36c44ee152f1bb1a92d19df12100f9a03457a1375d254bea83bc66778426d9fce39a905cae18a1
data/lib/eac_git/local.rb CHANGED
@@ -39,13 +39,17 @@ module EacGit
39
39
  ::EacGit::Executables.git.command('-C', root_path.to_path, *args)
40
40
  end
41
41
 
42
+ def raise_error(message)
43
+ raise "#{root_path}: #{message}"
44
+ end
45
+
42
46
  def rev_parse(ref, required = false)
43
47
  r = command('rev-parse', ref).execute!(exit_outputs: { 128 => nil, 32_768 => nil })
44
48
  r.strip! if r.is_a?(String)
45
49
  return r if r.present?
46
50
  return nil unless required
47
51
 
48
- raise "Reference \"#{ref}\" not found"
52
+ raise_error "Reference \"#{ref}\" not found"
49
53
  end
50
54
 
51
55
  def subrepo(subpath)
@@ -12,7 +12,8 @@ module EacGit
12
12
 
13
13
  common_constructor :local, :subpath do
14
14
  self.subpath = subpath.to_pathname
15
- raise "Config file \"#{config_absolute_path}\" not found" unless config_absolute_path.file?
15
+ local.raise_error "Config file \"#{config_absolute_path}\" not found" unless
16
+ config_absolute_path.file?
16
17
  end
17
18
 
18
19
  def command(subrepo_subcommand, *subrepo_subcommand_args)
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module EacGit
4
- VERSION = '0.5.0'
4
+ VERSION = '0.6.0'
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: eac_git
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.0
4
+ version: 0.6.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Put here the authors
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-06-02 00:00:00.000000000 Z
11
+ date: 2021-06-11 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: eac_ruby_utils