wpm 0.1.1 → 0.1.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
  SHA256:
3
- metadata.gz: 4cc3c4877fb13c8efb66e4c318d5abb2a9fccc2b131e39da402d387be81e0018
4
- data.tar.gz: 48cc76b43407e2c7853cea45fa365744bd9a2b36161a9f5de045e8b2145382b4
3
+ metadata.gz: 158a929f6f3f743e3cc9c9076051602f01c9f21f26d735b211c0f284ab3b73d8
4
+ data.tar.gz: ead5d4376702e5c97d1a0692aab75e77e1d82937b11998cf0c4e9b457a7a39cd
5
5
  SHA512:
6
- metadata.gz: 5af70b6da9e4caf524ba7fe38120a36a63694314caf7f428f61f7a2665c00ea9b04248ea3418db3e129687d494ca58d254a067782ef186c9d97f198061a3c481
7
- data.tar.gz: 280817de709846f9b27483b4e0fc95483aee28f4ca8a12c4a950810a0e7639112937a16c54e3d8deb69df5e1e7203e802accea08b718f123053593a14bb07540
6
+ metadata.gz: 4c93099c3bbb63f542d900915ca112942be120f0b354e47d2b5ef9cb5550fee5916abd023e07ed17a9878c2131f6fb40dcebdfdc2a5ed28724242d58c94247a3
7
+ data.tar.gz: 317d4a8c2296efa8b6056d43231eff1487da0ca0883047cc0ec1c301d0543495c19dbd0f7b38aee3a0f43abc9891b195236ddfcb96567c1e2bdff7d3e42bbb5c
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- wpm (0.1.1)
4
+ wpm (0.1.2)
5
5
 
6
6
  GEM
7
7
  remote: https://rubygems.org/
data/lib/wpm.rb CHANGED
@@ -52,13 +52,13 @@ module WPM
52
52
 
53
53
  def help
54
54
  puts <<~eof
55
- Usage: wpm
55
+ Usage: wpm [options]
56
56
 
57
57
  Options:
58
- -h: show this message
59
- -s: print stats
60
- -l: message length [1: short, 2: medium, 3: long]
61
- -q: print quotes.yml path
58
+ -h show this message
59
+ -s print stats
60
+ -l [length] maximum string length
61
+ -q print quotes.yml path
62
62
  eof
63
63
  exit
64
64
  end
@@ -89,8 +89,8 @@ module WPM
89
89
  def stats
90
90
  str=File.open(wpm_file).read
91
91
  scores=str.split(" ").map(&:to_i).select.with_index{|e,i| i.odd?}
92
- puts "Number of races: #{str.count("\n")}"
93
- puts "Average speed: #{scores.average}WPM"
92
+ printf "%-20s %s", "Number of races:", "#{str.count("\n")}\n"
93
+ printf "%-20s %s", "Average speed (WPM):", "#{scores.average}\n"
94
94
  end
95
95
 
96
96
  def time
data/lib/wpm/quotes.yml CHANGED
@@ -1,3 +1,6 @@
1
- - "Do nothing out of selfish ambition or vain conceit, but in humility consider others better than yourselves. - philippians 2:3"
2
- - "It's a funny thing, but people mostly have it backward. They think they live by what they want. But really, what guides them is what they're afraid of. What they don't want. - khaled hosseini typeracer"
3
- - "roses are red, violets are blue"
1
+ - "Do nothing out of selfish ambition or vain conceit, but in humility consider others better than yourselves"
2
+ - "It's a funny thing, but people mostly have it backward. They think they live by what they want. But really, what guides them is what they're afraid of. What they don't want"
3
+ - "Roses are red, violets are blue"
4
+ - "The best way to learn programming is by reading open source code"
5
+ - "Emacs is a nice operating system, but I prefer UNIX"
6
+ - "Real programmers can write assembly code in any language"
data/lib/wpm/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module WPM
2
- VERSION = "0.1.1"
2
+ VERSION = "0.1.2"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: wpm
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - sergioro