capistrano-direnv 0.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/README.md +41 -0
- data/capistrano-direnv.gemspec +15 -0
- data/lib/capistrano-direnv.rb +0 -0
- data/lib/capistrano/direnv.rb +1 -0
- data/lib/capistrano/tasks/direnv.rake +19 -0
- metadata +76 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: fe681cc5732836778c100867ee2932288bfc980a
|
4
|
+
data.tar.gz: 2c6a2a43aa77b6afb1bdde775538412440528814
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 4af9d174c7c0c6f40973f686d92324e0ab70ebb967fbc4dacbd5ee79faff127eae4b76fe45ff7dd2ccbfd7aa208a4ff30de25eaf8a534869a74dd63b691e77b3
|
7
|
+
data.tar.gz: 2b7c2797e4a7d8d621ea75da3804729c7af54cbc21d3263e246480e91098fe5908409908adac4fbac03924f379d630b409f83df4b6304c8584cebc989a3c6b6c
|
data/README.md
ADDED
@@ -0,0 +1,41 @@
|
|
1
|
+
# capistrano-direnv
|
2
|
+
|
3
|
+
Adds direnv support when executing commands with capistrano. It automatically adds
|
4
|
+
`direnv exec ...` prefix to all commands executed by capistrano.
|
5
|
+
|
6
|
+
## Installation
|
7
|
+
|
8
|
+
Add `capistrano-direnv` to `Gemfile`:
|
9
|
+
|
10
|
+
```ruby
|
11
|
+
group :development do
|
12
|
+
gem 'capistrano-direnv'
|
13
|
+
end
|
14
|
+
```
|
15
|
+
|
16
|
+
At least `direnv >= 2.3.0` must be installed.
|
17
|
+
|
18
|
+
## Usage
|
19
|
+
|
20
|
+
Add the following line to your `Capfile`:
|
21
|
+
|
22
|
+
```ruby
|
23
|
+
require 'capistrano/direnv'
|
24
|
+
```
|
25
|
+
|
26
|
+
You should also manually allow .envrc file:
|
27
|
+
|
28
|
+
```bash
|
29
|
+
cd /path/to/envrc
|
30
|
+
direnv allow
|
31
|
+
```
|
32
|
+
|
33
|
+
## Configuration
|
34
|
+
|
35
|
+
Defaults:
|
36
|
+
|
37
|
+
```ruby
|
38
|
+
set :direnv_map_bins, %w{rake ruby bundle} # list of executables which should be preceded with direnv prefix
|
39
|
+
set :direnv_path, 'direnv' # path to direnv executable
|
40
|
+
set :envrc_path, shared_path # path where .envrc file is stored
|
41
|
+
```
|
@@ -0,0 +1,15 @@
|
|
1
|
+
Gem::Specification.new do |s|
|
2
|
+
s.name = 'capistrano-direnv'
|
3
|
+
s.version = '0.0.1'
|
4
|
+
s.date = '2014-02-08'
|
5
|
+
s.summary = "Adds direnv support to capistrano"
|
6
|
+
s.description = "Every capistrano command will be executed with direnv environment"
|
7
|
+
s.authors = ["Andrey Chernih"]
|
8
|
+
s.email = 'andrey.chernih@gmail.com'
|
9
|
+
s.files = `git ls-files`.split($/)
|
10
|
+
s.homepage = 'http://github.com/andreychernih/capistrano-direnv'
|
11
|
+
s.license = 'Apache 2.0'
|
12
|
+
|
13
|
+
s.add_dependency 'capistrano', '~> 3.0'
|
14
|
+
s.add_dependency 'sshkit', '~> 1.2'
|
15
|
+
end
|
File without changes
|
@@ -0,0 +1 @@
|
|
1
|
+
load File.expand_path("../tasks/direnv.rake", __FILE__)
|
@@ -0,0 +1,19 @@
|
|
1
|
+
namespace :direnv do
|
2
|
+
task :hook do
|
3
|
+
fetch(:direnv_map_bins).each do |command|
|
4
|
+
direnv_path = fetch(:direnv_path, 'direnv')
|
5
|
+
envrc_path = fetch(:envrc_path, shared_path)
|
6
|
+
SSHKit.config.command_map.prefix[command.to_sym].unshift("#{direnv_path} exec #{envrc_path}")
|
7
|
+
end
|
8
|
+
end
|
9
|
+
end
|
10
|
+
|
11
|
+
Capistrano::DSL.stages.each do |stage|
|
12
|
+
after stage, 'direnv:hook'
|
13
|
+
end
|
14
|
+
|
15
|
+
namespace :load do
|
16
|
+
task :defaults do
|
17
|
+
set :direnv_map_bins, %w{rake ruby bundle}
|
18
|
+
end
|
19
|
+
end
|
metadata
ADDED
@@ -0,0 +1,76 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: capistrano-direnv
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.0.1
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Andrey Chernih
|
8
|
+
autorequire:
|
9
|
+
bindir: bin
|
10
|
+
cert_chain: []
|
11
|
+
date: 2014-02-08 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: capistrano
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - "~>"
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: '3.0'
|
20
|
+
type: :runtime
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - "~>"
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: '3.0'
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: sshkit
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - "~>"
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: '1.2'
|
34
|
+
type: :runtime
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - "~>"
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: '1.2'
|
41
|
+
description: Every capistrano command will be executed with direnv environment
|
42
|
+
email: andrey.chernih@gmail.com
|
43
|
+
executables: []
|
44
|
+
extensions: []
|
45
|
+
extra_rdoc_files: []
|
46
|
+
files:
|
47
|
+
- README.md
|
48
|
+
- capistrano-direnv.gemspec
|
49
|
+
- lib/capistrano-direnv.rb
|
50
|
+
- lib/capistrano/direnv.rb
|
51
|
+
- lib/capistrano/tasks/direnv.rake
|
52
|
+
homepage: http://github.com/andreychernih/capistrano-direnv
|
53
|
+
licenses:
|
54
|
+
- Apache 2.0
|
55
|
+
metadata: {}
|
56
|
+
post_install_message:
|
57
|
+
rdoc_options: []
|
58
|
+
require_paths:
|
59
|
+
- lib
|
60
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
61
|
+
requirements:
|
62
|
+
- - ">="
|
63
|
+
- !ruby/object:Gem::Version
|
64
|
+
version: '0'
|
65
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
66
|
+
requirements:
|
67
|
+
- - ">="
|
68
|
+
- !ruby/object:Gem::Version
|
69
|
+
version: '0'
|
70
|
+
requirements: []
|
71
|
+
rubyforge_project:
|
72
|
+
rubygems_version: 2.2.1
|
73
|
+
signing_key:
|
74
|
+
specification_version: 4
|
75
|
+
summary: Adds direnv support to capistrano
|
76
|
+
test_files: []
|