kitchen-openstack 3.5.0 → 3.5.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 7b433d2d0a11684712ba845ba47b696cd2c6fde9
4
- data.tar.gz: e59925c69ddc2d248af40de6d816ab61f3221364
3
+ metadata.gz: 7e7db233a71d287401a7403affdb1d4eee850bf9
4
+ data.tar.gz: d2fb24f0f65476236165f7bbd1dd35feefe404ac
5
5
  SHA512:
6
- metadata.gz: 64d46e0d70d2b65f9e555fb468c31b89ceeff651463204f6f0907686455124da4fdd52a157ba2b9b5379890e9c5c810f0bc6344c7696341ace61e38173ddf87e
7
- data.tar.gz: 93ac9c600b157277deef7a491f5ec00ebc18cb089b7b638f29692f00f0ec79fa963652f41fedc4da419e9d62a88a3e3705e8fbe2ebe5c50070de11405a551bdc
6
+ metadata.gz: ea06e965c4e275d377977ec323a1134957f663192dbf0cfb1caba4733f0f38e0970b070bdfd5fe05858036514f221c4aa1f412847d1fbf47dd81976067ca61de
7
+ data.tar.gz: 84154e6004899ccc99eb8433f7596bcca52b398a046d06c4338275aa03418d7b11aaf6733ff571332fed7a766cf8b2f25b0176c685b2b3a0978ff2bee69e65a4
@@ -1,6 +1,6 @@
1
1
  language: ruby
2
2
  cache: bundler
3
-
3
+ dist: trusty
4
4
  sudo: false
5
5
 
6
6
  gemfile:
@@ -8,5 +8,6 @@ gemfile:
8
8
 
9
9
  rvm:
10
10
  - ruby-head
11
- - 2.3.1
12
- - 2.2.5
11
+ - 2.4.1
12
+ - 2.3.3
13
+ - 2.2.7
@@ -1,7 +1,20 @@
1
1
  # Change Log
2
2
 
3
- ## [v3.5.0](https://github.com/test-kitchen/kitchen-openstack/tree/v3.5.0)
3
+ ## [v3.5.1](https://github.com/test-kitchen/kitchen-openstack/tree/v3.5.1)
4
4
 
