eac_git 0.5.0 → 0.7.2
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/local.rb +5 -1
- data/lib/eac_git/local/subrepo.rb +2 -1
- data/lib/eac_git/rspec.rb +1 -14
- data/lib/eac_git/rspec/setup.rb +23 -0
- data/lib/eac_git/version.rb +1 -1
- metadata +22 -9
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c1a21c475a5923f4e0a8858b1588cd4147580f9393a21b962f54d8a8a6f475d6
|
4
|
+
data.tar.gz: 9683a9e6ced4b4957df0a9f3176bbc96e2635a72ffa9492dd87867fc05d56e69
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d77370cfc40835af8ddd18af0aa2946edd9bf6d91abab76304b5f54271ff66501f4d5ac06c92a99fd556a9e041684615d5e1f300355528be967eb8b38011a8ed
|
7
|
+
data.tar.gz: 81126f091f53c937f8b9125bb291376ff532092e28c54f3aa9260b52cc6c157a28699babc4b489c13f4ded4b87a0ad12973c47efb85224bcfed1bd20fa764f76
|
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)
|
@@ -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,23 @@
|
|
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
|
+
module Setup
|
9
|
+
def self.perform(setup_obj)
|
10
|
+
setup_obj.setup_conditional_git
|
11
|
+
setup_obj.setup_stubbed_git_local_repo
|
12
|
+
end
|
13
|
+
|
14
|
+
def setup_conditional_git
|
15
|
+
conditional(:git) { ::EacGit::Executables.git.validate }
|
16
|
+
end
|
17
|
+
|
18
|
+
def setup_stubbed_git_local_repo
|
19
|
+
rspec_config.include ::EacGit::Rspec::StubbedGitLocalRepo
|
20
|
+
end
|
21
|
+
end
|
22
|
+
end
|
23
|
+
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.2
|
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-08-14 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.73'
|
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.73'
|
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.
|
53
|
+
version: '0.8'
|
54
|
+
- - ">="
|
55
|
+
- !ruby/object:Gem::Version
|
56
|
+
version: 0.8.2
|
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.
|
63
|
+
version: '0.8'
|
64
|
+
- - ">="
|
65
|
+
- !ruby/object:Gem::Version
|
66
|
+
version: 0.8.2
|
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.
|
73
|
+
version: '0.3'
|
74
|
+
- - ">="
|
75
|
+
- !ruby/object:Gem::Version
|
76
|
+
version: 0.3.2
|
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.
|
83
|
+
version: '0.3'
|
84
|
+
- - ">="
|
85
|
+
- !ruby/object:Gem::Version
|
86
|
+
version: 0.3.2
|
75
87
|
description:
|
76
88
|
email:
|
77
89
|
executables: []
|
@@ -91,6 +103,7 @@ files:
|
|
91
103
|
- lib/eac_git/remote.rb
|
92
104
|
- lib/eac_git/remote/ls_result.rb
|
93
105
|
- lib/eac_git/rspec.rb
|
106
|
+
- lib/eac_git/rspec/setup.rb
|
94
107
|
- lib/eac_git/rspec/stubbed_git_local_repo.rb
|
95
108
|
- lib/eac_git/version.rb
|
96
109
|
- vendor/git-subrepo/Changes
|
@@ -296,7 +309,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
296
309
|
- !ruby/object:Gem::Version
|
297
310
|
version: '0'
|
298
311
|
requirements: []
|
299
|
-
rubygems_version: 3.
|
312
|
+
rubygems_version: 3.1.6
|
300
313
|
signing_key:
|
301
314
|
specification_version: 4
|
302
315
|
summary: Put here de description.
|