loft-harmony 1.1.0 → 1.2.0
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/bin/harmony +10 -2
- metadata +2 -2
    
        checksums.yaml
    CHANGED
    
    | @@ -1,7 +1,7 @@ | |
| 1 1 | 
             
            ---
         | 
| 2 2 | 
             
            SHA1:
         | 
| 3 | 
            -
              metadata.gz:  | 
| 4 | 
            -
              data.tar.gz:  | 
| 3 | 
            +
              metadata.gz: 972c83676055f8e0de3e1edbe0ad3e8d26f5ef67
         | 
| 4 | 
            +
              data.tar.gz: 04f2b95363f1da1638be88c12fd90b4fa689a919
         | 
| 5 5 | 
             
            SHA512:
         | 
| 6 | 
            -
              metadata.gz:  | 
| 7 | 
            -
              data.tar.gz:  | 
| 6 | 
            +
              metadata.gz: cc5e68b769289d6688b9093afa486783c4cec631f423ab648e934d5e1229c01ce1a88bad8c7a90e701e8f794df6812f0a2f56a7499029e76001dc7b3d58d5981
         | 
| 7 | 
            +
              data.tar.gz: 973da60afd19a389139703f500e116446b704ed58c46b69487cb68b12bc780ed5bb95ea79137279ba5959f74ffbd9e9cd9d6642a0ab020a3e949fc6dfaea2bf4
         | 
    
        data/bin/harmony
    CHANGED
    
    | @@ -103,11 +103,16 @@ class Harmony < TerminalRunner | |
| 103 103 | 
             
                self.deploy if command == "deploy"
         | 
| 104 104 | 
             
                self.start_auto if command == "auto"
         | 
| 105 105 | 
             
                self.stop_auto if command == "stop"
         | 
| 106 | 
            -
                 | 
| 106 | 
            +
                self.mark_file(arg) if command == "mark"
         | 
| 107 107 | 
             
                self.ftp if command == "ftp"
         | 
| 108 108 | 
             
                false
         | 
| 109 109 | 
             
              end
         | 
| 110 110 |  | 
| 111 | 
            +
              def self.mark_file(filename)
         | 
| 112 | 
            +
                return puts "File does not exist." unless File.exist?(filename)
         | 
| 113 | 
            +
                @modified_proc.call(File.new(filename), nil)
         | 
| 114 | 
            +
              end
         | 
| 115 | 
            +
             | 
| 111 116 | 
             
              def self.ftp
         | 
| 112 117 | 
             
                `ftp ftp://#{@user}:#{@password}@#{@server}`
         | 
| 113 118 | 
             
              end
         | 
| @@ -145,7 +150,10 @@ class Harmony < TerminalRunner | |
| 145 150 | 
             
                failed = !self.open_connection
         | 
| 146 151 | 
             
                unless failed
         | 
| 147 152 | 
             
                  @modified.each do |file|
         | 
| 148 | 
            -
                     | 
| 153 | 
            +
                    if file.end_with?("~") || !File.exist?(file)
         | 
| 154 | 
            +
                      puts " XX Skipping #{file}. It probably doesn't exist".yellow
         | 
| 155 | 
            +
                      next
         | 
| 156 | 
            +
                    end
         | 
| 149 157 | 
             
                    begin
         | 
| 150 158 | 
             
                      Timeout::timeout(@timeout) do
         | 
| 151 159 | 
             
                        rpath = self.remote_path_for(file)
         | 
    
        metadata
    CHANGED
    
    | @@ -1,14 +1,14 @@ | |
| 1 1 | 
             
            --- !ruby/object:Gem::Specification
         | 
| 2 2 | 
             
            name: loft-harmony
         | 
| 3 3 | 
             
            version: !ruby/object:Gem::Version
         | 
| 4 | 
            -
              version: 1. | 
| 4 | 
            +
              version: 1.2.0
         | 
| 5 5 | 
             
            platform: ruby
         | 
| 6 6 | 
             
            authors:
         | 
| 7 7 | 
             
            - Caleb Simpson
         | 
| 8 8 | 
             
            autorequire: 
         | 
| 9 9 | 
             
            bindir: bin
         | 
| 10 10 | 
             
            cert_chain: []
         | 
| 11 | 
            -
            date:  | 
| 11 | 
            +
            date: 2015-12-10 00:00:00.000000000 Z
         | 
| 12 12 | 
             
            dependencies: []
         | 
| 13 13 | 
             
            description: Watches a directory for changes to upload to a server via FTP
         | 
| 14 14 | 
             
            email: caleb@simpson.center
         |