geek_typist 0.0.2 → 0.0.3
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.
- data/VERSION +1 -1
- data/bin/{geek_typist.rb → geek_typist} +10 -1
- metadata +6 -6
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.0.
|
1
|
+
0.0.3
|
@@ -21,6 +21,10 @@ opts.on("-n NUM", "--n-times NUM", "repeat the text NUM times") do |v|
|
|
21
21
|
options[:repeat] = v
|
22
22
|
end
|
23
23
|
|
24
|
+
opts.on("-r", "--randomize", "Randomize the content for more fun!") do |v|
|
25
|
+
options[:randomize] = 1
|
26
|
+
end
|
27
|
+
|
24
28
|
end.parse!
|
25
29
|
|
26
30
|
if options[:use_text]
|
@@ -35,8 +39,13 @@ else
|
|
35
39
|
n_times = 1
|
36
40
|
end
|
37
41
|
|
42
|
+
chain = (str_test.to_s * n_times).split("")
|
43
|
+
if options[:randomize]
|
44
|
+
chain = chain.sort_by{ rand }
|
45
|
+
end
|
46
|
+
|
38
47
|
failures = 0
|
39
|
-
|
48
|
+
chain.each do |s|
|
40
49
|
|
41
50
|
c = 0
|
42
51
|
while (c != s[0]) do
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: geek_typist
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 25
|
5
5
|
prerelease:
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 0
|
9
|
-
-
|
10
|
-
version: 0.0.
|
9
|
+
- 3
|
10
|
+
version: 0.0.3
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Caccinolo Benoit
|
@@ -15,7 +15,7 @@ autorequire:
|
|
15
15
|
bindir: bin
|
16
16
|
cert_chain: []
|
17
17
|
|
18
|
-
date: 2011-08-
|
18
|
+
date: 2011-08-31 00:00:00 Z
|
19
19
|
dependencies:
|
20
20
|
- !ruby/object:Gem::Dependency
|
21
21
|
prerelease: false
|
@@ -80,7 +80,7 @@ dependencies:
|
|
80
80
|
description: a typist tool for geeks in the console
|
81
81
|
email: benoit.caccinolo@gmail.com
|
82
82
|
executables:
|
83
|
-
- geek_typist
|
83
|
+
- geek_typist
|
84
84
|
extensions: []
|
85
85
|
|
86
86
|
extra_rdoc_files:
|
@@ -94,7 +94,7 @@ files:
|
|
94
94
|
- README.rdoc
|
95
95
|
- Rakefile
|
96
96
|
- VERSION
|
97
|
-
- bin/geek_typist
|
97
|
+
- bin/geek_typist
|
98
98
|
- lib/geek_typist.rb
|
99
99
|
- test/helper.rb
|
100
100
|
- test/test_geek_typist.rb
|