william 0.3.1 → 0.3.2

Sign up to get free protection for your applications and to get access to all the features.
@@ -23,7 +23,7 @@ module William
23
23
  command = "cd #{directory}"
24
24
 
25
25
  @command_argument = directory
26
- _output(@host, :cd, "ssh #{@host} '#{command}'")
26
+ _show_executing_command(@host, :cd, @command_argument)
27
27
 
28
28
  @current_pwd = directory
29
29
  yield if block_given?
@@ -37,7 +37,7 @@ module William
37
37
  end
38
38
 
39
39
  def _output(host, cmd_type, command)
40
- puts "[#{host}] #{cmd_type}: #{@command_argument}"
40
+ _show_executing_command(host, cmd_type, @command_argument)
41
41
  @current_command_type = cmd_type
42
42
  @current_command = command
43
43
  output = _execute(command)
@@ -45,6 +45,11 @@ module William
45
45
  output # return the output!
46
46
  end
47
47
 
48
+ # display the currently executed command (without preceding `cd .. &&`)
49
+ def _show_executing_command(host, cmd_type, command)
50
+ puts "[#{host}] #{cmd_type}: #{command}"
51
+ end
52
+
48
53
  def _get_pwd
49
54
  `ssh #{@host} 'echo $PWD'`.strip
50
55
  end
@@ -1,3 +1,3 @@
1
1
  module William
2
- VERSION = "0.3.1"
2
+ VERSION = "0.3.2"
3
3
  end
@@ -7,7 +7,7 @@ Gem::Specification.new do |s|
7
7
  s.version = William::VERSION
8
8
  s.authors = ["Julien Desrosiers"]
9
9
  s.email = ["juliend2@gmail.com"]
10
- s.homepage = ""
10
+ s.homepage = "https://github.com/juliend2/william"
11
11
  s.summary = %q{A DSL to interact with your server via SSH}
12
12
  s.description = %q{William is a DSL to interact with your server via SSH}
13
13
 
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: william
3
3
  version: !ruby/object:Gem::Version
4
- hash: 17
4
+ hash: 23
5
5
  prerelease:
6
6
  segments:
7
7
  - 0
8
8
  - 3
9
- - 1
10
- version: 0.3.1
9
+ - 2
10
+ version: 0.3.2
11
11
  platform: ruby
12
12
  authors:
13
13
  - Julien Desrosiers
@@ -38,7 +38,7 @@ files:
38
38
  - lib/william/runner.rb
39
39
  - lib/william/version.rb
40
40
  - william.gemspec
41
- homepage: ""
41
+ homepage: https://github.com/juliend2/william
42
42
  licenses: []
43
43
 
44
44
  post_install_message: