image-dumper 0.5.4.1 → 0.5.4.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (4) hide show
  1. checksums.yaml +4 -4
  2. data/bin/dumper +7 -5
  3. data/lib/dumper/version.rb +1 -1
  4. metadata +1 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 76e0c7485280e93ea7b1a4ad4e442553e23bf957
4
- data.tar.gz: 495cd4f03963c753e1864707eebe2cdef06ebd8f
3
+ metadata.gz: 6974ffcabb5cb92bf8ec7dcbaec484fb60cbdc32
4
+ data.tar.gz: 606411203e58de11b818edb1eef79c529b59db16
5
5
  SHA512:
6
- metadata.gz: 5e67fbda24e6640ee9ed5ab99b75e7ccf4c37c9f6460fdd9cfb57060ef9128b7bb966bdcd65365352806b3ec2f48affabd85d3b8812ba73fd145d900fd2948ac
7
- data.tar.gz: 9fd9d0deb8c9fd0ba1812c42b1654d255c543b9d99701de389f67b5102a223b19e360fc8b2d17fa4dc32c65315c3730ef7a6e0f8578d351ed7ceac282af58332
6
+ metadata.gz: 951420ac28177f8293f3cc24fdad249597adb48c4b7c9c4dee3ca3d9cb68550b33a1c802659ebc0b2047dcd231eaa5076f4f002b3216388211ebacab92a00bd0
7
+ data.tar.gz: 18340f6fb9b924251a4967056768a8bdf8f8f39bcb20c069d8d4144bd26e8251d33eba912eedd8496a05dca85e62006493a95aa856fd8cb5c1875d0050a00ad3
data/bin/dumper CHANGED
@@ -23,10 +23,8 @@ require 'dumper'
23
23
  options = {}
24
24
 
25
25
  OptionParser.new do |o|
26
- options[:url] = []
27
- options[:path] = []
28
- options[:from] = nil
29
- options[:to] = nil
26
+ options[:url] = []
27
+ options[:path] = []
30
28
 
31
29
  o.on '-l', '--list', 'Show available profiles' do
32
30
  abort 'Profiles available:'.tap { |s|
@@ -91,7 +89,11 @@ options[:url].each_with_index { |url, i|
91
89
 
92
90
  if Dumper::Profiles::list.include? host.gsub(?-, ?_)
93
91
  method = ('get_' + host.gsub(?-, ?_)).to_sym
94
- Dumper::Profiles::send method, url, options[:path][i], options[:from], options[:to]
92
+ if options.include?(:from) && options.include?(:to)
93
+ Dumper::Profiles::send method, url, options[:path][i], options[:from], options[:to]
94
+ else
95
+ Dumper::Profiles::send method, url, options[:path][i]
96
+ end
95
97
  else
96
98
  Dumper::Profiles::get_generic url, options[:path][i], options[:xpath]
97
99
  end
@@ -19,6 +19,6 @@
19
19
 
20
20
  module Dumper
21
21
  def self.version
22
- '0.5.4.1'
22
+ '0.5.4.2'
23
23
  end
24
24
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: image-dumper
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.4.1
4
+ version: 0.5.4.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Giovanni Capuano