mvn2 2.6.12 → 2.7.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +3 -3
- data/bin/mvn2 +0 -2
- data/lib/mvn2/plugin/filter.plugin.rb +16 -9
- data/lib/mvn2/plugin/live_print.plugin.rb +9 -6
- data/lib/mvn2/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 71970b18bea283cc3efacc1bb4afc095a105c580
|
4
|
+
data.tar.gz: faf90bf62234e7b015b7cb32addd8a36c0e4a771
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ed967d0d8f9cb498c9ce1c20170f13ebc8d2c9da094346fab50becce3d0ba4d188c7d701a8c1ba408d939dd38c11fe782f12a119fa07389e68163ad960054682
|
7
|
+
data.tar.gz: b5972d34cd6516d595fbc2794abbadccb7671612cd33373f15b31afeb93e40f9513b6910394e115bf82dc566e8ce240540d8a6394a5bab818bac0c64c16065b4
|
data/Gemfile.lock
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
mvn2 (2.6.
|
4
|
+
mvn2 (2.6.12)
|
5
5
|
everyday-cli-utils (~> 1.8, >= 1.8.6)
|
6
6
|
everyday-plugins (~> 1.2)
|
7
7
|
|
8
8
|
GEM
|
9
9
|
remote: https://rubygems.org/
|
10
10
|
specs:
|
11
|
-
everyday-cli-utils (1.8.
|
11
|
+
everyday-cli-utils (1.8.7.1)
|
12
12
|
everyday-plugins (1.2.1)
|
13
13
|
everyday-cli-utils (~> 1.8, >= 1.8.6)
|
14
14
|
rake (10.5.0)
|
@@ -22,4 +22,4 @@ DEPENDENCIES
|
|
22
22
|
rake (~> 10.4)
|
23
23
|
|
24
24
|
BUNDLED WITH
|
25
|
-
1.
|
25
|
+
1.14.3
|
data/bin/mvn2
CHANGED
@@ -54,8 +54,6 @@ Plugins.get :color_override
|
|
54
54
|
|
55
55
|
class Mvn2Runner
|
56
56
|
HEADLESS = ' -Djava.awt.headless=true'
|
57
|
-
INFO_LINE = '[INFO] ------------------------------------------------------------------------'
|
58
|
-
BUILD_REGEX = /\[INFO\] Building (?!(jar|war|zip))/
|
59
57
|
|
60
58
|
def initialize(options)
|
61
59
|
@options = options
|
@@ -3,7 +3,7 @@ include EverydayPlugins
|
|
3
3
|
|
4
4
|
class String
|
5
5
|
def start_with_any?(*strs)
|
6
|
-
strs.empty? ? false : strs.any? { |str| start_with?(str) }
|
6
|
+
strs.empty? ? false : strs.any? { |str| gsub(/\e\[.*?m/, '').start_with?(str) }
|
7
7
|
end
|
8
8
|
end
|
9
9
|
|
@@ -11,13 +11,15 @@ class FilterPlugin
|
|
11
11
|
extend Plugin
|
12
12
|
extend PluginType
|
13
13
|
|
14
|
-
|
15
|
-
BUILD_REGEX =
|
14
|
+
INFO_LINE_FULL = '[INFO] ------------------------------------------------------------------------'
|
15
|
+
BUILD_REGEX = /(\[(?:\e\S+)?INFO(?:\e\S+)?\] (?:\e\S+)?)Building (?!(jar|war|zip)).*(?:\e\S+)?$/
|
16
|
+
RESULT_REGEX = /(\[(?:\e\S+)?INFO(?:\e\S+)?\] (?:\e\S+)?)(BUILD SUCCESS|Reactor Summary:|BUILD FAILURE).*(?:\e\S+)?$/
|
16
17
|
|
17
18
|
def self.def_vars
|
18
19
|
register_variable :info_line_last, false
|
19
20
|
register_variable :found, false
|
20
21
|
register_variable :failures, 0
|
22
|
+
register_variable :info_line, ''
|
21
23
|
end
|
22
24
|
|
23
25
|
def_vars
|
@@ -40,9 +42,10 @@ class FilterPlugin
|
|
40
42
|
def self.def_filter1
|
41
43
|
register(:line_filter, priority: 10) { |_, line|
|
42
44
|
info_line_last = Plugins.get_var :info_line_last
|
45
|
+
info_line = Plugins.get_var :info_line
|
43
46
|
if line.start_with_any?('[INFO] BUILD SUCCESS', '[INFO] Reactor Summary:', '[INFO] BUILD FAILURE')
|
44
47
|
str = ''
|
45
|
-
str <<
|
48
|
+
str << "#{info_line}\n" unless info_line_last
|
46
49
|
str << line << "\n"
|
47
50
|
Plugins.set_vars found: true, info_line_last: false
|
48
51
|
str
|
@@ -69,7 +72,7 @@ class FilterPlugin
|
|
69
72
|
found = Plugins.get_var :found
|
70
73
|
if found
|
71
74
|
str = line << "\n"
|
72
|
-
Plugins.set_vars found: true, info_line_last: line.
|
75
|
+
Plugins.set_vars found: true, info_line_last: line.start_with_any?(INFO_LINE_FULL)
|
73
76
|
str
|
74
77
|
else
|
75
78
|
nil
|
@@ -80,7 +83,7 @@ class FilterPlugin
|
|
80
83
|
def self.def_filter4
|
81
84
|
register(:line_filter, priority: 40) { |options, line|
|
82
85
|
found = Plugins.get_var :found
|
83
|
-
if options[:hide_between] && found && line.
|
86
|
+
if options[:hide_between] && found && line.start_with_any?('Tests run:')
|
84
87
|
str = line << "\n\n"
|
85
88
|
Plugins.set_vars found: false, info_line_last: false
|
86
89
|
if line =~ /^.*Failures:\s+(\d+),.*$/
|
@@ -98,11 +101,15 @@ class FilterPlugin
|
|
98
101
|
def self.def_filter5
|
99
102
|
register(:line_filter, priority: 50) { |options, line|
|
100
103
|
info_line_last = Plugins.get_var :info_line_last
|
101
|
-
|
104
|
+
info_line = Plugins.get_var :info_line
|
105
|
+
if line.gsub(/\e\[.*?m/, '').chomp == INFO_LINE_FULL
|
106
|
+
Plugins.set_var :info_line, line.chomp
|
107
|
+
nil
|
108
|
+
elsif options[:show_projects] && line =~ BUILD_REGEX
|
102
109
|
str = ''
|
103
|
-
str <<
|
110
|
+
str << "#{info_line}\n" unless info_line_last
|
104
111
|
str << line << "\n"
|
105
|
-
str <<
|
112
|
+
str << "#{info_line}\n"
|
106
113
|
Plugins.set_var :info_line_last, true
|
107
114
|
str
|
108
115
|
else
|
@@ -1,3 +1,4 @@
|
|
1
|
+
require 'pty'
|
1
2
|
require 'everyday-plugins'
|
2
3
|
include EverydayPlugins
|
3
4
|
class LivePrintPlugin
|
@@ -21,12 +22,14 @@ class LivePrintPlugin
|
|
21
22
|
else
|
22
23
|
log_file = nil
|
23
24
|
end
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
25
|
+
PTY.spawn("TERM='xterm-256color' #{cmd}") { |r, w, pid|
|
26
|
+
r.each { |l|
|
27
|
+
log_file << l.gsub(/\e\[.*?m/, '') unless log_file.nil?
|
28
|
+
output = Plugins.get :line_filter, l
|
29
|
+
puts "\r\e[2K#{output}" unless output.nil?
|
30
|
+
result = true if l.chomp.gsub(/\e\[.*?;/, '').start_with?('[INFO] BUILD SUCCESS')
|
31
|
+
}
|
32
|
+
}
|
30
33
|
ensure
|
31
34
|
log_file.close unless log_file.nil?
|
32
35
|
end
|
data/lib/mvn2/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: mvn2
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.
|
4
|
+
version: 2.7.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Eric Henderson
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2017-07-17 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -129,7 +129,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
129
129
|
version: '0'
|
130
130
|
requirements: []
|
131
131
|
rubyforge_project:
|
132
|
-
rubygems_version: 2.
|
132
|
+
rubygems_version: 2.6.11
|
133
133
|
signing_key:
|
134
134
|
specification_version: 4
|
135
135
|
summary: Maven helper
|