occi-cli 4.2.0.beta.18 → 4.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: 636013164f6e96bad6aa0dd8c4cf279735ecc5e1
4
- data.tar.gz: 4cf7a194060a2572ac09647b4907ea39262be32b
3
+ metadata.gz: 65e10804d47573dec0a66e2b3c787414f459de59
4
+ data.tar.gz: 54c7e23213d0571c2a702f1a7869e5f761f462c7
5
5
  SHA512:
6
- metadata.gz: 509f1ef2f7adb7b9e4c9180729639a3d332584a637c4dcab103dcd0ec7cff96697516543b9be4ef499a08c560e5833feb6a3247dacad02171d09371e02bf3149
7
- data.tar.gz: d7f9a5f2e31b13078be79672e54a14f60d631d27ea0bf08a2966d59a7ca0dcfcb5cb3f5724af7b0ad9f87aeccc5ec2be08688597f89e3581d3348e856118fd6a
6
+ metadata.gz: eb575a9516a736fa9bafb3e71f9a4920c564953ce1588d18dc499a6590398df5130fbd064b519dd6a08574b4284be017e228438cec972b2313b9f207ce1717d3
7
+ data.tar.gz: 9eb16ad029683427ff326ca544715155e7bd12b2a4e11d9141bf17e1997178d8fb1a8030b5b780e55f696eb2a50de5c9c1278ee0cc8e8901cca84ed5c78f7fc9
data/.travis.yml CHANGED
@@ -41,3 +41,4 @@ branches:
41
41
  - master
42
42
  - 4.0.x
43
43
  - 4.1.x
44
+ - 4.2.x
data/bin/occi CHANGED
@@ -33,7 +33,7 @@ options.log[:logger] = logger.api_log
33
33
  output = Occi::Cli::ResourceOutputFactory.new options.output_format
34
34
 
35
35
  Occi::Cli::Log.info "Starting OCCI client ..."
36
- Occi::Cli::Log.debug "Options: #{options}"
36
+ Occi::Cli::Log.debug "Options: #{options.inspect}"
37
37
 
38
38
  # running with an empty password, we should ask the user for one
39
39
  # if auth method is not "none"
@@ -49,7 +49,7 @@ end
49
49
 
50
50
  # establish a connection
51
51
  begin
52
- Occi::Cli::Log.info "Establishing a connection to #{options.endpoint} ..."
52
+ Occi::Cli::Log.info "Establishing a connection to #{options.endpoint.inspect} ..."
53
53
 
54
54
  options.auto_connect = true
55
55
  connect :http, options
@@ -73,13 +73,13 @@ rescue OpenSSL::PKey::RSAError => key_ex
73
73
  rescue Errno::ECONNREFUSED
74
74
  # the remote server has refused our connection attempt(s)
75
75
  # there is nothing we can do ...
76
- Occi::Cli::Log.fatal "Connection refused by #{options.endpoint}!"
76
+ Occi::Cli::Log.fatal "Connection refused by #{options.endpoint.inspect}!"
77
77
  exit!
78
- rescue Errno::ETIMEDOUT
78
+ rescue Errno::ETIMEDOUT, Net::OpenTimeout, Net::ReadTimeout
79
79
  # connection attempt timed out
80
- Occi::Cli::Log.fatal "Connection to #{options.endpoint} timed out!"
80
+ Occi::Cli::Log.fatal "Connection to #{options.endpoint.inspect} timed out!"
81
81
  exit!
82
- rescue Exception => ex
82
+ rescue => ex
83
83
  # something went wrong during the execution
84
84
  # hide the stack trace in non-debug modes
85
85
  Occi::Cli::Log.fatal "An error occurred! Message: #{ex.message}"
@@ -101,7 +101,7 @@ if options.dump_model
101
101
  # iterate through available instance variables
102
102
  collection.instance_variables.each do |inst_var_sym|
103
103
  puts "#"*79
104
- puts "Dumping #{inst_var_sym.to_s}:"
104
+ puts "Dumping #{inst_var_sym.to_s.inspect}:"
105
105
 
