middleman-deploy 0.1.0 → 0.1.1

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.
data/Gemfile CHANGED
@@ -10,6 +10,7 @@ group :development do
10
10
  end
11
11
 
12
12
  group :test do
13
+ gem "compass"
13
14
  gem "cucumber"
14
15
  gem "fivemat"
15
16
  gem "aruba"
data/README.md CHANGED
@@ -1,149 +1,124 @@
1
- Middleman Deploy - Deploy a [middleman](http://middlemanapp.com/)
2
- built site over rsync, ftp, sftp, or git (e.g. gh-pages on github).
1
+ # middleman-deploy [![Build Status](https://travis-ci.org/tvaughan/middleman-deploy.png?branch=master)](https://travis-ci.org/tvaughan/middleman-deploy)
3
2
 
4
- [![Build Status](https://secure.travis-ci.org/tvaughan/middleman-deploy.png)](http://travis-ci.org/tvaughan/middleman-deploy)
3
+ Deploys a [middleman](http://middlemanapp.com/) built site via **rsync**,
4
+ **ftp**, **sftp**, or **git** (e.g. gh-pages on github).
5
5
 
6
- # QUICK START
6
+ ## Installation
7
7
 
8
- ## Step 1
8
+ Add this to the Gemfile of the repository of your middleman site:
9
9
 
10
- middleman init example-site
11
- cd example-site
10
+ ```ruby
11
+ gem "middleman-deploy"
12
+ ```
13
+
14
+ and run `bundle install`.
12
15
 
13
- ## Step 2
16
+ ## Usage
14
17
 
15
- Edit `Gemfile`, and add:
18
+ ```
19
+ $ middleman build [--clean]
20
+ $ middleman deploy [--build-before]
21
+ ```
16
22
 
17
- gem "middleman-deploy", ">= 0.1.0"
23
+ To automatically run `middleman build` during `middleman deploy`, turn on the
24
+ `build_before` option while activating the deploy extension:
18
25
 
19
- Then run:
26
+ ```ruby
27
+ activate :deploy do |deploy|
28
+ # ...
29
+ deploy.build_before = true # default: false
30
+ end
31
+ ```
20
32
 
21
- bundle install
33
+ ## Possible Configurations
22
34
 
23
- ## Step 3a - Rsync setup
35
+ Middleman-deploy can deploy a site via rsync, ftp, sftp, or git.
24
36
 
25
- First be sure that `rsync` is installed.
37
+ ### rsync
26
38
 
27
- **These settings are required.**
39
+ Make sure that `rsync` is installed, and activate the extension by adding the
40
+ following to `config.rb`:
28
41
 
29
- Edit `config.rb`, and add:
42
+ ```ruby
43
+ activate :deploy do |deploy|
44
+ deploy.method = :rsync
45
+ deploy.user = "tvaughan"
46
+ deploy.host = "www.example.com"
47
+ deploy.path = "/srv/www/site"
48
+ # Optional Settings
49
+ # deploy.port = 5309 # ssh port, default: 22
50
+ # deploy.clean = true # remove orphaned files on remote host, default: false
51
+ end
52
+ ```
30
53
 
31
- activate :deploy do |deploy|
32
- deploy.method = :rsync
33
- deploy.user = "tvaughan"
34
- deploy.host = "www.example.com"
35
- deploy.path = "/srv/www/site"
36
- end
54
+ ### Git (e.g. GitHub Pages)
37
55
 
38
- Adjust these values accordingly.
56
+ Make sure that `git` is installed, and activate the extension by adding the
57
+ following to `config.rb`:
39
58
 
40
- **These settings are optional.**
59
+ ```ruby
60
+ activate :deploy do |deploy|
61
+ deploy.method = :git
62
+ # Optional Settings
63
+ # deploy.remote = "custom-remote" # remote name or git url, default: origin
64
+ # deploy.branch = "custom-branch" # default: gh-pages
65
+ end
66
+ ```
41
67
 
42
- To use a particular SSH port, add:
68
+ If you use a remote name, you must first add it using `git remote add`. Run
69
+ `git remote -v` to see a list of possible remote names. If you use a git url,
70
+ it must end with '.git'.
43
71
 
44
- deploy.port = 5309
72
+ Afterwards, the `build` directory will become a git repo. This branch will be
73
+ created on the remote if it doesn't already exist.
45
74
 
46
- Default is `22`.
75
+ ### FTP
47
76
 
48
- To remove orphaned files or directories on the remote host, add:
77
+ Activate the extension by adding the following to `config.rb`:
49
78
 
50
- deploy.clean = true
79
+ ```ruby
80
+ activate :deploy do |deploy|
81
+ deploy.method = :ftp
82
+ deploy.host = "ftp.example.com"
83
+ deploy.user = "tvaughan"
84
+ deploy.password = "secret"
85
+ deploy.path = "/srv/www/site"
86
+ end
87
+ ```
51
88
 
52
- Default is `false`.
89
+ ### SFTP
53
90
 
54
- ## Step 3b - Git setup
91
+ Activate the extension by adding the following to `config.rb`:
55
92
 
56
- First be sure that `git` is installed.
93
+ ```ruby
94
+ activate :deploy do |deploy|
95
+ deploy.method = :sftp
96
+ deploy.host = "sftp.example.com"
97
+ deploy.user = "tvaughan"
98
+ deploy.password = "secret"
99
+ deploy.path = "/srv/www/site"
100
+ end
101
+ ```
57
102
 
58
- **These settings are required.**
103
+ ## Breaking Changes
59
104
 
60
- Edit `config.rb`, and add:
61
-
62
- activate :deploy do |deploy|
63
- deploy.method = :git
64
- end
65
-
66
- By default this will deploy to the `gh-pages` branch on the `origin`
67
- remote. The `build` directory will become a git repo.
68
-
69
- **These settings are optional.**
70
-
71
- To use a particular remote, add:
72
-
73
- deploy.remote = "some-other-remote-name"
74
-
75
- Default is `origin`. This can be a remote name or a git url.
76
-
77
- If you use a remote name, you must first add it using `git remote
78
- add`. Run `git remote -v` to see a list of possible remote names. If
79
- you use a git url, it must end with '.git'.
80
-
81
- To use a particular branch, add:
82
-
83
- deploy.branch = "some-other-branch-name"
84
-
85
- Default is `gh-pages`. This branch will be created on the remote if it
86
- doesn't already exist.
87
-
88
- ## Step 3c - FTP setup
89
-
90
- **These settings are required.**
91
-
92
- Edit `config.rb`, and add:
93
-
94
- activate :deploy do |deploy|
95
- deploy.method = :ftp
96
- deploy.host = "ftp.example.com"
97
- deploy.user = "tvaughan"
98
- deploy.password = "secret"
99
- deploy.path = "/srv/www/site"
100
- end
101
-
102
- Adjust these values accordingly.
103
-
104
- ## Step 3d - SFTP setup
105
-
106
- **These settings are required.**
107
-
108
- Edit `config.rb`, and add:
109
-
110
- activate :deploy do |deploy|
111
- deploy.method = :sftp
112
- deploy.host = "sftp.example.com"
113
- deploy.user = "tvaughan"
114
- deploy.password = "secret"
115
- deploy.path = "/srv/www/site"
116
- end
117
-
118
- Adjust these values accordingly.
119
-
120
- ## Step 4
121
-
122
- middleman build [--clean]
123
- middleman deploy [--build-before]
124
-
125
- To run `middleman build` before `middleman deploy`, add:
126
-
127
- deploy.build_before = true
128
-
129
- Default is `false`.
130
-
131
- ## BREAKING CHANGES
132
-
133
- * v0.1.0
134
-
135
- * Removed the `--clean` command-line option. This option only applied
136
- to the rsync deploy method. The idea going forward is that
137
- command-line options must apply to all deploy methods. Options that
138
- are specific to a deploy method will only be available in
139
- `config.rb`.
140
-
141
- * Removed `deploy` from the `after_build` hook. This caused a
142
- `deploy` to be run each time `build` was called. This workflow never
143
- made sense. `deploy` was added to the `after_build` hook simply
144
- because it was available.
145
-
146
- ## NOTES
105
+ * `v0.1.0`
106
+ - Removed the `--clean` command-line option. This option only applied to
107
+ the rsync deploy method. The idea going forward is that command-line
108
+ options must apply to all deploy methods. Options that are specific to a
109
+ deploy method will only be available in `config.rb`.
110
+ - Removed `deploy` from the `after_build` hook. This caused a `deploy` to
111
+ be run each time `build` was called. This workflow never made
112
+ sense. `deploy` was added to the `after_build` hook simply because it
113
+ was available.
114
+
115
+ ## Thanks!
116
+
117
+ A **BIG** thanks to
118
+ [everyone who has contributed](https://github.com/tvaughan/middleman-deploy/graphs/contributors)!
119
+ Almost all pull requests are accepted.
120
+
121
+ ## Other
147
122
 
148
123
  Inspired by the rsync task in
149
124
  [Octopress](https://github.com/imathis/octopress).
@@ -36,8 +36,7 @@ module Middleman
36
36
  end
37
37
  if build_before
38
38
  # http://forum.middlemanapp.com/t/problem-with-the-build-task-in-an-extension
39
- builder = ::Middleman::Cli::Build.new(args=[], options={:instrument=>false})
40
- builder.build
39
+ run("middleman build") || exit(1)
41
40
  end
42
41
  send("deploy_#{self.deploy_options.method}")
43
42
  end
@@ -1,7 +1,7 @@
1
1
  module Middleman
2
2
  module Deploy
3
3
  PACKAGE = "middleman-deploy"
4
- VERSION = "0.1.0"
4
+ VERSION = "0.1.1"
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
@@ -8,7 +8,7 @@ Gem::Specification.new do |s|
8
8
  s.platform = Gem::Platform::RUBY
9
9
  s.authors = ["Tom Vaughan"]
10
10
  s.email = ["thomas.david.vaughan@gmail.com"]
11
- s.homepage = "http://tvaughan.github.com/middleman-deploy/"
11
+ s.homepage = "http://tvaughan.github.io/middleman-deploy/"
12
12
  s.summary = Middleman::Deploy::TAGLINE
13
13
  s.description = Middleman::Deploy::TAGLINE
14
14
  s.license = "MIT"
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.0
4
+ version: 0.1.1
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-07-17 00:00:00.000000000 Z
12
+ date: 2013-07-29 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: middleman-core
@@ -72,7 +72,6 @@ files:
72
72
  - Gemfile
73
73
  - README.md
74
74
  - Rakefile
75
- - THANKS
76
75
  - features/support/env.rb
77
76
  - lib/middleman-deploy.rb
78
77
  - lib/middleman-deploy/commands.rb
@@ -80,7 +79,7 @@ files:
80
79
  - lib/middleman-deploy/pkg-info.rb
81
80
  - lib/middleman_extension.rb
82
81
  - middleman-deploy.gemspec
83
- homepage: http://tvaughan.github.com/middleman-deploy/
82
+ homepage: http://tvaughan.github.io/middleman-deploy/
84
83
  licenses:
85
84
  - MIT
86
85
  post_install_message:
@@ -93,12 +92,18 @@ required_ruby_version: !ruby/object:Gem::Requirement
93
92
  - - ! '>='
94
93
  - !ruby/object:Gem::Version
95
94
  version: '0'
95
+ segments:
96
+ - 0
97
+ hash: 1810602657871223633
96
98
  required_rubygems_version: !ruby/object:Gem::Requirement
97
99
  none: false
98
100
  requirements:
99
101
  - - ! '>='
100
102
  - !ruby/object:Gem::Version
101
103
  version: '0'
104
+ segments:
105
+ - 0
106
+ hash: 1810602657871223633
102
107
  requirements: []
103
108
  rubyforge_project:
104
109
  rubygems_version: 1.8.23
data/THANKS DELETED
@@ -1,4 +0,0 @@
1
- Ben Cates - Git deploy method.
2
- Gilbert Townshend - Bug reports and feature requests.
3
- Konstantin Gribov -- Git deploy method improvements.
4
- Benjamin Knofe -- FTP deploy method and Git improvements.