bropages 0.0.13 → 0.0.14
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/bro/version.rb +1 -1
- data/lib/bro.rb +14 -4
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
3
|
metadata.gz: !binary |-
|
4
|
-
|
4
|
+
MWM5MzA1YWEwOTgxNzAyYjYwN2Y4YjRmYTM5NWI0NWEzMmEwZmNmZA==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
YTg5MjdhNDBkNmNlYjJkMDU5ZmQ0MjU3MDVkNDE5MGU5NDhkZTRhMQ==
|
7
7
|
SHA512:
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
N2UxZjk0M2JkMmI5M2ZjM2UzMGFkNzM0ZDVmMGUyMWExZjY0OGNmNzcyOThl
|
10
|
+
Zjk5NDdmN2MzMGE4N2NlMzdlYWVhMmE1OWRkYWI4MjhmMzNlODI4MjYwOGY0
|
11
|
+
ZGM4NjM2NDdjMjBmZGE2ODgzNjUyNmJhMDljMWMwZjY2OWMxMzc=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
NzA3ZTAyYWEyYzVlNWNlMmQ4MDUzYjhmYzk2YzJhMTIzYmFhNmNmNjViMDIw
|
14
|
+
ZjE4MWNkY2ZlZTkwYjEzYjk5Y2I2NTEyZWJlYzg5MDFhNGZjZDJhZDFlMWE0
|
15
|
+
YzY2MmIwZTdjZDY3OWRkOTJjNGJjYzg5NTYwMzhmOGNiZWI1ZWU=
|
data/lib/bro/version.rb
CHANGED
data/lib/bro.rb
CHANGED
@@ -206,7 +206,10 @@ command :lookup do |c|
|
|
206
206
|
|
207
207
|
QQQ
|
208
208
|
else
|
209
|
+
# the display string for the command
|
209
210
|
cmd_display = args.join(" ")
|
211
|
+
|
212
|
+
# the server argument for the command
|
210
213
|
cmd = args.join("%20")
|
211
214
|
|
212
215
|
state.reset_lookup_ids()
|
@@ -220,9 +223,11 @@ command :lookup do |c|
|
|
220
223
|
res = RestClient.get URL + '/' + cmd + '.json'
|
221
224
|
rescue => e
|
222
225
|
say <<-QQQ.unindent
|
223
|
-
The #{cmd_display.colored.yellow} command isn't in our database
|
226
|
+
The #{cmd_display.colored.yellow} command isn't in our database.
|
224
227
|
|
225
|
-
\t*
|
228
|
+
\t* Typing #{"bro add".colored.green.underline} will let you add #{cmd_display.colored.yellow} to our database!
|
229
|
+
|
230
|
+
\t* There's nothing to lose by typing #{"bro add".colored.red.underline}, it will just launch an editor with instructions.
|
226
231
|
|
227
232
|
\t* Need help? Visit #{"http://bropages.org/help".colored.underline}
|
228
233
|
|
@@ -234,7 +239,11 @@ command :lookup do |c|
|
|
234
239
|
enable_paging
|
235
240
|
list = JSON.parse res
|
236
241
|
s = list.length == 1 ? 'y' : 'ies'
|
237
|
-
|
242
|
+
|
243
|
+
say <<-QQQ.unindent
|
244
|
+
#{"#{list.length} entr#{s} for #{cmd_display}".status.underline} #{"-- submit your own example with \"bro add #{cmd_display}\"".colored.yellow}
|
245
|
+
|
246
|
+
QQQ
|
238
247
|
|
239
248
|
sep = ""
|
240
249
|
(HighLine::SystemExtensions.terminal_size[0] - 5).times { sep += "." }
|
@@ -255,7 +264,7 @@ command :lookup do |c|
|
|
255
264
|
|
256
265
|
body = body.gsub(/^([^#][^\n]*)$/, "\\1".important)
|
257
266
|
|
258
|
-
say sep + "\n
|
267
|
+
say sep + "\n" if i > 1
|
259
268
|
|
260
269
|
say body + "\n\n"
|
261
270
|
|
@@ -271,6 +280,7 @@ command :lookup do |c|
|
|
271
280
|
say msg + "\n\n"
|
272
281
|
isDefault = false
|
273
282
|
}
|
283
|
+
|
274
284
|
end
|
275
285
|
end
|
276
286
|
end
|