fulmar-shell 1.8.0 → 1.8.1

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.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/lib/fulmar/shell.rb +8 -7
  3. metadata +3 -3
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 1a5c5935f0dca1c526da10e27a446e8315656887
4
- data.tar.gz: a1653c91906366b1a82d2fd266ee8624ef6b83c8
3
+ metadata.gz: ed1f7b3d6339da5838e87651ad9c812e47090ede
4
+ data.tar.gz: 5966832a8bba85463823d26caadedbe4e0be1390
5
5
  SHA512:
6
- metadata.gz: 4c54888221419f5daa698e1be76bf333e2e367fdf3969962eaed6d7ded08a10c892eab63794917e24b86035c05d1b4902cf0091602f274dc1997410f5a35f44e
7
- data.tar.gz: fb6d73959b1848cf386ce4ba6bdb820d4d0000a4664783e2921df907f4938ff39cecf0338608383a16d10b6d9db3d1c5b18e0857967d5160ee5e5688845a0e69
6
+ metadata.gz: d011a28432f831d2a91499e6122ea1226fb0695927e84e82b4629fa9b55c6c31eada132ac5b1b5800369399d352caf5522433505a8f80d22af761ac8859720e3
7
+ data.tar.gz: 387b4e76d0897a30b00a74306c9add156b4630e2b189ca1b52b0cadf77bb0d1fbcec583d553c6f9e24b51ceb81874ec9397843bcecbd71b394b02f02fc42970d
data/lib/fulmar/shell.rb CHANGED
@@ -1,4 +1,5 @@
1
1
  require 'open3'
2
+ require 'pathname'
2
3
  require 'fulmar/ringbuffer'
3
4
 
4
5
  # This shell is part of the fulmar deployment tools
@@ -6,7 +7,7 @@ require 'fulmar/ringbuffer'
6
7
  module Fulmar
7
8
  # Implements simple access to shell commands
8
9
  class Shell
9
- VERSION = '1.8.0'
10
+ VERSION = '1.8.1'
10
11
 
11
12
  attr_accessor :debug, :last_output, :last_error, :quiet, :strict, :interactive
12
13
  attr_reader :path
@@ -40,12 +41,12 @@ module Fulmar
40
41
  command = [command] if command.class == String
41
42
 
42
43
  # is a custom path given?
43
- if options[:in]
44
- # is it absolute?
45
- path = options[:in][0, 1] == '/' ? options[:in] : "#{@path}/#{options[:in]}"
46
- else
47
- path = @path
48
- end
44
+ path = if options[:in]
45
+ # is it absolute?
46
+ (Pathname.new options[:in]).absolute? ? options[:in] : "#{@path}/#{options[:in]}"
47
+ else
48
+ @path
49
+ end
49
50
 
50
51
  options[:error_message] ||= 'Last shell command returned an error.'
51
52
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fulmar-shell
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.8.0
4
+ version: 1.8.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Gerrit Visscher
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-02-27 00:00:00.000000000 Z
11
+ date: 2017-11-20 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -74,7 +74,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
74
74
  version: '0'
75
75
  requirements: []
76
76
  rubyforge_project:
77
- rubygems_version: 2.6.8
77
+ rubygems_version: 2.6.13
78
78
  signing_key:
79
79
  specification_version: 4
80
80
  summary: Small service to run shell commands on a local or remote shell