capistrano-shell 0.1.0 → 0.2.0
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/README.md +12 -4
- data/capistrano-shell.gemspec +1 -1
- data/lib/capistrano/tasks/shell.rake +5 -2
- 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: 9496aba2b0c5a85c524169ee82b59f70785b011d
|
4
|
+
data.tar.gz: 9bcf1ac462c17720d8d3dba12baded615535aa7e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8fceb27c14e8babddaf32e35d6e435dfff535e58a5ba86a46425dc41e9b7358b9bd72821bda51edc4589007e2375434a3feb6377c06963a654743fa2989057c6
|
7
|
+
data.tar.gz: 5abfbfd4c2a7a3984ebeee0e09f0c6f560ae0d11d6eb18ac84e55063d98a824026ee9ea4afcb0f292f3eda6eb90cae8feaae350ee75c081fb91195976751f3b4
|
data/README.md
CHANGED
@@ -34,15 +34,23 @@ server 'server2', user: 'deploy', roles: %w{db}, no_release: true
|
|
34
34
|
|
35
35
|
Then you should be able to do something like this:
|
36
36
|
|
37
|
-
$ cap production shell
|
38
|
-
$ cap production shell ROLES=app
|
39
|
-
$ cap production shell HOSTS=server1
|
40
|
-
$ cap production shell HOSTS=server2
|
37
|
+
$ cap production -n shell
|
38
|
+
$ cap production -n shell ROLES=app
|
39
|
+
$ cap production -n shell HOSTS=server1
|
40
|
+
$ cap production -n shell HOSTS=server2
|
41
41
|
|
42
42
|
When connecting to `server1` ssh will cd into `/var/www/your_app/current` directory(`release_path`). But when connecting to `server2` just `/home/deploy` will be opened because `server2` is marked as `no_release`.
|
43
43
|
|
44
44
|
In the last two example the `HOSTS` environment variable is used. However, you probably don't need to use it because `capistrano/shell` asks you what server to use when there are many.
|
45
45
|
|
46
|
+
### Shell command
|
47
|
+
|
48
|
+
It is possible to redefine shell command (by default `$SHELL --login` is used):
|
49
|
+
|
50
|
+
```ruby
|
51
|
+
set :shell_cmd, '/bin/zsh -l'
|
52
|
+
```
|
53
|
+
|
46
54
|
## Contributing
|
47
55
|
|
48
56
|
1. Fork it ( https://github.com/marshall-lee/capistrano-shell/fork )
|
data/capistrano-shell.gemspec
CHANGED
@@ -33,10 +33,12 @@ task :shell do
|
|
33
33
|
user_hostname = [options[:user], host.hostname].compact.join('@')
|
34
34
|
cmd << user_hostname
|
35
35
|
|
36
|
+
shell_cmd = fetch :shell_cmd
|
37
|
+
|
36
38
|
if host.properties.fetch(:no_release)
|
37
|
-
cmd <<
|
39
|
+
cmd << shell_cmd
|
38
40
|
else
|
39
|
-
cmd << "cd #{release_path} &&
|
41
|
+
cmd << "cd #{release_path} && #{shell_cmd}"
|
40
42
|
end
|
41
43
|
|
42
44
|
puts "Executing #{cmd.join ' '}"
|
@@ -46,5 +48,6 @@ end
|
|
46
48
|
namespace :load do
|
47
49
|
task :defaults do
|
48
50
|
set :shell_server_number, ask('server number', 1)
|
51
|
+
set :shell_cmd, '$SHELL --login'
|
49
52
|
end
|
50
53
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: capistrano-shell
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Vladimir Kochnev
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-04-
|
11
|
+
date: 2015-04-17 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|