progress_bar 1.0.0 → 1.0.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: 539f2c8c964f499f6c33cc125567cb718d667092
4
+ data.tar.gz: 498840c84fce2af2c9dcb08cfb1ba00bc81e94fe
5
+ SHA512:
6
+ metadata.gz: 0154bcf069ac2013326e46b6d1dff3864727e856d4177d057daa292a34b18859ade048776084485a0d913b3862f3eca5e2536d9aaf7139aa0008bcd832f042be
7
+ data.tar.gz: 259ad893bd1923d0553fbd70a71480139ddde828d7b75c6cbf73329386c4e62dccca2e66125e31ace43cfcb67fb6b9195a77446e609530b4a40aa61c85a9f616
data/.travis.yml CHANGED
@@ -2,8 +2,15 @@ script: rake spec
2
2
  rvm:
3
3
  - 1.9.3
4
4
  - 2.0.0
5
+ - 2.1.2
5
6
  - ruby-head
6
7
  - jruby-19mode
7
8
  - jruby-head
8
- - rbx-19mode
9
+ - rbx-2
9
10
 
11
+ matrix:
12
+ allow_failures:
13
+ - rvm:
14
+ - rbx-2.1.1
15
+ - jruby-head
16
+ - ruby-head
data/README.mkd CHANGED
@@ -1,11 +1,15 @@
1
-
2
1
  # ProgressBar
3
2
 