5
+ [Full Changelog](https://github.com/test-kitchen/kitchen-openstack/compare/v3.5.0...v3.5.1)
6
+
7
+ **Closed issues:**
8
+
9
+ - block\_device\_mapping crashes on nodename nor servname provided [\#176](https://github.com/test-kitchen/kitchen-openstack/issues/176)
10
+ - Same floating IP to different server [\#175](https://github.com/test-kitchen/kitchen-openstack/issues/175)
11
+ - Cannot create windows machines [\#172](https://github.com/test-kitchen/kitchen-openstack/issues/172)
12
+
13
+ **Merged pull requests:**
14
+
15
+ - Switch from fog to fog-openstack to slim deps and speed runtime [\#174](https://github.com/test-kitchen/kitchen-openstack/pull/174) ([tas50](https://github.com/tas50))
16
+
17
+ ## [v3.5.0](https://github.com/test-kitchen/kitchen-openstack/tree/v3.5.0) (2017-04-12)
5
18
  [Full Changelog](https://github.com/test-kitchen/kitchen-openstack/compare/v3.4.0...v3.5.0)
6
19
 
7
20
  **Merged pull requests:**
data/Gemfile CHANGED
@@ -1,6 +1,6 @@
1
1
  # Encoding: UTF-8
2
2
 
3
- source 'https://rubygems.org'
3
+ source "https://rubygems.org"
4
4
 
5
5
  # Specify your gem's dependencies in kitchen-openstack.gemspec
6
6
  gemspec
data/Rakefile CHANGED
@@ -1,18 +1,19 @@
1
1
  # Encoding: UTF-8
2
2
 
3
- require 'bundler/setup'
4
- require 'bundler/gem_tasks'
5
- require 'rubocop/rake_task'
6
- require 'rspec/core/rake_task'
3
+ require "bundler/setup"
4
+ require "bundler/gem_tasks"
5
+ require "chefstyle"
6
+ require "rubocop/rake_task"
7
+ require "rspec/core/rake_task"
7
8
 
8
9
  RuboCop::RakeTask.new
9
10
 
10
- desc 'Display LOC stats'
11
+ desc "Display LOC stats"
11
12
  task :loc do
12
13
  puts "\n## LOC Stats"
13
- sh 'countloc -r lib/kitchen'
14
+ sh "countloc -r lib/kitchen"
14
15
  end
15
16
 
16
17
  RSpec::Core::RakeTask.new(:spec)
17
18
 
18
- task default: %i(rubocop loc spec)
19
+ task default: %i{rubocop loc spec}
@@ -1,39 +1,39 @@
1
1
  # Encoding: UTF-8
2
2
 
3
- lib = File.expand_path('../lib', __FILE__)
3
+ lib = File.expand_path("../lib", __FILE__)
4
4
  $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
5
- require 'kitchen/driver/openstack_version'
5
+ require "kitchen/driver/openstack_version"
6
6
 
7
7
  Gem::Specification.new do |spec|
8
- spec.name = 'kitchen-openstack'
8
+ spec.name = "kitchen-openstack"
9
9
  spec.version = Kitchen::Driver::OPENSTACK_VERSION
10
- spec.authors = ['Jonathan Hartman', 'JJ Asghar']
11
- spec.email = ['j@p4nt5.com', 'jj@chef.io']
12
- spec.description = 'A Test Kitchen OpenStack Nova driver'
10
+ spec.authors = ["Jonathan Hartman", "JJ Asghar"]
11
+ spec.email = ["j@p4nt5.com", "jj@chef.io"]
12
+ spec.description = "A Test Kitchen OpenStack Nova driver"
13
13
  spec.summary = spec.description
14
- spec.homepage = 'https://github.com/test-kitchen/kitchen-openstack'
15
- spec.license = 'Apache'
14
+ spec.homepage = "https://github.com/test-kitchen/kitchen-openstack"
15
+ spec.license = "Apache"
16
16
 
17
17
  spec.files = `git ls-files`.split($INPUT_RECORD_SEPARATOR)
18
18
  spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
19
19
  spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
20
- spec.require_paths = ['lib']
20
+ spec.require_paths = ["lib"]
21
21
 
22
- spec.required_ruby_version = '>= 2.0.0'
22
+ spec.required_ruby_version = ">= 2.0.0"
23
23
 
24
- spec.add_dependency 'test-kitchen', '~> 1.4', '>= 1.4.1'
25
- spec.add_dependency 'fog', '~> 1.33'
26
- spec.add_dependency 'unf'
27
- spec.add_dependency 'ohai'
24
+ spec.add_dependency "test-kitchen", "~> 1.4", ">= 1.4.1"
25
+ spec.add_dependency "fog-openstack", "~> 0.1"
26
+ spec.add_dependency "unf"
27
+ spec.add_dependency "ohai"
28
28
 
29
- spec.add_development_dependency 'bundler'
30
- spec.add_development_dependency 'rake'
31
- spec.add_development_dependency 'rubocop', '~> 0.36'
32
- spec.add_development_dependency 'cane'
33
- spec.add_development_dependency 'countloc'
34
- spec.add_development_dependency 'rspec'
35
- spec.add_development_dependency 'simplecov'
36
- spec.add_development_dependency 'simplecov-console'
37
- spec.add_development_dependency 'coveralls'
38
- spec.add_development_dependency 'github_changelog_generator'
29
+ spec.add_development_dependency "bundler"
30
+ spec.add_development_dependency "rake"
31
+ spec.add_development_dependency "chefstyle"
32
+ spec.add_development_dependency "cane"
33
+ spec.add_development_dependency "countloc"
34
+ spec.add_development_dependency "rspec"
35
+ spec.add_development_dependency "simplecov"
36
+ spec.add_development_dependency "simplecov-console"
37
+ spec.add_development_dependency "coveralls"
38
+ spec.add_development_dependency "github_changelog_generator"
39
39
  end
@@ -19,16 +19,15 @@
19
19
  # See the License for the specific language governing permissions and
20
20
  # limitations under the License.
21
21
 
22
- require 'kitchen'
23
- require 'fog'
24
- require 'ohai'
25
- require_relative 'openstack_version'
26
- require_relative 'openstack/volume'
22
+ require "kitchen"
23
+ require "fog/openstack"
24
+ require "ohai"
25
+ require_relative "openstack_version"
26
+ require_relative "openstack/volume"
27
27
 
28
28
  module Kitchen
29
29
  module Driver
30
30
  # This takes from the Base Class and creates the OpenStack driver.
31
- # rubocop: disable Metrics/ClassLength
32
31
  class Openstack < Kitchen::Driver::Base
33
32
  @@ip_pool_lock = Mutex.new
34
33
 
@@ -38,7 +37,7 @@ module Kitchen
38
37
  default_config :server_name, nil
39
38
  default_config :server_name_prefix, nil
40
39
  default_config :key_name, nil
41
- default_config :port, '22'
40
+ default_config :port, "22"
42
41
  default_config :use_ipv6, false
43
42
  default_config :openstack_tenant, nil
44
43
  default_config :openstack_region, nil
@@ -82,10 +81,10 @@ module Kitchen
82
81
  disable_ssl_validation if config[:disable_ssl_validation]
83
82
  server = create_server
84
83
  state[:server_id] = server.id
85
- info "OpenStack instance with ID of <#{state[:server_id]}> is ready." # rubocop:disable Metrics/LineLength
84
+ info "OpenStack instance with ID of <#{state[:server_id]}> is ready."
86
85
 
87
86
  # this is due to the glance_caching issues. Annoying yes, but necessary.
88
- debug "Waiting for VM to be in ACTIVE state for a max time of:#{config[:glance_cache_wait_timeout]} seconds" # rubocop:disable Metrics/LineLength
87
+ debug "Waiting for VM to be in ACTIVE state for a max time of:#{config[:glance_cache_wait_timeout]} seconds"
89
88
  server.wait_for(config[:glance_cache_wait_timeout]) do
90
89
  sleep(1)
91
90
  ready?
@@ -111,14 +110,14 @@ module Kitchen
111
110
 
112
111
  unless server.nil?
113
112
  if config[:floating_ip_pool] && config[:allocate_floating_ip]
114
- info 'Retrieve the floating IP'
113
+ info "Retrieve the floating IP"
115
114
  pub, priv = get_public_private_ips(server)
116
115
  pub, = parse_ips(pub, priv)
117
116
  pub_ip = pub[config[:public_ip_order].to_i] || nil
118
117
  if pub_ip
119
118
  info "Retrieve the ID of floating IP <#{pub_ip}>"
120
- floating_ip_id = network.list_floating_ips(floating_ip_address: pub_ip) # rubocop:disable Metrics/LineLength
121
- .body['floatingips'][0]['id']
119
+ floating_ip_id = network.list_floating_ips(floating_ip_address: pub_ip)
120
+ .body["floatingips"][0]["id"]
122
121
  network.delete_floating_ip(floating_ip_id)
123
122
  info "OpenStack Floating IP <#{pub_ip}> released."
124
123
  end
@@ -134,27 +133,27 @@ module Kitchen
134
133
 
135
134
  def openstack_server
136
135
  server_def = {
137
- provider: 'OpenStack',
138
- connection_options: {}
136
+ provider: "OpenStack",
137
+ connection_options: {},
139
138
  }
140
139
  required_server_settings.each { |s| server_def[s] = config[s] }
141
- optional_server_settings.each { |s| server_def[s] = config[s] if config[s] } # rubocop:disable Metrics/LineLength
142
- connection_options.each { |s| server_def[:connection_options][s] = config[s] if config[s] } # rubocop:disable Metrics/LineLength
140
+ optional_server_settings.each { |s| server_def[s] = config[s] if config[s] }
141
+ connection_options.each { |s| server_def[:connection_options][s] = config[s] if config[s] }
143
142
  server_def
144
143
  end
145
144
 
146
145
  def required_server_settings
147
- %i(openstack_username openstack_api_key openstack_auth_url)
146
+ %i{openstack_username openstack_api_key openstack_auth_url}
148
147
  end
149
148
 
150
149
  def optional_server_settings
151
150
  Fog::Compute::OpenStack.recognized.select do |k|
152
- k.to_s.start_with?('openstack')
151
+ k.to_s.start_with?("openstack")
153
152
  end - required_server_settings
154
153
  end
155
154
 
156
155
  def connection_options
157
- %i(read_timeout write_timeout connect_timeout)
156
+ %i{read_timeout write_timeout connect_timeout}
158
157
  end
159
158
 
160
159
  def network
@@ -175,16 +174,16 @@ module Kitchen
175
174
 
176
175
  def create_server
177
176
  server_def = init_configuration
178
- fail(ActionFailed, 'Cannot specify both network_ref and network_id') if config[:network_id] && config[:network_ref] # rubocop:disable Metrics/LineLength, SignalException
177
+ fail(ActionFailed, "Cannot specify both network_ref and network_id") if config[:network_id] && config[:network_ref] # rubocop:disable SignalException
179
178
  if config[:network_id]
180
179
  networks = [].concat([config[:network_id]])
181
180
  server_def[:nics] = networks.flatten.map do |net_id|
182
- { 'net_id' => net_id }
181
+ { "net_id" => net_id }
183
182
  end
184
183
  elsif config[:network_ref]
185
184
  networks = [].concat([config[:network_ref]])
186
185
  server_def[:nics] = networks.flatten.map do |net|
187
- { 'net_id' => find_network(net).id }
186
+ { "net_id" => find_network(net).id }
188
187
  end
189
188
  end
190
189
 
@@ -192,13 +191,13 @@ module Kitchen
192
191
  server_def[:block_device_mapping] = get_bdm(config)
193
192
  end
194
193
 
195
- %i(
194
+ %i{
196
195
  security_groups
197
196
  key_name
198
197
  user_data
199
198
  config_drive
200
199
  metadata
201
- ).each do |c|
200
+ }.each do |c|
202
201
  server_def[c] = optional_config(c) if config[c]
203
202
  end
204
203
 
@@ -209,13 +208,13 @@ module Kitchen
209
208
  end
210
209
 
211
210
  def init_configuration
212
- fail(ActionFailed, 'Cannot specify both image_ref and image_id') if config[:image_id] && config[:image_ref] # rubocop:disable Metrics/LineLength, SignalException
213
- fail(ActionFailed, 'Cannot specify both flavor_ref and flavor_id') if config[:flavor_id] && config[:flavor_ref] # rubocop:disable Metrics/LineLength, SignalException
211
+ fail(ActionFailed, "Cannot specify both image_ref and image_id") if config[:image_id] && config[:image_ref] # rubocop:disable SignalException
212
+ fail(ActionFailed, "Cannot specify both flavor_ref and flavor_id") if config[:flavor_id] && config[:flavor_ref] # rubocop:disable SignalException
214
213
  {
215
214
  name: config[:server_name],
216
215
  image_ref: config[:image_id] || find_image(config[:image_ref]).id,
217
216
  flavor_ref: config[:flavor_id] || find_flavor(config[:flavor_ref]).id,
218
- availability_zone: config[:availability_zone]
217
+ availability_zone: config[:availability_zone],
219
218
  }
220
219
  end
221
220
 
@@ -232,21 +231,21 @@ module Kitchen
232
231
 
233
232
  def find_image(image_ref)
234
233
  image = find_matching(compute.images, image_ref)
235
- fail(ActionFailed, 'Image not found') unless image # rubocop:disable Metrics/LineLength, SignalException
234
+ fail(ActionFailed, "Image not found") unless image # rubocop:disable SignalException
236
235
  debug "Selected image: #{image.id} #{image.name}"
237
236
  image
238
237
  end
239
238
 
240
239
  def find_flavor(flavor_ref)
241
240
  flavor = find_matching(compute.flavors, flavor_ref)
242
- fail(ActionFailed, 'Flavor not found') unless flavor # rubocop:disable Metrics/LineLength, SignalException
241
+ fail(ActionFailed, "Flavor not found") unless flavor # rubocop:disable SignalException
243
242
  debug "Selected flavor: #{flavor.id} #{flavor.name}"
244
243
  flavor
245
244
  end
246
245
 
247
246
  def find_network(network_ref)
248
247
  net = find_matching(network.networks.all, network_ref)
249
- fail(ActionFailed, 'Network not found') unless net # rubocop:disable Metrics/LineLength, SignalException
248
+ fail(ActionFailed, "Network not found") unless net # rubocop:disable SignalException
250
249
  debug "Selected net: #{net.id} #{net.name}"
251
250
  net
252
251
  end
@@ -261,11 +260,11 @@ module Kitchen
261
260
  # Total: 63
262
261
  def default_name
263
262
  [
264
- instance.name.gsub(/\W/, '')[0..14],
265
- (Etc.getlogin || 'nologin').gsub(/\W/, '')[0..14],
266
- Socket.gethostname.gsub(/\W/, '')[0..22],
267
- Array.new(7) { rand(36).to_s(36) }.join
268
- ].join('-')
263
+ instance.name.gsub(/\W/, "")[0..14],
264
+ (Etc.getlogin || "nologin").gsub(/\W/, "")[0..14],
265
+ Socket.gethostname.gsub(/\W/, "")[0..22],
266
+ Array.new(7) { rand(36).to_s(36) }.join,
267
+ ].join("-")
269
268
  end
270
269
 
271
270
  def server_name_prefix(server_name_prefix)
@@ -279,18 +278,18 @@ module Kitchen
279
278
  # Max: 63
280
279
  #
281
280
  if server_name_prefix.length > 54
282
- warn 'Server name prefix too long, truncated to 54 characters'
281
+ warn "Server name prefix too long, truncated to 54 characters"
283
282
  server_name_prefix = server_name_prefix[0..53]
284
283
  end
285
284
 
286
- server_name_prefix.gsub!(/\W/, '')
285
+ server_name_prefix.gsub!(/\W/, "")
287
286
 
288
287
  if server_name_prefix.empty?
289
- warn 'Server name prefix empty or invalid; using fully generated name'
288
+ warn "Server name prefix empty or invalid; using fully generated name"
290
289
  default_name
291
290
  else
292
- random_suffix = ('a'..'z').to_a.sample(8).join
293
- server_name_prefix + '-' + random_suffix
291
+ random_suffix = ("a".."z").to_a.sample(8).join
292
+ server_name_prefix + "-" + random_suffix
294
293
  end
295
294
  end
296
295
 
@@ -299,9 +298,9 @@ module Kitchen
299
298
  info "Attaching floating IP from <#{pool}> pool"
300
299
  if config[:allocate_floating_ip]
301
300
  network_id = network.list_networks(name: pool)
302
- .body['networks'][0]['id']
301
+ .body["networks"][0]["id"]
303
302
  resp = network.create_floating_ip(network_id)
304
- ip = resp.body['floatingip']['floating_ip_address']
303
+ ip = resp.body["floatingip"]["floating_ip_address"]
305
304
  info "Created floating IP <#{ip}> from <#{pool}> pool"
306
305
  config[:floating_ip] = ip
307
306
  else
@@ -309,7 +308,7 @@ module Kitchen
309
308
  i.ip if i.fixed_ip.nil? && i.instance_id.nil? && i.pool == pool
310
309
  end.compact
311
310
  if free_addrs.empty?
312
- fail ActionFailed, "No available IPs in pool <#{pool}>" # rubocop:disable Metrics/LineLength, SignalException
311
+ fail ActionFailed, "No available IPs in pool <#{pool}>" # rubocop:disable SignalException
313
312
  end
314
313
  config[:floating_ip] = free_addrs[0]
315
314
  end
@@ -329,13 +328,12 @@ module Kitchen
329
328
  rescue Fog::Compute::OpenStack::NotFound, Excon::Errors::Forbidden
330
329
  # See Fog issue: https://github.com/fog/fog/issues/2160
331
330
  addrs = server.addresses
332
- addrs['public'] && pub = addrs['public'].map { |i| i['addr'] }
333
- addrs['private'] && priv = addrs['private'].map { |i| i['addr'] }
331
+ addrs["public"] && pub = addrs["public"].map { |i| i["addr"] }
332
+ addrs["private"] && priv = addrs["private"].map { |i| i["addr"] }
334
333
  end
335
334
  [pub, priv]
336
335
  end
337
336
 
338
- # rubocop:disable AbcSize
339
337
  def get_ip(server)
340
338
  if config[:floating_ip]
341
339
  debug "Using floating ip: #{config[:floating_ip]}"
@@ -343,19 +341,19 @@ module Kitchen
343
341
  end
344
342
 
345
343
  # make sure we have the latest info
346
- info 'Waiting for network information to be available...'
344
+ info "Waiting for network information to be available..."
347
345
  begin
348
346
  w = server.wait_for { !addresses.empty? }
349
347
  debug "Waited #{w[:duration]} seconds for network information."
350
348
  rescue Fog::Errors::TimeoutError
351
- raise ActionFailed, 'Could not get network information (timed out)'
349
+ raise ActionFailed, "Could not get network information (timed out)"
352
350
  end
353
351
 
354
352
  # should also work for private networks
355
353
  if config[:openstack_network_name]
356
354
  debug "Using configured net: #{config[:openstack_network_name]}"
357
355
  return filter_ips(server.addresses[config[:openstack_network_name]])
358
- .first['addr']
356
+ .first["addr"]
359
357
  end
360
358
 
361
359
  pub, priv = get_public_private_ips(server)
@@ -363,14 +361,14 @@ module Kitchen
363
361
  pub, priv = parse_ips(pub, priv)
364
362
  pub[config[:public_ip_order].to_i] ||
365
363
  priv[config[:private_ip_order].to_i] ||
366
- fail(ActionFailed, 'Could not find an IP') # rubocop:disable Metrics/LineLength, SignalException
364
+ fail(ActionFailed, "Could not find an IP") # rubocop:disable SignalException
367
365
  end
368
366
 
369
367
  def filter_ips(addresses)
370
368
  if config[:use_ipv6]
371
- addresses.select { |i| IPAddr.new(i['addr']).ipv6? }
369
+ addresses.select { |i| IPAddr.new(i["addr"]).ipv6? }
372
370
  else
373
- addresses.select { |i| IPAddr.new(i['addr']).ipv4? }
371
+ addresses.select { |i| IPAddr.new(i["addr"]).ipv4? }
374
372
  end
375
373
  end
376
374
 
@@ -387,14 +385,14 @@ module Kitchen
387
385
 
388
386
  def add_ohai_hint(state)
389
387
  if bourne_shell?
390
- info 'Adding OpenStack hint for ohai'
388
+ info "Adding OpenStack hint for ohai"
391
389
  mkdir_cmd = "sudo mkdir -p #{hints_path}"
392
390
  touch_cmd = "sudo bash -c 'echo {} > #{hints_path}/openstack.json'"
393
391
  instance.transport.connection(state).execute(
394
392
  "#{mkdir_cmd} && #{touch_cmd}"
395
393
  )
396
394
  elsif windows_os?
397
- info 'Adding OpenStack hint for ohai'
395
+ info "Adding OpenStack hint for ohai"
398
396
  touch_cmd = "New-Item #{hints_path}\\openstack.json"
399
397
  touch_cmd_args = "-Value '{}' -Force -Type file"
400
398
  instance.transport.connection(state).execute(
@@ -408,19 +406,19 @@ module Kitchen
408
406
  end
409
407
 
410
408
  def disable_ssl_validation
411
- require 'excon'
409
+ require "excon"
412
410
  Excon.defaults[:ssl_verify_peer] = false
413
411
  end
414
412
 
415
413
  def wait_for_server(state)
416
414
  if config[:server_wait]
417
- info "Sleeping for #{config[:server_wait]} seconds to let your server start up..." # rubocop:disable Metrics/LineLength
415
+ info "Sleeping for #{config[:server_wait]} seconds to let your server start up..."
418
416
  countdown(config[:server_wait])
419
417
  end
420
- info 'Waiting for server to be ready...'
418
+ info "Waiting for server to be ready..."
421
419
  instance.transport.connection(state).wait_until_ready
422
420
  rescue
423
- error "Server #{state[:hostname]} (#{state[:server_id]}) not reachable. Destroying server..." # rubocop:disable Metrics/LineLength
421
+ error "Server #{state[:hostname]} (#{state[:server_id]}) not reachable. Destroying server..."
424
422
  destroy(state)
425
423
  raise
426
424
  end
@@ -428,14 +426,14 @@ module Kitchen
428
426
  def countdown(seconds)
429
427
  date1 = Time.now + seconds
430
428
  while Time.now < date1
431
- Kernel.print '.'
429
+ Kernel.print "."
432
430
  sleep 10
433
431
  end
434
432
  end
435
433
 
436
434
  def find_matching(collection, name)
437
435
  name = name.to_s
438
- if name.start_with?('/') && name.end_with?('/')
436
+ if name.start_with?("/") && name.end_with?("/")
439
437
  regex = Regexp.new(name[1...-1])
440
438
  # check for regex name match
441
439
  collection.each { |single| return single if regex =~ single.name }