capistrano-shell 0.1.0 → 0.2.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: cce5ddd775a920494e728a20765425cdc0b12226
4
- data.tar.gz: 7f8e712670942a5c91e360931508ddc0b99d1adb
3
+ metadata.gz: 9496aba2b0c5a85c524169ee82b59f70785b011d
4
+ data.tar.gz: 9bcf1ac462c17720d8d3dba12baded615535aa7e
5
5
  SHA512:
6
- metadata.gz: a480b48b843aea37fa36ada0842171f9fff73bc2168745437a5fb27a033044b97af7cb0db3ae1804793ea50a7539db2d5c17d2c194767881fb4bb1461f0a0f7a
7
- data.tar.gz: 8d01b7941037dfe481f24d94856e455ae5c546f4d471577a58f5a59fada5d77088b37ca4f80867154db31eef7a241b5fefa39f175e97af6e492e96f74d8058dd
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 )
@@ -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-shell'
7
- spec.version = '0.1.0'
7
+ spec.version = '0.2.0'
8
8
  spec.authors = ['Vladimir Kochnev']
9
9
  spec.email = ['hashtable@yandex.ru']
10
10
 
@@ -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 << '$SHELL'
39
+ cmd << shell_cmd
38
40
  else
39
- cmd << "cd #{release_path} && $SHELL"
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.1.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-16 00:00:00.000000000 Z
11
+ date: 2015-04-17 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler