avm-git 0.13.0 → 0.13.1

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: e4c465260eb218d03c56e7b83254e448b098fc0c3209a616d21a85e9145dc2dc
4
- data.tar.gz: abfe98048c3d3c761dc0aea833dc7c05f48a3f0c385c9797cb68fe7d871ee401
3
+ metadata.gz: 3c527e07290b2c56ad8f4aeb91cdbb3b0f78223dc34c9babf50f372573555d79
4
+ data.tar.gz: f9cf685952de778334ce13137152065a246bbcd0b95135b627439fee1fdd2a8d
5
5
  SHA512:
6
- metadata.gz: 95264dd3e496af3d28533de1b1c439672920eaef5aae55e5972f52f808647f84ea46cce84086fb13857f9d7b8e4be0b50f5065a823c9b383c7621f3a3acf691c
7
- data.tar.gz: f2908fe7a9b7e6ee1ce4ca90c2a21df5e08c92a47ce37079df17b19d4a55ce6c93ddba53f99fc31930bd68809f2971cda5174a00397d72a2829684287418ac1e
6
+ metadata.gz: 2685abcc268908517117700c16217f2bd928e0eadb0564f81e7702dd20a7a0fef4273178ebbe7c9baf4b12c93e7c5b0bd2e7e2e1773c6b97d9d1d3d8d2b063ba
7
+ data.tar.gz: f72d76691c1d21a09fbcb7e2c9f73f802f168734e34575e5c7e3a55f2401005d99b6492739f9a467e7fea30ce13d611f64e1b1a19b41f78ca344c3a474321f2b
@@ -15,6 +15,8 @@ module Avm
15
15
  CHECKERS = %w[remote_url remote_fetch publish_remote_no_exist remote_equal remote_following
16
16
  local_following].freeze
17
17
 
18
+ DEFAULT_REMOTE_REF = 'master'
19
+
18
20
  REMOTE_UNAVAILABLE_MESSAGES = ['could not resolve host', 'connection timed out',
19
21
  'no route to host'].map(&:downcase).freeze
20
22
 
@@ -108,7 +110,7 @@ module Avm
108
110
 
109
111
  def remote_sha_uncached
110
112
  remote_fetch
111
- b = sgit.git.branches["#{remote_name}/master"]
113
+ b = sgit.git.branches["#{remote_name}/#{remote_ref}"]
112
114
  b ? b.gcommit.sha : nil
113
115
  end
114
116
 
@@ -119,6 +121,11 @@ module Avm
119
121
  def remote_name
120
122
  ::Avm::Git::Launcher::WarpBase::TARGET_REMOTE
121
123
  end
124
+
125
+ # @return [String]
126
+ def remote_ref
127
+ DEFAULT_REMOTE_REF
128
+ end
122
129
  end
123
130
  end
124
131
  end
@@ -7,6 +7,23 @@ module Avm
7
7
  module LauncherStereotypes
8
8
  class GitSubrepo
9
9
  class Publish < ::Avm::Git::Launcher::PublishBase
10
+ # @return [Pathname]
11
+ def config_path
12
+ instance.parent.warped.to_pathname.join(
13
+ "./#{instance.to_parent_path}",
14
+ ::Avm::Git::LauncherStereotypes::GitSubrepo::CONFIG_SUBPATH
15
+ )
16
+ end
17
+
18
+ # @return [EacGit::Local::Subrepo::Config]
19
+ def config
20
+ ::EacGit::Local::Subrepo::Config.from_file(config_path)
21
+ end
22
+
23
+ # @return [String]
24
+ def remote_ref
25
+ config.remote_branch || super
26
+ end
10
27
  end
11
28
  end
12
29
  end
@@ -11,9 +11,11 @@ module Avm
11
11
  require_sub __FILE__
12
12
  include Avm::Launcher::Stereotype
13
13
 
14
+ CONFIG_SUBPATH = '.gitrepo'
15
+
14
16
  class << self
15
17
  def match?(path)
16
- File.exist?(path.real.subpath('.gitrepo')) && subrepo_url(path.real) != 'none'
18
+ File.exist?(path.real.subpath(CONFIG_SUBPATH)) && subrepo_url(path.real) != 'none'
17
19
  end
18
20
 
19
21
  def color
@@ -21,7 +23,7 @@ module Avm
21
23
  end
22
24
 
23
25
  def subrepo_url(path)
24
- File.read(path.subpath('.gitrepo')).each_line do |l|
26
+ File.read(path.subpath(CONFIG_SUBPATH)).each_line do |l|
25
27
  m = /remote\s*=\s(.+)/.match(l)
26
28
  return m[1] if m
27
29
  end
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Avm
4
4
  module Git
5
- VERSION = '0.13.0'
5
+ VERSION = '0.13.1'
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.13.0
4
+ version: 0.13.1
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-03-21 00:00:00.000000000 Z
11
+ date: 2023-03-31 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: avm
@@ -17,6 +17,9 @@ dependencies:
17
17
  - - "~>"
18
18
  - !ruby/object:Gem::Version
19
19
  version: '0.64'
20
+ - - ">="
21
+ - !ruby/object:Gem::Version
22
+ version: 0.64.2
20
23
  type: :runtime
21
24
  prerelease: false
22
25
  version_requirements: !ruby/object:Gem::Requirement
@@ -24,6 +27,9 @@ dependencies:
24
27
  - - "~>"
25
28
  - !ruby/object:Gem::Version
26
29
  version: '0.64'
30
+ - - ">="
31
+ - !ruby/object:Gem::Version
32
+ version: 0.64.2
27
33
  - !ruby/object:Gem::Dependency
28
34
  name: avm-files
29
35
  requirement: !ruby/object:Gem::Requirement
@@ -78,20 +84,14 @@ dependencies:
78
84
  requirements:
79
85
  - - "~>"
80
86
  - !ruby/object:Gem::Version
81
- version: '1.17'
82
- - - ">="
83
- - !ruby/object:Gem::Version
84
- version: 1.17.2
87
+ version: '1.18'
85
88
  type: :runtime
86
89
  prerelease: false
87
90
  version_requirements: !ruby/object:Gem::Requirement
88
91
  requirements:
89
92
  - - "~>"
90
93
  - !ruby/object:Gem::Version
91
- version: '1.17'
92
- - - ">="
93
- - !ruby/object:Gem::Version
94
- version: 1.17.2
94
+ version: '1.18'
95
95
  - !ruby/object:Gem::Dependency
96
96
  name: aranha-parsers
97
97
  requirement: !ruby/object:Gem::Requirement