capistrano-bundler 1.1.1 → 1.1.2
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/CHANGELOG.md +8 -0
- data/README.md +40 -15
- data/capistrano-bundler.gemspec +2 -2
- data/lib/capistrano/tasks/bundler.cap +28 -15
- metadata +7 -8
- data/LICENSE.txt +0 -22
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 15de615ad7ef1c7bc41ffcc4001f9061c7d618e8
|
4
|
+
data.tar.gz: 44a0f9373b330c8349c5c6bb668e9f1d4438e784
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 29b4e3a989df7f373227fc0d749140ef94cc8f67212b6c155b830058e67419524de4e0cf8027b9254543aa97a3ce419821ee76fbf7ef77a5cb14dc85d0d8e0bb
|
7
|
+
data.tar.gz: 6b6329f5a298119c931ddc12a728bb614ff62367b3ebd89c239bb8be969c2e8282fbb42a5507e12c196c1505e7e4399c086ef4041970bc709d2f634bfa4944cc
|
data/CHANGELOG.md
CHANGED
@@ -1,3 +1,11 @@
|
|
1
|
+
# 1.1.2 (8 Feb 2014)
|
2
|
+
|
3
|
+
* Added `bundle_env_variables` option for specifying environment variables that should be set when running `bundle`.
|
4
|
+
* The `bundle_dir` option is now named `bundle_path`
|
5
|
+
* Use `bundle install` instead of `bundle`
|
6
|
+
* All options are now optional and can be excluded from the final bundle command by setting them to `nil`
|
7
|
+
* Bundler looks for a `Gemfile` by default, so there is no need to specify it.
|
8
|
+
|
1
9
|
# 1.1.1
|
2
10
|
|
3
11
|
* ruby is not prefixed with `bundle exec` anymore by default
|
data/README.md
CHANGED
@@ -1,13 +1,17 @@
|
|
1
1
|
# Capistrano::Bundler
|
2
2
|
|
3
|
-
Bundler
|
3
|
+
Bundler specific tasks for Capistrano v3:
|
4
|
+
|
5
|
+
* cap production bundler:install
|
6
|
+
|
7
|
+
It also prefixes certain binaries to use `bundle exec`.
|
4
8
|
|
5
9
|
## Installation
|
6
10
|
|
7
11
|
Add this line to your application's Gemfile:
|
8
12
|
|
9
|
-
gem 'capistrano', '~> 3.
|
10
|
-
gem 'capistrano-bundler'
|
13
|
+
gem 'capistrano', '~> 3.1'
|
14
|
+
gem 'capistrano-bundler', '~> 1.1.2'
|
11
15
|
|
12
16
|
And then execute:
|
13
17
|
|
@@ -23,23 +27,44 @@ Require in `Capfile` to use the default task:
|
|
23
27
|
|
24
28
|
require 'capistrano/bundler'
|
25
29
|
|
26
|
-
The task will run before `deploy:updated` as part of Capistrano's default deploy,
|
27
|
-
|
30
|
+
The task will run before `deploy:updated` as part of Capistrano's default deploy, or can be run in isolation with `cap production bundler:install`
|
31
|
+
|
32
|
+
By default, the plugin adds `bundle exec` prefix to common executables listed in `bundle_bins` option. This currently applies for `gem`, `rake` and `rails`.
|
33
|
+
|
34
|
+
You can add any custom executable to this list:
|
35
|
+
```ruby
|
36
|
+
set :bundle_bins, fetch(:bundle_bins, []).push %w(my_new_binary)
|
37
|
+
```
|
38
|
+
|
39
|
+
Configurable options:
|
40
|
+
|
41
|
+
set :bundle_roles, :all # this is default
|
42
|
+
set :bundle_binstubs, -> { shared_path.join('bin') } # this is default
|
43
|
+
set :bundle_gemfile, -> { release_path.join('MyGemfile') } # default: nil
|
44
|
+
set :bundle_path, -> { shared_path.join('bundle') } # this is default
|
45
|
+
set :bundle_without, %w{development test}.join(' ') # this is default
|
46
|
+
set :bundle_flags, '--deployment --quiet' # this is default
|
47
|
+
set :bundle_env_variables, {} # this is default
|
48
|
+
|
49
|
+
This would execute the following bundle command on all servers
|
50
|
+
(actual paths depend on the real deploy directory):
|
51
|
+
|
52
|
+
bundle install \
|
53
|
+
--binstubs /my_app/shared/bin \
|
54
|
+
--gemfile /my_app/releases/20130623094732/MyGemfile \
|
55
|
+
--path /my_app/shared/bundle \
|
56
|
+
--without development test \
|
57
|
+
--deployment --quiet
|
28
58
|
|
29
|
-
|
59
|
+
If any option is set to `nil` it will be excluded from the final bundle command.
|
30
60
|
|
31
|
-
|
32
|
-
set :bundle_dir, -> { shared_path.join('bundle') }
|
33
|
-
set :bundle_flags, '--deployment --quiet'
|
34
|
-
set :bundle_without, %w{development test}.join(' ')
|
35
|
-
set :bundle_binstubs, -> { shared_path.join('bin') }
|
36
|
-
set :bundle_roles, :all
|
37
|
-
set :bundle_bins, %w(gem rake rails)
|
61
|
+
### Environment Variables
|
38
62
|
|
39
|
-
|
63
|
+
The `bundle_env_variables` option can be used to specify any environment variables you want present when running the `bundle` command:
|
40
64
|
|
41
65
|
```ruby
|
42
|
-
|
66
|
+
# This translates to NOKOGIRI_USE_SYSTEM_LIBRARIES=1 when executed
|
67
|
+
set :bundle_env_variables, { nokogiri_use_system_libraries: 1 }
|
43
68
|
```
|
44
69
|
|
45
70
|
## Contributing
|
data/capistrano-bundler.gemspec
CHANGED
@@ -4,7 +4,7 @@ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
|
4
4
|
|
5
5
|
Gem::Specification.new do |spec|
|
6
6
|
spec.name = 'capistrano-bundler'
|
7
|
-
spec.version = '1.1.
|
7
|
+
spec.version = '1.1.2'
|
8
8
|
spec.authors = ['Tom Clements', 'Lee Hambley', 'Kir Shatrov']
|
9
9
|
spec.email = ['seenmyfate@gmail.com', 'lee.hambley@gmail.com', 'shatrov@me.com']
|
10
10
|
spec.description = %q{Bundler support for Capistrano 3.x}
|
@@ -18,7 +18,7 @@ Gem::Specification.new do |spec|
|
|
18
18
|
spec.require_paths = ['lib']
|
19
19
|
|
20
20
|
spec.add_dependency 'capistrano', '~> 3.0'
|
21
|
-
spec.add_dependency 'sshkit', '
|
21
|
+
spec.add_dependency 'sshkit', '~> 1.2'
|
22
22
|
|
23
23
|
spec.add_development_dependency 'bundler', '~> 1.3'
|
24
24
|
spec.add_development_dependency 'rake'
|
@@ -7,25 +7,38 @@ namespace :bundler do
|
|
7
7
|
|
8
8
|
You can override any of these defaults by setting the variables shown below.
|
9
9
|
|
10
|
+
set :bundle_roles, :all
|
11
|
+
|
12
|
+
set :bundle_binstubs, -> { shared_path.join('bin') }
|
10
13
|
set :bundle_gemfile, -> { release_path.join('Gemfile') }
|
11
|
-
set :
|
12
|
-
set :bundle_flags, '--deployment --quiet'
|
14
|
+
set :bundle_path, -> { shared_path.join('bundle') }
|
13
15
|
set :bundle_without, %w{development test}.join(' ')
|
14
|
-
set :
|
15
|
-
set :
|
16
|
+
set :bundle_flags, '--deployment --quiet'
|
17
|
+
set :bundle_env_variables, {}
|
16
18
|
DESC
|
17
19
|
task :install do
|
18
20
|
on roles fetch(:bundle_roles) do
|
19
21
|
within release_path do
|
20
|
-
|
21
|
-
|
22
|
-
fetch(:
|
23
|
-
"--
|
24
|
-
"--
|
22
|
+
with fetch(:bundle_env_variables, {}) do
|
23
|
+
options = ["install"]
|
24
|
+
options << "--binstubs #{fetch(:bundle_binstubs)}" if fetch(:bundle_binstubs)
|
25
|
+
options << "--gemfile #{fetch(:bundle_gemfile)}" if fetch(:bundle_gemfile)
|
26
|
+
options << "--path #{fetch(:bundle_path)}" if fetch(:bundle_path)
|
27
|
+
options << "--without #{fetch(:bundle_without)}" if fetch(:bundle_without)
|
28
|
+
options << "#{fetch(:bundle_flags)}" if fetch(:bundle_flags)
|
29
|
+
|
30
|
+
execute :bundle, options
|
31
|
+
end
|
25
32
|
end
|
26
33
|
end
|
27
34
|
end
|
28
35
|
|
36
|
+
desc <<-DESC
|
37
|
+
Maps all binaries to use `bundle exec` by default.
|
38
|
+
Add your own binaries to the array with the command shown below.
|
39
|
+
|
40
|
+
set :bundle_bins, fetch(:bundle_bins).push %w(my_new_binary)
|
41
|
+
DESC
|
29
42
|
task :map_bins do
|
30
43
|
fetch(:bundle_bins).each do |command|
|
31
44
|
SSHKit.config.command_map.prefix[command.to_sym].push("bundle exec")
|
@@ -41,12 +54,12 @@ end
|
|
41
54
|
|
42
55
|
namespace :load do
|
43
56
|
task :defaults do
|
44
|
-
set :bundle_gemfile, -> { release_path.join('Gemfile') }
|
45
|
-
set :bundle_dir, -> { shared_path.join('bundle') }
|
46
|
-
set :bundle_flags, '--deployment --quiet'
|
47
|
-
set :bundle_without, %w{development test}.join(' ')
|
48
|
-
set :bundle_binstubs, -> { shared_path.join('bin') }
|
49
|
-
set :bundle_roles, :all
|
50
57
|
set :bundle_bins, %w{gem rake rails}
|
58
|
+
|
59
|
+
set :bundle_roles, :all
|
60
|
+
set :bundle_binstubs, -> { shared_path.join('bin') }
|
61
|
+
set :bundle_path, -> { shared_path.join('bundle') }
|
62
|
+
set :bundle_without, %w{development test}.join(' ')
|
63
|
+
set :bundle_flags, '--deployment --quiet'
|
51
64
|
end
|
52
65
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: capistrano-bundler
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.1.
|
4
|
+
version: 1.1.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Tom Clements
|
@@ -10,7 +10,7 @@ authors:
|
|
10
10
|
autorequire:
|
11
11
|
bindir: bin
|
12
12
|
cert_chain: []
|
13
|
-
date:
|
13
|
+
date: 2014-02-08 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: capistrano
|
@@ -30,16 +30,16 @@ dependencies:
|
|
30
30
|
name: sshkit
|
31
31
|
requirement: !ruby/object:Gem::Requirement
|
32
32
|
requirements:
|
33
|
-
- -
|
33
|
+
- - ~>
|
34
34
|
- !ruby/object:Gem::Version
|
35
|
-
version: 1.2
|
35
|
+
version: '1.2'
|
36
36
|
type: :runtime
|
37
37
|
prerelease: false
|
38
38
|
version_requirements: !ruby/object:Gem::Requirement
|
39
39
|
requirements:
|
40
|
-
- -
|
40
|
+
- - ~>
|
41
41
|
- !ruby/object:Gem::Version
|
42
|
-
version: 1.2
|
42
|
+
version: '1.2'
|
43
43
|
- !ruby/object:Gem::Dependency
|
44
44
|
name: bundler
|
45
45
|
requirement: !ruby/object:Gem::Requirement
|
@@ -81,7 +81,6 @@ files:
|
|
81
81
|
- CHANGELOG.md
|
82
82
|
- Gemfile
|
83
83
|
- LICENSE
|
84
|
-
- LICENSE.txt
|
85
84
|
- README.md
|
86
85
|
- Rakefile
|
87
86
|
- capistrano-bundler.gemspec
|
@@ -108,7 +107,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
108
107
|
version: '0'
|
109
108
|
requirements: []
|
110
109
|
rubyforge_project:
|
111
|
-
rubygems_version: 2.
|
110
|
+
rubygems_version: 2.2.1
|
112
111
|
signing_key:
|
113
112
|
specification_version: 4
|
114
113
|
summary: Bundler support for Capistrano 3.x
|
data/LICENSE.txt
DELETED
@@ -1,22 +0,0 @@
|
|
1
|
-
Copyright (c) 2013 seenmyfate
|
2
|
-
|
3
|
-
MIT License
|
4
|
-
|
5
|
-
Permission is hereby granted, free of charge, to any person obtaining
|
6
|
-
a copy of this software and associated documentation files (the
|
7
|
-
"Software"), to deal in the Software without restriction, including
|
8
|
-
without limitation the rights to use, copy, modify, merge, publish,
|
9
|
-
distribute, sublicense, and/or sell copies of the Software, and to
|
10
|
-
permit persons to whom the Software is furnished to do so, subject to
|
11
|
-
the following conditions:
|
12
|
-
|
13
|
-
The above copyright notice and this permission notice shall be
|
14
|
-
included in all copies or substantial portions of the Software.
|
15
|
-
|
16
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
17
|
-
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
18
|
-
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
19
|
-
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
20
|
-
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
21
|
-
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
22
|
-
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|