avm-git 0.14.0 → 0.15.0

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: 5b8398e0b296b1b152268e3e75893239fdbf76ea35198a090b5a32c0b50c29ce
4
- data.tar.gz: 1a3d77ec717bededa720a46b50d44dbe8cf098dc829adfce891e66880669024c
3
+ metadata.gz: '069dd4b5903571ba7437e10f037563d08a7be64d9066e37c4fde8dbb2e2ec221'
4
+ data.tar.gz: 757222ff60fabf5df18cdc42152adc5013208ada07132a2a554412a0a8a79f8d
5
5
  SHA512:
6
- metadata.gz: f6b6a7480886329c0d8d430ad2d3617e94a3775beee1812bf9d5a95bf5e56c0dad34dc9d4cfa437dfe0b3c9d73657960eefc149e7595d10b9f45fd3bc58d8cdc
7
- data.tar.gz: a37e788e6f4c18b11c556c0bab148968e448915a34aa36e09810578c11f2b8ee9313882762a5ecc500b88d874407cd9f0cb09dbb945a9974ab59364317c0ccac
6
+ metadata.gz: 78921f2c0c1c40525726b8a9dd466e877ac601cc2239ed48f771f0322d3e386ac9405b5f1c3993893dea4fa38e4689a3caf6dafeeca26ebdad47c45e12ee5073
7
+ data.tar.gz: 17e20fe9e5b9ddca9c8185e9ee31133d870e3f533d011294fea343c596bb912414ef3084885c6493ff01bc333797b2a104542f3c3099311f6aba5ccec602b0e0
@@ -1,6 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require 'avm/tools/core_ext'
3
+ require 'eac_cli/core_ext'
4
4
  require 'eac_git/local'
5
5
 
6
6
  module Avm
@@ -0,0 +1,31 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'avm/scms/branch'
4
+ require 'eac_ruby_utils/core_ext'
5
+
6
+ module Avm
7
+ module Git
8
+ module Scms
9
+ class Git < ::Avm::Scms::Base
10
+ class Branch < ::Avm::Scms::Branch
11
+ common_constructor :scm, :eac_git_branch
12
+
13
+ # @return [Avm::Git::Scms::Git::Commit]
14
+ def head_commit
15
+ ::Avm::Git::Scms::Git::Commit.new(scm, eac_git_branch.head_commit)
16
+ end
17
+
18
+ # @return [String]
19
+ def id
20
+ eac_git_branch.name
21
+ end
22
+
23
+ # @param remote [Avm::Git::Scms::Git::Remote]
24
+ def push(remote)
25
+ eac_git_branch.push(remote.eac_git_remote, force: true)
26
+ end
27
+ end
28
+ end
29
+ end
30
+ end
31
+ end
@@ -0,0 +1,20 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'avm/scms/commit'
4
+ require 'eac_ruby_utils/core_ext'
5
+
6
+ module Avm
7
+ module Git
8
+ module Scms
9
+ class Git < ::Avm::Scms::Base
10
+ module Branches
11
+ # @return [Avm::Git::Scms::Git::Branch]
12
+ def head_branch
13
+ ::Avm::Git::Scms::Git::Branch.new(self,
14
+ git_repo.current_branch)
15
+ end
16
+ end
17
+ end
18
+ end
19
+ end
20
+ end
@@ -0,0 +1,21 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'avm/scms/remote'
4
+ require 'eac_ruby_utils/core_ext'
5
+
6
+ module Avm
7
+ module Git
8
+ module Scms
9
+ class Git < ::Avm::Scms::Base
10
+ class Remote < ::Avm::Scms::Remote
11
+ common_constructor :scm, :eac_git_remote
12
+
13
+ # @return [String]
14
+ def id
15
+ nyi eac_git_remote
16
+ end
17
+ end
18
+ end
19
+ end
20
+ end
21
+ end
@@ -0,0 +1,32 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'avm/git/scms/git/remote'
4
+ require 'eac_ruby_utils/core_ext'
5
+
6
+ module Avm
7
+ module Git
8
+ module Scms
9
+ class Git < ::Avm::Scms::Base
10
+ module Remotes
11
+ DEFAULT_REMOTE_ID = 'origin'
12
+
13
+ # @return [Avm::Git::Scms::Git::Remote]
14
+ def default_remote
15
+ remote(default_remote_id)
16
+ end
17
+
18
+ # @return [String]
19
+ def default_remote_id
20
+ DEFAULT_REMOTE_ID
21
+ end
22
+
23
+ # @param id [String]
24
+ # @return [Avm::Git::Scms::Git::Remote]
25
+ def remote(id)
26
+ ::Avm::Git::Scms::Git::Remote.new(self, git_repo.remote(id))
27
+ end
28
+ end
29
+ end
30
+ end
31
+ end
32
+ end
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Avm
4
4
  module Git
