eac_launcher 0.6.1 → 0.6.2
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_launcher/git/base.rb +1 -1
- data/lib/eac_launcher/git/publish_base.rb +34 -13
- data/lib/eac_launcher/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 565fc4ab1f27c68e3cfd0004bdae700508cedf36b1e6ada6e768f77e6a47fbd9
|
4
|
+
data.tar.gz: 18c26e86d04b2e1e0bf0f058af24ef3f6402132e0fff33cac07ff6dba2f25754
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ef72bcbda016a06d3c67263dc0edc9da63909365d3680a6d6fc38669ec8abf4b05215478fa7b76a1dbb797cdfbbf38326a2e12f5fbe3f4c28dc8e499689bc892
|
7
|
+
data.tar.gz: 36c0cbb61f3085af3b019b752dffc11a880e405ce0c8c8231094b2de5288dbe06bcf9d8350d9348c94c7d2fc5521ade3bff497b8ad2706ae836aa03334580436
|
@@ -10,38 +10,55 @@ module EacLauncher
|
|
10
10
|
include ::EacRubyUtils::SimpleCache
|
11
11
|
include ::EacRubyUtils::Console::Speaker
|
12
12
|
|
13
|
-
CHECKERS = %w[publish_remote_no_exist remote_equal remote_following
|
13
|
+
CHECKERS = %w[remote_fetch publish_remote_no_exist remote_equal remote_following
|
14
|
+
local_following].freeze
|
15
|
+
|
16
|
+
REMOTE_UNAVAILABLE_MESSAGES = ['could not resolve hostname', 'connection timed out',
|
17
|
+
'no route to host'].map(&:downcase).freeze
|
14
18
|
|
15
19
|
protected
|
16
20
|
|
17
21
|
def internal_check
|
18
|
-
CHECKERS.each
|
22
|
+
CHECKERS.each do |checker|
|
23
|
+
result = send("#{checker}_check_result")
|
24
|
+
return result if result
|
25
|
+
end
|
19
26
|
divergent_result_check_result
|
20
27
|
end
|
21
28
|
|
22
29
|
private
|
23
30
|
|
24
|
-
def
|
25
|
-
|
31
|
+
def remote_fetch_check_result
|
32
|
+
remote_fetch
|
33
|
+
nil
|
34
|
+
rescue ::StandardError => e
|
35
|
+
raise e unless remote_unavailable_error?(e)
|
36
|
+
|
37
|
+
::EacLauncher::Publish::CheckResult.blocked(e.message)
|
26
38
|
end
|
27
39
|
|
28
|
-
def
|
29
|
-
|
40
|
+
def remote_unavailable_error?(error)
|
41
|
+
error_message = error.message.downcase
|
42
|
+
REMOTE_UNAVAILABLE_MESSAGES.any? do |message|
|
43
|
+
error_message.include?(message)
|
44
|
+
end
|
30
45
|
end
|
31
46
|
|
32
|
-
def
|
33
|
-
|
47
|
+
def publish_remote_no_exist_check_result
|
48
|
+
return nil if sgit.remote_exist?(::EacLauncher::Git::WarpBase::TARGET_REMOTE)
|
49
|
+
|
50
|
+
::EacLauncher::Publish::CheckResult.blocked('Remote does not exist')
|
34
51
|
end
|
35
52
|
|
36
53
|
def remote_equal_check_result
|
37
|
-
|
38
|
-
end
|
54
|
+
return nil unless remote_sha.present? && remote_sha == local_sha
|
39
55
|
|
40
|
-
|
41
|
-
remote_sha.present? && sgit.descendant?(remote_sha, local_sha)
|
56
|
+
::EacLauncher::Publish::CheckResult.updated('Remote equal')
|
42
57
|
end
|
43
58
|
|
44
59
|
def remote_following_check_result
|
60
|
+
return nil unless remote_sha.present? && sgit.descendant?(remote_sha, local_sha)
|
61
|
+
|
45
62
|
::EacLauncher::Publish::CheckResult.outdated('Remote following')
|
46
63
|
end
|
47
64
|
|
@@ -77,10 +94,14 @@ module EacLauncher
|
|
77
94
|
end
|
78
95
|
|
79
96
|
def remote_sha_uncached
|
80
|
-
|
97
|
+
remote_fetch
|
81
98
|
b = sgit.git.branches["#{::EacLauncher::Git::WarpBase::TARGET_REMOTE}/master"]
|
82
99
|
b ? b.gcommit.sha : nil
|
83
100
|
end
|
101
|
+
|
102
|
+
def remote_fetch_uncached
|
103
|
+
sgit.fetch(::EacLauncher::Git::WarpBase::TARGET_REMOTE)
|
104
|
+
end
|
84
105
|
end
|
85
106
|
end
|
86
107
|
end
|
data/lib/eac_launcher/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: eac_launcher
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.6.
|
4
|
+
version: 0.6.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Esquilo Azul Company
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-
|
11
|
+
date: 2019-10-07 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|