capistrano-karaf 1.2.4 → 1.2.5

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.
Files changed (2) hide show
  1. data/lib/capistrano-karaf.rb +10 -8
  2. metadata +1 -1
@@ -118,12 +118,13 @@ def list_bundles ()
118
118
  break_listing bundle_line_matcher,data
119
119
  end
120
120
 
121
- def wait_for_all_bundles (timeout = 5, sleeptime = 1, &pred)
122
- timeout1 = Time.now + timeout
121
+ def wait_for_all_bundles (args={}, &pred)
122
+ args = {:timeout => 60, :sleeptime => 1}.merge(args)
123
+ timeout = Time.now + args[:timeout]
123
124
 
124
- until Time.now > timeout1 or list_bundles.all? { |b| pred.call b}
125
+ until Time.now > timeout or list_bundles.all? { |b| pred.call b}
125
126
  puts "Some bundles are still failing the predicate"
126
- sleep sleeptime
127
+ sleep args[:sleeptime]
127
128
  end
128
129
  end
129
130
 
@@ -132,12 +133,13 @@ def feature_installed? (name)
132
133
  feature['status']=='installed' unless feature.nil?
133
134
  end
134
135
 
135
- def wait_for_bundle (timeout = 5, sleeptime = 1, &pred)
136
- timeout1 = Time.now + timeout
136
+ def wait_for_bundle (args={}, &pred)
137
+ args = {:timeout => 60, :sleeptime => 1}.merge(args)
138
+ timeout = Time.now + args[:timeout]
137
139
 
138
- while Time.now < timeout1 and list_bundles.none? { |b| pred.call b}
140
+ while Time.now < timeout and list_bundles.none? { |b| pred.call b}
139
141
  puts "Bundle not yet started"
140
- sleep sleeptime
142
+ sleep args[:sleeptime]
141
143
  end
142
144
  end
143
145
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: capistrano-karaf
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.2.4
4
+ version: 1.2.5
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors: