vagrant-routes 0.0.1 → 0.0.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: d085fb1436e7b170e8da6ab59716facf15b12d5b
4
- data.tar.gz: 9daafa3112e91db23577fcaf754399379c53643b
3
+ metadata.gz: 3d033cfb843077337d60b2723a9042b012a2f459
4
+ data.tar.gz: 2da6c15d60f399dbb4ddd5e0a736624058fff29d
5
5
  SHA512:
6
- metadata.gz: e6b0ec5c29ae2e82b5a84774136275523f0cee57b1a8f35061d85f9686335b414d566478069584073985ebd655751058ddd7d9ac21cde4989066bf5e03a61bd6
7
- data.tar.gz: b43c7b6986486b2f30fc7850b9237a1713824169a74e10d6f73f516fc8a9e49932eeb90251e2fd7d68adfc2175b1656600709e65b0e47c67029e032f96f62bd6
6
+ metadata.gz: 3cf0b3b96c9c1434d8dfb7be314b4713adb28a9de44785c2128d9a93188709c80a1f1522328d8c1b9aa11f0baf11c4bdeb351b4e5c9c6d7c22224899fc49b3d4
7
+ data.tar.gz: 4fee622d043e5fdb4f7a79c09bdfc42a58eb30071a65193a56a4acc68d9944d5387e9b923428382c0dce789119d6cb09d7013bb560a73f3fcec99091ab6f76d3
data/lib/command.rb CHANGED
@@ -7,8 +7,8 @@ module VagrantPlugins
7
7
 
8
8
  def execute
9
9
  with_target_vms(nil, single_target: true) do |machine|
10
- machine.communicate.execute('oc get routes', sudo: false) do |type, data|
11
- @result = data if type == :stdout
10
+ machine.communicate.execute('oc get routes', sudo: false) do |type, data|
11
+ @result = data
12
12
  end
13
13
  @env.ui.info("Updating hosts file with new hostnames:\n#{routes_hostnames(@result).join(', ')}")
14
14
  ip = machine.ssh_info[:host]
@@ -18,16 +18,12 @@ module VagrantPlugins
18
18
  case @result
19
19
  # We are not signed-in
20
20
  when /.*the server has asked for the client to provide credentials.*/
21
- @env.ui.error('You need to sign in and select a project first.')
21
+ @env.ui.error('You need to sign in and select a project in OpenShift first.')
22
22
  # OpenShift is not installed on the guest
23
23
  when /.*oc: command not found.*/
24
- @env.ui.error('oc command not found on guest. Is OpenShift installed?')
25
- # Command failed
26
- when /.*Error.*/
27
- @env.ui.error("oc command returned an error:\n")
28
- @env.ui.error(result)
24
+ @env.ui.error('oc command was not found on guest. Is OpenShift installed?')
29
25
  else
30
- @env.ui.error('Unexpected error occured.')
26
+ @env.ui.error("Unexpected error occured:\n#{@result}")
31
27
  end
32
28
  end
33
29
 
@@ -1,6 +1,6 @@
1
1
  Gem::Specification.new do |spec|
2
2
  spec.name = 'vagrant-routes'
3
- spec.version = '0.0.1'
3
+ spec.version = '0.0.2'
4
4
  spec.homepage = 'https://github.com/strzibny/vagrant-routes'
5
5
  spec.summary = 'Access OpenShift routes on the host'
6
6
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: vagrant-routes
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Josef Strzibny
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-11-16 00:00:00.000000000 Z
11
+ date: 2015-11-18 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler