progress 0.0.8 → 0.0.8.1

Sign up to get free protection for your applications and to get access to all the features.
data/Manifest CHANGED
@@ -12,3 +12,4 @@ spec/progress_spec.rb
12
12
  spec/spec.opts
13
13
  spec/spec_helper.rb
14
14
  tasks/rspec.rake
15
+ VERSION.yml
data/Rakefile CHANGED
@@ -9,9 +9,16 @@ load 'tasks/rspec.rake'
9
9
  task :default => :spec
10
10
  task :test
11
11
 
12
- require File.dirname(__FILE__) + '/lib/progress'
12
+ version = YAML.load_file(File.join(File.dirname(__FILE__), 'VERSION.yml')).join('.') rescue nil
13
13
 
14
- Echoe.new('progress', Progress::VERSION) do |p|
14
+ echoe = Echoe.new('progress', version) do |p|
15
15
  p.author = "toy"
16
16
  p.summary = "A library to show progress of long running tasks."
17
17
  end
18
+
19
+ desc "Replace system gem with symlink to this folder"
20
+ task 'ghost' do
21
+ path = Gem.searcher.find(echoe.name).full_gem_path
22
+ system 'sudo', 'rm', '-r', path
23
+ symlink File.expand_path('.'), path
24
+ end
data/VERSION.yml ADDED
@@ -0,0 +1 @@
1
+ [0, 0, 8, 1]
data/lib/progress.rb CHANGED
@@ -4,8 +4,6 @@ $:.unshift(File.dirname(__FILE__)) unless
4
4
  require 'singleton'
5
5
 
6
6
  class Progress
7
- VERSION = '0.0.8'
8
-
9
7
  include Singleton
10
8
 
11
9
  # start progress indication
@@ -106,7 +104,7 @@ protected
106
104
  @io ||= $stderr
107
105
  @io.sync = true
108
106
  if @io.tty? && !levels.any?{ |level| level.options[:lines] }
109
- @io.print "\r" + message.ljust(@previous_length || 0).gsub(/\d+\.\d+/){ |s| s == '100.0' ? s : "\e[1m#{s}\e[0m" }
107
+ @io.print message.ljust(@previous_length || 0).gsub(/\d+\.\d+/){ |s| s == '100.0' ? s : "\e[1m#{s}\e[0m" } + "\r"
110
108
  @previous_length = message.length
111
109
  else
112
110
  @io.puts message
data/progress.gemspec CHANGED
@@ -2,15 +2,15 @@
2
2
 
3
3
  Gem::Specification.new do |s|
4
4
  s.name = %q{progress}
5
- s.version = "0.0.8"
5
+ s.version = "0.0.8.1"
6
6
 
7
7
  s.required_rubygems_version = Gem::Requirement.new(">= 1.2") if s.respond_to? :required_rubygems_version=
8
8
  s.authors = ["toy"]
9
- s.date = %q{2009-04-27}
9
+ s.date = %q{2009-05-02}
10
10
  s.description = %q{A library to show progress of long running tasks.}
11
11
  s.email = %q{}
12
12
  s.extra_rdoc_files = ["CHANGELOG", "lib/progress/enumerable.rb", "lib/progress/integer.rb", "lib/progress.rb", "README.rdoc", "tasks/rspec.rake"]
13
- s.files = ["CHANGELOG", "lib/progress/enumerable.rb", "lib/progress/integer.rb", "lib/progress.rb", "Manifest", "Rakefile", "README.rdoc", "script/console", "script/destroy", "script/generate", "spec/progress_spec.rb", "spec/spec.opts", "spec/spec_helper.rb", "tasks/rspec.rake", "progress.gemspec"]
13
+ s.files = ["CHANGELOG", "lib/progress/enumerable.rb", "lib/progress/integer.rb", "lib/progress.rb", "Manifest", "Rakefile", "README.rdoc", "script/console", "script/destroy", "script/generate", "spec/progress_spec.rb", "spec/spec.opts", "spec/spec_helper.rb", "tasks/rspec.rake", "VERSION.yml", "progress.gemspec"]
14
14
  s.has_rdoc = true
15
15
  s.homepage = %q{}
16
16
  s.rdoc_options = ["--line-numbers", "--inline-source", "--title", "Progress", "--main", "README.rdoc"]
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: progress
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.8
4
+ version: 0.0.8.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - toy
@@ -9,7 +9,7 @@ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
 
12
- date: 2009-04-27 00:00:00 +04:00
12
+ date: 2009-05-02 00:00:00 +04:00
13
13
  default_executable:
14
14
  dependencies: []
15
15
 
@@ -41,6 +41,7 @@ files:
41
41
  - spec/spec.opts
42
42
  - spec/spec_helper.rb
43
43
  - tasks/rspec.rake
44
+ - VERSION.yml
44
45
  - progress.gemspec
45
46
  has_rdoc: true
46
47
  homepage: ""