progress-bar 0.3.6 → 0.3.7
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.
- checksums.yaml +4 -4
- data/VERSION +1 -1
- data/lib/progress-bar.rb +4 -2
- data/progress-bar.gemspec +2 -2
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 67db22370ee46bd79b0397d0d2bc97fad6cc0ec2
|
4
|
+
data.tar.gz: 8253f8eceaac27970c3461f4552c178c07ba4903
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d87c0922a23b65462ef863000c52a115ded381f2f2753547106b0bcf356104c8b43fdf8549c8fcdfc4473273aa805a456f8a041a9ec906c8a93e0fa26fd58681
|
7
|
+
data.tar.gz: e5eeff9d0f908222cd9d217605896f4c33a1d5c059c2913f8a47e92213ded8d9fc07aba283127cbb8d3aa492f956ef14a9266504af96cd93069d85253af4fcd4
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.3.
|
1
|
+
0.3.7
|
data/lib/progress-bar.rb
CHANGED
@@ -17,6 +17,7 @@ class ProgressBar::Base
|
|
17
17
|
attr_accessor :start
|
18
18
|
def initialize max = nil, text = nil
|
19
19
|
@start, @max, @i, @text, @error = Time.now, max || 100, 0, text || '', nil
|
20
|
+
at_exit {finish}
|
20
21
|
end
|
21
22
|
|
22
23
|
def i= x
|
@@ -90,12 +91,13 @@ end
|
|
90
91
|
|
91
92
|
class ProgressBar::KDialog < ProgressBar::Base
|
92
93
|
attr_reader :dialog_service_path, :dialog_object_path, :errors, :dialog_object
|
93
|
-
def initialize max, text = nil
|
94
|
+
def initialize max, text = nil, title = nil
|
94
95
|
super max, text
|
95
96
|
text = @text
|
96
97
|
text = nil if text.nil? or text.empty?
|
98
|
+
title = nil if title.nil? or title.empty?
|
97
99
|
@errors = []
|
98
|
-
args =
|
100
|
+
args = ['kdialog', *(title ? ['--title', title] : []), '--progressbar', text || '.', max.to_s]
|
99
101
|
@dialog_service_path, @dialog_object_path = IO.popen( args, 'r', &:readlines).join("\n").split ' '
|
100
102
|
@dialog_bus = DBus.session_bus
|
101
103
|
@dialog_service = @dialog_bus[@dialog_service_path]
|
data/progress-bar.gemspec
CHANGED
@@ -5,11 +5,11 @@
|
|
5
5
|
|
6
6
|
Gem::Specification.new do |s|
|
7
7
|
s.name = "progress-bar"
|
8
|
-
s.version = "0.3.
|
8
|
+
s.version = "0.3.7"
|
9
9
|
|
10
10
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
11
|
s.authors = ["Denis Knauf"]
|
12
|
-
s.date = "2014-12-
|
12
|
+
s.date = "2014-12-24"
|
13
13
|
s.description = "Displays a Progress Bar in terminal or via kdialog"
|
14
14
|
s.email = "\#{\"de\"}nis@denkn.at"
|
15
15
|
s.extra_rdoc_files = [
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: progress-bar
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.3.
|
4
|
+
version: 0.3.7
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Denis Knauf
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-12-
|
11
|
+
date: 2014-12-24 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: ruby-dbus
|