rainbow_say 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/bin/rainbow_say CHANGED
@@ -2,7 +2,13 @@
2
2
  STDOUT.sync = true
3
3
  trap("SIGINT") { exit! }
4
4
 
5
- if !(say = ARGV.join(" ")).empty?
5
+ say = if ARGV.any?
6
+ ARGV.join " "
7
+ elsif !(stdin = STDIN.read).empty?
8
+ stdin.chomp
9
+ end
10
+
11
+ if say
6
12
  loop do
7
13
  STDOUT.print "\r\x1b[#{31+($.+=1)%7}m#{say}"
8
14
  STDOUT.print "\e[0m"
@@ -1,3 +1,3 @@
1
1
  module RainbowSay
2
- VERSION = "0.0.2"
2
+ VERSION = "0.0.3"
3
3
  end
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.2
4
+ version: 0.0.3
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -58,7 +58,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
58
58
  version: '0'
59
59
  segments:
60
60
  - 0
61
- hash: -3789179275798799138
61
+ hash: -3434169701580051851
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: -3789179275798799138
70
+ hash: -3434169701580051851
71
71
  requirements: []
72
72
  rubyforge_project:
73
73
  rubygems_version: 1.8.23