eac_git 0.4.1 → 0.7.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/eac_git/executables.rb +4 -0
- data/lib/eac_git/local.rb +5 -1
- data/lib/eac_git/local/commit/archive.rb +19 -0
- data/lib/eac_git/local/subrepo.rb +2 -1
- data/lib/eac_git/rspec.rb +1 -14
- data/lib/eac_git/rspec/setup_include.rb +28 -0
- data/lib/eac_git/version.rb +1 -1
- metadata +11 -15
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b04ab8b8d59ecebc5047f682efcf0571f1cd4d4b25ab9224ea118abe5d4bb7ff
|
4
|
+
data.tar.gz: 491cd970a7d0f43fcf1d51016729cedd89077cdd9d93bda5dc9301dbb35f0af3
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b97a8b03b1b7f5ba5d05dd6fb283a9d0a6c38f98e6597fe529aeb7e8c2a2da3b8c740b691dbcb72603f9508e229faf333ec18bd4ebed9e4851edca646246ac66
|
7
|
+
data.tar.gz: 1c75b14dd35cbfe07313e5509dca925f8cfe043542391b0b7b46bf4bf81b0a280527a67ceed1cab0d73fef0baa32559cf3610733a0b5c806916d1160fed22104
|
data/lib/eac_git/executables.rb
CHANGED
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
|
-
|
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
|
-
|
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/
|
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,28 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require 'eac_ruby_utils/rspec/conditional'
|
4
|
+
require 'eac_git/executables'
|
5
|
+
require 'eac_git/rspec/stubbed_git_local_repo'
|
6
|
+
|
7
|
+
module EacGit
|
8
|
+
module Rspec
|
9
|
+
module SetupInclude
|
10
|
+
class << self
|
11
|
+
def setup(setup_obj)
|
12
|
+
setup_conditional_git
|
13
|
+
setup_stubbed_git_local_repo(setup_obj)
|
14
|
+
end
|
15
|
+
|
16
|
+
def setup_conditional_git
|
17
|
+
::EacRubyUtils::Rspec::Conditional.default.add(:git) do
|
18
|
+
::EacGit::Executables.git.validate
|
19
|
+
end
|
20
|
+
end
|
21
|
+
|
22
|
+
def setup_stubbed_git_local_repo(setup_obj)
|
23
|
+
setup_obj.rspec_config.include ::EacGit::Rspec::StubbedGitLocalRepo
|
24
|
+
end
|
25
|
+
end
|
26
|
+
end
|
27
|
+
end
|
28
|
+
end
|
data/lib/eac_git/version.rb
CHANGED
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
|
+
version: 0.7.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-
|
11
|
+
date: 2021-07-25 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.
|
19
|
+
version: '0.70'
|
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.
|
26
|
+
version: '0.70'
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: parseconfig
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
@@ -50,34 +50,28 @@ dependencies:
|
|
50
50
|
requirements:
|
51
51
|
- - "~>"
|
52
52
|
- !ruby/object:Gem::Version
|
53
|
-
version: '0.
|
53
|
+
version: '0.8'
|
54
54
|
type: :development
|
55
55
|
prerelease: false
|
56
56
|
version_requirements: !ruby/object:Gem::Requirement
|
57
57
|
requirements:
|
58
58
|
- - "~>"
|
59
59
|
- !ruby/object:Gem::Version
|
60
|
-
version: '0.
|
60
|
+
version: '0.8'
|
61
61
|
- !ruby/object:Gem::Dependency
|
62
62
|
name: eac_ruby_gem_support
|
63
63
|
requirement: !ruby/object:Gem::Requirement
|
64
64
|
requirements:
|
65
65
|
- - "~>"
|
66
66
|
- !ruby/object:Gem::Version
|
67
|
-
version: '0.
|
68
|
-
- - ">="
|
69
|
-
- !ruby/object:Gem::Version
|
70
|
-
version: 0.1.2
|
67
|
+
version: '0.3'
|
71
68
|
type: :development
|
72
69
|
prerelease: false
|
73
70
|
version_requirements: !ruby/object:Gem::Requirement
|
74
71
|
requirements:
|
75
72
|
- - "~>"
|
76
73
|
- !ruby/object:Gem::Version
|
77
|
-
version: '0.
|
78
|
-
- - ">="
|
79
|
-
- !ruby/object:Gem::Version
|
80
|
-
version: 0.1.2
|
74
|
+
version: '0.3'
|
81
75
|
description:
|
82
76
|
email:
|
83
77
|
executables: []
|
@@ -88,6 +82,7 @@ files:
|
|
88
82
|
- lib/eac_git/executables.rb
|
89
83
|
- lib/eac_git/local.rb
|
90
84
|
- lib/eac_git/local/commit.rb
|
85
|
+
- lib/eac_git/local/commit/archive.rb
|
91
86
|
- lib/eac_git/local/commit/changed_file.rb
|
92
87
|
- lib/eac_git/local/commit/diff_tree_line.rb
|
93
88
|
- lib/eac_git/local/dirty_files.rb
|
@@ -96,6 +91,7 @@ files:
|
|
96
91
|
- lib/eac_git/remote.rb
|
97
92
|
- lib/eac_git/remote/ls_result.rb
|
98
93
|
- lib/eac_git/rspec.rb
|
94
|
+
- lib/eac_git/rspec/setup_include.rb
|
99
95
|
- lib/eac_git/rspec/stubbed_git_local_repo.rb
|
100
96
|
- lib/eac_git/version.rb
|
101
97
|
- vendor/git-subrepo/Changes
|
@@ -301,7 +297,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
301
297
|
- !ruby/object:Gem::Version
|
302
298
|
version: '0'
|
303
299
|
requirements: []
|
304
|
-
rubygems_version: 3.
|
300
|
+
rubygems_version: 3.1.6
|
305
301
|
signing_key:
|
306
302
|
specification_version: 4
|
307
303
|
summary: Put here de description.
|