ssoroka-ansi 1.0.0 → 1.0.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (5) hide show
  1. data/README.rdoc +14 -12
  2. data/Rakefile +1 -1
  3. data/ansi.gemspec +1 -1
  4. data/init.rb +1 -0
  5. metadata +1 -1
data/README.rdoc CHANGED
@@ -14,23 +14,25 @@ as a plugin:
14
14
 
15
15
  == USAGE
16
16
 
17
+ require 'ansi' # if not installed as a plugin.
18
+
17
19
  1) Simply control the cursor:
18
- >> puts "HELLO" + ANSI.right(30) + "THERE!"
19
- HELLO THERE!
20
+ >> puts "HELLO" + ANSI.right(30) + "THERE!"
21
+ HELLO THERE!
20
22
 
21
23
  2) use colors:
22
24
 
23
- >> puts ANSI.color(:red) { "hello there" }
24
- >> puts ANSI.color(:green) + "Everything is green now" + ANSI.no_color
25
+ >> puts ANSI.color(:red) { "hello there" }
26
+ >> puts ANSI.color(:green) + "Everything is green now" + ANSI.no_color
25
27
 
26
28
  3) loops:
27
29
 
28
- printf ANSI.clear_screen
29
- puts "Processing users..."
30
- max = User.count
31
- User.all.each_with_index {|user, index|
32
- user.update_something!
33
- printf ANSI.left(50) + "Processed #{index}/#{max} users..."
34
- }
35
- puts " done!"
30
+ printf ANSI.clear_screen
31
+ puts "Processing users..."
32
+ max = User.count
33
+ User.all.each_with_index {|user, index|
34
+ user.update_something!
35
+ printf ANSI.left(50) + "Processed #{index}/#{max} users..."
36
+ }
37
+ puts " done!"
36
38
 
data/Rakefile CHANGED
@@ -2,7 +2,7 @@ require 'rubygems'
2
2
  require 'rake'
3
3
  require 'echoe'
4
4
 
5
- Echoe.new('ansi', '1.0.0') do |p|
5
+ Echoe.new('ansi', '1.0.1') do |p|
6
6
  p.description = 'Use ANSI codes in printed output, including colors and controlling the cursor, clearing the line, and clearing the screen.'
7
7
  p.url = 'http://github.com/ssoroka/ansi'
8
8
  p.author = 'Steven Soroka'
data/ansi.gemspec CHANGED
@@ -1,6 +1,6 @@
1
1
  Gem::Specification.new do |s|
2
2
  s.name = %q{ansi}
3
- s.version = "1.0.0"
3
+ s.version = "1.0.1"
4
4
 
5
5
  s.required_rubygems_version = Gem::Requirement.new(">= 1.2") if s.respond_to? :required_rubygems_version=
6
6
  s.authors = ["Steven Soroka"]
data/init.rb ADDED
@@ -0,0 +1 @@
1
+ require File.dirname(__FILE__) + '/lib/ansi'
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ssoroka-ansi
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0
4
+ version: 1.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Steven Soroka