progress-bar 0.3.5 → 0.3.6

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: c3b7c6721e0e0e88a6e37ff9125fe9db59e329df
4
- data.tar.gz: c0d82981909f5f1540fda7dcff7f883a0b674204
3
+ metadata.gz: 9bea79440728cd1a4a6bb6b68fb9c1fe143c514e
4
+ data.tar.gz: 05a736cfdde2beff140402225001556afb133db3
5
5
  SHA512:
6
- metadata.gz: b37eb6034636b3ac7943b2930f60b7e8945ab2c3000054713f50be819a0a953108f4635a5c4ff8412cca8daccceafef9e2dbd7e12aa0bda627bcc5df332cbf26
7
- data.tar.gz: a0e36f06634215dcf9c238117815dcd64dff9c1ffbd739d5bfebb902a7be7b7709c600552c074adc95fba9edb59bc4b1182990a6414c8159c1ac0048d67dbfe7
6
+ metadata.gz: 3a6054ba33e0e57c9327b691bd5ed6682f8459dc7ccc6793038e64b97854e9f5f62900d77675703af04e5c3eca26ab3ca754f6ce7cd4fc94dd988165b53a3692
7
+ data.tar.gz: 9a251ee4db21c560f52123eb29f2b82dc7ac2eaff8395a2e58735017f5b1348ff05036a745be94e96810ff0c6b53fb256a325597d5758ac4d6cee54229fac82d
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.3.5
1
+ 0.3.6
data/lib/progress-bar.rb CHANGED
@@ -90,16 +90,19 @@ end
90
90
 
91
91
  class ProgressBar::KDialog < ProgressBar::Base
92
92
  attr_reader :dialog_service_path, :dialog_object_path, :errors, :dialog_object
93
- def initialize max, text
93
+ def initialize max, text = nil
94
94
  super max, text
95
+ text = @text
96
+ text = nil if text.nil? or text.empty?
95
97
  @errors = []
96
- args = %w[kdialog --progressbar] + [text, max.to_s]
98
+ args = %w[kdialog --progressbar] + [text || '.', max.to_s]
97
99
  @dialog_service_path, @dialog_object_path = IO.popen( args, 'r', &:readlines).join("\n").split ' '
98
100
  @dialog_bus = DBus.session_bus
99
101
  @dialog_service = @dialog_bus[@dialog_service_path]
100
102
  @dialog_object = @dialog_service.object @dialog_object_path
101
103
  @dialog_object.introspect
102
104
  @dialog_object.showCancelButton true
105
+ change_text if text.nil?
103
106
  change_progress
104
107
  rescue DBus::Error
105
108
  raise Interrupt if $!.name == 'org.freedesktop.DBus.Error.ServiceUnknown'
data/progress-bar.gemspec CHANGED
@@ -5,7 +5,7 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = "progress-bar"
8
- s.version = "0.3.5"
8
+ s.version = "0.3.6"
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"]
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: progress-bar
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.5
4
+ version: 0.3.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Denis Knauf