This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# | |
# = Capistrano database.yml task | |
# | |
# Provides a couple of tasks for creating the database.yml | |
# configuration file dynamically when deploy:setup is run. | |
# | |
# Category:: Capistrano | |
# Package:: Database | |
# Author:: Simone Carletti <weppos@weppos.net> | |
# Copyright:: 2007-2010 The Authors |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
rake db:migrate --trace | |
** Invoke db:migrate (first_time) | |
** Invoke environment (first_time) | |
** Execute environment | |
** Invoke db:load_config (first_time) | |
** Invoke rails_env (first_time) | |
** Execute rails_env | |
** Execute db:load_config | |
** Execute db:migrate | |
rake aborted! |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# route.rb has: | |
# resources :user do | |
# resources :accounts do | |
# end | |
class AccountsController < ApplicationController | |
before_filter :retrieve_user | |
respond_to :html, :json | |
# GET /accounts |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
# Adapted from the book "Nginx HTTP Server", by Clement Nedelcu. | |
# Original Author: Ryuan Norbauer http://norbauerinc.com | |
# Modified: Geoffrey Grosenbach http://topfunky.com | |
# Modified: Clement Nedelcu http://cnedelcu.blogspot.com/ | |
# Modified: Jordan Orelli http://jordanorelli.com/ | |
# source: https://gist.github.com/1161075 | |
# Corresponds with the following compile-time options: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
scenario 'Logging in' do | |
ENV["BOSTONRB_ADMIN_NAME"] = name | |
ENV["BOSTONRB_ADMIN_PASSWORD"] = password | |
if page.driver.respond_to?(:basic_auth) | |
page.driver.basic_auth(name, password) | |
elsif page.driver.respond_to?(:basic_authorize) | |
page.driver.basic_authorize(name, password) | |
elsif page.driver.respond_to?(:browser) && page.driver.browser.respond_to?(:basic_authorize) | |
page.driver.browser.basic_authorize(name, password) | |
else |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'spec_helper' | |
feature 'Report is Now' | |
scenario 'with valid attributes' do | |
Given 'I am authenticated' do | |
@user = authenticate(create(:user)) | |
end | |
And 'I have no reports' do | |
@user.reports.should be_empty | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#... | |
has_many :notes_students | |
has_many :students, through: :notes_students | |
#... |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Devise.setup do |config| | |
#... | |
config.mailer = "PasswordResetMailer" | |
#... | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module Devise | |
module Models | |
module Confirmable | |
handle_asynchronously :send_confirmation_instructions | |
end | |
module Recoverable | |
handle_asynchronously :send_reset_password_instructions | |
end | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
server { | |
server_name *.ducky.local ducky.local 127.0.0.1; | |
root /Projects/Ruby/Rails/duckyg/public; | |
rack_env development; | |
passenger_enabled on; | |
} |
OlderNewer