5
- VERSION = '0.14.0'
5
+ VERSION = '0.15.0'
6
6
  end
7
7
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: avm-git
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.14.0
4
+ version: 0.15.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: 2023-11-04 00:00:00.000000000 Z
11
+ date: 2024-02-18 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: avm
@@ -16,88 +16,76 @@ dependencies:
16
16
  requirements:
17
17
  - - "~>"
18
18
  - !ruby/object:Gem::Version
19
- version: '0.82'
19
+ version: '0.85'
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.82'
26
+ version: '0.85'
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: avm-files
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
31
  - - "~>"
32
32
  - !ruby/object:Gem::Version
33
- version: '0.6'
34
- - - ">="
35
- - !ruby/object:Gem::Version
36
- version: 0.6.2
33
+ version: '0.7'
37
34
  type: :runtime
38
35
  prerelease: false
39
36
  version_requirements: !ruby/object:Gem::Requirement
40
37
  requirements:
41
38
  - - "~>"
42
39
  - !ruby/object:Gem::Version
43
- version: '0.6'
44
- - - ">="
45
- - !ruby/object:Gem::Version
46
- version: 0.6.2
40
+ version: '0.7'
47
41
  - !ruby/object:Gem::Dependency
48
42
  name: eac_git
49
43
  requirement: !ruby/object:Gem::Requirement
50
44
  requirements:
51
45
  - - "~>"
52
46
  - !ruby/object:Gem::Version
53
- version: '0.14'
54
- - - ">="
55
- - !ruby/object:Gem::Version
56
- version: 0.14.1
47
+ version: '0.16'
57
48
  type: :runtime
58
49
  prerelease: false
59
50
  version_requirements: !ruby/object:Gem::Requirement
60
51
  requirements:
61
52
  - - "~>"
62
53
  - !ruby/object:Gem::Version
63
- version: '0.14'
64
- - - ">="
65
- - !ruby/object:Gem::Version
66
- version: 0.14.1
54
+ version: '0.16'
67
55
  - !ruby/object:Gem::Dependency
68
56
  name: eac_ruby_utils
69
57
  requirement: !ruby/object:Gem::Requirement
70
58
  requirements:
71
59
  - - "~>"
72
60
  - !ruby/object:Gem::Version
73
- version: '0.119'
74
- - - ">="
75
- - !ruby/object:Gem::Version
76
- version: 0.119.2
61
+ version: '0.121'
77
62
  type: :runtime
78
63
  prerelease: false
79
64
  version_requirements: !ruby/object:Gem::Requirement
80
65
  requirements:
81
66
  - - "~>"
82
67
  - !ruby/object:Gem::Version
83
- version: '0.119'
84
- - - ">="
85
- - !ruby/object:Gem::Version
86
- version: 0.119.2
68
+ version: '0.121'
87
69
  - !ruby/object:Gem::Dependency
88
70
  name: git
89
71
  requirement: !ruby/object:Gem::Requirement
