Note: Run this script as the root
user (no sudo calls are used in the script).
You will need the curl package installed, though I would have no idea why it wouldn't be installed by default:
zypper --non-interactive install curl
1) Download and install FreeTDS | |
2) Configure FreeTDS (make an entry inside /usr/local/etc/freetds.conf) | |
[free_tds_server] | |
host = <sql server> | |
port = 1433 | |
tds version = 8.0 | |
encryption = no |
1) brew install freetds | |
2) /usr/local/etc/freetds.conf | |
[my_sql_server] | |
host = <hostip> | |
port = 1433 | |
tds version = 7.0 | |
3) Enter these in the Gemfile: |
Find all the .svn directories: | |
$ find . -type d -name .svn | |
./.svn | |
./directory_1/.svn | |
./directory_2/.svn | |
./directory_3/module/.svn | |
./directory_4/.svn | |
....... |
module Capistrano | |
class SSH | |
class << self | |
alias :original_connect :connect | |
def connect(server, options={}, &block) | |
additional_server_settings = options[:server_authentication] ? options[:server_authentication] =~ /#{server.to_s}/ : nil | |
if additional_server_settings.nil? | |
return original_connect(server, options, &block) | |
else | |
methods = [ %w(publickey hostbased), %w(password keyboard-interactive) ] |
$ rails console | |
Loading development environment (Rails 3.0.6) | |
ruby-1.8.7-p334 :001 > class; MyTestController < ApplicationController; end | |
ruby-1.8.7-p334 :003 > MyTestController._process_action_callbacks.map{|c| c.filter}.compact | |
=> [:verify_authenticity_token, :authenticate_user!, :first_login?, :secure_from_admin?, :require_current_client] | |
# Add a controller to test some functionality in controller rspec | |
class MyTestController < ApplicationController | |
def index | |
render :nothing => true | |
end | |
end | |
# add | |
before do |
# Checks whether it's a devise mapped resource or not. | |
def is_devise_resource? #:nodoc: | |
raise ActionController::UnknownAction unless devise_mapping | |
end | |
# And also | |
# Attempt to find the mapped route for devise based on request path | |
def devise_mapping | |
@devise_mapping ||= request.env["devise.mapping"] |
class SessionsController < Devise::SessionsController | |
def destroy | |
reset_session | |
super | |
end | |
end | |
# In your routes | |
devise_for :users do |
require 'spec_helper' | |
class SessionsController < Devise::SessionsController | |
def index | |
session[:current_client] = "some value set in session" | |
session[:some_other_value] = "some other value in session" | |
render :nothing => true | |
end | |
end |