rainbow_say 0.0.3 → 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- data/bin/rainbow_say +7 -10
- data/lib/rainbow_say/version.rb +1 -1
- metadata +4 -4
data/bin/rainbow_say
CHANGED
@@ -2,18 +2,15 @@
|
|
2
2
|
STDOUT.sync = true
|
3
3
|
trap("SIGINT") { exit! }
|
4
4
|
|
5
|
-
say
|
6
|
-
|
7
|
-
|
8
|
-
stdin.chomp
|
5
|
+
def say_it(say)
|
6
|
+
STDOUT.print "\r\x1b[#{31+($.+=1)%7}m#{say}"
|
7
|
+
STDOUT.print "\e[0m"
|
9
8
|
end
|
10
9
|
|
11
|
-
if
|
12
|
-
loop
|
13
|
-
|
14
|
-
|
15
|
-
sleep 0.3
|
16
|
-
end
|
10
|
+
if ARGV.any?
|
11
|
+
loop { say_it ARGV.join " "; sleep 0.3 }
|
12
|
+
elsif !STDIN.tty?
|
13
|
+
STDIN.each { |stream| say_it stream }
|
17
14
|
else
|
18
15
|
puts "Usage: rainbow_say <something witty>"
|
19
16
|
end
|
data/lib/rainbow_say/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rainbow_say
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0
|
4
|
+
version: 0.1.0
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2012-10-
|
12
|
+
date: 2012-10-08 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rake
|
@@ -58,7 +58,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
58
58
|
version: '0'
|
59
59
|
segments:
|
60
60
|
- 0
|
61
|
-
hash: -
|
61
|
+
hash: -92738330026517232
|
62
62
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
63
63
|
none: false
|
64
64
|
requirements:
|
@@ -67,7 +67,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
67
67
|
version: '0'
|
68
68
|
segments:
|
69
69
|
- 0
|
70
|
-
hash: -
|
70
|
+
hash: -92738330026517232
|
71
71
|
requirements: []
|
72
72
|
rubyforge_project:
|
73
73
|
rubygems_version: 1.8.23
|