middleman-deploy 0.1.2 → 0.1.3

Sign up to get free protection for your applications and to get access to all the features.
data/.gitignore CHANGED
@@ -1,2 +1,8 @@
1
- Gemfile.lock
2
- coverage
1
+ # Ignore bundler lock file
2
+ /Gemfile.lock
3
+
4
+ # Ignore pkg folder
5
+ /pkg
6
+
7
+ # Ignore coverage folder
8
+ /coverage
data/README.md CHANGED
@@ -80,9 +80,9 @@ Activate the extension by adding the following to `config.rb`:
80
80
  activate :deploy do |deploy|
81
81
  deploy.method = :ftp
82
82
  deploy.host = "ftp.example.com"
83
+ deploy.path = "/srv/www/site"
83
84
  deploy.user = "tvaughan"
84
85
  deploy.password = "secret"
85
- deploy.path = "/srv/www/site"
86
86
  end
87
87
  ```
88
88
 
@@ -94,9 +94,10 @@ Activate the extension by adding the following to `config.rb`:
94
94
  activate :deploy do |deploy|
95
95
  deploy.method = :sftp
96
96
  deploy.host = "sftp.example.com"
97
- deploy.user = "tvaughan"
98
- deploy.password = "secret"
99
97
  deploy.path = "/srv/www/site"
98
+ # Optional Settings
99
+ # deploy.user = "tvaughan" # no default
100
+ # deploy.password = "secret" # no default
100
101
  end
101
102
  ```
102
103
 
data/Rakefile CHANGED
@@ -11,25 +11,4 @@ require 'rake/clean'
11
11
 
12
12
  task :test => ["cucumber"]
13
13
 
14
- require "middleman-deploy/pkg-info"
15
-
16
- PACKAGE = "#{Middleman::Deploy::PACKAGE}"
17
- VERSION = "#{Middleman::Deploy::VERSION}"
18
-
19
- task :package do
20
- system "gem build #{PACKAGE}.gemspec"
21
- end
22
-
23
- task :install => :package do
24
- Dir.chdir("pkg") do
25
- system "gem install #{PACKAGE}-#{VERSION}"
26
- end
27
- end
28
-
29
- task :release => :package do
30
- Dir.chdir("pkg") do
31
- system "gem push #{PACKAGE}-#{VERSION}"
32
- end
33
- end
34
-
35
- task :default => :test
14
+ task :default => :test
@@ -76,9 +76,9 @@ activate :deploy do |deploy|
76
76
  deploy.method = :ftp
77
77
  # host, user, passwword and path *must* be set
78
78
  deploy.host = "ftp.example.com"
79
+ deploy.path = "/srv/www/site"
79
80
  deploy.user = "tvaughan"
80
81
  deploy.password = "secret"
81
- deploy.path = "/srv/www/site"
82
82
  end
83
83
 
84
84
  # To deploy the build directory to a remote host via sftp:
@@ -86,9 +86,11 @@ activate :deploy do |deploy|
86
86
  deploy.method = :sftp
87
87
  # host, user, passwword and path *must* be set
88
88
  deploy.host = "sftp.example.com"
89
+ deploy.path = "/srv/www/site"
90
+ # user is optional (no default)
89
91
  deploy.user = "tvaughan"
92
+ # password is optional (no default)
90
93
  deploy.password = "secret"
91
- deploy.path = "/srv/www/site"
92
94
  end
93
95
  EOF
94
96
  end
@@ -102,7 +104,7 @@ EOF
102
104
 
103
105
  begin
104
106
  options = inst.options
105
- rescue
107
+ rescue NoMethodError
106
108
  print_usage_and_die "You need to activate the deploy extension in config.rb."
107
109
  end
108
110
 
@@ -111,13 +113,13 @@ EOF
111
113
  end
112
114
 
113
115
  case options.method
114
- when :rsync
116
+ when :rsync, :sftp
115
117
  if (!options.host || !options.path)
116
- print_usage_and_die "The rsync deploy method requires host and path to be set."
118
+ print_usage_and_die "The #{options.method} method requires host and path to be set."
117
119
  end
118
- when :ftp, :sftp
120
+ when :ftp
119
121
  if (!options.host || !options.user || !options.password || !options.path)
120
- print_usage_and_die "The #{options.method} method requires host, user, password, and path to be set."
122
+ print_usage_and_die "The ftp deploy method requires host, path, user, and password to be set."
121
123
  end
122
124
  end
123
125
 
@@ -249,6 +251,7 @@ EOF
249
251
 
250
252
  puts "## Deploying via sftp to #{user}@#{host}:#{path}"
251
253
 
254
+ # `nil` is a valid value for user and/or pass.
252
255
  Net::SFTP.start(host, user, :password => pass) do |sftp|
253
256
  sftp.mkdir(path)
254
257
  Dir.chdir(self.inst.build_dir) do
@@ -1,7 +1,7 @@
1
1
  module Middleman
2
2
  module Deploy
3
3
  PACKAGE = "middleman-deploy"
4
- VERSION = "0.1.2"
4
+ VERSION = "0.1.3"
5
5
  TAGLINE = "Deploy a middleman built site over rsync, ftp, sftp, or git (e.g. gh-pages on github)."
6
6
  end
7
7
  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.1.2
4
+ version: 0.1.3
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-08-09 00:00:00.000000000 Z
12
+ date: 2013-09-21 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: middleman-core