106
106
  inst_var = collection.instance_variable_get(inst_var_sym)
107
107
  next unless inst_var.respond_to? :each
@@ -130,7 +130,7 @@ end
130
130
  # start executing actions
131
131
  begin
132
132
 
133
- Occi::Cli::Log.info "Executing action #{options.action.to_s} on #{options.resource} ..."
133
+ Occi::Cli::Log.info "Executing action #{options.action.inspect} on #{options.resource.inspect} ..."
134
134
 
135
135
  # call the appropriate helper and then format its output
136
136
  case options.action
@@ -151,15 +151,19 @@ begin
151
151
  when :skip, :test, :dry_run
152
152
  Occi::Cli::Log.info "Just a connection test ..."
153
153
  else
154
- raise "Unknown action [#{options.action}]!"
154
+ raise "Unknown action #{options.action.inspect}!"
155
155
  end
156
156
 
157
157
  rescue Errno::ECONNREFUSED
158
158
  # remote server refused our connection attempt(s)
159
159
  # even though initial connect was successful
160
- Occi::Cli::Log.fatal "Connection refused by #{options.endpoint}!"
160
+ Occi::Cli::Log.fatal "Connection refused by #{options.endpoint.inspect}!"
161
161
  exit!
162
- rescue Exception => ex
162
+ rescue Errno::ETIMEDOUT, Net::OpenTimeout, Net::ReadTimeout
163
+ # connection attempt timed out
164
+ Occi::Cli::Log.fatal "Connection to #{options.endpoint.inspect} timed out!"
165
+ exit!
166
+ rescue => ex
163
167
  # something went wrong during the execution
164
168
  # hide the stack trace in non-debug modes
165
169
  Occi::Cli::Log.fatal "An error occurred! Message: #{ex.message}"
@@ -1,5 +1,5 @@
1
1
  module Occi
2
2
  module Cli
3
- VERSION = "4.2.0.beta.18" unless defined?(::Occi::Cli::VERSION)
3
+ VERSION = "4.2.0" unless defined?(::Occi::Cli::VERSION)
4
4
  end
5
5
  end
data/occi-cli.gemspec CHANGED
@@ -19,7 +19,7 @@ Gem::Specification.new do |gem|
19
19
  gem.test_files = `git ls-files -- {test,spec}/*`.split("\n")
20
20
  gem.require_paths = ["lib"]
21
21
 
22
- gem.add_dependency 'occi-api', '= 4.2.0.beta.17'
22
+ gem.add_dependency 'occi-api', '~> 4.2.0'
23
23
  gem.add_dependency 'json'
24
24
  gem.add_dependency 'highline'
25
25
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: occi-cli
3
3
  version: !ruby/object:Gem::Version
4
- version: 4.2.0.beta.18
4
+ version: 4.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Florian Feldhaus
@@ -16,16 +16,16 @@ dependencies:
16
16
  name: occi-api
17
17
  requirement: !ruby/object:Gem::Requirement
18
18
  requirements:
19
- - - '='
19
+ - - ~>
20
20
  - !ruby/object:Gem::Version
21
- version: 4.2.0.beta.17
21
+ version: 4.2.0
22
22
  type: :runtime
23
23
  prerelease: false
24
24
  version_requirements: !ruby/object:Gem::Requirement
25
25
  requirements:
26
- - - '='
26
+ - - ~>
27
27
  - !ruby/object:Gem::Version
28
- version: 4.2.0.beta.17
28
+ version: 4.2.0
29
29
  - !ruby/object:Gem::Dependency
30
30
  name: json
31
31
  requirement: !ruby/object:Gem::Requirement
@@ -118,9 +118,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
118
118
  version: 1.9.3
119
119
  required_rubygems_version: !ruby/object:Gem::Requirement
120
120
  requirements:
121
- - - '>'
121
+ - - '>='
122
122
  - !ruby/object:Gem::Version
123
- version: 1.3.1
123
+ version: '0'
124
124
  requirements: []
125
125
  rubyforge_project:
126
126
  rubygems_version: 2.1.11