90
72
  requirements:
91
73
  - - "~>"
92
74
  - !ruby/object:Gem::Version
93
- version: '1.18'
75
+ version: '1.19'
76
+ - - ">="
77
+ - !ruby/object:Gem::Version
78
+ version: 1.19.1
94
79
  type: :runtime
95
80
  prerelease: false
96
81
  version_requirements: !ruby/object:Gem::Requirement
97
82
  requirements:
98
83
  - - "~>"
99
84
  - !ruby/object:Gem::Version
100
- version: '1.18'
85
+ version: '1.19'
86
+ - - ">="
87
+ - !ruby/object:Gem::Version
88
+ version: 1.19.1
101
89
  - !ruby/object:Gem::Dependency
102
90
  name: eac_ruby_gem_support
103
91
  requirement: !ruby/object:Gem::Requirement
@@ -139,7 +127,6 @@ files:
139
127
  - lib/avm/git/issue/complete/validation.rb
140
128
  - lib/avm/git/issue/complete/validations.rb
141
129
  - lib/avm/git/issue/complete/working_tree.rb
142
- - lib/avm/git/issue/deliver.rb
143
130
  - lib/avm/git/launcher.rb
144
131
  - lib/avm/git/launcher/base.rb
145
132
  - lib/avm/git/launcher/base/class_methods.rb
@@ -171,6 +158,8 @@ files:
171
158
  - lib/avm/git/revision_test.rb
172
159
  - lib/avm/git/scms.rb
173
160
  - lib/avm/git/scms/git.rb
161
+ - lib/avm/git/scms/git/branch.rb
162
+ - lib/avm/git/scms/git/branches.rb
174
163
  - lib/avm/git/scms/git/change_tracker.rb
175
164
  - lib/avm/git/scms/git/changed_file.rb
176
165
  - lib/avm/git/scms/git/changed_files.rb
@@ -181,6 +170,8 @@ files:
181
170
  - lib/avm/git/scms/git/commits.rb
182
171
  - lib/avm/git/scms/git/interval.rb
183
172
  - lib/avm/git/scms/git/milestones.rb
173
+ - lib/avm/git/scms/git/remote.rb
174
+ - lib/avm/git/scms/git/remotes.rb
184
175
  - lib/avm/git/scms/git/run_commit.rb
185
176
  - lib/avm/git/scms/git_sub_base.rb
186
177
  - lib/avm/git/scms/git_sub_base/changed_file.rb
@@ -1,56 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- require 'avm/tools/core_ext'
4
- require 'clipboard'
5
-
6
- module Avm
7
- module Git
8
- module Issue
9
- class Deliver
10
- enable_simple_cache
11
- enable_speaker
12
-
13
- common_constructor :git_repo
14
-
15
- def run
16
- push
17
- clipboard_copy_tracker_message
18
- true
19
- end
20
-
21
- def start_banner
22
- infov 'Branch name', branch_name
23
- infov 'Commit ID', branch_commit_id
24
- infov 'Push arguments', ::Shellwords.join(push_args)
25
- end
26
-
27
- private
28
-
29
- def branch_commit_id
30
- git_repo.rev_parse(branch_name)
31
- end
32
-
33
- def branch_name_uncached
34
- git_repo.command('rev-parse', '--abbrev-ref', 'HEAD').execute!.strip
35
- end
36
-
37
- def clipboard_copy_tracker_message
38
- ::Clipboard.copy(textile_tracker_message)
39
- infov 'Copied to clipboard', textile_tracker_message
40
- end
41
-
42
- def push
43
- git_repo.command(*push_args).system!
44
- end
45
-
46
- def push_args
47
- %w[push origin --force] + ["#{branch_name}:refs/heads/#{branch_name}"]
48
- end
49
-
50
- def textile_tracker_message
51
- "#{branch_name}: commit:#{branch_commit_id}."
52
- end
53
- end
54
- end
55
- end
56
- end