loft-harmony 1.2.1 → 1.2.2

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 +1 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 8b59f794f96343c5946c2bf89dcc4bf129b7a509
4
- data.tar.gz: 72f88b60df4c3fb163d03f746e566398ff1d0666
3
+ metadata.gz: df76af79bda66a3cc2b48282f7d0c31586e143b3
4
+ data.tar.gz: 174090be91e9ccedc3e4566792586bbf6265c95b
5
5
  SHA512:
6
- metadata.gz: 4e482c395834bc9b90bee95949307297661b9b07626d35ee13c6a4449662d6c6f3c681590a7069dce14b58100c1e49928a3e661e5d1b896e8a97b125e61fc62a
7
- data.tar.gz: b2c8bad68f3175f98e6d25eea157e2cf0b13d90897a43f5137754fe27ec39b5a637e13a7bf4eb796a23fefc2d8efe39bca8aea2aee3e29845c4eb9f4cfe5b5ce
6
+ metadata.gz: 266bf609aed5a29318bc686a262cebff45d8baf6bdf6eed09cc4a5b2279ad4d11278e7221f1c6fcf072d14545c08552aeb18066ae373eec9c443bd06414c1a4c
7
+ data.tar.gz: af25de5487c71f06c76d4b057f9db51e248675f5d563ba44545b7e186fc213b9df75413b808fc9a5af8bcdd80bd3867272463fa522951068a928c2caddf1c134
data/bin/harmony CHANGED
@@ -18,6 +18,7 @@ class Harmony < TerminalRunner
18
18
  option "--eco", 2, "target identifier", "Automatically compile saved eco files to the given directory."
19
19
  option "--auto", 0, "", "Start up auto mode automatically."
20
20
  option "--passive", 0, "", "Use FTP in passive mode."
21
+ option "--vanilla_ftp", 0, "", "Use Vanilla ruby Net::FTP. Disables automatica directory creation."
21
22
 
22
23
  help ""
23
24
 
@@ -38,6 +39,7 @@ class Harmony < TerminalRunner
38
39
  @timeout = @@options.include?("--timeout") ? @@options["--timeout"][0].to_i : 2
39
40
  @compile_coffeescript = @@options.include?("--coffee") ? @@options["--coffee"][0] : nil
40
41
  @passive_mode = @@options.include?("--passive")
42
+ @use_vanilla_ftp = @@options.include?("--vanilla_ftp")
41
43
  @ignored = []
42
44
 
43
45
  @compile_eco = nil
@@ -160,7 +162,7 @@ class Harmony < TerminalRunner
160
162
  Timeout::timeout(@timeout) do
161
163
  rpath = self.remote_path_for(file)
162
164
 
163
- if @ftp.mkdir_p rpath
165
+ if @ftp.respond_to?(:mkdir_p) && @ftp.mkdir_p(rpath)
164
166
  puts " ## Created new directory #{rpath}".pink
165
167
  end
166
168
 
@@ -237,8 +239,14 @@ class Harmony < TerminalRunner
237
239
 
238
240
  if @ftp.nil? || @ftp.closed?
239
241
  puts " ## Connection opening".red
240
- @ftp = BetterFTP.new(@server, @user, @password)
242
+ if @use_vanilla_ftp
243
+ puts "(Using Vanilla FTP)".pink
244
+ @ftp = Net::FTP.new(@server, @user, @password)
245
+ else
246
+ @ftp = BetterFTP.new(@server, @user, @password)
247
+ end
241
248
  @ftp.passive = @passive_mode
249
+ puts "(Using Passive Mode)".pink if @passive_mode
242
250
  end
243
251
  end
244
252
  true
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: loft-harmony
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.2.1
4
+ version: 1.2.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Caleb Simpson