CapConsole 0.0.1

Sign up to get free protection for your applications and to get access to all the features.
data/History.txt ADDED
@@ -0,0 +1,6 @@
1
+ == 0.0.1 / 2007-12-20
2
+
3
+ * First release
4
+ * Does as advertised, provides a cap task for opening a remote console on your
5
+ production host.
6
+
data/README.txt ADDED
@@ -0,0 +1,65 @@
1
+ CapConsole
2
+ by HandleIT
3
+ http://handle.it/
4
+
5
+ == DESCRIPTION:
6
+
7
+ This adds a new capistrano task called console:shell which, when run, opens a
8
+ script/console shell on your remote production (or staging/etc.) host. Lets
9
+ you play in your familiar script/console shell but directly on your remote
10
+ host.
11
+
12
+ == FEATURES/PROBLEMS:
13
+
14
+ * Readline doesn't work so no command history and other really nice parts of
15
+ local script/console.
16
+ * Capfile is embedded inside the capify script - and there's no hook, so you
17
+ have to add the require for cap_console manually to each Capfile after you
18
+ capify.
19
+
20
+ == SYNOPSIS:
21
+
22
+ After you capify your project add the following require to the end of your
23
+ Capfile:
24
+ require 'cap_console/recipes'
25
+
26
+ *nix users can do it like this:
27
+ echo "require 'cap_console/recipes'" >> Capfile
28
+
29
+ In fact, I've actually edited my bin/capify script so it always does this when
30
+ I capify a project.
31
+
32
+ Check cap -T and you should see console:shell as a new task.
33
+
34
+ == REQUIREMENTS:
35
+
36
+ * capistrano >= 2.0.0
37
+
38
+ == INSTALL:
39
+
40
+ * sudo gem install cap_console
41
+
42
+ == LICENSE:
43
+
44
+ (The MIT License)
45
+
46
+ Copyright (c) 2007 FIX
47
+
48
+ Permission is hereby granted, free of charge, to any person obtaining
49
+ a copy of this software and associated documentation files (the
50
+ 'Software'), to deal in the Software without restriction, including
51
+ without limitation the rights to use, copy, modify, merge, publish,
52
+ distribute, sublicense, and/or sell copies of the Software, and to
53
+ permit persons to whom the Software is furnished to do so, subject to
54
+ the following conditions:
55
+
56
+ The above copyright notice and this permission notice shall be
57
+ included in all copies or substantial portions of the Software.
58
+
59
+ THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
60
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
61
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
62
+ IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
63
+ CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
64
+ TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
65
+ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
@@ -0,0 +1,3 @@
1
+ module CapConsole
2
+ VERSION = '0.0.1'
3
+ end
@@ -0,0 +1,23 @@
1
+ require 'capistrano'
2
+ require 'cap_console'
3
+
4
+ module CapConsole
5
+ configuration = Capistrano::Configuration.respond_to?( :instance ) ?
6
+ Capistrano::Configuration.instance( :must_exist ) :
7
+ Capistrano.configuration( :must_exist )
8
+
9
+ configuration.load do
10
+ namespace :console do
11
+ desc "remote script/console"
12
+ task :shell, :roles => :app do
13
+ input = ''
14
+ ENV['RAILS_ENV'] = stage if stage # use multistage if it exists
15
+ run "cd #{current_path} && ./script/console #{ENV['RAILS_ENV']}" do |channel, stream, data|
16
+ next if data.chomp == input.chomp || data.chomp == ''
17
+ print data
18
+ channel.send_data(input = $stdin.gets) if data =~ /^(>|\?)>/
19
+ end
20
+ end
21
+ end
22
+ end
23
+ end
@@ -0,0 +1,8 @@
1
+ require 'test/unit'
2
+
3
+ class CapConsoleTest < Test::Unit::TestCase
4
+ # No idea how to test a cap task
5
+ def test_this_plugin
6
+ assert true
7
+ end
8
+ end
metadata ADDED
@@ -0,0 +1,69 @@
1
+ --- !ruby/object:Gem::Specification
2
+ rubygems_version: 0.9.4
3
+ specification_version: 1
4
+ name: CapConsole
5
+ version: !ruby/object:Gem::Version
6
+ version: 0.0.1
7
+ date: 2007-12-20 00:00:00 +11:00
8
+ summary: Cap task to remotely open a rails console on your production host
9
+ require_paths:
10
+ - lib
11
+ email: support@handle.it
12
+ homepage: http://handle.rubyforge.org
13
+ rubyforge_project: cap_console
14
+ description: This adds a new capistrano task called console:shell which, when run, opens a script/console shell on your remote production (or staging/etc.) host. Lets you play in your familiar script/console shell but directly on your remote host.
15
+ autorequire:
16
+ default_executable:
17
+ bindir: bin
18
+ has_rdoc: true
19
+ required_ruby_version: !ruby/object:Gem::Version::Requirement
20
+ requirements:
21
+ - - ">"
22
+ - !ruby/object:Gem::Version
23
+ version: 0.0.0
24
+ version:
25
+ platform: ruby
26
+ signing_key:
27
+ cert_chain:
28
+ post_install_message:
29
+ authors:
30
+ - HandleIT
31
+ files:
32
+ - History.txt
33
+ - README.txt
34
+ - lib/cap_console.rb
35
+ - lib/cap_console/recipes.rb
36
+ - test/cap_console_test.rb
37
+ test_files: []
38
+
39
+ rdoc_options:
40
+ - --main
41
+ - README.txt
42
+ extra_rdoc_files:
43
+ - History.txt
44
+ - README.txt
45
+ executables: []
46
+
47
+ extensions: []
48
+
49
+ requirements: []
50
+
51
+ dependencies:
52
+ - !ruby/object:Gem::Dependency
53
+ name: capistrano
54
+ version_requirement:
55
+ version_requirements: !ruby/object:Gem::Version::Requirement
56
+ requirements:
57
+ - - ">="
58
+ - !ruby/object:Gem::Version
59
+ version: 2.0.0
60
+ version:
61
+ - !ruby/object:Gem::Dependency
62
+ name: hoe
63
+ version_requirement:
64
+ version_requirements: !ruby/object:Gem::Version::Requirement
65
+ requirements:
66
+ - - ">="
67
+ - !ruby/object:Gem::Version
68
+ version: 1.3.0
69
+ version: