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 Company < ActiveRecord::Base | |
| def update_with_password(params={}) | |
| if params[:password].blank? | |
| params.delete(:password) | |
| params.delete(:password_confirmation) if params[:password_confirmation].blank? | |
| end | |
| update_attributes(params) | |
| 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
| LANG= | |
| LC_COLLATE="C" | |
| LC_CTYPE="UTF-8" | |
| LC_MESSAGES="C" | |
| LC_MONETARY="C" | |
| LC_NUMERIC="C" | |
| LC_TIME="C" | |
| LC_ALL= |
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
| like_this :when => "called", | |
| :like => "this" | |
| like_that(when, signature, is, like, this) |
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
| require 'rubygems' | |
| require 'test/unit' | |
| require 'redgreen' | |
| class Card | |
| attr_reader :suite, :value | |
| def initialize(options={}) | |
| @suite = options[:suite] | |
| @value = options[:value] |
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
| group :development, :test do | |
| gem 'ruby-debug', :platforms => :ruby_18 | |
| gem 'ruby-debug19', :platforms => :ruby_19 | |
| 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
| #!/bin/bash | |
| for f in `find . -name \*.rb`; do | |
| grep '^# encoding: UTF-8' $f 2>&1 >/dev/null && continue | |
| pf=$(basename $f) | |
| cp $f /tmp | |
| echo "#encoding: UTF-8" > $f | |
| cat /tmp/$pf >> $f |
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
| Ereconsulaat Belo Horizonte | |
| Avenida dos Andradas, 1093 | |
| MG CEP 30120-010 Belo Horizonte | |
| Brazilië | |
| +55 31 30486307 | |
| +55 31 32264532 | |
| [email protected] |
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
| Version 0.9.3.27 | |
| April 24, 2011 | |
| Beta expiration extended to June 1st, 2011 | |
| Version 0.9.3.26 | |
| February 26, 2011 | |
| Beta expiration extended to May 1st, 2011 | |
| Version 0.9.3.25 | |
| December 26, 2010 | |
| Beta expiration extended to March 1st, 2011 | |
| Version 0.9.3.24 |
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
| @subscriber(ApplicationCreated) | |
| def application_created_subscriber(event): | |
| log.warn('Initializing database...') | |
| f = open(os.path.join(here, 'schema.sql'), 'r') | |
| stmt = f.read() | |
| settings = event.app.registry.settings | |
| db = sqlite3.connect(settings['db']) | |
| db.executescript(stmt) | |
| db.commit() | |
| f.close() |
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
| function! RunTests(filename) | |
| " Write the file and run tests for the given filename | |
| :w | |
| :silent !echo;echo;echo;echo;echo | |
| exec ":!bundle exec rspec --fail-fast --drb " . a:filename | |
| endfunction | |
| function! SetTestFile() | |
| " Set the spec file that tests will be run for. | |
| let t:grb_test_file=@% |