nab 1.1.0 → 1.2.0

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: 88dff9f0057c872115d2b4ab618534acb0d9b6db
4
- data.tar.gz: 651c067a126989179b2614fbe4a92e5d5000b0e0
3
+ metadata.gz: 8e3af6f1216fc42ce46d96dd1cf3373bd7539e18
4
+ data.tar.gz: 0100e73818e9330ccf2f448589f94daf2b673f27
5
5
  SHA512:
6
- metadata.gz: ec41b11c7b04a140a5104074f53131924006e7b70789eeea7cb6fc235349ff5b0f3d5feb1f99eca3946a501593e2b28ce6967b8d850c0d7e879b4d549a103d92
7
- data.tar.gz: ed2eba0384bc46fd4a130d366b960b1baea83070e6431feb5ce98d70d7c1931708cae25bb359ddc96161ff660d1b7b126adb13afe462cb963ea5ef4968551f62
6
+ metadata.gz: da4c5efde7dc05fea57fbc1dd3c11c677a1b4d1e33767a1448bfa5cdfde4fa8cc1d762f6d97d1a2a1ff051663963d158328e21b1d908e8e9d6c045c4145f5c9b
7
+ data.tar.gz: 50b40d2f74e6d2db819362db38371544e2470080c149b012991d02646ee37299fd30e18d9a3d947c37f4a99950ffecfd37e24927065a6117a72f60d2cb34e8dd
data/bin/nab CHANGED
@@ -46,4 +46,4 @@ OptionParser.new do |o|
46
46
  end
47
47
  end
48
48
 
49
- Nab::Client.new.run(options)
49
+ Nab::Client.new.run(ARGV,options)
@@ -1,6 +1,10 @@
1
1
  Nab Changelog
2
2
  ===
3
3
 
4
+ 1.2.0
5
+ ---
6
+ - Changes client class to be easier to run when not called from command line
7
+
4
8
  1.1.0
5
9
  ---
6
10
  - Factors out path_from_uri into new Utils module
@@ -2,12 +2,13 @@
2
2
 
3
3
  module Nab
4
4
  class Client
5
- def run(options)
5
+ def run(args,options)
6
6
  Log.level options.log_level
7
7
 
8
8
  Nab::Log.debug "Options received: #{options.inspect}"
9
+ Nab::Log.debug "Arguments received: #{args.inspect}"
9
10
 
10
- if ARGV.size < 1
11
+ if args.size < 1
11
12
  Nab::Log.fatal "No arguments specified"
12
13
  exit 1
13
14
  end
@@ -16,7 +17,7 @@ module Nab
16
17
  manager.write_adapter = options.write_adapter
17
18
  manager.strip_dirs = options.strip_dirs
18
19
 
19
- ARGV.each do |a|
20
+ args.each do |a|
20
21
  uri = URI(a)
21
22
  adapter = manager.get uri.scheme.capitalize
22
23
  adapter.get uri,options.destination_dir
@@ -1,5 +1,5 @@
1
1
  # encoding: UTF-8
2
2
 
3
3
  module Nab
4
- VERSION = '1.1.0'
4
+ VERSION = '1.2.0'
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: nab
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.0
4
+ version: 1.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Brian Bianco