http_find 0.1.1 → 0.1.3

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 3122dfecfba59775fb74216ca4bbb44d692afb52
4
- data.tar.gz: 604e501ce13ba659e67af15c01df727f59df6f8d
3
+ metadata.gz: ed8fb2460352956373f577f5ba5cdcae92bb3267
4
+ data.tar.gz: 5512b95172ccdd7fb78b66a06dd37d8c9e2e96eb
5
5
  SHA512:
6
- metadata.gz: 8a1f79e36d1de73c7b07fde9f445c6a85230fae8ca4e32301517347037d4037e5845dc8e318e95bbeb4929301c35c8a3674532fd3a27a46c72ff6619e6f2b277
7
- data.tar.gz: 4ff1c4547ec1c573aa63d7eb8c3e0de4a060135479ff1ad6d2b210cdd7aa2c342ff2f7cc7e25770f596ddf26d60eba1756cefe3c92efd368e95a35b2c0b5513f
6
+ metadata.gz: e06b0d0321ecd6b81b9204299f3374ef57e28ae03bb288cf4f7e9a9c4dabce4a584de84c1ddd45b99a2ae327c8cdf44493bba5f7882cf7f3ecea32646ba770d2
7
+ data.tar.gz: a8beaddae1653d2ee757d8c1c1291707335d4ffb3ff4766dc387af748edd36adbcdae76b995397779d5cb0fe47333abbd7502f7156cdcf000a4e2be2903daf5d
data/README.md CHANGED
@@ -28,14 +28,14 @@ Installing this gem will add the executable `httpfind` to your system.
28
28
  With `httpfind` in your $PATH, usage looks like:
29
29
 
30
30
  ```
31
- $ httpfind [URI] [TERM]
31
+ $ httpfind [options] URI TERM
32
32
  ```
33
33
 
34
34
  This will search the HTTP GET response from `URI` for the specified `TERM`.
35
35
 
36
36
  `TERM` may be either a simple string or a regular expression in the form
37
- `$ httpfind -e http://example.com '\d.{2} one'` (note the `-e` flag).
38
- Check `$httpfind help` for more info.
37
+ `$ httpfind -e http://example.com '\d.{2} one'` (note the `-e` option).
38
+ Check `$httpfind --help` for more info.
39
39
 
40
40
  ## Development
41
41
 
@@ -1,5 +1,7 @@
1
1
  module HttpFind
2
2
  class Output
3
+ LINENUM_COLOR = :light_black
4
+
3
5
  def initialize(matches)
4
6
  @matches = matches
5
7
  end
@@ -7,9 +9,9 @@ module HttpFind
7
9
  def lines
8
10
  justlen = @matches.map { |m| m[:line] }.sort.last.to_s.length
9
11
  @matches.map do |m|
10
- line = m[:line].to_s
12
+ line = m[:line].to_s.rjust(justlen).colorize(LINENUM_COLOR)
11
13
  text = m[:text]
12
- "#{line.rjust(justlen)} | #{text}"
14
+ line + " | ".colorize(LINENUM_COLOR) + text
13
15
  end
14
16
  end
15
17
  end
@@ -1,3 +1,3 @@
1
1
  module HttpFind
2
- VERSION = "0.1.1"
2
+ VERSION = "0.1.3"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: http_find
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.1.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Nicholas Scheurich