deployable 0.0.3 → 0.0.4
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/CHANGELOG.md +4 -0
- data/lib/deployable/bundle.rb +11 -13
- data/lib/deployable/directories.rb +3 -5
- data/lib/deployable/passenger_standalone.rb +8 -7
- data/lib/deployable/version.rb +1 -1
- metadata +6 -8
data/CHANGELOG.md
CHANGED
data/lib/deployable/bundle.rb
CHANGED
@@ -21,22 +21,20 @@ Capistrano::Configuration.instance(true).load do
|
|
21
21
|
namespace :bundle do
|
22
22
|
desc "Setup bundler config on server"
|
23
23
|
task :config do
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
bundle_dir = fetch(:bundle_dir, File.join(fetch(:shared_path), 'bundle'))
|
24
|
+
fetch(:bundle_config, {}).each do |k1,h|
|
25
|
+
h.each do |k2,v|
|
26
|
+
bundle_cmd = fetch(:bundle_cmd, "bundle")
|
27
|
+
bundle_dir = fetch(:bundle_dir, File.join(fetch(:shared_path), 'bundle'))
|
29
28
|
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
29
|
+
current_release = fetch(:current_release)
|
30
|
+
if current_release.to_s.empty?
|
31
|
+
raise ::Capistrano::CommandError.new("Cannot detect current release path - make sure you have deployed at least once.")
|
32
|
+
end
|
34
33
|
|
35
|
-
|
36
|
-
|
34
|
+
args = ["#{k1}.#{k2} #{v}"]
|
35
|
+
args << "--path #{bundle_dir}" unless bundle_dir.to_s.empty?
|
37
36
|
|
38
|
-
|
39
|
-
end
|
37
|
+
run "cd #{current_release} && #{bundle_cmd} config #{args.join(" ")}"
|
40
38
|
end
|
41
39
|
end
|
42
40
|
end
|
@@ -10,11 +10,9 @@ Capistrano::Configuration.instance(true).load do
|
|
10
10
|
namespace :directories do
|
11
11
|
desc "Creates all the directories in var :directories"
|
12
12
|
task :create, :roles => [:app] do
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
run "mkdir -p #{dir}"
|
17
|
-
end
|
13
|
+
fetch(:directories, []).each do |dir|
|
14
|
+
dir = dir.call if dir.respond_to?(:call)
|
15
|
+
run "mkdir -p #{dir}"
|
18
16
|
end
|
19
17
|
end
|
20
18
|
end
|
@@ -9,14 +9,15 @@ Capistrano::Configuration.instance(true).load do
|
|
9
9
|
namespace :passenger_standalone do
|
10
10
|
desc "Setup server.yml in the 'deploy_to' directory"
|
11
11
|
task :setup, :roles => [:app] do
|
12
|
-
config = fetch(:passenger_standalone)
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
12
|
+
if config = fetch(:passenger_standalone, nil)
|
13
|
+
config = deep_stringify_keys(config)
|
14
|
+
unless config["rvm"] && config["rvm"]["rvm_ruby_string"]
|
15
|
+
config["rvm"] ||= {}
|
16
|
+
config["rvm"]["rvm_ruby_string"] = fetch(:rvm_ruby_string)
|
17
|
+
end
|
18
18
|
|
19
|
-
|
19
|
+
put config.to_yaml, "#{deploy_to}/server.yml"
|
20
|
+
end
|
20
21
|
end
|
21
22
|
end
|
22
23
|
|
data/lib/deployable/version.rb
CHANGED
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: deployable
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
5
|
-
prerelease:
|
4
|
+
hash: 23
|
5
|
+
prerelease:
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 0
|
9
|
-
-
|
10
|
-
version: 0.0.
|
9
|
+
- 4
|
10
|
+
version: 0.0.4
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Digitpaint
|
@@ -16,8 +16,7 @@ autorequire:
|
|
16
16
|
bindir: bin
|
17
17
|
cert_chain: []
|
18
18
|
|
19
|
-
date: 2012-01-
|
20
|
-
default_executable:
|
19
|
+
date: 2012-01-25 00:00:00 Z
|
21
20
|
dependencies:
|
22
21
|
- !ruby/object:Gem::Dependency
|
23
22
|
name: capistrano
|
@@ -99,7 +98,6 @@ files:
|
|
99
98
|
- lib/deployable/recipes/default_with_database.rb
|
100
99
|
- lib/deployable/rvm.rb
|
101
100
|
- lib/deployable/version.rb
|
102
|
-
has_rdoc: true
|
103
101
|
homepage: https://github.com/DigitPaint/Deployable
|
104
102
|
licenses: []
|
105
103
|
|
@@ -129,7 +127,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
129
127
|
requirements: []
|
130
128
|
|
131
129
|
rubyforge_project: deployable
|
132
|
-
rubygems_version: 1.
|
130
|
+
rubygems_version: 1.8.15
|
133
131
|
signing_key:
|
134
132
|
specification_version: 3
|
135
133
|
summary: A collection of handy capistrano tasks and recipes
|