loft-harmony 1.1.0 → 1.2.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/bin/harmony +10 -2
  3. metadata +2 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 357be3211af77da5e3cd8a20d084446311bf1743
4
- data.tar.gz: 526c22da20b924a191a59e51005e5eaa8ba13e36
3
+ metadata.gz: 972c83676055f8e0de3e1edbe0ad3e8d26f5ef67
4
+ data.tar.gz: 04f2b95363f1da1638be88c12fd90b4fa689a919
5
5
  SHA512:
6
- metadata.gz: 63b4cba6a29257c401496a11adc42ec9e485b8e8d2db027d01b0f9415b299bf12f17509fe2518d8070b22ceb381ac6b73c9d49564449a3586669d7043904a40d
7
- data.tar.gz: f508d0854a236ea048c6444d6fae9389a9d2bbfdd6ccc6cd80442cee14df4b43350f302e3862dc5bd845311f78dee2a8374ab53659959630348d0dccc1a2f6b1
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
- @modified_proc.call(File.new(arg), nil) if command == "mark"
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
- next if file.end_with? "~"
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.1.0
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: 2014-07-10 00:00:00.000000000 Z
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