fulmar-shell 1.1.2 → 1.2.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/lib/fulmar/shell.rb +7 -2
  3. metadata +2 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 163cd665e5afb087113d0f5db20bc22ce723060f
4
- data.tar.gz: 84b82d03fd5473f437ef8bb35ebf4691819733d4
3
+ metadata.gz: 4b1eecbc826fbdf7fb94816509ec2d7a21eb66ad
4
+ data.tar.gz: 7eab24649e0767fe10006485d54cd0b23ed8e705
5
5
  SHA512:
6
- metadata.gz: 7e970c4ae6bcd02b1c82c15314cb31ae754eee8b4ba89979dacc0a059a902c6b24223aa5a3f601fa6a0ea6c9535603d14157da1957b8df7754cacd179c7d016e
7
- data.tar.gz: 82013e50a32a6170d0d1cdf73dfb9fdbf9290dfed86ecf905b3e6b9bf9bf53c035e4857cf690ebfbc71e50ac1e172028d5e9f17ebdd0cb67f7c93df5f4acc8b9
6
+ metadata.gz: bb282a8e9b650419a62981e5cca6eac1a219bd752a6b105e2ef8400dd98dd3951d9a7789b699b8b18adb69ec7d0a30f97b1adbd44e330c6bedf11ee0134c312e
7
+ data.tar.gz: 57e25a5635a7bc7d765c11eccfb9fb6c0335051ec9a79bd045c9770c5ce4b7efb16f3873faf32c012e184a37044db6585f8e917f75934e9ed9263b470fc074d7
data/lib/fulmar/shell.rb CHANGED
@@ -5,12 +5,13 @@ require 'open3'
5
5
  module Fulmar
6
6
  # Implements simple access to shell commands
7
7
  class Shell
8
- VERSION = '1.1.2'
8
+ VERSION = '1.2.0'
9
9
 
10
10
  attr_accessor :debug, :last_output, :last_error, :quiet
11
+ attr_reader :path
11
12
 
12
13
  def initialize(path, host = 'localhost')
13
- @path = (path.nil? || path.empty?) ? '.' : path
14
+ @path = File.expand_path((path.nil? || path.empty?) ? '.' : path)
14
15
  @host = host
15
16
  @last_output = []
16
17
  @last_error = []
@@ -35,6 +36,10 @@ module Fulmar
35
36
  @host == 'localhost'
36
37
  end
37
38
 
39
+ def path=(path)
40
+ @path = File.expand_path(path)
41
+ end
42
+
38
43
  protected
39
44
 
40
45
  # Run the command and capture the output
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.1.2
4
+ version: 1.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Gerrit Visscher
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-03-23 00:00:00.000000000 Z
11
+ date: 2015-03-24 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler