dctl_rb 0.13.0 → 0.13.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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 891e4ebdd5366c0525f1e5d50fddf2fb5351594a1b284580e782b1ab5865d7a1
4
- data.tar.gz: 6555744900318c5e7b881c34e0ec09702f3980ffa81865ec1801e713293474f2
3
+ metadata.gz: d1bcf89b457f36a029b21cd3c0036845070bd7193608edc26823dc12c924f86c
4
+ data.tar.gz: 3ec7f0b5b262203393069dc276fdbacbd037b9849ba7773adf23a7baf7c584df
5
5
  SHA512:
6
- metadata.gz: 38501937b88ebeb904280fed31f5abbf58856212a538e8695d13c503c528d77a933aeaa10cb5edd7704413ee26d8165997e777afc28d7c7eeaca3eaf411b94cb
7
- data.tar.gz: c0f7f9419517cea03fe5a4d9357c176952b8580869d826dccd5335901e563048debd2d51494065b577d46d8e014b6dfaf014bcb64b64aa3daa315b0392b3103a
6
+ metadata.gz: c777f13aabf4e8fb8db107a36d95b4515a272182eaacf3ca448c579a4d8618e4f4bf161695f20e6b8eaeec5ec8dbc635115754103606888ffb130cb46234a8a8
7
+ data.tar.gz: b350b97c4bcd4f3c4c08c9a64db02c7589e83167c5bf3906b129ff358c216c1f6c052615fba033a068b638a3f8d5b12b2f6f3b291cb686cf4dbd34e52ac7842c
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- dctl_rb (0.13.0)
4
+ dctl_rb (0.13.1)
5
5
  config (>= 1, < 2)
6
6
  rainbow (>= 2.2, < 3)
7
7
  rake (~> 12)
data/lib/dctl/main.rb CHANGED
@@ -155,8 +155,14 @@ module Dctl
155
155
  def define_custom_commands(klass)
156
156
  Array(settings.custom_commands).each do |command, args|
157
157
  klass.send(:desc, command, "[Custom Command] #{command}")
158
+
159
+ # Concat with string so we can use exec rather than executing multiple
160
+ # subshells. Exec allows us to reuse the shell in which dctl is being
161
+ # executed, so we get to do things like reuse sudo authorizations
162
+ # rather than always having to prmopt.
163
+ concatenated = Array(args).join(" && ").strip
158
164
  klass.send(:define_method, command, -> do
159
- Array(args).each { |a| stream_output(a) }
165
+ stream_output(concatenated, exec: true)
160
166
  end)
161
167
  end
162
168
  end
data/lib/dctl/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Dctl
2
- VERSION = "0.13.0"
2
+ VERSION = "0.13.1"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: dctl_rb
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.13.0
4
+ version: 0.13.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Justin Toniazzo