octopress-deploy 1.0.0.rc.2 → 1.0.0.rc.3

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 3efe926242e9c3f0936e369b1c3881909a2db698
4
- data.tar.gz: 1093e88356c8500b3fe8a8cc0a730c9cefb70441
3
+ metadata.gz: bedbad944ec84caf8996e0ad73948eb63a0018dd
4
+ data.tar.gz: 04745c41ed2ae1879c9896645d29add34f5352ee
5
5
  SHA512:
6
- metadata.gz: 3de6a859d40bb71a6be9d544780965a325957d41d2b5012ebdd5755afb140f75f21f176aff62981c8196dd12ad327e027a1af7b8c5e060acfef5a836cc77a73c
7
- data.tar.gz: 2518b7c9a75884da919a445c8eb709a0f657e747b36c9d23ce7abbe829158f47806f6b08492babac0f807745df86db42cf402f70d7ca6382f54d70a0e8d1ae7e
6
+ metadata.gz: 4386f246e4e5a2ef29376d9702184d0a47e9948b1a1c7605f6fc76e38eeabac1d048bfa485d23b63a5be65bee80ea134974f6b5d1d88198cc0a4b6b21989d033
7
+ data.tar.gz: 507f9b34ca94e126f868929c9ea373332a3e743279a579d6357ca736553734126417b2c10735d84f27b646075375f50601390642e4009657bea25a110c495194
data/CHANGELOG.md ADDED
@@ -0,0 +1,25 @@
1
+ # Octopress Deploy Changelog
2
+
3
+ ## Current version
4
+
5
+ ### 1.0.0 RC3 - 2014-03-22
6
+
7
+ #### Minor Enhancements
8
+ - Default rsync flags are now `-rltDvz` so they no
9
+ longer try to set file permissions or preserve owner and
10
+ group name on remote. Issue: #19
11
+ - Added `flags` config for rsync allows customization of flags.
12
+ - Added support for octopress-ink documentation system.
13
+ - Added a `update_docs` Rake task to update assets/docs/index.markdown from README.md.
14
+
15
+ #### Bug Fixes
16
+ - No longer stripping forward slashes on remote_path. Issue #18
17
+ - `pull` command no longer promises a default directory.
18
+
19
+ ## Past versions
20
+
21
+ ### 1.0.0 RC2 - 2014-03-18
22
+ - CHANGE: `add_bucket` command becomes `add-bucket`
23
+
24
+ ### 1.0.0 RC1 - 2014-03-17
25
+ - Initial release
data/README.md CHANGED
@@ -1,16 +1,14 @@
1
1
  # Octopress Deploy
2
2
 
3
- Deployment tools for Octopress and Jekyll blogs (or really any static site).
3
+ Currently this gem supports deploying static sites using S3, Git and Rsync. Pull request to support other deployment methods are welcome.
4
4
 
