capistrano-middleman-presentation 0.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.gitignore +14 -0
- data/Gemfile +6 -0
- data/LICENSE.txt +22 -0
- data/README.md +49 -0
- data/Rakefile +2 -0
- data/capistrano-middleman-presentation.gemspec +24 -0
- data/lib/capistrano/middleman/presentation/version.rb +7 -0
- data/lib/capistrano/middleman/presentation.rb +1 -0
- data/lib/capistrano/tasks/middleman_presentation.rake +60 -0
- data/lib/capistrano-middleman.rb +1 -0
- metadata +97 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: dfcfbeecd88ddb8a25f9ef8c618492a803ffedec
|
4
|
+
data.tar.gz: a81d1400e9aa5b0de5d3065db00f0b614ad8b97a
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 05b6ebc24142440e0540a935693de6d507551d518d6985b31e66e58a591394fd63d5e0246cd9565b05945d990e1414529e18164984679aaeae6c61256eaec6b7
|
7
|
+
data.tar.gz: f1b0270f56caa979b16b1e27d256345aa8f75c4c18df97172b02242a03f70ae440393a8391edab7c854a6eac6ff8016e2747881e4a134684b0ca9e8a9fd2b70c
|
data/.gitignore
ADDED
data/Gemfile
ADDED
data/LICENSE.txt
ADDED
@@ -0,0 +1,22 @@
|
|
1
|
+
Copyright (c) 2015 Max Meyer
|
2
|
+
|
3
|
+
MIT License
|
4
|
+
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining
|
6
|
+
a copy of this software and associated documentation files (the
|
7
|
+
"Software"), to deal in the Software without restriction, including
|
8
|
+
without limitation the rights to use, copy, modify, merge, publish,
|
9
|
+
distribute, sublicense, and/or sell copies of the Software, and to
|
10
|
+
permit persons to whom the Software is furnished to do so, subject to
|
11
|
+
the following conditions:
|
12
|
+
|
13
|
+
The above copyright notice and this permission notice shall be
|
14
|
+
included in all copies or substantial portions of the Software.
|
15
|
+
|
16
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
17
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
18
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
19
|
+
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
20
|
+
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
21
|
+
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
22
|
+
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
data/README.md
ADDED
@@ -0,0 +1,49 @@
|
|
1
|
+
# Capistrano::Middleman
|
2
|
+
|
3
|
+
Deploy middleman-presentation slides with the help of capistrano 3.
|
4
|
+
[`capistrano-scm-copy`](https://github.com/wercker/capistrano-scm-copy) was
|
5
|
+
quite helpful as template for this gem.
|
6
|
+
|
7
|
+
## Installation
|
8
|
+
|
9
|
+
Add this line to your application's Gemfile:
|
10
|
+
|
11
|
+
```ruby
|
12
|
+
gem 'capistrano-middleman-presentation', require: false
|
13
|
+
```
|
14
|
+
|
15
|
+
And then execute:
|
16
|
+
|
17
|
+
$ bundle
|
18
|
+
|
19
|
+
Or install it yourself as:
|
20
|
+
|
21
|
+
$ gem install capistrano-middleman-presentation
|
22
|
+
|
23
|
+
## Usage
|
24
|
+
|
25
|
+
You just need to change `:scm` to `:middleman_presentation`.
|
26
|
+
|
27
|
+
```
|
28
|
+
set :scm, :middleman_presentation
|
29
|
+
```
|
30
|
+
|
31
|
+
And make sure you've got the following software installed:
|
32
|
+
|
33
|
+
Machine running Capistrano:
|
34
|
+
|
35
|
+
* Capistrano 3
|
36
|
+
* tar
|
37
|
+
|
38
|
+
Servers:
|
39
|
+
|
40
|
+
* mktemp
|
41
|
+
* tar
|
42
|
+
|
43
|
+
## Contributing
|
44
|
+
|
45
|
+
1. Fork it ( https://github.com/[my-github-username]/capistrano-middleman-presentation/fork )
|
46
|
+
2. Create your feature branch (`git checkout -b my-new-feature`)
|
47
|
+
3. Commit your changes (`git commit -am 'Add some feature'`)
|
48
|
+
4. Push to the branch (`git push origin my-new-feature`)
|
49
|
+
5. Create a new Pull Request
|
data/Rakefile
ADDED
@@ -0,0 +1,24 @@
|
|
1
|
+
# coding: utf-8
|
2
|
+
lib = File.expand_path('../lib', __FILE__)
|
3
|
+
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
4
|
+
require 'capistrano/middleman/presentation/version'
|
5
|
+
|
6
|
+
Gem::Specification.new do |spec|
|
7
|
+
spec.name = 'capistrano-middleman-presentation'
|
8
|
+
spec.version = Capistrano::Middleman::Presentation::VERSION
|
9
|
+
spec.authors = ['Max Meyer']
|
10
|
+
spec.email = ['dev@fedux.org']
|
11
|
+
spec.summary = %q{Middleman Presentation deploy strategy for capistrano}
|
12
|
+
spec.homepage = 'https://github.com/maxmeyer/capistrano-middleman-presentation'
|
13
|
+
spec.license = 'MIT'
|
14
|
+
|
15
|
+
spec.files = `git ls-files -z`.split("\x0")
|
16
|
+
spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
|
17
|
+
spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
|
18
|
+
spec.require_paths = ['lib']
|
19
|
+
|
20
|
+
spec.add_development_dependency 'bundler', '~> 1.7'
|
21
|
+
|
22
|
+
spec.add_runtime_dependency 'middleman-presentation', '~> 0.16.0'
|
23
|
+
spec.add_runtime_dependency 'capistrano', '~> 3'
|
24
|
+
end
|
@@ -0,0 +1 @@
|
|
1
|
+
load File.expand_path('../tasks/../middleman-presentation.rake', __FILE__)
|
@@ -0,0 +1,60 @@
|
|
1
|
+
namespace :middleman_presentation do
|
2
|
+
middleman_presentation_options = Array(fetch(:middleman_presentation_options, %w(--verbose)))
|
3
|
+
|
4
|
+
archive_name = fetch :archive_name, 'archive.tar.gz'
|
5
|
+
build_dir = fetch :build_dir, 'build'
|
6
|
+
source_dir = fetch :source_dir, 'source'
|
7
|
+
exclude_dir = Array(fetch(:exclude_dir))
|
8
|
+
exclude_args = exclude_dir.map { |dir| "--exclude '#{dir}'"}
|
9
|
+
|
10
|
+
tar_roles = fetch(:tar_roles, :all)
|
11
|
+
|
12
|
+
desc "Archive files to #{archive_name}"
|
13
|
+
file archive_name => source_dir do |t|
|
14
|
+
cmd = %w(middleman-presentation build)
|
15
|
+
cmd.concat middleman_presentation_options
|
16
|
+
|
17
|
+
sh cmd.join(' ')
|
18
|
+
|
19
|
+
files = FileList.new(File.join(build_dir, '*')).sub(%r{#{build_dir}/?}, '')
|
20
|
+
|
21
|
+
cmd = %w(tar -cvzf)
|
22
|
+
cmd << t.name
|
23
|
+
cmd << "-C #{build_dir}"
|
24
|
+
cmd.concat exclude_args
|
25
|
+
cmd.concat files
|
26
|
+
|
27
|
+
sh cmd.join(' ')
|
28
|
+
end
|
29
|
+
|
30
|
+
desc "Deploy #{archive_name} to release_path"
|
31
|
+
task create_release: archive_name do |t|
|
32
|
+
tarball = t.prerequisites.first
|
33
|
+
|
34
|
+
on release_roles tar_roles do |host|
|
35
|
+
# Make sure the release directory exists
|
36
|
+
puts "==> release_path: #{release_path} is created on #{tar_roles} roles <=="
|
37
|
+
execute :install, "-d -m 755", release_path
|
38
|
+
|
39
|
+
# Create a temporary file on the server
|
40
|
+
tmp_file = capture('mktemp')
|
41
|
+
|
42
|
+
# Upload the archive, extract it and finally remove the tmp_file
|
43
|
+
upload!(tarball, tmp_file)
|
44
|
+
|
45
|
+
execute :tar, '-xzf', tmp_file, '-C', release_path
|
46
|
+
execute :rm, '-f', tmp_file
|
47
|
+
end
|
48
|
+
end
|
49
|
+
|
50
|
+
desc 'Cleaning up deploy'
|
51
|
+
task :clean do |t|
|
52
|
+
FileUtils.rm_rf build_dir
|
53
|
+
FileUtils.rm_rf archive_name
|
54
|
+
end
|
55
|
+
|
56
|
+
after 'deploy:finished', 'middleman_presentation:clean'
|
57
|
+
|
58
|
+
task :check
|
59
|
+
task :set_current_revision
|
60
|
+
end
|
@@ -0,0 +1 @@
|
|
1
|
+
require 'capistrano/middleman/version'
|
metadata
ADDED
@@ -0,0 +1,97 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: capistrano-middleman-presentation
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.0.1
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Max Meyer
|
8
|
+
autorequire:
|
9
|
+
bindir: bin
|
10
|
+
cert_chain: []
|
11
|
+
date: 2015-02-25 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: bundler
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - "~>"
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: '1.7'
|
20
|
+
type: :development
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - "~>"
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: '1.7'
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: middleman-presentation
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - "~>"
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: 0.16.0
|
34
|
+
type: :runtime
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - "~>"
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: 0.16.0
|
41
|
+
- !ruby/object:Gem::Dependency
|
42
|
+
name: capistrano
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - "~>"
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: '3'
|
48
|
+
type: :runtime
|
49
|
+
prerelease: false
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - "~>"
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: '3'
|
55
|
+
description:
|
56
|
+
email:
|
57
|
+
- dev@fedux.org
|
58
|
+
executables: []
|
59
|
+
extensions: []
|
60
|
+
extra_rdoc_files: []
|
61
|
+
files:
|
62
|
+
- ".gitignore"
|
63
|
+
- Gemfile
|
64
|
+
- LICENSE.txt
|
65
|
+
- README.md
|
66
|
+
- Rakefile
|
67
|
+
- capistrano-middleman-presentation.gemspec
|
68
|
+
- lib/capistrano-middleman.rb
|
69
|
+
- lib/capistrano/middleman/presentation.rb
|
70
|
+
- lib/capistrano/middleman/presentation/version.rb
|
71
|
+
- lib/capistrano/tasks/middleman_presentation.rake
|
72
|
+
homepage: https://github.com/maxmeyer/capistrano-middleman-presentation
|
73
|
+
licenses:
|
74
|
+
- MIT
|
75
|
+
metadata: {}
|
76
|
+
post_install_message:
|
77
|
+
rdoc_options: []
|
78
|
+
require_paths:
|
79
|
+
- lib
|
80
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
81
|
+
requirements:
|
82
|
+
- - ">="
|
83
|
+
- !ruby/object:Gem::Version
|
84
|
+
version: '0'
|
85
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
86
|
+
requirements:
|
87
|
+
- - ">="
|
88
|
+
- !ruby/object:Gem::Version
|
89
|
+
version: '0'
|
90
|
+
requirements: []
|
91
|
+
rubyforge_project:
|
92
|
+
rubygems_version: 2.4.5
|
93
|
+
signing_key:
|
94
|
+
specification_version: 4
|
95
|
+
summary: Middleman Presentation deploy strategy for capistrano
|
96
|
+
test_files: []
|
97
|
+
has_rdoc:
|