scli 0.0.5 → 0.0.6

Sign up to get free protection for your applications and to get access to all the features.
@@ -2,13 +2,14 @@ module Scli
2
2
  def self.detvol
3
3
  cli = MyCLI.new
4
4
  cli.parse_options
5
- volume_id = cli.config[:volume_id]
5
+ volume_id = cli.config[:volume_id] || ARGV[1]
6
6
  instance_id = cli.config[:instance_id]
7
- if volume_id.nil? || instance_id.nil?
8
- puts "Instance and volume id's are required, please retry."
7
+ if volume_id.nil?
8
+ puts "Volume ID is required, please retry."
9
9
  else
10
- server = Scli::Compute.new.servers.get(instance_id)
11
10
  volume = Scli::Storage.new.volumes.get(volume_id)
11
+ instance_id = volume.instance_id if instance_id.nil?
12
+ server = Scli::Compute.new.servers.get(instance_id)
12
13
  if server.nil?
13
14
  puts "Could not find server: #{instance_id}"
14
15
  elsif volume.nil?
@@ -26,4 +27,4 @@ module Scli
26
27
  end
27
28
  end
28
29
 
29
- PLUGINS << ["detvol", "detach-volume", "Volume ID (Req -v), Instance ID (Req -i)", "scli detvol -i 123456 -v 23456"]
30
+ PLUGINS << ["detvol", "detach-volume", "Volume ID (Req -v), Instance ID (Opt -i)", "scli detvol 23456"]
@@ -21,4 +21,4 @@ module Scli
21
21
  end
22
22
  end
23
23
 
24
- PLUGINS << ["tin", "terminate-instance", "Instance ID (Req -i)", "scli tin 123456"]
24
+ PLUGINS << ["tin", "terminate-instance", "Instance ID (Req -i)", "scli tin 123456"]
@@ -76,7 +76,7 @@ class MyCLI
76
76
  option :format,
77
77
  :short => "-f FORMAT",
78
78
  :long => "--format FORMAT",
79
- :description => "Format to use (ext3, raw)"
79
+ :description => "Format to use (EXT3, RAW)"
80
80
 
81
81
  option :private,
82
82
  :short => "-p",
@@ -1,7 +1,7 @@
1
1
  Gem::Specification.new do |s|
2
2
  s.name = 'scli'
3
- s.version = '0.0.5'
4
- s.date = '2012-06-30'
3
+ s.version = '0.0.6'
4
+ s.date = '2012-11-20'
5
5
  s.platform = Gem::Platform::RUBY
6
6
  s.authors = ['Josh Pasqualetto']
7
7
  s.email = ['josh.pasqualetto@sonian.net']
@@ -11,7 +11,7 @@ Gem::Specification.new do |s|
11
11
  s.license = 'MIT'
12
12
  s.has_rdoc = false
13
13
 
14
- s.add_dependency('fog', '~> 1.3.1')
14
+ s.add_dependency('fog', '~> 1.7.0')
15
15
  s.add_dependency('mixlib-cli', '~> 1.2.2')
16
16
  s.add_dependency('terminal-table', '~> 1.4.5')
17
17
  s.add_dependency('colored', '1.2')
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: scli
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.5
4
+ version: 0.0.6
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: 2012-06-30 00:00:00.000000000 Z
12
+ date: 2012-11-20 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: fog
@@ -18,7 +18,7 @@ dependencies:
18
18
  requirements:
19
19
  - - ~>
20
20
  - !ruby/object:Gem::Version
21
- version: 1.3.1
21
+ version: 1.7.0
22
22
  type: :runtime
23
23
  prerelease: false
24
24
  version_requirements: !ruby/object:Gem::Requirement
@@ -26,7 +26,7 @@ dependencies:
26
26
  requirements:
27
27
  - - ~>
28
28
  - !ruby/object:Gem::Version
29
- version: 1.3.1
29
+ version: 1.7.0
30
30
  - !ruby/object:Gem::Dependency
31
31
  name: mixlib-cli
32
32
  requirement: !ruby/object:Gem::Requirement