awesome_bot 1.13.0 → 1.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
  SHA1:
3
- metadata.gz: 5339a2c603f81d4366910e4bf0796dadaef12736
4
- data.tar.gz: dd2afbc414a8ba086a1e436eb9668429867ae756
3
+ metadata.gz: 85dacb264b2ea078f991b88ef2ab185526f22af3
4
+ data.tar.gz: 2db17b9b5a8c547a9d66fbaab730d34885e769ad
5
5
  SHA512:
6
- metadata.gz: 51a17797b8a6518b3b9e3e3ab0583de3ec1364985596cfcfb5d3e04e745a34ddb76f6bce822352a572e56204944bd3bfb11a398bd876e8dbee5a0128ab44781f
7
- data.tar.gz: 9bb7ee011f0b71a2a37031ff20b85816efd907ab97612103022b5b4f2a7bfffe5041eb6b7638f677536408e546e8632f5b8556639e405179b8044983029fb0ef
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)
@@ -107,15 +107,14 @@ module AwesomeBot
107
107
  print o
108
108
  end
109
109
 
110
- filtered_issues = []
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, h = output(x, k, pad_list(o), digits)
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
- print " #{pad_text index + 1, pad_list(r.dupes.uniq)}. "
167
+ loc = d['loc']
167
168
  url = d['url']
168
- print loc_formatted d['loc'], largest
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
@@ -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
- "#{s == STATUS_ERROR ? x['error'] : ''}" \
72
+ "#{error}" \
71
73
  "#{redirect} \n"
72
74
 
73
75
  [o, hash]
@@ -5,5 +5,5 @@ module AwesomeBot
5
5
  'Great for "awesome" projects.'
6
6
  PROJECT_URL = 'https://github.com/dkhamsing/awesome_bot'
7
7
 
8
- VERSION = '1.13.0'
8
+ VERSION = '1.13.1'
9
9
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: awesome_bot
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.13.0
4
+ version: 1.13.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Daniel Khamsing