console_progress_bar 0.0.3 → 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/lib/console_progress_bar.rb +12 -0
- data/lib/console_progress_bar/counter.rb +3 -3
- data/lib/console_progress_bar/version.rb +1 -1
- metadata +49 -61
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: '080ae1c7c6cba7f7271f373667ee6720f6b7052e'
|
4
|
+
data.tar.gz: ea37b74623cb948a6cf03a3b1540baa457a35c6c
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 3d693e1cc61d876e58d9d9428633408c065001a2204abdbe5526bce287ef2cc10493f571d2d235ca940448cad7315822f974fc77ccec7be07956d6bf48ee5505
|
7
|
+
data.tar.gz: 7e21f7f1b925fa093a9dc797155c96e86363a850a6cb594bcee8ec259a6f45266afbee8c30c600572d97a3e90e9b7a8ec3e9cf6a53bb1a5c470c1d78b30ad977
|
data/lib/console_progress_bar.rb
CHANGED
@@ -9,6 +9,18 @@ module ConsoleProgressBar
|
|
9
9
|
|
10
10
|
class ProgressBar
|
11
11
|
|
12
|
+
def self.counter(options = {})
|
13
|
+
new.counter(options)
|
14
|
+
end
|
15
|
+
|
16
|
+
def self.animator(options = {})
|
17
|
+
new.animator(options)
|
18
|
+
end
|
19
|
+
|
20
|
+
def self.bar(options = {})
|
21
|
+
new.bar(options)
|
22
|
+
end
|
23
|
+
|
12
24
|
def counter(options = {})
|
13
25
|
init_options(options)
|
14
26
|
ConsoleProgressBar::Counter.new(@total, @with_elapsed_time, @with_remaining_time, @increment_size)
|
@@ -17,8 +17,8 @@ module ConsoleProgressBar
|
|
17
17
|
@output_length = 0
|
18
18
|
end
|
19
19
|
|
20
|
-
def increase
|
21
|
-
@current += @increment_size
|
20
|
+
def increase(by = nil)
|
21
|
+
@current += (by || @increment_size)
|
22
22
|
if @current >= @total
|
23
23
|
finished
|
24
24
|
else
|
@@ -40,4 +40,4 @@ module ConsoleProgressBar
|
|
40
40
|
|
41
41
|
end
|
42
42
|
|
43
|
-
end
|
43
|
+
end
|
metadata
CHANGED
@@ -1,58 +1,51 @@
|
|
1
|
-
--- !ruby/object:Gem::Specification
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
2
|
name: console_progress_bar
|
3
|
-
version: !ruby/object:Gem::Version
|
4
|
-
|
5
|
-
segments:
|
6
|
-
- 0
|
7
|
-
- 0
|
8
|
-
- 3
|
9
|
-
version: 0.0.3
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.1.0
|
10
5
|
platform: ruby
|
11
|
-
authors:
|
12
|
-
-
|
6
|
+
authors:
|
7
|
+
- Mehmet Emin İNAÇ
|
13
8
|
autorequire:
|
14
9
|
bindir: bin
|
15
10
|
cert_chain: []
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
dependencies:
|
20
|
-
- !ruby/object:Gem::Dependency
|
11
|
+
date: 2017-03-02 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
21
14
|
name: bundler
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
segments:
|
28
|
-
- 1
|
29
|
-
- 3
|
30
|
-
version: "1.3"
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - "~>"
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: '1.3'
|
31
20
|
type: :development
|
32
|
-
version_requirements: *id001
|
33
|
-
- !ruby/object:Gem::Dependency
|
34
|
-
name: rake
|
35
21
|
prerelease: false
|
36
|
-
|
37
|
-
requirements:
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - "~>"
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: '1.3'
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: rake
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
38
31
|
- - ">="
|
39
|
-
- !ruby/object:Gem::Version
|
40
|
-
|
41
|
-
- 0
|
42
|
-
version: "0"
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: '0'
|
43
34
|
type: :development
|
44
|
-
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - ">="
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: '0'
|
45
41
|
description: useful progress bar gem for console usage
|
46
|
-
email:
|
42
|
+
email:
|
47
43
|
- mehmetemininac@gmail.com
|
48
44
|
executables: []
|
49
|
-
|
50
45
|
extensions: []
|
51
|
-
|
52
46
|
extra_rdoc_files: []
|
53
|
-
|
54
|
-
|
55
|
-
- .gitignore
|
47
|
+
files:
|
48
|
+
- ".gitignore"
|
56
49
|
- Gemfile
|
57
50
|
- LICENSE.txt
|
58
51
|
- README.md
|
@@ -65,35 +58,30 @@ files:
|
|
65
58
|
- lib/console_progress_bar/extras.rb
|
66
59
|
- lib/console_progress_bar/print_tools.rb
|
67
60
|
- lib/console_progress_bar/version.rb
|
68
|
-
has_rdoc: true
|
69
61
|
homepage: http://github.com/meinac/progressbar
|
70
|
-
licenses:
|
62
|
+
licenses:
|
71
63
|
- MIT
|
64
|
+
metadata: {}
|
72
65
|
post_install_message:
|
73
66
|
rdoc_options: []
|
74
|
-
|
75
|
-
require_paths:
|
67
|
+
require_paths:
|
76
68
|
- lib
|
77
|
-
required_ruby_version: !ruby/object:Gem::Requirement
|
78
|
-
requirements:
|
69
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
70
|
+
requirements:
|
79
71
|
- - ">="
|
80
|
-
- !ruby/object:Gem::Version
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
required_rubygems_version: !ruby/object:Gem::Requirement
|
85
|
-
requirements:
|
72
|
+
- !ruby/object:Gem::Version
|
73
|
+
version: '0'
|
74
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
75
|
+
requirements:
|
86
76
|
- - ">="
|
87
|
-
- !ruby/object:Gem::Version
|
88
|
-
|
89
|
-
- 0
|
90
|
-
version: "0"
|
77
|
+
- !ruby/object:Gem::Version
|
78
|
+
version: '0'
|
91
79
|
requirements: []
|
92
|
-
|
93
80
|
rubyforge_project:
|
94
|
-
rubygems_version:
|
81
|
+
rubygems_version: 2.6.8
|
95
82
|
signing_key:
|
96
|
-
specification_version:
|
97
|
-
summary: Progress bar implementation for console scripts which you can show elapsed
|
83
|
+
specification_version: 4
|
84
|
+
summary: Progress bar implementation for console scripts which you can show elapsed
|
85
|
+
time and remaining time with animation or progressbar or current percent of total
|
86
|
+
transactions
|
98
87
|
test_files: []
|
99
|
-
|