middleman-deploy 0.0.9 → 0.0.10

Sign up to get free protection for your applications and to get access to all the features.
data/README.md CHANGED
@@ -1,4 +1,4 @@
1
- Middleman Delpoy -- Deploy a [middleman](http://middlemanapp.com/) built site over rsync or via git (e.g. gh-pages on github).
1
+ Middleman Delpoy - Deploy a [middleman](http://middlemanapp.com/) built site over rsync, git (e.g. gh-pages on github) or via ftp.
2
2
 
3
3
  [![Build Status](https://secure.travis-ci.org/tvaughan/middleman-deploy.png)](http://travis-ci.org/tvaughan/middleman-deploy)
4
4
 
@@ -19,7 +19,7 @@ Middleman Delpoy -- Deploy a [middleman](http://middlemanapp.com/) built site ov
19
19
 
20
20
  Edit `Gemfile`, and add:
21
21
 
22
- gem "middleman-deploy", "~>0.0.1"
22
+ gem "middleman-deploy", "~> 0.0.10"
23
23
 
24
24
  Then run:
25
25
 
@@ -92,6 +92,12 @@ EOF
92
92
  end
93
93
  end
94
94
 
95
+ if (options.method == :ftp)
96
+ if (!options.host || !options.user || !options.password || !options.path)
97
+ print_usage_and_die "The ftp deploy method requires host, user, password, and path to be set."
98
+ end
99
+ end
100
+
95
101
  options
96
102
  end
97
103
 
@@ -177,12 +183,13 @@ EOF
177
183
  ftp.passive = true
178
184
 
179
185
  Dir.chdir('build/') do
180
- Dir['**/*'].each do |f|
186
+ files = Dir.glob('**/*', File::FNM_DOTMATCH)
187
+ files.reject { |a| a =~ Regexp.new('\.$') }.each do |f|
181
188
  if File.directory?(f)
182
189
  begin
183
190
  ftp.mkdir(f)
191
+ puts "Created directory #{f}"
184
192
  rescue
185
- puts "Folder '#{f}' exists. skipping..."
186
193
  end
187
194
  else
188
195
  begin
@@ -202,6 +209,7 @@ EOF
202
209
  end
203
210
  end
204
211
  end
212
+ puts "Copied #{f}"
205
213
  end
206
214
  end
207
215
  end
@@ -1,6 +1,6 @@
1
1
  module Middleman
2
2
  module Deploy
3
3
  PACKAGE = "middleman-deploy"
4
- VERSION = "0.0.9"
4
+ VERSION = "0.0.10"
5
5
  end
6
6
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: middleman-deploy
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.9
4
+ version: 0.0.10
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2013-01-05 00:00:00.000000000 Z
12
+ date: 2013-01-20 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: middleman-core