This file contains hidden or 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
| <VirtualHost *:80> | |
| ServerName communitycollab.org <VirtualHost *:80> | |
| ServerName communitycollab.org | |
| DocumentRoot /var/www/bigmac/current/public | |
| </VirtualHost> | |
| <VirtualHost *:80> | |
| ServerName newwebitects.webitects.com | |
| # DocumentRoot /var/www/webitects/foo/public | |
| DocumentRoot /var/www/webitects/current/public |
This file contains hidden or 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
| Feature: Beer Donations | |
| In order to donate a beer | |
| A user | |
| Should be signed_in | |
| Background: | |
| Given user@example.com is a user with password "secret" | |
| Scenario: A registered user should be able to donate a beer to another registered user | |
| Given someone@example.com is a user |
This file contains hidden or 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
| $ gem bundle --backtrace | |
| Calculating dependencies... | |
| Updating source: http://gems.rubyforge.org | |
| ERROR: While executing gem ... (ArgumentError) | |
| comparison of Array with Array failed | |
| c:/Ruby/lib/ruby/gems/1.8/gems/bundler-0.7.2/lib/bundler/resolver.rb:238 | |
| :in `sort_by' | |
| c:/Ruby/lib/ruby/gems/1.8/gems/bundler-0.7.2/lib/bundler/resolver.rb:238 | |
| :in `search' | |
| c:/Ruby/lib/ruby/gems/1.8/gems/bundler-0.7.2/lib/bundler/resolver.rb:109 |
This file contains hidden or 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 repackage && rake install && gem bundle | |
| (in c:/Documents and Settings/dfr/bundler) | |
| rm -r pkg | |
| mkdir -p pkg | |
| WARNING: no rubyforge_project specified | |
| WARNING: description and summary are identical | |
| Successfully built RubyGem | |
| Name: bundler | |
| Version: 0.7.2 | |
| File: bundler-0.7.2.gem |
This file contains hidden or 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
| class AccountsController < ApplicationController | |
| def new | |
| @account = Account.new | |
| end | |
| def create | |
| @account = Account.new(params[:account]) | |
| if @account.save | |
| session[:account_id] = @account.id | |
| flash[:notice] = "Thank you for signing up! You are now logged in." |
This file contains hidden or 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
| ## I seem to have lost my base models - I had obtained them already from pre-existing tables. | |
| Basically, this relates to one table, a model and a subclass, which I thought would be quite short. | |
| class Person < ActiveRecord::Base | |
| has_one :address | |
| has_one :phone | |
| belongs_to :district | |
| def member? | |
| mem # and if you really require true/false: !!mem |
This file contains hidden or 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
| context "#increment" do | |
| setup { @object.create! } | |
| evaluate { @object.increment! :attribute } | |
| should_change("attribute", :from => 0, :to => 1) { @object.attribute } | |
| end |
This file contains hidden or 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
| 1 class CreateSurveyResponseAlternatives < ActiveRecord::Migration | |
| 2 def self.up | |
| 3 create_table :survey_response_alternatives do |t| | |
| 4 t.string :name | |
| 5 t.string :value | |
| 6 t.integer :position | |
| 7 t.references :survey_item | |
| 8 end | |
| 9 | |
| 10 #SurveyResponseAlternative.reset_column_information |
This file contains hidden or 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
| class ActiveRecord::ConnectionAdapters::PostgreSQLAdapter | |
| alias_method :originit, :initialize | |
| def initialize(connection, logger, connection_parameters, config) | |
| ret = originit(connection, logger, connection_parameters, config) | |
| self.execute('SELECT prepare_perl_utils()') | |
| return ret | |
| end | |
| end |
This file contains hidden or 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
| class ActiveRecord::ConnectionAdapters::PostgreSQLAdapter | |
| def initialize_with_perl_utils(*args) | |
| returning(initialize_without_perl_utils(*args)) do | |
| execute('SELECT prepare_perl_utils()') | |
| end | |
| end | |
| alias_method_chain :initialize, :perl_utils | |
| end |