eac_ruby_utils 0.1.0 → 0.1.1

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: d5fa1cf02f09675fc58d1578a7a65385540c409f
4
- data.tar.gz: 3ae2e091eafcfadab182d82101fcabccd5d57ff6
3
+ metadata.gz: d76872365ceb8022590bd9f0794826cc084cc594
4
+ data.tar.gz: e586946bec36d03509f84ab39e3ecd4930ce5c26
5
5
  SHA512:
6
- metadata.gz: 28c5eb7ca9b13a7a94b8a3bf1be07d69f9e53f0aeb7eccbcae1a697b60051c38e4c26dc6371aa87ac7c39167151e992168c8e2fe7e61e93867d792a29fa78968
7
- data.tar.gz: 72fea88ff5a5b6c28318d5ea0399172001f4c932081f6d324e53089430012c800720afcf9b02625a5b6b41710092d1e20bdc0d03751e79fe451b2523406240fb
6
+ metadata.gz: bddafc0f47b272bfb06946191a20c94dda4fcdba690d76aab46495091edf49587806d029cd13b347ff306afd95c392076635b88c31c727a8dc77778e9f4f9c7f
7
+ data.tar.gz: 72ee625ebca529360e3790a47086ea266baf5396f11fd90f881d3059a120623df5d1ee842881ea458e37b48864ba72e9ee8a3752126ad31b9918da2de554f0ca
@@ -68,7 +68,7 @@ module EacRubyUtils
68
68
 
69
69
  def append_command_options(c, options)
70
70
  c = options[:input].command + ' | ' + c if options[:input]
71
- c += ' < ' + Shellwords.escape(options[:input_file]) if options[:input_file]
71
+ c = "cat #{Shellwords.escape(options[:input_file])} | #{c}" if options[:input_file]
72
72
  c += ' > ' + Shellwords.escape(options[:output_file]) if options[:output_file]
73
73
  c
74
74
  end
@@ -1,15 +1,17 @@
1
- module Envs
2
- class SshEnv < ::EacRubyUtils::Envs::BaseEnv
3
- def initialize(user_hostname)
4
- @user_hostname = user_hostname
5
- end
1
+ module EacRubyUtils
2
+ module Envs
3
+ class SshEnv < ::EacRubyUtils::Envs::BaseEnv
4
+ def initialize(user_hostname)
5
+ @user_hostname = user_hostname
6
+ end
6
7
 
7
- def to_s
8
- "SSH(#{@user_hostname})"
9
- end
8
+ def to_s
9
+ "SSH(#{@user_hostname})"
10
+ end
10
11
 
11
- def command_line(line)
12
- "ssh #{Shellwords.escape(@user_hostname)} #{Shellwords.escape(line)}"
12
+ def command_line(line)
13
+ "ssh #{Shellwords.escape(@user_hostname)} #{Shellwords.escape(line)}"
14
+ end
13
15
  end
14
16
  end
15
17
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module EacRubyUtils
4
- VERSION = '0.1.0'.freeze
4
+ VERSION = '0.1.1'.freeze
5
5
  end
@@ -4,6 +4,7 @@ require 'colorize'
4
4
  require 'docopt'
5
5
  require 'open3'
6
6
  require 'pp'
7
+ require 'net/ssh'
7
8
 
8
9
  module EacRubyUtils
9
10
  require 'eac_ruby_utils/console/docopt_runner'
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: eac_ruby_utils
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Esquilo Azul Company
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-04-04 00:00:00.000000000 Z
11
+ date: 2018-04-23 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: colorize
@@ -38,6 +38,20 @@ dependencies:
38
38
  - - "~>"
39
39
  - !ruby/object:Gem::Version
40
40
  version: 0.6.1
41
+ - !ruby/object:Gem::Dependency
42
+ name: net-ssh
43
+ requirement: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - "~>"
46
+ - !ruby/object:Gem::Version
47
+ version: '4.2'
48
+ type: :runtime
49
+ prerelease: false
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - "~>"
53
+ - !ruby/object:Gem::Version
54
+ version: '4.2'
41
55
  description:
42
56
  email:
43
57
  executables: []