arethusa-cli 0.1.5 → 0.1.6

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
  SHA1:
3
- metadata.gz: 14e29348d945f3d8d08493d1501b8396882cd236
4
- data.tar.gz: d4dcaa9f3631ce4e865545c4db2015d6f707c3b6
3
+ metadata.gz: 37d7f500edfe6b324176165c6f23b0092bddb22a
4
+ data.tar.gz: e731f8b468c1659a86de8da2bf29543b86d87ba0
5
5
  SHA512:
6
- metadata.gz: fe8b6ec67cf4b514db93c456bcb662d87996f0b19f12af187d3044933441a652bfb9d60bf789ed92ae73dca5347ee206f677a5d135766b00bbfb39b167534390
7
- data.tar.gz: d6cb31f7e179feaee206f29836f4b9da1b97885adc6f14234eeb9d253e964ae85b58b5ddc8b300db6249edc8128c7984e75252ec833a449b1ad74bd1b18dda8f
6
+ metadata.gz: 50ab1a100438525355ef1b87a864fb09a6d5e6e7b6156f8fd78ff10873e384ab010d9f46a072eda304a5eed6b463bb72a4cccae669f4ba837d3bb604ec3dcf3b
7
+ data.tar.gz: e073dde397f4b6768f5ad873bb2a185beb845723aface295a8782440eee322f39774b68da7dbf1a25ef3cdfdf57e7df4f19fbe9b54516376c89c91e81001b267
@@ -1,5 +1,5 @@
1
1
  module Arethusa
2
2
  class CLI
3
- VERSION = "0.1.5"
3
+ VERSION = "0.1.6"
4
4
  end
5
5
  end
data/lib/arethusa/cli.rb CHANGED
@@ -55,11 +55,15 @@ EOF
55
55
  desc: 'Minifies Arethusa before building'
56
56
  method_option :commit, aliases: '-c', type: :boolean,
57
57
  desc: 'Deploy in a subfolder, referenced by the current commit sha'
58
+ method_option :sudo, aliases: '-s', type: :boolean,
59
+ desc: 'Run ssh commands as sudo'
60
+ mo
58
61
  def deploy(address, directory)
59
62
  @address = address
60
63
  @directory = options[:commit] ? File.join(directory, short_sha) : directory
61
64
  @ssh_options = options[:options]
62
65
  @archive = options[:file]
66
+ @sudo = options[:sudo] ? 'sudo ' : ''
63
67
 
64
68
  @small = options[:small]
65
69
 
@@ -160,8 +164,8 @@ EOF
160
164
 
161
165
  # For deploy command
162
166
  def execute
163
- `#{ssh} mkdir -p #{@directory}`
164
- `#{archive_to_use} | #{ssh} #{decompress}`
167
+ `#{ssh} #{@sudo} mkdir -p #{@directory}`
168
+ `#{archive_to_use} | #{ssh} #{@sudo} #{decompress}`
165
169
  end
166
170
 
167
171
  def compress
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: arethusa-cli
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.5
4
+ version: 0.1.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - LFDM
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-11-01 00:00:00.000000000 Z
11
+ date: 2014-11-02 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler