testlab 1.8.0 → 1.8.1

Sign up to get free protection for your applications and to get access to all the features.
@@ -173,12 +173,8 @@ EOF
173
173
  import.flag [:input]
174
174
 
175
175
  import.action do |global_options, options, args|
176
- if options[:name].nil?
177
- help_now!('a name is required') if options[:name].nil?
178
- else
179
- iterate_objects_by_name(options[:name], TestLab::Container) do |container|
180
- container.import(options[:input] || "")
181
- end
176
+ iterate_objects_by_name(options[:name], TestLab::Container) do |container|
177
+ container.import(options[:input])
182
178
  end
183
179
  end
184
180
  end
@@ -103,12 +103,13 @@ EOF
103
103
  def import(local_file)
104
104
  @ui.logger.debug { "Container Import: #{self.id} " }
105
105
 
106
+ local_file ||= File.expand_path("#{self.id}.sc")
107
+
106
108
  if !File.exists?(local_file)
107
109
  self.sc_url.nil? and raise ContainerError, "You failed to supply a filename or URL to import from!"
108
110
 
109
111
  @ui.stdout.puts(format_message("Downloading shipping container for #{self.id}...".green.bold))
110
112
 
111
- local_file = File.expand_path("#{self.id}.sc")
112
113
  sc_download(local_file, self.sc_url, 16)
113
114
  end
114
115
 
@@ -212,7 +213,7 @@ EOF
212
213
 
213
214
  when Net::HTTPRedirection then
214
215
  location = response['location']
215
- @ui.stdout.puts(format_message("REDIRECTED #{url} --> #{location}".black))
216
+ @ui.stdout.puts(format_message("REDIRECT: #{url} --> #{location}".white))
216
217
  return sc_download(local_file, location, (count - 1))
217
218
 
218
219
  when Net::HTTPOK then
@@ -1,6 +1,6 @@
1
1
  class TestLab
2
2
  unless const_defined?(:VERSION)
3
3
  # TestLab Gem Version
4
- VERSION = "1.8.0"
4
+ VERSION = "1.8.1"
5
5
  end
6
6
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: testlab
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.8.0
4
+ version: 1.8.1
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2013-09-15 00:00:00.000000000 Z
12
+ date: 2013-09-16 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: gli
@@ -343,7 +343,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
343
343
  version: '0'
344
344
  segments:
345
345
  - 0
346
- hash: -2347575770462916440
346
+ hash: 2144885167691104843
347
347
  required_rubygems_version: !ruby/object:Gem::Requirement
348
348
  none: false
349
349
  requirements:
@@ -352,7 +352,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
352
352
  version: '0'
353
353
  segments:
354
354
  - 0
355
- hash: -2347575770462916440
355
+ hash: 2144885167691104843
356
356
  requirements: []
357
357
  rubyforge_project:
358
358
  rubygems_version: 1.8.25