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 +4 -4
- data/lib/capobvious/recipes/bundle.rb +3 -1
- data/lib/capobvious/recipes/main.rb +10 -5
- data/lib/capobvious/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 5065b663bc0c505f3a36eca8fee14085302f0bd4
|
|
4
|
+
data.tar.gz: 84c8bbee56dfe38a42f71d9ec699bf8b859e6560
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
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
|
-
|
|
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 #{
|
|
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
|
data/lib/capobvious/version.rb
CHANGED
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.
|
|
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-
|
|
11
|
+
date: 2013-10-03 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: capistrano
|