Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

documenting what should be here someday

  • Loading branch information...
commit 5887f7529264c2e42c946a0e17cf4317499e522c 1 parent ae799c9
@codesnik authored
Showing with 56 additions and 5 deletions.
  1. +53 −2 README.rdoc
  2. +2 −2 Rakefile
  3. +1 −1  test/rails-recipes_test.rb
View
55 README.rdoc
@@ -1,7 +1,58 @@
= rails-recipes
-Description goes here.
+capistrano recipes for invoking rails script/console, script/dbconsole, rake etc.
+on first server in a cluster
+
+== Synopsis
+
+ # starts script/console on the first :app server in currently released directory
+ # be careful with your production server data - it's the power under your fingers now!
+
+ cap rails:console
+
+ # starts script/dbconsole, still on the :app server, but connected to a
+ # right database, probably
+
+ cap rails:dbconsole
+
+ # even this should work, providing you authenticate via ssh key
+ # and you're not using ssh gateway (breaks pipeline sometimes)
+
+ cap rails:dbconsole < sqldump.sql
+
+ # sorry, haven't figured how to provide additional arguments for rake yet.
+
+ cap rails:rake task=db:abort_if_pending_migrations
+
+ # do not try it at work
+ cap rails:runner cmd='User.delete_all'
+
+ # using some multistage deployment scheme (capistrano/ext/multistage or something homebrew)?
+ # this should work too right from the box
+
+ cap staging rails:console
+
+== Installation
+
+TODO
+
+== Configuration
+
+== Hidden details
+
+It doesn't use ruby net/ssh2 library for interactive script/console and script/dbconsole
+but invokes real 'ssh' executable so that readline interface works as expected.
+Still this means that all the subtile differences of parsing ~/.ssh/config and other files
+between openssh executables and net/ssh2 apply here.
+
+Used on Ubuntu and MacOS X, for deployment on Gentoo, Fedora, FreeBSD
+
+Sorry, no tests yet, not that there's much code you can actually test here
+
+== Suggestions, feature requests, bugreports
+
+...are always welcome.
== Copyright
-Copyright (c) 2009 codesnik. See LICENSE for details.
+Copyright (c) 2009 Alexey 'codesnik' Trofimenko. See LICENSE for details.
View
4 Rakefile
@@ -5,10 +5,10 @@ begin
require 'jeweler'
Jeweler::Tasks.new do |gem|
gem.name = "rails-recipes"
- gem.summary = %Q{TODO}
+ gem.summary = %Q{capistrano recipes for invoking script/console, script/dbconsole and rake on a rails app server}
gem.email = "aronaxis@gmail.com"
gem.homepage = "http://github.com/codesnik/rails-recipes"
- gem.authors = ["codesnik"]
+ gem.authors = ["Alexey 'codesnik' Trofimenko"]
# gem is a Gem::Specification... see http://www.rubygems.org/read/chapter/20 for additional settings
end
View
2  test/rails-recipes_test.rb
@@ -2,6 +2,6 @@
class RailsRecipesTest < Test::Unit::TestCase
should "probably rename this file and start testing for real" do
- flunk "hey buddy, you should probably rename this file and start testing for real"
+ assert "still won't bother myself with it right now"
end
end
Please sign in to comment.
Something went wrong with that request. Please try again.