capobvious 0.3.pre21 → 0.3.pre22

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 0fd6f0aa667d4ad7e2ee910daed6ed5419231151
4
- data.tar.gz: c02a245ea666ae07c2203de086366ff907e664aa
3
+ metadata.gz: 5065b663bc0c505f3a36eca8fee14085302f0bd4
4
+ data.tar.gz: 84c8bbee56dfe38a42f71d9ec699bf8b859e6560
5
5
  SHA512:
6
- metadata.gz: 12549997ae8da9f8311f1d8fff00b9a6608354073f1450bed312983c7c10a04ff0390b8d7170ba6ba6add84aaf4ae1607182af70d010127e418f25c97a7b1f46
7
- data.tar.gz: 31a52d9636529de7dca814531269bbb3c8416d439f9c496d6173ad58972f5a3fd96ebf8a539387778654b4500e593fad575d7fedb6d3e05e5fda990d6071eff0
6
+ metadata.gz: b78dbb55d3e13c69e1d3954ab620baabddbb0ace2c6b7ca063e1bd33d510d0dbcad6714e3544c31d75a930c185d10cb6f34036d3f591b46d9880d605de45f5be
7
+ data.tar.gz: 9298c074b39e7076d879a7baad4a5e182f6bef8e75aa85e1f36de0ae07936adb81f3bdbe07d973d931d2a8561c86f13a6f095ae6a7fd580edc1498d76592ad6a
@@ -3,9 +3,11 @@ Capistrano::Configuration.instance(:must_exist).load do
3
3
  namespace :bundle do
4
4
  desc "Run bundle install"
5
5
  task :install do
6
+ opts = []
7
+ opts << "-j#{server_cores.to_i}" if server_cores.to_i > 1
6
8
  deployment = "--deployment --quiet"
7
9
  without = ['development','test','production']-[rails_env]
8
- run "cd #{latest_release} && bundle install --without #{without.join(" ")}"
10
+ run "cd #{latest_release} && bundle install #{opts.join(' ')} --without #{without.join(" ")}"
9
11
  end
10
12
  end
11
13
  end
@@ -1,5 +1,7 @@
1
1
  Capistrano::Configuration.instance(:must_exist).load do
2
- _cset(:ruby_version) { RUBY_VERSION }
2
+ set :bundle_dir, ''
3
+ set :bundle_flags, '--system --quiet'
4
+
3
5
  _cset :rvm_type, :user
4
6
  _cset :rails_env, 'production'
5
7
  _cset :branch, 'master'
@@ -16,8 +18,12 @@ Capistrano::Configuration.instance(:must_exist).load do
16
18
  _cset(:ssh) {"ssh -p #{fetch(:port)} #{user}@#{serv}"}
17
19
  _cset(:stage){ rails_env }
18
20
  _cset(:application_env){ "#{application}_#{rails_env}"}
21
+ _cset(:rvm_ruby_string){ "#{ruby_version}@#{application}" }
22
+
23
+ before 'deploy', 'rvm:install_rvm' # install/update RVM
24
+ before 'deploy', 'rvm:install_ruby' # install Ruby and create gemset (both if missing)
19
25
 
20
- after "deploy:update_code", "create:rvmrc"
26
+ #after "deploy:update_code", "create:rvmrc"
21
27
  after "deploy:update", "deploy:cleanup"
22
28
 
23
29
  #set :deploy_to, (exists?(:deploy_folder)? fetch(:deploy_folder) : "/home/#{user}/www/#{application}")
@@ -25,7 +31,6 @@ Capistrano::Configuration.instance(:must_exist).load do
25
31
  default_run_options[:pty] = true
26
32
  ssh_options[:forward_agent] = true
27
33
 
28
-
29
34
  def gem_use?(name)
30
35
  gemfile_lock = File.read("Gemfile.lock")
31
36
  return (gemfile_lock =~ /^\s*#{name}\s+\(/)? true : false
@@ -82,8 +87,8 @@ Capistrano::Configuration.instance(:must_exist).load do
82
87
 
83
88
  namespace :create do
84
89
  desc "Create .rvmrc"
85
- task :rvmrc do
86
- rvmrc_string = "rvm use #{ruby_version} --create"
90
+ task :rvmrc, :roles => :web, :except => { :no_release => true } do
91
+ rvmrc_string = "rvm use #{rvm_ruby_string} --create"
87
92
  logger.info rvmrc_string
88
93
  put rvmrc_string, "#{latest_release}/.rvmrc"
89
94
  end
@@ -1,3 +1,3 @@
1
1
  module Capobvious
2
- VERSION = '0.3.pre21'
2
+ VERSION = '0.3.pre22'
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: capobvious
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.pre21
4
+ version: 0.3.pre22
5
5
  platform: ruby
6
6
  authors:
7
7
  - Dmitry Gruzd
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2013-09-23 00:00:00.000000000 Z
11
+ date: 2013-10-03 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: capistrano