3
+ [![Build Status](https://travis-ci.org/paul/progress_bar.png?branch=master)](https://travis-ci.org/paul/progress_bar)
4
+
4
5
  *ProgressBar* is a simple Ruby library for displaying progress of
5
6
  long-running tasks on the console. It is intended to be as simple to use
6
7
  as possible.
7
8
 
8
- [![Build Status](https://travis-ci.org/paul/progress_bar.png?branch=master)](https://travis-ci.org/paul/progress_bar)
9
+ **NOTE:** This project isn't dead! It's just feature complete, and I don't want
10
+ to keep adding things to it. If you find bugs, please open an Issue, or even
11
+ better, a Pull Request, and I'll take a look. We at ProgressBar know you have
12
+ lots of progress bar alternatives, and we thank you for using ProgressBar!
9
13
 
10
14
 
11
15
  # Installation
@@ -72,9 +76,10 @@ pass them to the constructor:
72
76
 
73
77
  Run the tests to see examples of all the formats, with different values
74
78
  and maximums.
75
-
76
- `rspec test/*_test.rb`
77
-
79
+ ```
80
+ gem install --development progress_bar
81
+ rspec spec/*_spec.rb
82
+ ```
78
83
 
79
84
 
80
85
 
data/lib/progress_bar.rb CHANGED
@@ -15,15 +15,15 @@ class ProgressBar
15
15
  @max = args.shift if args.first.is_a? Numeric
16
16
  @meters = args unless args.empty?
17
17
 
18
- @last_write = Time.at(0)
19
- @start = Time.now
18
+ @last_write = ::Time.at(0)
19
+ @start = ::Time.now
20
20
 
21
21
  @hl = HighLine.new
22
22
  end
23
23
 
24
24
  def increment!(count = 1)
25
25
  self.count += count
26
- now = Time.now
26
+ now = ::Time.now
27
27
  if (now - @last_write) > 0.2 || self.count >= max
28
28
  write
29
29
  @last_write = now
@@ -48,7 +48,7 @@ class ProgressBar
48
48
  end
49
49
 
50
50
  def elapsed
51
- Time.now - @start
51
+ ::Time.now - @start
52
52
  end
53
53
 
54
54
  def rate
@@ -123,8 +123,8 @@ class ProgressBar
123
123
 
124
124
  def terminal_width
125
125
  # HighLine check takes a long time, so only update width every second.
126
- if @last_width_adjustment.nil? || Time.now - @last_width_adjustment > 1
127
- @last_width_adjustment = Time.now
126
+ if @last_width_adjustment.nil? || ::Time.now - @last_width_adjustment > 1
127
+ @last_width_adjustment = ::Time.now
128
128
  @terminal_width = @hl.output_cols.to_i
129
129
  if @terminal_width < 1
130
130
  @terminal_width = 80
@@ -1,3 +1,3 @@
1
1
  class ProgressBar
2
- VERSION = "1.0.0"
2
+ VERSION = "1.0.1"
3
3
  end
metadata CHANGED
@@ -1,107 +1,96 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: progress_bar
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0
5
- prerelease:
4
+ version: 1.0.1
6
5
  platform: ruby
7
6
  authors:
8
7
  - Paul Sadauskas
9
8
  autorequire:
10
9
  bindir: bin
11
10
  cert_chain: []
12
- date: 2013-03-15 00:00:00.000000000 Z
11
+ date: 2014-06-05 00:00:00.000000000 Z
13
12
  dependencies:
14
13
  - !ruby/object:Gem::Dependency
15
14
  name: options
16
15
  requirement: !ruby/object:Gem::Requirement
17
- none: false
18
16
  requirements:
19
- - - ~>
17
+ - - "~>"
20
18
  - !ruby/object:Gem::Version
21
19
  version: 2.3.0
22
20
  type: :runtime
23
21
  prerelease: false
24
22
  version_requirements: !ruby/object:Gem::Requirement
25
- none: false
26
23
  requirements:
27
- - - ~>
24
+ - - "~>"
28
25
  - !ruby/object:Gem::Version
29
26
  version: 2.3.0
30
27
  - !ruby/object:Gem::Dependency
31
28
  name: highline
32
29
  requirement: !ruby/object:Gem::Requirement
33
- none: false
34
30
  requirements:
35
- - - ~>
31
+ - - "~>"
36
32
  - !ruby/object:Gem::Version
37
33
  version: 1.6.1
38
34
  type: :runtime
39
35
  prerelease: false
40
36
  version_requirements: !ruby/object:Gem::Requirement
41
- none: false
42
37
  requirements:
43
- - - ~>
38
+ - - "~>"
44
39
  - !ruby/object:Gem::Version
45
40
  version: 1.6.1
46
41
  - !ruby/object:Gem::Dependency
47
42
  name: rake
48
43
  requirement: !ruby/object:Gem::Requirement
49
- none: false
50
44
  requirements:
51
- - - ! '>='
45
+ - - ">="
52
46
  - !ruby/object:Gem::Version
53
47
  version: '0'
54
48
  type: :development
55
49
  prerelease: false
56
50
  version_requirements: !ruby/object:Gem::Requirement
57
- none: false
58
51
  requirements:
59
- - - ! '>='
52
+ - - ">="
60
53
  - !ruby/object:Gem::Version
61
54
  version: '0'
62
55
  - !ruby/object:Gem::Dependency
63
56
  name: rspec
64
57
  requirement: !ruby/object:Gem::Requirement
65
- none: false
66
58
  requirements:
67
- - - ! '>='
59
+ - - ">="
68
60
  - !ruby/object:Gem::Version
69
61
  version: '0'
70
62
  type: :development
71
63
  prerelease: false
72
64
  version_requirements: !ruby/object:Gem::Requirement
73
- none: false
74
65
  requirements:
75
- - - ! '>='
66
+ - - ">="
76
67
  - !ruby/object:Gem::Version
77
68
  version: '0'
78
69
  - !ruby/object:Gem::Dependency
79
70
  name: timecop
80
71
  requirement: !ruby/object:Gem::Requirement
81
- none: false
82
72
  requirements:
83
- - - ! '>='
73
+ - - ">="
84
74
  - !ruby/object:Gem::Version
85
75
  version: '0'
86
76
  type: :development
87
77
  prerelease: false
88
78
  version_requirements: !ruby/object:Gem::Requirement
89
- none: false
90
79
  requirements:
91
- - - ! '>='
80
+ - - ">="
92
81
  - !ruby/object:Gem::Version
93
82
  version: '0'
94
- description: ! 'Give people feedback about long-running tasks without overloading
95
- them with information: Use a progress bar, like Curl or Wget!'
83
+ description: 'Give people feedback about long-running tasks without overloading them
84
+ with information: Use a progress bar, like Curl or Wget!'
96
85
  email:
97
86
  - psadauskas@gmail.com
98
87
  executables: []
99
88
  extensions: []
100
89
  extra_rdoc_files: []
101
90
  files:
102
- - .gitignore
103
- - .rspec
104
- - .travis.yml
91
+ - ".gitignore"
92
+ - ".rspec"
93
+ - ".travis.yml"
105
94
  - Gemfile
106
95
  - LICENSE
107
96
  - README.mkd
@@ -125,33 +114,26 @@ files:
125
114
  - spec/spec_helper.rb
126
115
  homepage: http://www.github.com/paul/progress_bar
127
116
  licenses: []
117
+ metadata: {}
128
118
  post_install_message:
129
119
  rdoc_options: []
130
120
  require_paths:
131
121
  - lib
132
122
  required_ruby_version: !ruby/object:Gem::Requirement
133
- none: false
134
123
  requirements:
135
- - - ! '>='
124
+ - - ">="
136
125
  - !ruby/object:Gem::Version
137
126
  version: '0'
138
- segments:
139
- - 0
140
- hash: -4355563269462453542
141
127
  required_rubygems_version: !ruby/object:Gem::Requirement
142
- none: false
143
128
  requirements:
144
- - - ! '>='
129
+ - - ">="
145
130
  - !ruby/object:Gem::Version
146
131
  version: '0'
147
- segments:
148
- - 0
149
- hash: -4355563269462453542
150
132
  requirements: []
151
133
  rubyforge_project: progress_bar
152
- rubygems_version: 1.8.25
134
+ rubygems_version: 2.2.2
153
135
  signing_key:
154
- specification_version: 3
136
+ specification_version: 4
155
137
  summary: Simple Progress Bar for output to a terminal
156
138
  test_files:
157
139
  - spec/arguments_spec.rb