captainu-chinook 0.1.1 → 0.1.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: d926a92748e86f4f80a92ddcabeb37653414e539
4
- data.tar.gz: b0268258f5d8ab01f4b95d1faec4cb98947fd9a7
3
+ metadata.gz: 8a2f080938d3d45b3fa7d23f248bc082a8e7a350
4
+ data.tar.gz: c1efcb423009afcc4b4798f8f16a9ca37a59e868
5
5
  SHA512:
6
- metadata.gz: eb4421f543414610b2e86f65a084fe5e32acb4233740a985adcc3a8d972223ce9eb534dd1ef648338c8696b9709e58779e7cc60584fa97ecf4b2d356c590e7d4
7
- data.tar.gz: baa71749fd72564cd44c77607d00864376756730b289d6d7d712db8d003d7c99f698f12c5c39038cb6a6e72c953cd0236513257c3293d0030d91d25489f229fa
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
@@ -3,4 +3,4 @@ module Chinook
3
3
  end
4
4
  end
5
5
 
6
- %w(campfire passenger ping).each { |m| require "chinook/capistrano/#{m}" }
6
+ %w(campfire passenger ping symlink).each { |m| require "chinook/capistrano/#{m}" }
@@ -1,3 +1,3 @@
1
1
  module Chinook
2
- VERSION = '0.1.1'
2
+ VERSION = '0.1.2'
3
3
  end
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.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-06 00:00:00.000000000 Z
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