eac_git 0.12.3 → 0.13.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/local/remote.rb +12 -1
- data/lib/eac_git/remote.rb +10 -5
- data/lib/eac_git/{remote → remote_like}/ls_result.rb +1 -1
- data/lib/eac_git/remote_like.rb +32 -0
- data/lib/eac_git/version.rb +1 -1
- metadata +6 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ad179bd7d0768619cf0b8ec1dd226926fb7727448bd2d55d7502bff1e81040f9
|
4
|
+
data.tar.gz: fdde3d525de0c562555a6838e1ef83fde137350003e5fa2697e3f26220349656
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9b3ce069a038c6db5e8f58cb9a8dfa7362685d5bdd8cf3722a84f097ca06a7730199f4422011f2e710e025ee991a2523f2fbd42abd84ed34429ea3003782d1cc
|
7
|
+
data.tar.gz: ff51e5148857b89adfd02d205703b30cf16656543cf569918859af89b43f159dce964a30c6d8abfd4a1e095d3d28131a918608523c255c2207a70b284c02e1bc
|
data/lib/eac_git/local/remote.rb
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
require 'eac_git/
|
3
|
+
require 'eac_git/remote_like'
|
4
4
|
require 'eac_ruby_utils/core_ext'
|
5
5
|
|
6
6
|
module EacGit
|
@@ -9,6 +9,7 @@ module EacGit
|
|
9
9
|
NO_SUCH_REMOTE_CODE = 128
|
10
10
|
|
11
11
|
enable_simple_cache
|
12
|
+
include ::EacGit::RemoteLike
|
12
13
|
|
13
14
|
common_constructor :local, :name
|
14
15
|
|
@@ -16,6 +17,16 @@ module EacGit
|
|
16
17
|
url
|
17
18
|
end
|
18
19
|
|
20
|
+
# @return [EacRubyUtils::Envs::Command
|
21
|
+
def git_command(*args)
|
22
|
+
local.command(*args)
|
23
|
+
end
|
24
|
+
|
25
|
+
# @return [String]
|
26
|
+
def remote_reference
|
27
|
+
name
|
28
|
+
end
|
29
|
+
|
19
30
|
# @return [String, nil]
|
20
31
|
def url
|
21
32
|
local.command('remote', 'get-url', name)
|
data/lib/eac_git/remote.rb
CHANGED
@@ -1,19 +1,24 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
3
|
require 'eac_git/executables'
|
4
|
+
require 'eac_git/remote_like'
|
4
5
|
require 'eac_ruby_utils/core_ext'
|
5
6
|
|
6
7
|
module EacGit
|
7
8
|
# A Git remote repository referenced by URI.
|
8
9
|
class Remote
|
9
|
-
|
10
|
+
include ::EacGit::RemoteLike
|
10
11
|
|
11
12
|
common_constructor :uri
|
12
13
|
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
14
|
+
# @return [EacRubyUtils::Envs::Command
|
15
|
+
def git_command(*args, &block)
|
16
|
+
::EacGit::Executables.git.command(*args, &block)
|
17
|
+
end
|
18
|
+
|
19
|
+
# @return [String]
|
20
|
+
def remote_reference
|
21
|
+
uri
|
17
22
|
end
|
18
23
|
end
|
19
24
|
end
|
@@ -0,0 +1,32 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require 'eac_ruby_utils/core_ext'
|
4
|
+
|
5
|
+
module EacGit
|
6
|
+
module RemoteLike
|
7
|
+
require_sub __FILE__
|
8
|
+
enable_abstract_methods
|
9
|
+
|
10
|
+
# @return [String] The output of command "git fetch".
|
11
|
+
def fetch
|
12
|
+
local.command('fetch', name).execute!
|
13
|
+
end
|
14
|
+
|
15
|
+
# @return [EacRubyUtils::Envs::Command
|
16
|
+
def git_command(*_args)
|
17
|
+
raise_abstract_method __method__
|
18
|
+
end
|
19
|
+
|
20
|
+
# @return [EacGit::RemoteLike::LsResult]
|
21
|
+
def ls
|
22
|
+
::EacGit::RemoteLike::LsResult.by_ls_remote_command_output(
|
23
|
+
git_command('ls-remote', remote_reference).execute!
|
24
|
+
)
|
25
|
+
end
|
26
|
+
|
27
|
+
# @return [String]
|
28
|
+
def remote_reference
|
29
|
+
raise_abstract_method __method__
|
30
|
+
end
|
31
|
+
end
|
32
|
+
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.13.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: 2022-
|
11
|
+
date: 2022-10-16 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.105'
|
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.105'
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: parseconfig
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
@@ -99,7 +99,8 @@ files:
|
|
99
99
|
- lib/eac_git/local/subrepo.rb
|
100
100
|
- lib/eac_git/local/subrepo/config.rb
|
101
101
|
- lib/eac_git/remote.rb
|
102
|
-
- lib/eac_git/
|
102
|
+
- lib/eac_git/remote_like.rb
|
103
|
+
- lib/eac_git/remote_like/ls_result.rb
|
103
104
|
- lib/eac_git/rspec.rb
|
104
105
|
- lib/eac_git/rspec/setup.rb
|
105
106
|
- lib/eac_git/rspec/stubbed_git_local_repo.rb
|