capistrano-rails-console 0.5.0 → 0.5.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 50d8c679e2f48d5fbb32f8fc35ef351607f007f4
4
- data.tar.gz: 373cfad2bf3f0d63ce2c322b0fa9ae1294068837
3
+ metadata.gz: f8e03e9c997a1447dd97fdc4ec188de36432abee
4
+ data.tar.gz: 310d77fb78f42ad3885062c95d908b32e457ead5
5
5
  SHA512:
6
- metadata.gz: a9978d793aec89b6c2d21d72ad83dc52055660303e3e09464e12e316f7459cdaa2412193a5923f95c5cb491f4a8239a4b25ff7ef014318a38a1ae4632e9b49b9
7
- data.tar.gz: 6130b613bd573f892e7031de8f83cbf173d341bd664af58da65ea048d3564a0595e27561ec472befc1b7c47db1202ce0e2996442810a262c97c084851b910350
6
+ metadata.gz: f6036ec91e01217908e465edccdc037b810d667f9b1f8045d56cd5dd7ada681844d7446e16ebb3fd1d20c4e312d7784ac8e3bb974f10f34d94ff643c934298de
7
+ data.tar.gz: 94ee4ef297c6e703eef9e136d65dd9436fd42d03a91d7387187548f92f3c5f1977beb5150e7041ba9e78c28427061359dde620cb6458c5c1fb87d95253e19350
@@ -0,0 +1,11 @@
1
+ ## 0.5.2 (2015-04-02)
2
+
3
+ Bugfixes:
4
+
5
+ - removed rails binary check due to different environments in sshkit and the ssh shellout
6
+
7
+ ## 0.5.1 (2015-04-01)
8
+
9
+ Bugfixes:
10
+
11
+ - missing ssh proxy options in console task
data/README.md CHANGED
@@ -1,3 +1,7 @@
1
+ [![Gem Version](https://img.shields.io/gem/v/capistrano-rails-console.svg)](https://rubygems.org/gems/capistrano-rails-console)
2
+ [![Dependencies](https://img.shields.io/gemnasium/ydkn/capistrano-rails-console.svg)](https://gemnasium.com/ydkn/capistrano-rails-console)
3
+ [![Code Climate](https://img.shields.io/codeclimate/github/ydkn/capistrano-rails-console.svg)](https://codeclimate.com/github/ydkn/capistrano-rails-console)
4
+
1
5
  # Capistrano::Rails::Console
2
6
 
3
7
  Remote rails console for capistrano
@@ -30,6 +34,10 @@ This will add a task `rails:console`:
30
34
 
31
35
  $ cap production rails:console
32
36
 
37
+ You can also start a sandbox session:
38
+
39
+ $ cap production rails:console sandbox=1
40
+
33
41
  ## Contributing
34
42
 
35
43
  1. Fork it
@@ -37,10 +45,3 @@ This will add a task `rails:console`:
37
45
  3. Commit your changes (`git commit -am 'Add some feature'`)
38
46
  4. Push to the branch (`git push origin my-new-feature`)
39
47
  5. Create new Pull Request
40
-
41
-
42
-  
43
-
44
- [![Gem Version](https://img.shields.io/gem/v/capistrano-rails-console.svg)](https://rubygems.org/gems/capistrano-rails-console)
45
- [![Dependencies](https://img.shields.io/gemnasium/ydkn/capistrano-rails-console.svg)](https://gemnasium.com/ydkn/capistrano-rails-console)
46
- [![Code Climate](https://img.shields.io/codeclimate/github/ydkn/capistrano-rails-console.svg)](https://codeclimate.com/github/ydkn/capistrano-rails-console)
@@ -1,34 +1,33 @@
1
1
  namespace :load do
2
2
  task :defaults do
3
3
  # add rails to rvm_map_bins
4
- rvm_map_bins = fetch(:rvm_map_bins) || []
5
- rvm_map_bins << :rails
6
- set(:rvm_map_bins, rvm_map_bins)
4
+ set :rvm_map_bins, fetch(:rvm_map_bins, []).push(:rails)
7
5
  end
8
6
  end
9
7
 
10
8
  namespace :rails do
11
-
12
9
  desc "Interact with a remote rails console"
13
10
  task console: ['deploy:set_rails_env'] do
14
11
  on primary :app do |host|
15
- ssh_cmd_options = []
12
+ test(:true) # initialize ssh_options on host
13
+
14
+ ssh_cmd_options = []
15
+ rails_console_args = []
16
16
 
17
17
  if host.ssh_options && host.ssh_options[:proxy]
18
18
  template = host.ssh_options[:proxy].command_line_template
19
19
  ssh_cmd_options << "-o ProxyCommand=\"#{template}\""
20
20
  end
21
21
 
22
- ssh_cmd_options_str = ssh_cmd_options.join(' ') if ssh_cmd_options.size > 0
23
- user_host = [host.user, host.hostname].compact.join('@')
24
- ssh_cmd = "ssh #{ssh_cmd_options_str} #{user_host} -p #{host.port || 22}"
22
+ rails_console_args << '--sandbox' if ENV.key?('sandbox') || ENV.key?('s')
25
23
 
26
- sandbox_arg = ENV.key?('sandbox') || ENV.key?('s') ? '-s' : ''
27
- cmd = SSHKit::Command.new(:rails, "console #{fetch(:rails_env)} #{sandbox_arg}", host: host)
24
+ cmd = SSHKit::Command.new(:rails, "console #{fetch(:rails_env)} #{rails_console_args.join(' ')}", host: host)
28
25
  SSHKit.config.output << cmd
29
26
 
27
+ user_host = [host.user, host.hostname].compact.join('@')
28
+ ssh_cmd = "ssh #{ssh_cmd_options.join(' ')} #{user_host} -p #{host.port || 22}"
29
+
30
30
  exec(%Q(#{ssh_cmd} -t "cd #{current_path} && (#{cmd.environment_string} #{cmd})"))
31
31
  end
32
32
  end
33
-
34
33
  end
@@ -5,7 +5,7 @@ module Capistrano
5
5
  # Console
6
6
  module Console
7
7
  # gem version
8
- VERSION = '0.5.0'
8
+ VERSION = '0.5.2'
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: 0.5.0
4
+ version: 0.5.2
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-03-22 00:00:00.000000000 Z
11
+ date: 2015-04-02 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: capistrano
@@ -80,6 +80,7 @@ extensions: []
80
80
  extra_rdoc_files: []
81
81
  files:
82
82
  - ".gitignore"
83
+ - CHANGELOG.md
83
84
  - Gemfile
84
85
  - LICENSE.txt
85
86
  - README.md