deployable 0.0.3 → 0.0.4

Sign up to get free protection for your applications and to get access to all the features.
data/CHANGELOG.md CHANGED
@@ -1,3 +1,7 @@
1
+ ## 0.0.4 (January 25th, 2012)
2
+
3
+ * Don't fail if a certain config isn't set, just ignore it.
4
+
1
5
  ## 0.0.3 (January 24th, 2012)
2
6
 
3
7
  * Added directories module
@@ -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
- if conf = fetch(:bundle_config)
25
- conf.each do |k1,h|
26
- h.each do |k2,v|
27
- bundle_cmd = fetch(:bundle_cmd, "bundle")
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
- current_release = fetch(:current_release)
31
- if current_release.to_s.empty?
32
- raise ::Capistrano::CommandError.new("Cannot detect current release path - make sure you have deployed at least once.")
33
- end
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
- args = ["#{k1}.#{k2} #{v}"]
36
- args << "--path #{bundle_dir}" unless bundle_dir.to_s.empty?
34
+ args = ["#{k1}.#{k2} #{v}"]
35
+ args << "--path #{bundle_dir}" unless bundle_dir.to_s.empty?
37
36
 
38
- run "cd #{current_release} && #{bundle_cmd} config #{args.join(" ")}"
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
- if dirs = fetch(:directories)
14
- dirs.each do |dir|
15
- dir = dir.call if dir.respond_to?(:call)
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
- 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
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
- put config.to_yaml, "#{deploy_to}/server.yml"
19
+ put config.to_yaml, "#{deploy_to}/server.yml"
20
+ end
20
21
  end
21
22
  end
22
23
 
@@ -1,3 +1,3 @@
1
1
  module Deployable
2
- VERSION = "0.0.3"
2
+ VERSION = "0.0.4"
3
3
  end
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: 25
5
- prerelease: false
4
+ hash: 23
5
+ prerelease:
6
6
  segments:
7
7
  - 0
8
8
  - 0
9
- - 3
10
- version: 0.0.3
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-24 00:00:00 +01:00
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.3.7
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