awesome_bot 1.13.0 → 1.13.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +4 -0
- data/lib/awesome_bot/cli.rb +17 -6
- data/lib/awesome_bot/output.rb +4 -2
- data/lib/awesome_bot/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 85dacb264b2ea078f991b88ef2ab185526f22af3
|
4
|
+
data.tar.gz: 2db17b9b5a8c547a9d66fbaab730d34885e769ad
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8b36edf14f6c7d8f28ea149b6122165d2b2f0ba5b8a1a5219e2ed9cc5fbd5c4c6de851e51e68489bafdc22c9cbe11e5ae2de82a550cc632a3050d172d4d0897a
|
7
|
+
data.tar.gz: 9c9db13ecb3f4aeb026bcb9999e48403899a81012e139a9578c04b6eb4b17b4a4ea3535af02308888f27fc760bf279cea3b2b4514eb249d3108ab9354130aa84
|
data/CHANGELOG.md
CHANGED
@@ -2,6 +2,10 @@
|
|
2
2
|
|
3
3
|
Changes by [Daniel Khamsing][] unless otherwise noted.
|
4
4
|
|
5
|
+
# 1.13.1
|
6
|
+
|
7
|
+
- add `error` (and dupes) to filtered issues
|
8
|
+
|
5
9
|
# 1.13.0
|
6
10
|
|
7
11
|
- add filtered issues artifacts that can be used to [generate a report](https://github.com/dkhamsing/awesome_bot/issues/95) (this changes an internal `output` format)
|
data/lib/awesome_bot/cli.rb
CHANGED
@@ -107,15 +107,14 @@ module AwesomeBot
|
|
107
107
|
print o
|
108
108
|
end
|
109
109
|
|
110
|
-
|
111
|
-
|
110
|
+
|
111
|
+
|
112
112
|
digits = number_of_digits content
|
113
113
|
unless r.white_listed.nil?
|
114
114
|
puts "\n> White listed:"
|
115
115
|
o = order_by_loc r.white_listed, content
|
116
116
|
o.each_with_index do |x, k|
|
117
|
-
temp,
|
118
|
-
filtered_issues.push h
|
117
|
+
temp, _ = output(x, k, pad_list(o), digits)
|
119
118
|
puts temp
|
120
119
|
end
|
121
120
|
end
|
@@ -136,6 +135,8 @@ module AwesomeBot
|
|
136
135
|
cli_write_results(filename, r)
|
137
136
|
return STATUS_OK
|
138
137
|
else
|
138
|
+
filtered_issues = []
|
139
|
+
|
139
140
|
puts "\nIssues :-("
|
140
141
|
|
141
142
|
print "> Links \n"
|
@@ -163,9 +164,19 @@ module AwesomeBot
|
|
163
164
|
o = order_by_loc dupe_hash, content
|
164
165
|
largest = o.last['loc'].to_s.size
|
165
166
|
o.each_with_index do |d, index|
|
166
|
-
|
167
|
+
loc = d['loc']
|
167
168
|
url = d['url']
|
168
|
-
|
169
|
+
error = 'Dupe'
|
170
|
+
|
171
|
+
hash = {
|
172
|
+
'loc'=> loc,
|
173
|
+
'link'=> url,
|
174
|
+
'error'=> error
|
175
|
+
}
|
176
|
+
filtered_issues.push hash
|
177
|
+
|
178
|
+
print " #{pad_text index + 1, pad_list(r.dupes.uniq)}. "
|
179
|
+
print loc_formatted loc, largest
|
169
180
|
puts " #{url}"
|
170
181
|
end
|
171
182
|
end
|
data/lib/awesome_bot/output.rb
CHANGED
@@ -54,12 +54,14 @@ module AwesomeBot
|
|
54
54
|
status = s == STATUS_ERROR ? '' : s
|
55
55
|
link = x['url']
|
56
56
|
redirect = output_redirect x
|
57
|
+
error = s == STATUS_ERROR ? x['error'] : ''
|
57
58
|
|
58
59
|
hash = {
|
59
60
|
'loc'=> loc,
|
60
61
|
'status'=> s,
|
61
62
|
'link'=> link,
|
62
|
-
'redirect'=> redirect
|
63
|
+
'redirect'=> redirect,
|
64
|
+
'error'=> error
|
63
65
|
}
|
64
66
|
|
65
67
|
o =
|
@@ -67,7 +69,7 @@ module AwesomeBot
|
|
67
69
|
"#{loc_formatted loc, largest} " \
|
68
70
|
"#{status} " \
|
69
71
|
"#{link} " \
|
70
|
-
"#{
|
72
|
+
"#{error}" \
|
71
73
|
"#{redirect} \n"
|
72
74
|
|
73
75
|
[o, hash]
|
data/lib/awesome_bot/version.rb
CHANGED