simple-cli 0.2.4 → 0.2.5

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: d679f9697e51d2d91312bfe3eaac0a6cb577019a
4
- data.tar.gz: 0a7cce907a747c8a0b0c44a1c2d4f5e45701f59c
3
+ metadata.gz: dcb48c1ae3ae3ccebd82b9325af58f639910f22b
4
+ data.tar.gz: 07479195b9435ede0973188e6f44a773a5a3547e
5
5
  SHA512:
6
- metadata.gz: 18fdd30d1a31e77da83a3e549c43d2712f0912121becf6240c528cb8686e3059899d15a06602237bd986493f0d0764eba4edce24c19aa358346ef4be5d3a0bb2
7
- data.tar.gz: 0e53ca862abac7db8120d1ec922fe0310f8fcd02f99d5efd09e528565bcd775e171cf91bcff7ee97a22b97844a41f2f2bd9fc8d69ec393924341a08850736308
6
+ metadata.gz: 3483729223bc6fff70f10ff13b94c0fbdadfa67710315c99bb0195a1dd2b36e35630240fe2329eed341068deab1c3f5929218276cafc06ec104f5b0fab18e993
7
+ data.tar.gz: e73e915b867625e90272ebac5101d18a8625f348c2d8b0fdad52a9fb31777f4d5c6cc60ebf907cfd3c48cbaa51fc42e2540ff1350cae7701c2f60ca081b9eb4d
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- simple-cli (0.2.4)
4
+ simple-cli (0.2.5)
5
5
 
6
6
  GEM
7
7
  remote: https://rubygems.org/
@@ -29,6 +29,17 @@ module Simple::CLI::Helpers
29
29
  sys! "#{ssh_command(target, user: user)} #{command}"
30
30
  end
31
31
 
32
+ def sh(cmd, *args)
33
+ command = Command.new(cmd, *args)
34
+ result = command.sh
35
+ first_line, more = result.split("\n", 2)
36
+ if more == ""
37
+ first_line
38
+ else
39
+ result
40
+ end
41
+ end
42
+
32
43
  def sh!(cmd, *args)
33
44
  command = Command.new(cmd, *args)
34
45
  result = command.sh
@@ -1,5 +1,5 @@
1
1
  module Simple
2
2
  module CLI
3
- VERSION = "0.2.4"
3
+ VERSION = "0.2.5"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: simple-cli
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.4
4
+ version: 0.2.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - radiospiel
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2018-03-02 00:00:00.000000000 Z
12
+ date: 2018-03-04 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rake