eac_git 0.4.2 → 0.7.1

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: 77fe6ad59bdd1e4504f9bbd8bbb0765ecf323c1ef1530fda11216d63da603188
4
- data.tar.gz: ccb14f3f36efc68ad252aa6196050568576d87275ea1ef5296a092a4ee665388
3
+ metadata.gz: 0cbaa3bcfa8bc46c1f611e08799e4a391d73ff3851f71ed3d076f1acd5c2f6ff
4
+ data.tar.gz: 90e5a236919f519e06c8ff11321417e140a91c8f95be074d546584e8cd2d6927
5
5
  SHA512:
6
- metadata.gz: 6ad009d9eb2c5a7b4d1910a2ed7b4350c1a994a4701b2c6dd5d03d6a8090b3ce09e84a7c0df3d0302979050beac8660439acd9c46417180a37e3cb60a4e2b959
7
- data.tar.gz: 586d73467f0d86ab8cb1d853b37a81255b8c176f639fa69245633a4ac1c269c52c26dde47bd7272b97a65e4da7e41a75d1366e77ba2cd7d9958c655a51dc909d
6
+ metadata.gz: 85545d07434e100d1ddaa58c2bdcfcaa10ea0f4faefa54a35bcaf8fc1caf75443e8eaea471d5998b24e90ba73408c5e71f8cb182a5beac12138bf4a66b90b79a
7
+ data.tar.gz: 4f040b8eb11a692e63e464a53b41d84974d491db29ae4a16362940f0524cb2529fee319eaec2b41756af12e357a2a60fd5a07324436847163a530173793baf3c
@@ -20,6 +20,10 @@ module EacGit
20
20
  r
21
21
  end
22
22
 
23
+ def tar_uncached
24
+ env.executable('tar', '--version')
25
+ end
26
+
23
27
  module GitCommandExtensions
24
28
  def command(*args)
25
29
  super(*args).envvar('PATH', path_with_git_subrepo)
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)
@@ -0,0 +1,19 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'eac_ruby_utils/core_ext'
4
+
5
+ module EacGit
6
+ class Local
7
+ class Commit
8
+ module Archive
9
+ # @return [EacRubyUtils::Envs::Command]
10
+ def archive_to_dir(path)
11
+ path = path.to_pathname
12
+ repo.command('archive', '--format=tar', hash).pipe(
13
+ ::EacGit::Executables.tar.command('-xC', path)
14
+ )
15
+ end
16
+ end
17
+ end
18
+ end
19
+ end
@@ -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)
data/lib/eac_git/rspec.rb CHANGED
@@ -1,22 +1,9 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require 'eac_ruby_utils/rspec/conditional'
4
- require 'eac_git/executables'
3
+ require 'eac_ruby_utils/core_ext'
5
4
 
6
5
  module EacGit
7
6
  module Rspec
8
7
  require_sub __FILE__
9
-
10
- class << self
11
- def configure
12
- ::EacRubyUtils::Rspec::Conditional.default.add(:git) do
13
- ::EacGit::Executables.git.validate
14
- end
15
- RSpec.configure do |config|
16
- ::EacRubyUtils::Rspec::Conditional.default.configure(config)
17
- config.include ::EacGit::Rspec::StubbedGitLocalRepo
18
- end
19
- end
20
- end
21
8
  end
22
9
  end
@@ -0,0 +1,25 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'eac_git/executables'
4
+ require 'eac_git/rspec/stubbed_git_local_repo'
5
+
6
+ module EacGit
7
+ module Rspec
8
+ class Setup
9
+ common_constructor :setup_obj
10
+
11
+ def perform
12
+ setup_conditional_git
13
+ setup_stubbed_git_local_repo
14
+ end
15
+
16
+ def setup_conditional_git
17
+ setup_obj.conditional(:git) { ::EacGit::Executables.git.validate }
18
+ end
19
+
20
+ def setup_stubbed_git_local_repo
21
+ setup_obj.rspec_config.include ::EacGit::Rspec::StubbedGitLocalRepo
22
+ end
23
+ end
24
+ end
25
+ end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module EacGit
4
- VERSION = '0.4.2'
4
+ VERSION = '0.7.1'
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.4.2
4
+ version: 0.7.1
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-05-06 00:00:00.000000000 Z
11
+ date: 2021-07-31 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: eac_ruby_utils
@@ -16,14 +16,14 @@ dependencies:
16
16
  requirements:
17
17
  - - "~>"
18
18
  - !ruby/object:Gem::Version
19
- version: '0.37'
19
+ version: '0.72'
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - "~>"
25
25
  - !ruby/object:Gem::Version
26
- version: '0.37'
26
+ version: '0.72'
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: parseconfig
29
29
  requirement: !ruby/object:Gem::Requirement
@@ -50,28 +50,40 @@ dependencies:
50
50
  requirements:
51
51
  - - "~>"
52
52
  - !ruby/object:Gem::Version
53
- version: '0.7'
53
+ version: '0.8'
54
+ - - ">="
55
+ - !ruby/object:Gem::Version
56
+ version: 0.8.1
54
57
  type: :development
55
58
  prerelease: false
56
59
  version_requirements: !ruby/object:Gem::Requirement
57
60
  requirements:
58
61
  - - "~>"
59
62
  - !ruby/object:Gem::Version
60
- version: '0.7'
63
+ version: '0.8'
64
+ - - ">="
65
+ - !ruby/object:Gem::Version
66
+ version: 0.8.1
61
67
  - !ruby/object:Gem::Dependency
62
68
  name: eac_ruby_gem_support
63
69
  requirement: !ruby/object:Gem::Requirement
64
70
  requirements:
65
71
  - - "~>"
66
72
  - !ruby/object:Gem::Version
67
- version: '0.2'
73
+ version: '0.3'
74
+ - - ">="
75
+ - !ruby/object:Gem::Version
76
+ version: 0.3.1
68
77
  type: :development
69
78
  prerelease: false
70
79
  version_requirements: !ruby/object:Gem::Requirement
71
80
  requirements:
72
81
  - - "~>"
73
82
  - !ruby/object:Gem::Version
74
- version: '0.2'
83
+ version: '0.3'
84
+ - - ">="
85
+ - !ruby/object:Gem::Version
86
+ version: 0.3.1
75
87
  description:
76
88
  email:
77
89
  executables: []
@@ -82,6 +94,7 @@ files:
82
94
  - lib/eac_git/executables.rb
83
95
  - lib/eac_git/local.rb
84
96
  - lib/eac_git/local/commit.rb
97
+ - lib/eac_git/local/commit/archive.rb
85
98
  - lib/eac_git/local/commit/changed_file.rb
86
99
  - lib/eac_git/local/commit/diff_tree_line.rb
87
100
  - lib/eac_git/local/dirty_files.rb
@@ -90,6 +103,7 @@ files:
90
103
  - lib/eac_git/remote.rb
91
104
  - lib/eac_git/remote/ls_result.rb
92
105
  - lib/eac_git/rspec.rb
106
+ - lib/eac_git/rspec/setup.rb
93
107
  - lib/eac_git/rspec/stubbed_git_local_repo.rb
94
108
  - lib/eac_git/version.rb
95
109
  - vendor/git-subrepo/Changes
@@ -295,7 +309,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
295
309
  - !ruby/object:Gem::Version
296
310
  version: '0'
297
311
  requirements: []
298
- rubygems_version: 3.0.9
312
+ rubygems_version: 3.1.6
299
313
  signing_key:
300
314
  specification_version: 4
301
315
  summary: Put here de description.