eac_git 0.15.0 → 0.17.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/eac_git/executables.rb +2 -3
- data/lib/eac_git/local/branch.rb +22 -2
- data/lib/eac_git/local/commit/archive.rb +1 -1
- data/lib/eac_git/local/commit/changed_file.rb +1 -1
- data/lib/eac_git/local/commit.rb +2 -2
- data/lib/eac_git/local/dirty_files.rb +1 -1
- data/lib/eac_git/local/log.rb +1 -1
- data/lib/eac_git/local/remote/push.rb +35 -0
- data/lib/eac_git/local/remote.rb +8 -1
- data/lib/eac_git/local/remotes.rb +1 -1
- data/lib/eac_git/local/subrepo/config.rb +1 -1
- data/lib/eac_git/local/subrepo.rb +1 -1
- data/lib/eac_git/local.rb +1 -1
- data/lib/eac_git/remote.rb +1 -1
- data/lib/eac_git/remote_like/ls_result.rb +1 -1
- data/lib/eac_git/remote_like.rb +1 -1
- data/lib/eac_git/rspec/stubbed_git_local_repo/fs_object.rb +1 -1
- data/lib/eac_git/rspec/stubbed_git_local_repo/repository.rb +1 -1
- data/lib/eac_git/rspec/stubbed_git_local_repo.rb +1 -1
- data/lib/eac_git/rspec.rb +1 -1
- data/lib/eac_git/version.rb +1 -1
- data/lib/eac_git.rb +2 -2
- metadata +13 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2ec8481bbfe574a9c00ed4324f402a56379b37820d4c6bb3f97fe8ffcdc3d6c1
|
4
|
+
data.tar.gz: 76d42a04d49ab572c5b1ccd370d4b9996d1e67eba2c4f86f36ed603005d27d34
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 06f7fce3e78470c6c8f59ac09563ff0e9ffac80256beb5914b0172901ffedbeacad6af7b51fa6a67cd75550e5e289630985f38daf22733e8fd4a34f797868858
|
7
|
+
data.tar.gz: c8797bbcd1b8c3e5e1eb72a20b8c16e928f092db763c5369860b78016b9e8d0e82dd89d75b33b1c0a397c321769ec844f1d147720ef4f5f0c3d008101219f387
|
data/lib/eac_git/executables.rb
CHANGED
@@ -1,7 +1,6 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
require 'eac_ruby_utils
|
4
|
-
require 'eac_ruby_utils/envs'
|
3
|
+
require 'eac_ruby_utils'
|
5
4
|
|
6
5
|
module EacGit
|
7
6
|
module Executables
|
@@ -26,7 +25,7 @@ module EacGit
|
|
26
25
|
|
27
26
|
module GitCommandExtensions
|
28
27
|
def command(*args)
|
29
|
-
super
|
28
|
+
super.envvar('PATH', path_with_git_subrepo)
|
30
29
|
end
|
31
30
|
|
32
31
|
def gem_root
|
data/lib/eac_git/local/branch.rb
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
require 'eac_ruby_utils
|
3
|
+
require 'eac_ruby_utils'
|
4
4
|
|
5
5
|
module EacGit
|
6
6
|
class Local
|
@@ -10,8 +10,9 @@ module EacGit
|
|
10
10
|
common_constructor :local, :name
|
11
11
|
|
12
12
|
# @return [String]
|
13
|
+
# @deprecated Use {#head_commit_id} instead.
|
13
14
|
def current_commit_id
|
14
|
-
|
15
|
+
head_commit_id
|
15
16
|
end
|
16
17
|
|
17
18
|
# @return [Boolean]
|
@@ -22,6 +23,25 @@ module EacGit
|
|
22
23
|
def full_ref_name
|
23
24
|
"#{REFS_PREFIX}#{name}"
|
24
25
|
end
|
26
|
+
|
27
|
+
# @return [EacGit::Local::Commit]
|
28
|
+
def head_commit
|
29
|
+
local.commit(head_commit_id, true)
|
30
|
+
end
|
31
|
+
|
32
|
+
# @return [String]
|
33
|
+
def head_commit_id
|
34
|
+
local.rev_parse(full_ref_name, true)
|
35
|
+
end
|
36
|
+
|
37
|
+
# @param remote [EacGit::Local::Remote]
|
38
|
+
# @return [void]
|
39
|
+
def push(remote, options = {})
|
40
|
+
options[:refspec] = name
|
41
|
+
options.inject(remote.push) do |a, e|
|
42
|
+
a.send(*e)
|
43
|
+
end.perform
|
44
|
+
end
|
25
45
|
end
|
26
46
|
end
|
27
47
|
end
|
data/lib/eac_git/local/commit.rb
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
require 'eac_ruby_utils
|
3
|
+
require 'eac_ruby_utils'
|
4
4
|
|
5
5
|
module EacGit
|
6
6
|
class Local
|
@@ -53,7 +53,7 @@ module EacGit
|
|
53
53
|
|
54
54
|
# @return [Array<EacGit::Local::Commit>]
|
55
55
|
def parents
|
56
|
-
format('%P').each_line.map { |line| repo.commitize(line) }
|
56
|
+
format('%P').each_line.map { |line| repo.commitize(line) } # rubocop:disable Style/RedundantFormat
|
57
57
|
end
|
58
58
|
|
59
59
|
def root_child?
|
data/lib/eac_git/local/log.rb
CHANGED
@@ -0,0 +1,35 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require 'eac_ruby_utils'
|
4
|
+
|
5
|
+
module EacGit
|
6
|
+
class Local
|
7
|
+
class Remote
|
8
|
+
class Push
|
9
|
+
acts_as_immutable
|
10
|
+
immutable_accessor :force, type: :boolean
|
11
|
+
immutable_accessor :refspec, type: :array
|
12
|
+
|
13
|
+
common_constructor :remote
|
14
|
+
delegate :local, to: :remote
|
15
|
+
|
16
|
+
# @return [Array<Object>]
|
17
|
+
def immutable_constructor_args
|
18
|
+
[remote]
|
19
|
+
end
|
20
|
+
|
21
|
+
# @return [void]
|
22
|
+
def perform
|
23
|
+
local.command(*git_command_args).system!
|
24
|
+
end
|
25
|
+
|
26
|
+
# @return [Enumerable<String>]
|
27
|
+
def git_command_args
|
28
|
+
r = ['push', remote.name]
|
29
|
+
r << '--force' if force?
|
30
|
+
r + refspecs
|
31
|
+
end
|
32
|
+
end
|
33
|
+
end
|
34
|
+
end
|
35
|
+
end
|
data/lib/eac_git/local/remote.rb
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
3
|
require 'eac_git/remote_like'
|
4
|
-
require 'eac_ruby_utils
|
4
|
+
require 'eac_ruby_utils'
|
5
5
|
|
6
6
|
module EacGit
|
7
7
|
class Local
|
@@ -22,6 +22,11 @@ module EacGit
|
|
22
22
|
local.command(*args)
|
23
23
|
end
|
24
24
|
|
25
|
+
# @return [EacGit::Local::Remote::Push]
|
26
|
+
def push
|
27
|
+
::EacGit::Local::Remote::Push.new(self)
|
28
|
+
end
|
29
|
+
|
25
30
|
# @return [String]
|
26
31
|
def remote_reference
|
27
32
|
name
|
@@ -38,6 +43,8 @@ module EacGit
|
|
38
43
|
def url=(new_url)
|
39
44
|
local.command('remote', 'set-url', name, new_url).execute!
|
40
45
|
end
|
46
|
+
|
47
|
+
require_sub __FILE__
|
41
48
|
end
|
42
49
|
end
|
43
50
|
end
|
data/lib/eac_git/local.rb
CHANGED
data/lib/eac_git/remote.rb
CHANGED
data/lib/eac_git/remote_like.rb
CHANGED
data/lib/eac_git/rspec.rb
CHANGED
data/lib/eac_git/version.rb
CHANGED
data/lib/eac_git.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.17.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:
|
11
|
+
date: 2025-06-02 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.127'
|
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.127'
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: parseconfig
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
@@ -50,14 +50,20 @@ dependencies:
|
|
50
50
|
requirements:
|
51
51
|
- - "~>"
|
52
52
|
- !ruby/object:Gem::Version
|
53
|
-
version: '0.
|
53
|
+
version: '0.11'
|
54
|
+
- - ">="
|
55
|
+
- !ruby/object:Gem::Version
|
56
|
+
version: 0.11.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.
|
63
|
+
version: '0.11'
|
64
|
+
- - ">="
|
65
|
+
- !ruby/object:Gem::Version
|
66
|
+
version: 0.11.1
|
61
67
|
description:
|
62
68
|
email:
|
63
69
|
executables: []
|
@@ -75,6 +81,7 @@ files:
|
|
75
81
|
- lib/eac_git/local/dirty_files.rb
|
76
82
|
- lib/eac_git/local/log.rb
|
77
83
|
- lib/eac_git/local/remote.rb
|
84
|
+
- lib/eac_git/local/remote/push.rb
|
78
85
|
- lib/eac_git/local/remotes.rb
|
79
86
|
- lib/eac_git/local/subrepo.rb
|
80
87
|
- lib/eac_git/local/subrepo/config.rb
|