word_counter 0.2.1 → 0.2.2

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: ad4762dc1f1983b67b2402185ce23df5426e3235
4
- data.tar.gz: 49f3dc0d1daa4de2966a90bee9eade7aa0073f63
3
+ metadata.gz: d5ce85b61fc478bd3370f801801bbe0b10cf2dd1
4
+ data.tar.gz: 706ede944d9e83028e26a324814130e7ce7483df
5
5
  SHA512:
6
- metadata.gz: 71af26195753cad0a620098d190da7ee48dffd8e124d2419bab04b2d7052a963af100db7f09f64f345c5d3b37fda601b8eb966672f940ea0c2385b5f8c49eaff
7
- data.tar.gz: a9ab076b9c4533f53d5ade730c13bbbfbba9127c16e19f530070b1a0b09a3e364c464b04c70d7fae58ec9a88cfc4dd9caf52ed23bc0b1b701eb3dc33328d1158
6
+ metadata.gz: aca7fc10e5b601a37cd7219ba93aa6f3b8283ec8e06ce1bf479dba51e0392923be32bd76373978d287d15be676e76258296f121fdabf0f592a5a04a31e403270
7
+ data.tar.gz: a61e8068686b4132b2023e171b14c5b508ad6f94d42c7348fd2b514bf137b1d23abaa7916c99801fb97cf5fc1316e85b0272c69c846ee7b6cb9c1c030f8771e0
data/README.md CHANGED
@@ -24,6 +24,18 @@ Or install it yourself as:
24
24
  To count a website's words:
25
25
 
26
26
  $ word_counter www.example.com
27
+ Results:
28
+ 2 Domain
29
+ 2 Example
30
+ 2 domain
31
+ 2 examples
32
+ 2 for
33
+ 2 in
34
+ 1 More
35
+ 1 This
36
+ 1 You
37
+ 1 asking
38
+ 1 be
27
39
 
28
40
  To count a file's words:
29
41
 
@@ -32,6 +44,17 @@ To count a file's words:
32
44
  Use the `-s` switch to also report which lines contained the counted word (can result in lot of text output, so you might want to pipe it to `less`):
33
45
 
34
46
  $ word_counter www.example.com -s | less
47
+ Results:
48
+ 2 Domain
49
+ 1: Example Domain
50
+ 2 Example
51
+ 1: Example Domain
52
+ 2 domain
53
+ 1: This domain is established to be used for illustrative examples in documents. You may use this
54
+ 2: domain in examples without prior coordination or asking for permission.
55
+ 2 examples
56
+ 1: This domain is established to be used for illustrative examples in documents. You may use this
57
+ 2: domain in examples without prior coordination or asking for permission.
35
58
 
36
59
  ## Roadmap
37
60
 
@@ -1,3 +1,3 @@
1
1
  class WordCounter
2
- VERSION = "0.2.1"
2
+ VERSION = "0.2.2"
3
3
  end
data/lib/word_counter.rb CHANGED
@@ -51,6 +51,7 @@ class WordCounter
51
51
  [-data[:count], word]
52
52
  }
53
53
 
54
+ puts 'Results:'
54
55
  sorted_hash.each do |word, data|
55
56
  puts colorize "#{data[:count]} #{word}"
56
57
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: word_counter
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.1
4
+ version: 0.2.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - trevor bortins