arethusa-cli 0.1.7 → 0.1.8
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 +4 -4
- data/lib/arethusa/cli/version.rb +1 -1
- data/lib/arethusa/cli.rb +4 -3
- metadata +1 -1
    
        checksums.yaml
    CHANGED
    
    | @@ -1,7 +1,7 @@ | |
| 1 1 | 
             
            ---
         | 
| 2 2 | 
             
            SHA1:
         | 
| 3 | 
            -
              metadata.gz:  | 
| 4 | 
            -
              data.tar.gz:  | 
| 3 | 
            +
              metadata.gz: 23186fbbded3a0c29e739e997a4f1164bc271d2e
         | 
| 4 | 
            +
              data.tar.gz: 672c6aae2e11c5b5c41d038c63d1bff5896f3271
         | 
| 5 5 | 
             
            SHA512:
         | 
| 6 | 
            -
              metadata.gz:  | 
| 7 | 
            -
              data.tar.gz:  | 
| 6 | 
            +
              metadata.gz: 03ceb14621642a3e9b7182f32c327ec9b84d2116a039ab9b79826668ad2e0c32646efecf2701b10e5de7e184555f1379572a7702159cffd08697de852c5b1f07
         | 
| 7 | 
            +
              data.tar.gz: 751dd36b50072ee24e6d3a386a3ff0fa7393733c5a74cc5ea56d12cda968b10392458a5fc383d6faff4edefb10c02e79b246c76adaa21aa3ab51ac3f828e5b9f
         | 
    
        data/lib/arethusa/cli/version.rb
    CHANGED
    
    
    
        data/lib/arethusa/cli.rb
    CHANGED
    
    | @@ -55,14 +55,14 @@ 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,  | 
| 58 | 
            +
                method_option :sudo, type: :boolean,
         | 
| 59 59 | 
             
                  desc: 'Run ssh commands as sudo'
         | 
| 60 60 | 
             
                def deploy(address, directory)
         | 
| 61 61 | 
             
                  @address = address
         | 
| 62 62 | 
             
                  @directory = options[:commit] ? File.join(directory, short_sha) : directory
         | 
| 63 63 | 
             
                  @ssh_options = options[:options]
         | 
| 64 64 | 
             
                  @archive = options[:file]
         | 
| 65 | 
            -
                  @sudo = options[:sudo] ? 'sudo ' : ''
         | 
| 65 | 
            +
                  @sudo = options[:sudo] ? '-t sudo ' : ''
         | 
| 66 66 |  | 
| 67 67 | 
             
                  @small = options[:small]
         | 
| 68 68 |  | 
| @@ -163,8 +163,9 @@ EOF | |
| 163 163 |  | 
| 164 164 | 
             
                  # For deploy command
         | 
| 165 165 | 
             
                  def execute
         | 
| 166 | 
            +
                    puts "#{ssh} #{@sudo} mkdir -p #{@directory}"
         | 
| 166 167 | 
             
                    `#{ssh} #{@sudo} mkdir -p #{@directory}`
         | 
| 167 | 
            -
                    `#{archive_to_use} | #{ssh} #{ | 
| 168 | 
            +
                    `#{archive_to_use} | #{ssh} #{decompress}`
         | 
| 168 169 | 
             
                  end
         | 
| 169 170 |  | 
| 170 171 | 
             
                  def compress
         |