openteam-capistrano 0.0.7 → 0.0.8

Sign up to get free protection for your applications and to get access to all the features.
@@ -3,7 +3,7 @@ require 'capistrano/ext/multistage'
3
3
  require 'bundler/capistrano'
4
4
  require 'rvm/capistrano'
5
5
 
6
- require 'capistrano-db-tasks'
6
+ require 'capistrano-db-tasks' if use_db?
7
7
  require 'capistrano-unicorn'
8
8
  begin; require 'airbrake/capistrano'; rescue LoadError; end
9
9
 
@@ -1,6 +1,6 @@
1
1
  # set up hooks
2
2
  Capistrano::Configuration.instance.load do
3
- after 'deploy:update_code', 'deploy:migrate'
3
+ after 'deploy:update_code', 'deploy:migrate' if use_db?
4
4
  after 'deploy:restart', 'unicorn:restart'
5
5
  after 'deploy', 'deploy:cleanup'
6
6
  end
@@ -1,3 +1,7 @@
1
+ def use_db?
2
+ @use_db ||= File.exists?('config/database.yml') || File.exists?('config/database.yml.example')
3
+ end
4
+
1
5
  require "openteam/capistrano/dependencies"
2
6
  require "openteam/capistrano/hooks"
3
7
  require "openteam/capistrano/setup_common"
@@ -4,7 +4,11 @@ Capistrano::Configuration.instance.load do
4
4
 
5
5
  # source repostitory settings
6
6
  # this files will be symlinked from shared to current path on deploy:create_symlinks
7
- set :shared_children, %w[config/settings.yml config/database.yml log tmp/sockets tmp/pids]
7
+ if use_db?
8
+ set :shared_children, %w[config/database.yml config/settings.yml log tmp/sockets tmp/pids]
9
+ else
10
+ set :shared_children, %w[config/settings.yml log tmp/sockets tmp/pids]
11
+ end
8
12
 
9
13
  # for assets compilation on host with nodejs
10
14
  set :default_shell, 'bash -l'
@@ -4,7 +4,7 @@ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
4
 
5
5
  Gem::Specification.new do |gem|
6
6
  gem.name = 'openteam-capistrano'
7
- gem.version = '0.0.7'
7
+ gem.version = '0.0.8'
8
8
  gem.authors = ["OpenTeam developers"]
9
9
  gem.email = ["developers@openteam.ru"]
10
10
  gem.description = %q{OpenTeam common capistrano recipe}
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: openteam-capistrano
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.7
4
+ version: 0.0.8
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2013-03-26 00:00:00.000000000 Z
12
+ date: 2013-03-27 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: capistrano-db-tasks
@@ -127,7 +127,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
127
127
  version: '0'
128
128
  segments:
129
129
  - 0
130
- hash: 3278497435865315661
130
+ hash: -3643175344437776527
131
131
  required_rubygems_version: !ruby/object:Gem::Requirement
132
132
  none: false
133
133
  requirements:
@@ -136,7 +136,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
136
136
  version: '0'
137
137
  segments:
138
138
  - 0
139
- hash: 3278497435865315661
139
+ hash: -3643175344437776527
140
140
  requirements: []
141
141
  rubyforge_project:
142
142
  rubygems_version: 1.8.24