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.
Files changed (4) hide show
  1. checksums.yaml +8 -8
  2. data/lib/bro/version.rb +1 -1
  3. data/lib/bro.rb +14 -4
  4. metadata +1 -1
checksums.yaml CHANGED
@@ -1,15 +1,15 @@
1
1
  ---
2
2
  !binary "U0hBMQ==":
3
3
  metadata.gz: !binary |-
4
- MmFjNjIxZmNjOTU1MTI4M2I2NjU4MDViNTQyNWIxN2JiMjk5MTkxNw==
4
+ MWM5MzA1YWEwOTgxNzAyYjYwN2Y4YjRmYTM5NWI0NWEzMmEwZmNmZA==
5
5
  data.tar.gz: !binary |-
6
- ZDNlNWMwYWYyNzMxYmYzNGFjYmQyNTk4YWI4NmViNDY4OTc4Mzk4MA==
6
+ YTg5MjdhNDBkNmNlYjJkMDU5ZmQ0MjU3MDVkNDE5MGU5NDhkZTRhMQ==
7
7
  SHA512:
8
8
  metadata.gz: !binary |-
9
- N2M0NjJjOTZjNzc3Yjg5OTk4Nzg4NGUwMDA5YTNmNWJjM2M0Mjg2NDZjZWI4
10
- MzBhMTAyMDkzYmEwZmMwZWVmNGViYmVmZDNhZGVlNjk4ZGI5MmY3ZjlmN2Fm
11
- Mzc5ZWQ5ODQ5YmFmMTY5ZWEyNGJjMzkzYTliMTU3ZTdmZmE4ZDQ=
9
+ N2UxZjk0M2JkMmI5M2ZjM2UzMGFkNzM0ZDVmMGUyMWExZjY0OGNmNzcyOThl
10
+ Zjk5NDdmN2MzMGE4N2NlMzdlYWVhMmE1OWRkYWI4MjhmMzNlODI4MjYwOGY0
11
+ ZGM4NjM2NDdjMjBmZGE2ODgzNjUyNmJhMDljMWMwZjY2OWMxMzc=
12
12
  data.tar.gz: !binary |-
13
- YjJiZDI1ODE0NGU3ZDVhYmI1M2U0NDliMTdhMTk4YzIxOWI3ZWI5MGFmNzE0
14
- ZjcyZmUwYjUzMmExZDZiNmIwMmY3Y2FiODEzYTM4M2FjZDk4NjBhMGFjNDVi
15
- OTQzYTBlYjNlZGYwZDI4ZjQ4ZDYyM2VjZTc4NjI2ODNhZDQ1NGI=
13
+ NzA3ZTAyYWEyYzVlNWNlMmQ4MDUzYjhmYzk2YzJhMTIzYmFhNmNmNjViMDIw
14
+ ZjE4MWNkY2ZlZTkwYjEzYjk5Y2I2NTEyZWJlYzg5MDFhNGZjZDJhZDFlMWE0
15
+ YzY2MmIwZTdjZDY3OWRkOTJjNGJjYzg5NTYwMzhmOGNiZWI1ZWU=
data/lib/bro/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Bro
2
- VERSION = "0.0.13"
2
+ VERSION = "0.0.14"
3
3
  end
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* Use #{"bro add".colored.green.underline} to add #{cmd_display.colored.yellow} to our database!
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
- say "#{list.length} entr#{s} for #{cmd_display}\n".status.underline
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\n" if i > 1
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
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: bropages
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.13
4
+ version: 0.0.14
5
5
  platform: ruby
6
6
  authors:
7
7
  - bropages.org