5
- Currently this supports deploying through S3, Git and Rsync. Pull request to support other deployment methods are welcome.
6
-
7
- [![Gem Version](https://badge.fury.io/rb/octopress-deploy.png)](http://badge.fury.io/rb/octopress-deploy)
5
+ <!--[![Gem Version](https://badge.fury.io/rb/octopress-deploy.png)](http://badge.fury.io/rb/octopress-deploy)-->
8
6
 
9
7
  ## Installation
10
8
 
11
9
  Add this line to your application's Gemfile:
12
10
 
13
- gem 'octopress-deploy', '~> 1.0.0.rc.1'
11
+ gem 'octopress-deploy', '~> 1.0.0.rc.2'
14
12
 
15
13
  And then execute:
16
14
 
@@ -56,7 +54,7 @@ $ octopress deploy --config _staging.yml
56
54
  With the `pull` command, you can pull your site down into a local directory.
57
55
 
58
56
  ```sh
59
- octopress deploy pull <DIRECTORY>
57
+ octopress deploy pull <DIR>
60
58
  ```
61
59
 
62
60
  Mainly you'd do this if you're troubleshooting deployment and you want to see if it's working how you expected.
@@ -101,7 +99,7 @@ Note: configurations in `_deploy.yml` will override environment variables so be
101
99
  If your AWS credentials are properly configured, you can add a new bucket with this command.
102
100
 
103
101
  ```sh
104
- octopress deploy add_bucket
102
+ octopress deploy add-bucket
105
103
  ```
106
104
 
107
105
  This will connect to AWS, create a new S3 bucket, and configure it for static website hosting. This command can use the settings in your deployment configuration or you can pass options to override those settings.
data/Rakefile CHANGED
@@ -1 +1,8 @@
1
1
  require "bundler/gem_tasks"
2
+ require "octopress-ink"
3
+
4
+ desc "Copy Readme and Changelog into docs"
5
+ task :update_docs do
6
+ Octopress::Ink.copy_doc 'README.md', 'assets/docs/index.markdown'
7
+ Octopress::Ink.copy_doc 'CHANGELOG.md', 'assets/docs/changelog/index.markdown'
8
+ end
@@ -0,0 +1,27 @@
1
+ ---
2
+ title: "Octopress Deploy Changelog"
3
+ ---
4
+
5
+ ## Current version
6
+
7
+ ### 1.0.0 RC3 - 2014-03-22
8
+
9
+ #### Minor Enhancements
10
+ - Default rsync flags are now `-rltDvz` so they no
11
+ longer try to set file permissions or preserve owner and
12
+ group name on remote. Issue: #19
13
+ - Added `flags` config for rsync allows customization of flags.
14
+ - Added support for octopress-ink documentation system.
15
+ - Added a `update_docs` Rake task to update assets/docs/index.markdown from README.md.
16
+
17
+ #### Bug Fixes
18
+ - No longer stripping forward slashes on remote_path. Issue #18
19
+ - `pull` command no longer promises a default directory.
20
+
21
+ ## Past versions
22
+
23
+ ### 1.0.0 RC2 - 2014-03-18
24
+ - CHANGE: `add_bucket` command becomes `add-bucket`
25
+
26
+ ### 1.0.0 RC1 - 2014-03-17
27
+ - Initial release
@@ -0,0 +1,179 @@
1
+ ---
2
+ title: "Octopress Deploy"
3
+ ---
4
+
5
+ Currently this gem supports deploying static sites using S3, Git and Rsync. Pull request to support other deployment methods are welcome.
6
+
7
+ <!--[![Gem Version](https://badge.fury.io/rb/octopress-deploy.png)](http://badge.fury.io/rb/octopress-deploy)-->
8
+
9
+ ## Installation
10
+
11
+ Add this line to your application's Gemfile:
12
+
13
+ gem 'octopress-deploy', '~> 1.0.0.rc.2'
14
+
15
+ And then execute:
16
+
17
+ $ bundle
18
+
19
+ Or install it yourself as:
20
+
21
+ $ gem install octopress-deploy --pre
22
+
23
+ ## Set up
24
+
25
+ First set up a configuration file for your deployment method.
26
+
27
+ ```sh
28
+ $ octopress deploy init git # or rsync, s3
29
+ ```
30
+
31
+ This will generate a `_deploy.yml` file in your current
32
+ directory which you can edit to add any necessary configuration.
33
+ **Remember to add your configuration to `.gitignore` to be sure
34
+ you never commit sensitive information to your repository.**
35
+
36
+ ## Deploying
37
+
38
+ Deployment is tailored to work with Jekyll, but it will work for
39
+ any static site. Simply make sure your configuration points to
40
+ the root directory of your static site (For Jekyll, that's
41
+ probably `_site`) then tell Octopress to deploy it.
42
+
43
+ ```sh
44
+ $ octopress deploy
45
+ ```
46
+
47
+ This will read your `_deploy.yml` configuration and deploy your
48
+ site. If you like, you can specify a configuration file.
49
+
50
+ ```sh
51
+ $ octopress deploy --config _staging.yml
52
+ ```
53
+
54
+ ## Pull down your site
55
+
56
+ With the `pull` command, you can pull your site down into a local directory.
57
+
58
+ ```sh
59
+ octopress deploy pull <DIR>
60
+ ```
61
+
62
+ Mainly you'd do this if you're troubleshooting deployment and you want to see if it's working how you expected.
63
+
64
+ ## Amazon S3 Deployment Configuration
65
+
66
+ To deploy with Amazon S3 you will need to install the [aws-sdk gem](https://rubygems.org/gems/aws-sdk).
67
+
68
+ Important: when using S3, you must add your `_deploy.yml` to your .gitignore to prevent accidentally sharing
69
+ account access information.
70
+
71
+ | Config | Description | Default
72
+ |:--------------------|:------------------------------------------------------|:-------------|
73
+ | `method` | Deployment method, in this case use 's3' | |
74
+ | `site_dir` | Path to static site files | _site |
75
+ | `bucket_name` | S3 bucket name | |
76
+ | `access_key_id` | AWS access key | |
77
+ | `secret_access_key` | AWS secret key | |
78
+ | `remote_path` | Directory files should be synced to. | / |
79
+ | `verbose` | [optional] Display all file actions during deploy. | true |
80
+ | `region` | [optional] Region for your AWS bucket | us-east-1 |
81
+ | `delete` | Delete files in `remote_path` not found in `site_dir` | false |
82
+
83
+ If you choose a bucket which doesn't yet exist, Octopress Deploy will offer to create it for you, and offer to configure it as a static website.
84
+
85
+ If you configure Octopress to delete files, all files found in the `remote_path` on S3 bucket will be removed unless they match local site files.
86
+ If `remote_path` is a subdirectory, only files in that subdirectory will be evaluated for deletion.
87
+
88
+ ### AWS config via ENV
89
+
90
+ If you prefer, you can store AWS access credentials in environment variables instead of a conifiguration file.
91
+
92
+ | Config | ENV var |
93
+ |:--------------------|:-------------------------------|
94
+ | `access_key_id` | AWS_ACCESS_KEY_ID |
95
+ | `secret_access_key` | AWS_SECRET_ACCESS_KEY |
96
+
97
+ Note: configurations in `_deploy.yml` will override environment variables so be sure to remove those if you decide to use environment variables.
98
+
99
+ ### Add a new bucket
100
+
101
+ If your AWS credentials are properly configured, you can add a new bucket with this command.
102
+
103
+ ```sh
104
+ octopress deploy add-bucket
105
+ ```
106
+
107
+ This will connect to AWS, create a new S3 bucket, and configure it for static website hosting. This command can use the settings in your deployment configuration or you can pass options to override those settings.
108
+
109
+ | Option | Description | Default
110
+ |:--------------|:-------------------------------------------------|:---------------|
111
+ | `--name` | Override the `bucket_name` configuration | |
112
+ | `--region` | Override the `region` configuration | |
113
+ | `--index` | Specify an index page for your site | index.html |
114
+ | `--error` | Specify an error page for your site | error.html |
115
+ | `--config` | Use a custom configuration file | _deploy.yml |
116
+
117
+ You'll only need to pass options if you want to override settings in your deploy config file.
118
+
119
+ ## Git Deployment Configuration
120
+
121
+ Only `git_url` is required. Other options will default as shown below.
122
+
123
+ | Config | Description | Default
124
+ |:--------------|:-------------------------------------------------|:---------------|
125
+ | `method` | Deployment method, in this case use 'git' | |
126
+ | `site_dir` | Path to static site files | _site |
127
+ | `git_url` | Url for remote git repository | |
128
+ | `git_branch` | Deployment branch for git repository | master |
129
+ | `deploy_dir` | Directory where deployment files are staged | .deploy |
130
+ | `remote` | Name of git remote | deploy |
131
+
132
+ ## Rsync Deployment Configuration
133
+
134
+ | Config | Description | Default
135
+ |:---------------|:--------------------------------------------------|:---------------|
136
+ | `method` | Deployment method, in this case use 'rsync' | |
137
+ | `site_dir` | Path to static site files | _site |
138
+ | `user` | ssh user, e.g user@host.com | |
139
+ | `port` | ssh port | 22 |
140
+ | `remote_path` | Remote destination's document root | |
141
+ | `exclude_file` | Path to a file containing rsync exclusions | |
142
+ | `exclude` | Inline list of rsync exclusions | |
143
+ | `include` | Inline list of inclusions to override exclusions | |
144
+ | `delete` | Delete files in destination not found in source | false |
145
+
146
+ You can rsync to a local directory by configuring `remote_path` and leaving off `user` and `port`.
147
+
148
+ ## Contributing
149
+
150
+ 1. Fork it
151
+ 2. Create your feature branch (`git checkout -b my-new-feature`)
152
+ 3. Commit your changes (`git commit -am 'Add some feature'`)
153
+ 4. Push to the branch (`git push origin my-new-feature`)
154
+ 5. Create new Pull Request
155
+
156
+ ## License
157
+
158
+ Copyright (c) 2014 Brandon Mathis
159
+
160
+ MIT License
161
+
162
+ Permission is hereby granted, free of charge, to any person obtaining
163
+ a copy of this software and associated documentation files (the
164
+ "Software"), to deal in the Software without restriction, including
165
+ without limitation the rights to use, copy, modify, merge, publish,
166
+ distribute, sublicense, and/or sell copies of the Software, and to
167
+ permit persons to whom the Software is furnished to do so, subject to
168
+ the following conditions:
169
+
170
+ The above copyright notice and this permission notice shall be
171
+ included in all copies or substantial portions of the Software.
172
+
173
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
174
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
175
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
176
+ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
177
+ LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
178
+ OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
179
+ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
@@ -8,7 +8,6 @@ require 'octopress-deploy/version'
8
8
  require 'octopress-deploy/core_ext'
9
9
  require 'octopress-deploy/commands'
10
10
 
11
-
12
11
  module Octopress
13
12
  module Deploy
14
13
  autoload :Git, 'octopress-deploy/git'
@@ -130,5 +129,17 @@ FILE
130
129
  true
131
130
  end
132
131
  end
132
+
133
+ def self.gem_dir(*subdirs)
134
+ File.expand_path(File.join(File.dirname(__FILE__), '../', *subdirs))
135
+ end
136
+
133
137
  end
134
138
  end
139
+
140
+ begin
141
+ require 'octopress-ink'
142
+ require 'octopress-deploy/docs'
143
+ Octopress::Ink.register_plugin(Octopress::Deploy::DeployDocs)
144
+ rescue LoadError
145
+ end
@@ -12,8 +12,8 @@ module Octopress
12
12
  end
13
13
 
14
14
  c.command(:pull) do |c|
15
- c.syntax "pull <DIRECTORY>"
16
- c.description "Pull down the published copy of your site into a directory (default: ./site-pull)"
15
+ c.syntax "pull <DIR>"
16
+ c.description "Pull down the published copy of your site into DIR"
17
17
  c.option "config_file", "--config FILE", "The path to your config file (default: _deploy.yml)"
18
18
 
19
19
  c.action do |args, options|
@@ -0,0 +1,19 @@
1
+ module Octopress
2
+ module Deploy
3
+ class DeployDocs < Octopress::Ink::Plugin
4
+ def configuration
5
+ {
6
+ name: "Octopress Deploy",
7
+ description: "Deploy your site with Git, Rsync or S3.",
8
+ slug: "deploy",
9
+ assets_path: Octopress::Deploy.gem_dir('assets'),
10
+ version: Octopress::Deploy::VERSION,
11
+ }
12
+ end
13
+
14
+ def docs_base_path
15
+ 'docs/deploy'
16
+ end
17
+ end
18
+ end
19
+ end
@@ -4,6 +4,7 @@ module Octopress
4
4
 
5
5
  def initialize(options)
6
6
  @options = options
7
+ @flags = @options[:flags] || ' -rltDvz'
7
8
  @user = @options[:user]
8
9
  @port = @options[:port]
9
10
  @local = @options[:site_dir]
@@ -15,7 +16,6 @@ module Octopress
15
16
  @exclude_file = @options[:include_file]
16
17
  @exclude_file = File.expand_path(@include_file) if @include_file
17
18
  @delete = @options[:delete] || false
18
- @remote_path = @remote_path.sub(/^\//,'') #remove leading slash
19
19
  @pull_dir = @options[:dir]
20
20
  end
21
21
 
@@ -33,14 +33,15 @@ module Octopress
33
33
  local = ''
34
34
  remote = ''
35
35
 
36
- cmd = "rsync -avz "
37
- cmd << " -e " if @exclude_file || @exclude
38
- cmd << " --exclude-from #{@exclude_file} " if @exclude_file
39
- cmd << " --exclude #{@exclude} " if @exclude
40
- cmd << " --include-from #{@include_file} " if @include_file
41
- cmd << " --include #{@include} " if @include
42
- cmd << " --rsh='ssh -p#{@port}' " if @user && @port
43
- cmd << " --delete " if @delete
36
+ cmd = "rsync "
37
+ cmd << "#{@flags} "
38
+ cmd << " -e" if @exclude_file || @exclude
39
+ cmd << " --exclude-from #{@exclude_file}" if @exclude_file
40
+ cmd << " --exclude #{@exclude}" if @exclude
41
+ cmd << " --include-from #{@include_file}" if @include_file
42
+ cmd << " --include #{@include}" if @include
43
+ cmd << " --rsh='ssh -p#{@port}'" if @user && @port
44
+ cmd << " --delete" if @delete
44
45
 
45
46
  local << " #{File.join(@local, '')} "
46
47
  remote << " #{@user}:" if @user
@@ -59,12 +60,12 @@ module Octopress
59
60
  #{"remote_path: #{options[:remote_path]}".ljust(40)} # Destination directory
60
61
  #{"delete: #{options[:delete]}".ljust(40)} # Remove files from destination which don't match files in source
61
62
 
63
+ #{"# flags: #{options[:flags] || '-rltDvz'}".ljust(40)} # Modify flags as necessary to suit your hosting setup
62
64
  #{"# port: #{options[:port]}".ljust(40)} # If your host requires a non standard port
63
65
  #{"# exclude: ".ljust(40)} # Path to file containing list of files to exclude
64
66
  #{"# exclude-file: ".ljust(40)} # Path to file containing list of files to exclude
65
67
  #{"# include: ".ljust(40)} # Path to file containing list of files to include
66
68
  #{"# include-file: ".ljust(40)} # Path to file containing list of files to include
67
-
68
69
  CONFIG
69
70
  end
70
71
 
@@ -1,5 +1,5 @@
1
1
  module Octopress
2
2
  module Deploy
3
- VERSION = "1.0.0.rc.2"
3
+ VERSION = "1.0.0.rc.3"
4
4
  end
5
5
  end
@@ -20,6 +20,7 @@ Gem::Specification.new do |spec|
20
20
  spec.add_runtime_dependency "octopress", "~> 3.0.0.rc.1"
21
21
  spec.add_runtime_dependency "colorator"
22
22
 
23
+ spec.add_development_dependency "octopress-ink"
23
24
  spec.add_development_dependency "bundler", "~> 1.3"
24
25
  spec.add_development_dependency "rake"
25
26
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: octopress-deploy
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0.rc.2
4
+ version: 1.0.0.rc.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Brandon Mathis
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-03-19 00:00:00.000000000 Z
11
+ date: 2014-03-23 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: octopress
@@ -38,6 +38,20 @@ dependencies:
38
38
  - - '>='
39
39
  - !ruby/object:Gem::Version
40
40
  version: '0'
41
+ - !ruby/object:Gem::Dependency
42
+ name: octopress-ink
43
+ requirement: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - '>='
46
+ - !ruby/object:Gem::Version
47
+ version: '0'
48
+ type: :development
49
+ prerelease: false
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - '>='
53
+ - !ruby/object:Gem::Version
54
+ version: '0'
41
55
  - !ruby/object:Gem::Dependency
42
56
  name: bundler
43
57
  requirement: !ruby/object:Gem::Requirement
@@ -74,13 +88,17 @@ extensions: []
74
88
  extra_rdoc_files: []
75
89
  files:
76
90
  - .gitignore
91
+ - CHANGELOG.md
77
92
  - Gemfile
78
93
  - LICENSE.txt
79
94
  - README.md
80
95
  - Rakefile
96
+ - assets/docs/changelog/index.markdown
97
+ - assets/docs/index.markdown
81
98
  - lib/octopress-deploy.rb
82
99
  - lib/octopress-deploy/commands.rb
83
100
  - lib/octopress-deploy/core_ext.rb
101
+ - lib/octopress-deploy/docs.rb
84
102
  - lib/octopress-deploy/git.rb
85
103
  - lib/octopress-deploy/rsync.rb
86
104
  - lib/octopress-deploy/s3.rb