capistrano-rails-console 1.0.0 → 1.0.1

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 598ddcd8d79222e0574cd8e09448a5a0032f355e
4
- data.tar.gz: 7541199e11fbbe296e238c01181081f24b505454
3
+ metadata.gz: a9d608f1f9221df4040a4d831ec380c9f567c258
4
+ data.tar.gz: c28b59a23d2aad86ff84bd14f6f9e2b3cbbb5d45
5
5
  SHA512:
6
- metadata.gz: 298a610fa794f2ce123cbeff593de162d3e2363524e9f002abd4966fcea9a5e615ab104bcb22b374c2c1adb4d70e6ebbc0daebc53928d0a33fdebc97dc66c3bb
7
- data.tar.gz: fc662fff600897df4bcce8d960a5ecb5376106db423d94e7c435d99c5907716a39b9db55e59b19266d0b028334d91b6cd1925949fc389da2dcaccafcdecf2030
6
+ metadata.gz: 7c31f0106c18eb5291fb4d7a1414fcb4697ea607b59221c452dd241216aa2ce18db8b3b5834a2b6bc3043dfc6917f452e457ecb640b5f15733fc175dec64c7c7
7
+ data.tar.gz: 21e952d7702883d0d3bcdda183397ef2dd0b7a4ac8d7e09c8cacddd844e89532a5ed5fb6191dc3fc630d966d283fc28c98cf398ff6c4c5e5b681696e943081fa
@@ -1,5 +1,13 @@
1
1
  # Change Log
2
2
 
3
+ ## 1.0.0 (2015-11-12)
4
+ ### Fixed
5
+ - setting ssh hostname through `ssh_options`
6
+ - use login shell
7
+
8
+ ### Feature
9
+ - log ssh command before it is being executed
10
+
3
11
  ## 1.0.0 (2015-08-01)
4
12
  ### Fixed
5
13
  - removed dependency on capistrano-rails gem setting propper rails_env
data/README.md CHANGED
@@ -7,7 +7,8 @@
7
7
 
8
8
  # Capistrano::Rails::Console
9
9
 
10
- Remote rails console for capistrano
10
+ Remote rails console for capistrano.
11
+
11
12
 
12
13
  ## Installation
13
14
 
@@ -25,6 +26,7 @@ Or install it yourself as:
25
26
 
26
27
  $ gem install capistrano-rails-console
27
28
 
29
+
28
30
  ## Usage
29
31
 
30
32
  Require in `Capfile` to use the default task:
@@ -41,10 +43,12 @@ You can also start a sandbox session:
41
43
 
42
44
  $ cap production rails:console sandbox=1
43
45
 
46
+
44
47
  ## Contributing
45
48
 
46
- 1. Fork it
47
- 2. Create your feature branch (`git checkout -b my-new-feature`)
48
- 3. Commit your changes (`git commit -am 'Add some feature'`)
49
- 4. Push to the branch (`git push origin my-new-feature`)
50
- 5. Create new Pull Request
49
+ Bug reports and pull requests are welcome on GitHub at https://github.com/ydkn/capistrano-rails-console.
50
+
51
+
52
+ ## License
53
+
54
+ The gem is available as open source under the terms of the [MIT License](http://opensource.org/licenses/MIT).
@@ -6,7 +6,7 @@ namespace :load do
6
6
  end
7
7
 
8
8
  namespace :rails do
9
- desc "Interact with a remote rails console"
9
+ desc 'Interact with a remote rails console'
10
10
  task :console do
11
11
  on primary :app do |host|
12
12
  test(:true) # initialize ssh_options on host
@@ -19,6 +19,10 @@ namespace :rails do
19
19
  ssh_cmd_args << "-o ProxyCommand=\"#{template}\""
20
20
  end
21
21
 
22
+ if host.ssh_options && host.ssh_options[:host_name]
23
+ ssh_cmd_args << "-o HostName=\"#{host.ssh_options[:host_name]}\""
24
+ end
25
+
22
26
  rails_console_args << '--sandbox' if ENV.key?('sandbox') || ENV.key?('s')
23
27
 
24
28
  rails_env = fetch(:rails_env, fetch(:stage, 'production'))
@@ -41,7 +45,11 @@ namespace :rails do
41
45
  ssh_cmd_args << "-i #{identity}"
42
46
  end
43
47
 
44
- exec(%Q(ssh #{ssh_cmd_args.join(' ')} -t "cd #{current_path} && (#{cmd.environment_string} #{cmd})"))
48
+ ssh_cmd = %Q(ssh #{ssh_cmd_args.join(' ')} -t '$SHELL -l -c "cd #{current_path} && (#{cmd.environment_string} #{cmd})"')
49
+
50
+ debug("Running #{ssh_cmd.yellow} on #{host.hostname.blue}")
51
+
52
+ exec(ssh_cmd)
45
53
  end
46
54
  end
47
55
  end
@@ -5,7 +5,7 @@ module Capistrano
5
5
  # Console
6
6
  module Console
7
7
  # gem version
8
- VERSION = '1.0.0'
8
+ VERSION = '1.0.1'
9
9
  end
10
10
  end
11
11
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: capistrano-rails-console
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0
4
+ version: 1.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Florian Schwab
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-08-01 00:00:00.000000000 Z
11
+ date: 2015-11-12 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: capistrano