travis 1.6.2.travis.366.4 → 1.6.2.travis.367.4
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 +8 -8
- data/lib/travis/cli/command.rb +2 -2
- data/lib/travis/cli/report.rb +1 -1
- data/lib/travis/tools/notification.rb +2 -2
- data/lib/travis/tools/system.rb +27 -3
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
3
|
metadata.gz: !binary |-
|
4
|
-
|
4
|
+
MTk5YzM2YWU1MGQ4OWE2NzYyYjFiNDhiNDhjNzNmMGJlZDFhNzlhOA==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
NzcxODViZDI2Y2JkNDk3OWFhNGIxMDg0NTJhNjJjYjA3ZTg4MDhjNw==
|
7
7
|
!binary "U0hBNTEy":
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
NTUwZmI1YmE1YWIyMDNlY2UzNGZmM2M4YjM0MzRkNTJjMzdiNmU0N2UwZjNl
|
10
|
+
MGJhY2MyZTNkNTU2NjBmNzZiZDExYjUzMzE5Mjk1Y2E2NTViZDI3YmE2YTI4
|
11
|
+
MGUwZjQ4MDA4YjI0MTkyMTU2NTVhYzJhNGFiZWI4OGQ4MmEzZDM=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
MDU2MTE1MTUzMzM5NGQ3MWMxZTQwNzYzNzMzNDBlNWQ5NDAxYTBmODA3NzM5
|
14
|
+
NGJhZTdmNzI2MTU0NTAyY2Y5MTBlMmYwMjliYTFhYzQzZDhlMzIyYzViYWQ0
|
15
|
+
ZDQwN2RlYmEwZTUxMjdkYzkzOGI2NGUyZDAyZWVhNzg2ZTk2ZDI=
|
data/lib/travis/cli/command.rb
CHANGED
@@ -17,7 +17,7 @@ module Travis
|
|
17
17
|
extend Parser, Forwardable, Tools::Assets
|
18
18
|
def_delegators :terminal, :agree, :ask, :choose
|
19
19
|
|
20
|
-
HighLine.use_color =
|
20
|
+
HighLine.use_color = Tools::System.unix? && $stdout.tty?
|
21
21
|
HighLine.color_scheme = HighLine::ColorScheme.new do |cs|
|
22
22
|
cs[:command] = [ :bold ]
|
23
23
|
cs[:error] = [ :red ]
|
@@ -33,7 +33,7 @@ module Travis
|
|
33
33
|
end
|
34
34
|
|
35
35
|
on('-i', '--[no-]interactive', "be interactive and colorful") do |c, v|
|
36
|
-
HighLine.use_color = v
|
36
|
+
HighLine.use_color = v if Tools::System.unix?
|
37
37
|
c.force_interactive = v
|
38
38
|
end
|
39
39
|
|
data/lib/travis/cli/report.rb
CHANGED
@@ -41,7 +41,7 @@ module Travis
|
|
41
41
|
end
|
42
42
|
|
43
43
|
def available?
|
44
|
-
System.mac? and
|
44
|
+
System.mac? and System.os_version.to_s >= '10.8'
|
45
45
|
end
|
46
46
|
end
|
47
47
|
|
@@ -55,7 +55,7 @@ module Travis
|
|
55
55
|
end
|
56
56
|
|
57
57
|
def available?
|
58
|
-
|
58
|
+
System.has? @command
|
59
59
|
end
|
60
60
|
end
|
61
61
|
|
data/lib/travis/tools/system.rb
CHANGED
@@ -15,12 +15,30 @@ module Travis
|
|
15
15
|
RUBY_PLATFORM =~ /linux/i
|
16
16
|
end
|
17
17
|
|
18
|
+
def unix?
|
19
|
+
not windows?
|
20
|
+
end
|
21
|
+
|
18
22
|
def os
|
19
|
-
|
23
|
+
os_name ? "#{os_name} #{os_version}".strip : os_type
|
20
24
|
end
|
21
25
|
|
22
26
|
def full_os
|
23
|
-
|
27
|
+
os_name == os_type ? os : "#{os} like #{os_type}"
|
28
|
+
end
|
29
|
+
|
30
|
+
def os_version
|
31
|
+
@os_version ||= has?(:sw_vers) && `sw_vers -productVersion`.chomp
|
32
|
+
@os_version ||= has?(:lsb_release) && `lsb_release -r -s`.chomp
|
33
|
+
end
|
34
|
+
|
35
|
+
def os_name
|
36
|
+
@os_name ||= has?(:sw_vers) && `sw_vers -productName`.chomp
|
37
|
+
@os_name ||= has?(:lsb_release) && `lsb_release -i -s`.chomp
|
38
|
+
end
|
39
|
+
|
40
|
+
def os_type
|
41
|
+
@os_type ||= `uname`.chomp
|
24
42
|
end
|
25
43
|
|
26
44
|
def ruby_engine
|
@@ -46,7 +64,13 @@ module Travis
|
|
46
64
|
end
|
47
65
|
|
48
66
|
def description(*args)
|
49
|
-
[
|
67
|
+
[ full_os, ruby, rubygems, *args.flatten].compact.uniq.join("; ")
|
68
|
+
end
|
69
|
+
|
70
|
+
def has?(command)
|
71
|
+
return false unless unix?
|
72
|
+
@has ||= {}
|
73
|
+
@has.fetch(command) { @has[command] = system "which #{command} 2>/dev/null >/dev/null" }
|
50
74
|
end
|
51
75
|
end
|
52
76
|
end
|