capistrano_rails_console 0.2.1 → 0.3.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.
data/README.md CHANGED
@@ -16,6 +16,10 @@ Or install it yourself as:
16
16
 
17
17
  $ gem install capistrano_rails_console
18
18
 
19
+ Require it in your Capfile or deploy.rb:
20
+
21
+ require "capistrano_rails_console/recipes"
22
+
19
23
  ## Usage
20
24
 
21
25
  $ cap rails:console
@@ -5,7 +5,14 @@ Capistrano::Configuration.instance(:must_exist).load do
5
5
  desc "Open a rails console the first app server"
6
6
  task :console, :roles => :app do
7
7
  hostname = find_servers_for_task(current_task).first
8
- exec "ssh -l #{user} #{hostname} -p #{port} -t 'cd #{current_path} && rails c #{rails_env}'"
8
+
9
+ console_command = case defined?(Rails::VERSION::MAJOR) && Rails::VERSION::MAJOR
10
+ when 2
11
+ "script/rails console #{rails_env}"
12
+ else
13
+ "rails console #{rails_env}"
14
+ end
15
+ exec "ssh -l #{user} #{hostname} -p #{port} -t 'cd #{current_path} && #{console_command}'"
9
16
  end
10
17
  end
11
18
  end
@@ -1,3 +1,3 @@
1
1
  module CapistranoRailsConsole
2
- VERSION = "0.2.1"
2
+ VERSION = "0.3.0"
3
3
  end
metadata CHANGED
@@ -2,14 +2,14 @@
2
2
  name: capistrano_rails_console
3
3
  version: !ruby/object:Gem::Version
4
4
  prerelease:
5
- version: 0.2.1
5
+ version: 0.3.0
6
6
  platform: ruby
7
7
  authors:
8
8
  - Timo Schilling
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-12-18 00:00:00.000000000 Z
12
+ date: 2013-01-06 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  version_requirements: !ruby/object:Gem::Requirement
@@ -71,7 +71,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
71
71
  version: '0'
72
72
  segments:
73
73
  - 0
74
- hash: 1721732046819986721
74
+ hash: 3592551622653224190
75
75
  none: false
76
76
  required_rubygems_version: !ruby/object:Gem::Requirement
77
77
  requirements:
@@ -80,7 +80,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
80
80
  version: '0'
81
81
  segments:
82
82
  - 0
83
- hash: 1721732046819986721
83
+ hash: 3592551622653224190
84
84
  none: false
85
85
  requirements: []
86
86
  rubyforge_project: