capobvious 0.3.pre10 → 0.3.pre12

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,7 +1,9 @@
1
1
  Capistrano::Configuration.instance(:must_exist).load do
2
2
 
3
- after 'bundle:install', 'assets:precompile'
4
- before 'deploy:finalize_update', 'assets:symlink'
3
+ if exists?(:assets) && fetch(:assets) == true
4
+ after 'bundle:install', 'assets:precompile'
5
+ before 'deploy:finalize_update', 'assets:symlink'
6
+ end
5
7
 
6
8
  namespace :assets do
7
9
  desc "Local Assets precompile"
@@ -11,7 +11,10 @@ Capistrano::Configuration.instance(:must_exist).load do
11
11
  _cset :backup_folder_path, "tmp/backup"
12
12
  _cset :database_yml_path, 'config/database.yml'
13
13
  _cset :auto_migrate, true
14
+ _cset :assets, true
14
15
  _cset(:ssh) {"ssh -p #{fetch(:port, 22)} #{user}@#{serv}"}
16
+ _cset(:stage){ rails_env }
17
+ _cset(:application_env){ "#{application}_#{rails_env}"}
15
18
 
16
19
  after "deploy:update_code", "create:rvmrc"
17
20
  after "deploy:update", "deploy:cleanup"
@@ -77,11 +80,9 @@ Capistrano::Configuration.instance(:must_exist).load do
77
80
  namespace :create do
78
81
  desc "Create .rvmrc"
79
82
  task :rvmrc do
80
- if exists?(:ruby_version)
81
- rvmrc_string = "rvm use #{fetch(:ruby_version)} --create"
82
- logger.info rvmrc_string
83
- put rvmrc_string, "#{latest_release}/.rvmrc"
84
- end
83
+ rvmrc_string = "rvm use #{ruby_version}@#{application_env} --create"
84
+ logger.info rvmrc_string
85
+ put rvmrc_string, "#{latest_release}/.rvmrc"
85
86
  end
86
87
  end
87
88
 
@@ -2,7 +2,6 @@ Capistrano::Configuration.instance(:must_exist).load do
2
2
  if exists?(:whenever) && fetch(:whenever) == true
3
3
  set :whenever_command, "bundle exec whenever"
4
4
  set :whenever_environment, defer { stage }
5
- _cset(:stage){ rails_env }
6
5
  set :whenever_identifier, defer { "#{application}_#{stage}" }
7
6
  require "whenever/capistrano/recipes"
8
7
  after "bundle:install", "whenever:update_crontab"
@@ -1,3 +1,3 @@
1
1
  module Capobvious
2
- VERSION = '0.3.pre10'
2
+ VERSION = '0.3.pre12'
3
3
  end
metadata CHANGED
@@ -2,14 +2,14 @@
2
2
  name: capobvious
3
3
  version: !ruby/object:Gem::Version
4
4
  prerelease: 4
5
- version: 0.3.pre10
5
+ version: 0.3.pre12
6
6
  platform: ruby
7
7
  authors:
8
8
  - Dmitry Gruzd
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2013-03-20 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