captainu-chinook 0.1.1 → 0.1.2
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 +4 -4
- data/lib/chinook/capistrano/symlink.rb +26 -0
- data/lib/chinook/capistrano.rb +1 -1
- data/lib/chinook/version.rb +1 -1
- data/readme.markdown +13 -0
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8a2f080938d3d45b3fa7d23f248bc082a8e7a350
|
4
|
+
data.tar.gz: c1efcb423009afcc4b4798f8f16a9ca37a59e868
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2f90797e20e927721687317b295d1635bc81677213d9983f73df07fb7d9fcaa61f5faad505e4a06e2ae8918403210195c97e351dd5112f33015e9e33e2aa7105
|
7
|
+
data.tar.gz: adf5fb0b81810e204ce8ace7cecf77cb17a06217d01cbafc990574b7c67ede3d8fb747847e37bb6f59ae064831b6babb01bca6872afcb1f6200533e92b2763a4
|
@@ -0,0 +1,26 @@
|
|
1
|
+
# Defines a task that will symlink directories into the deployed site.
|
2
|
+
require 'capistrano'
|
3
|
+
|
4
|
+
module Chinook::Capistrano
|
5
|
+
module Symlink
|
6
|
+
def self.load_into(configuration)
|
7
|
+
configuration.load do
|
8
|
+
namespace :chinook do
|
9
|
+
desc 'Symlinks files or directories from shared into public.'
|
10
|
+
task :symlink_shared_to_public, except: { no_release: true } do
|
11
|
+
logger.info "Symlinking directories from shared into public."
|
12
|
+
fetch(:public_directories, []).each do |directory|
|
13
|
+
source = File.join(deploy_to, 'shared', directory)
|
14
|
+
destination = File.join(release_path, 'public', directory)
|
15
|
+
invoke_command "ln -nfs #{source} #{destination}", via: run_method
|
16
|
+
end
|
17
|
+
end
|
18
|
+
end
|
19
|
+
end
|
20
|
+
end
|
21
|
+
end
|
22
|
+
end
|
23
|
+
|
24
|
+
if Capistrano::Configuration.instance
|
25
|
+
Chinook::Capistrano::Symlink.load_into(Capistrano::Configuration.instance)
|
26
|
+
end
|
data/lib/chinook/capistrano.rb
CHANGED
data/lib/chinook/version.rb
CHANGED
data/readme.markdown
CHANGED
@@ -71,6 +71,19 @@ Pings the site after a [Passenger](phusionpassenger.com) deploy to ensure that i
|
|
71
71
|
* Settings:
|
72
72
|
- `:ping_url`: the URL you'd like to ping to wake up. *Environment specific.*
|
73
73
|
|
74
|
+
### Symlink
|
75
|
+
|
76
|
+
Symlinks directories from various other directories into your project.
|
77
|
+
|
78
|
+
#### Symlink shared to public
|
79
|
+
|
80
|
+
Symlinks directories from `deploy_dir/shared` into your project's `deploy_dir/current/public` directory.
|
81
|
+
|
82
|
+
* Tasks: `chinook:symlink_shared_to_public`
|
83
|
+
* Hook: `after 'deploy:update_code', 'chinook:symlink_shared_to_public'`
|
84
|
+
* Settings:
|
85
|
+
- `:public_directories`: a Ruby array of the directories you'd like to symlink from `shared`.
|
86
|
+
|
74
87
|
## Contributing
|
75
88
|
|
76
89
|
1. [Fork it](https://github.com/captainu/chinook/fork).
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: captainu-chinook
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ben Kreeger
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-03-
|
11
|
+
date: 2014-03-07 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: capistrano
|
@@ -82,6 +82,7 @@ files:
|
|
82
82
|
- lib/chinook/capistrano/campfire.rb
|
83
83
|
- lib/chinook/capistrano/passenger.rb
|
84
84
|
- lib/chinook/capistrano/ping.rb
|
85
|
+
- lib/chinook/capistrano/symlink.rb
|
85
86
|
- lib/chinook/version.rb
|
86
87
|
- license.markdown
|
87
88
|
- readme.markdown
|