capper 2.0.0.rc3 → 2.0.0
Sign up to get free protection for your applications and to get access to all the features.
- data/README.rst +2 -1
- data/capper.gemspec +4 -6
- data/lib/capper.rb +1 -3
- data/lib/capper/bundler.rb +1 -20
- data/lib/capper/rvm.rb +3 -24
- metadata +19 -20
- data/.rvmrc +0 -1
- data/lib/capper/version.rb +0 -3
data/README.rst
CHANGED
@@ -195,7 +195,8 @@ rvm
|
|
195
195
|
|
196
196
|
The rvm recipe is an extension to RVMs native capistrano integration. The
|
197
197
|
recipe forces the ``rvm_type`` to ``:user`` and will automatically determine
|
198
|
-
the ruby version and gemset via the projects ``.
|
198
|
+
the ruby version and gemset via the projects ``.ruby-version`` and
|
199
|
+
``.ruby-gemset`` files.
|
199
200
|
|
200
201
|
A ``deploy:setup`` hook is provided to ensure the correct rvm, ruby and rubygems
|
201
202
|
versions are installed on all servers.
|
data/capper.gemspec
CHANGED
@@ -1,10 +1,8 @@
|
|
1
1
|
# -*- encoding: utf-8 -*-
|
2
|
-
$:.push File.expand_path("../lib", __FILE__)
|
3
|
-
require "capper/version"
|
4
2
|
|
5
3
|
Gem::Specification.new do |s|
|
6
4
|
s.name = "capper"
|
7
|
-
s.version =
|
5
|
+
s.version = "2.0.0"
|
8
6
|
s.authors = ["Benedikt Böhm"]
|
9
7
|
s.email = ["bb@xnull.de"]
|
10
8
|
s.homepage = "http://github.com/zenops/capper"
|
@@ -18,7 +16,7 @@ Gem::Specification.new do |s|
|
|
18
16
|
|
19
17
|
s.add_dependency "erubis"
|
20
18
|
s.add_dependency "dedent"
|
21
|
-
s.add_dependency "capistrano"
|
22
|
-
s.add_dependency "capistrano_colors"
|
23
|
-
s.add_dependency "rvm-capistrano"
|
19
|
+
s.add_dependency "capistrano"
|
20
|
+
s.add_dependency "capistrano_colors"
|
21
|
+
s.add_dependency "rvm-capistrano"
|
24
22
|
end
|
data/lib/capper.rb
CHANGED
@@ -1,7 +1,5 @@
|
|
1
1
|
require "dedent"
|
2
2
|
|
3
|
-
require "capper/version"
|
4
|
-
|
5
3
|
# mixin various helpers
|
6
4
|
require 'capper/utils/templates'
|
7
5
|
include Capper::Utils::Templates
|
@@ -15,7 +13,7 @@ include Capper::Utils::Systemd
|
|
15
13
|
# see https://github.com/capistrano/capistrano/issues/168
|
16
14
|
Capistrano::Configuration::Namespaces::Namespace.class_eval do
|
17
15
|
def capture(*args)
|
18
|
-
parent.capture
|
16
|
+
parent.capture(*args)
|
19
17
|
end
|
20
18
|
end
|
21
19
|
|
data/lib/capper/bundler.rb
CHANGED
@@ -8,24 +8,5 @@ set(:ruby_exec_prefix, "bundle exec")
|
|
8
8
|
# do not install a global bundle if rvm has been enabled
|
9
9
|
# instead, use the gemset selected by rvm_ruby_string
|
10
10
|
set(:bundle_dir) do
|
11
|
-
|
12
|
-
File.join(shared_path, 'bundle', rvm_ruby_string)
|
13
|
-
rescue NoMethodError, NameError
|
14
|
-
File.join(shared_path, 'bundle')
|
15
|
-
end
|
16
|
-
end
|
17
|
-
|
18
|
-
# freeze bundler version
|
19
|
-
_cset(:bundler_version, "1.2.3")
|
20
|
-
|
21
|
-
before "bundle:install", "bundle:setup"
|
22
|
-
|
23
|
-
namespace :bundle do
|
24
|
-
desc "Setup bundler"
|
25
|
-
task :setup, :except => {:no_release => true} do
|
26
|
-
run "if ! gem query -i -n ^bundler$ -v #{bundler_version} >/dev/null; then " +
|
27
|
-
"gem install bundler -v #{bundler_version}; " +
|
28
|
-
"fi"
|
29
|
-
run "mkdir -p #{bundle_dir}"
|
30
|
-
end
|
11
|
+
File.join([shared_path, 'bundle', fetch(:rvm_ruby_string_evaluated, nil)].compact)
|
31
12
|
end
|
data/lib/capper/rvm.rb
CHANGED
@@ -4,21 +4,14 @@ load "capper/ruby"
|
|
4
4
|
require "capistrano"
|
5
5
|
Kernel.const_set("Capistrano", Capistrano)
|
6
6
|
|
7
|
-
|
8
|
-
|
9
|
-
set(:rvm_type, :user)
|
10
|
-
set(:rvm_ruby_string, File.read(".rvmrc").gsub(/^rvm( use)? --create (.*)/, '\2').strip)
|
7
|
+
set(:rvm_ruby_string, :local)
|
11
8
|
|
12
|
-
|
13
|
-
set(:rvm_install_type) { rvm_version }
|
9
|
+
require "rvm/capistrano"
|
14
10
|
|
15
11
|
before "deploy:setup", "rvm:install_ruby"
|
16
12
|
before "rvm:install_ruby", "rvm:install_rvm"
|
17
13
|
before "rvm:install_rvm", "rvm:install_rvmrc"
|
18
14
|
after "rvm:install_ruby", "rvm:auto_gem"
|
19
|
-
after "rvm:install_ruby", "rvm:install_rubygems"
|
20
|
-
|
21
|
-
after "deploy:create_symlink", "rvm:trust_rvmrc"
|
22
15
|
|
23
16
|
namespace :rvm do
|
24
17
|
desc "Install a global .rvmrc"
|
@@ -34,18 +27,10 @@ export rvm_gem_options="--no-rdoc --no-ri"
|
|
34
27
|
|
35
28
|
desc "Ensure that Gentoos declare -x RUBYOPT=\"-rauto_gem\" is ignored"
|
36
29
|
task :auto_gem do
|
37
|
-
wo_gemset =
|
30
|
+
wo_gemset = fetch(:rvm_ruby_string_evaluated).to_s.split('@').first
|
38
31
|
run "touch ~/.rvm/rubies/#{wo_gemset}/lib/ruby/site_ruby/auto_gem.rb"
|
39
32
|
end
|
40
33
|
|
41
|
-
desc "Install the specified rubygems version"
|
42
|
-
task :install_rubygems do
|
43
|
-
# if specified freeze rubygems version, otherwise don't touch it
|
44
|
-
if fetch(:rvm_rubygems_version, false)
|
45
|
-
run("rvm rubygems #{rvm_rubygems_version}")
|
46
|
-
end
|
47
|
-
end
|
48
|
-
|
49
34
|
desc "Clear the current gemset"
|
50
35
|
task :empty do
|
51
36
|
run "cd #{current_release} && rvm --force gemset empty"
|
@@ -55,10 +40,4 @@ export rvm_gem_options="--no-rdoc --no-ri"
|
|
55
40
|
task :reinstall do
|
56
41
|
set(:rvm_install_ruby, :reinstall)
|
57
42
|
end
|
58
|
-
|
59
|
-
# prevents interactive rvm dialog
|
60
|
-
task :trust_rvmrc, :except => {:no_release => true} do
|
61
|
-
run "rvm rvmrc trust #{release_path} >/dev/null"
|
62
|
-
run "rvm rvmrc trust #{current_path} >/dev/null"
|
63
|
-
end
|
64
43
|
end
|
metadata
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: capper
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.0.0
|
5
|
-
prerelease:
|
4
|
+
version: 2.0.0
|
5
|
+
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
8
8
|
- Benedikt Böhm
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2013-
|
12
|
+
date: 2013-06-05 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: erubis
|
@@ -48,49 +48,49 @@ dependencies:
|
|
48
48
|
requirement: !ruby/object:Gem::Requirement
|
49
49
|
none: false
|
50
50
|
requirements:
|
51
|
-
- -
|
51
|
+
- - ! '>='
|
52
52
|
- !ruby/object:Gem::Version
|
53
|
-
version:
|
53
|
+
version: '0'
|
54
54
|
type: :runtime
|
55
55
|
prerelease: false
|
56
56
|
version_requirements: !ruby/object:Gem::Requirement
|
57
57
|
none: false
|
58
58
|
requirements:
|
59
|
-
- -
|
59
|
+
- - ! '>='
|
60
60
|
- !ruby/object:Gem::Version
|
61
|
-
version:
|
61
|
+
version: '0'
|
62
62
|
- !ruby/object:Gem::Dependency
|
63
63
|
name: capistrano_colors
|
64
64
|
requirement: !ruby/object:Gem::Requirement
|
65
65
|
none: false
|
66
66
|
requirements:
|
67
|
-
- -
|
67
|
+
- - ! '>='
|
68
68
|
- !ruby/object:Gem::Version
|
69
|
-
version: 0
|
69
|
+
version: '0'
|
70
70
|
type: :runtime
|
71
71
|
prerelease: false
|
72
72
|
version_requirements: !ruby/object:Gem::Requirement
|
73
73
|
none: false
|
74
74
|
requirements:
|
75
|
-
- -
|
75
|
+
- - ! '>='
|
76
76
|
- !ruby/object:Gem::Version
|
77
|
-
version: 0
|
77
|
+
version: '0'
|
78
78
|
- !ruby/object:Gem::Dependency
|
79
79
|
name: rvm-capistrano
|
80
80
|
requirement: !ruby/object:Gem::Requirement
|
81
81
|
none: false
|
82
82
|
requirements:
|
83
|
-
- -
|
83
|
+
- - ! '>='
|
84
84
|
- !ruby/object:Gem::Version
|
85
|
-
version:
|
85
|
+
version: '0'
|
86
86
|
type: :runtime
|
87
87
|
prerelease: false
|
88
88
|
version_requirements: !ruby/object:Gem::Requirement
|
89
89
|
none: false
|
90
90
|
requirements:
|
91
|
-
- -
|
91
|
+
- - ! '>='
|
92
92
|
- !ruby/object:Gem::Version
|
93
|
-
version:
|
93
|
+
version: '0'
|
94
94
|
description: Capper is a collection of opinionated Capistrano recipes
|
95
95
|
email:
|
96
96
|
- bb@xnull.de
|
@@ -100,7 +100,6 @@ extra_rdoc_files: []
|
|
100
100
|
files:
|
101
101
|
- .document
|
102
102
|
- .gitignore
|
103
|
-
- .rvmrc
|
104
103
|
- Gemfile
|
105
104
|
- Gemfile.lock
|
106
105
|
- LICENSE
|
@@ -140,7 +139,6 @@ files:
|
|
140
139
|
- lib/capper/utils/systemd.rb
|
141
140
|
- lib/capper/utils/templates.rb
|
142
141
|
- lib/capper/uwsgi.rb
|
143
|
-
- lib/capper/version.rb
|
144
142
|
- lib/capper/virtualenv.rb
|
145
143
|
- lib/capper/whenever.rb
|
146
144
|
homepage: http://github.com/zenops/capper
|
@@ -158,13 +156,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
158
156
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
159
157
|
none: false
|
160
158
|
requirements:
|
161
|
-
- - ! '
|
159
|
+
- - ! '>='
|
162
160
|
- !ruby/object:Gem::Version
|
163
|
-
version:
|
161
|
+
version: '0'
|
164
162
|
requirements: []
|
165
163
|
rubyforge_project:
|
166
|
-
rubygems_version: 1.8.
|
164
|
+
rubygems_version: 1.8.25
|
167
165
|
signing_key:
|
168
166
|
specification_version: 3
|
169
167
|
summary: Capper is a collection of opinionated Capistrano recipes
|
170
168
|
test_files: []
|
169
|
+
has_rdoc:
|
data/.rvmrc
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
rvm use --create ruby-1.9.3-p194@capper
|
data/lib/capper/version.rb
DELETED