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
test "should only generate url tokens on creation" do | |
invite = invites(:page) | |
old_token = invite.url_token | |
invite.last_visited_at = 1.day.ago | |
invite.save | |
invite.reload | |
new_token = invite.url_token | |
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
module URIExtension | |
def self.included(klass) | |
klass.extend ClassMethods | |
end | |
module ClassMethods | |
def foo | |
"baz" | |
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
/opt/local/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/action_controller/vendor/html-scanner | |
/opt/local/lib/ruby/gems/1.8/gems/activesupport-2.2.2/lib/active_support/vendor/i18n-0.0.1 | |
/opt/local/lib/ruby/gems/1.8/gems/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12 | |
/opt/local/lib/ruby/gems/1.8/gems/activesupport-2.2.2/lib/active_support/vendor/memcache-client-1.5.1 | |
/Users/avk/Documents/My Code/Ruby on Rails/feedback/coreapp/app/controllers/ | |
/Users/avk/Documents/My Code/Ruby on Rails/feedback/coreapp/app | |
/Users/avk/Documents/My Code/Ruby on Rails/feedback/coreapp/app/models | |
/Users/avk/Documents/My Code/Ruby on Rails/feedback/coreapp/app/controllers | |
/Users/avk/Documents/My Code/Ruby on Rails/feedback/coreapp/app/helpers | |
/Users/avk/Documents/My Code/Ruby on Rails/feedback/coreapp/config |
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
avk ~/public_html/gracechow.com/current: rake RAILS_ENV=production db:migrate --trace | |
(in /home/avk/public_html/gracechow.com/releases/20090707223211) | |
** Invoke db:migrate (first_time) | |
** Invoke environment (first_time) | |
** Execute environment | |
rake aborted! | |
Mysql::Error: Table 'gracechow_production.galleries' doesn't exist: SELECT * FROM `galleries` ORDER BY sequence ASC LIMIT 1 | |
/home/avk/public_html/gracechow.com/releases/20090707223211/vendor/rails/activerecord/lib/active_record/connection_adapters/abstract_adapter.rb:188:in `log' | |
/home/avk/public_html/gracechow.com/releases/20090707223211/vendor/rails/activerecord/lib/active_record/connection_adapters/mysql_adapter.rb:309:in `execute' | |
/home/avk/public_html/gracechow.com/releases/20090707223211/vendor/rails/activerecord/lib/active_record/connection_adapters/mysql_adapter.rb:563:in `select' |
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
# Place any notes or comments you have here | |
# It will make any customisation easier to understand in the weeks to come | |
# domain: gracechow.com | |
# public: /home/avk/public_html/gracechow.com/ | |
<VirtualHost *:80> | |
# Admin email, Server Name (domain name) and any aliases | |
ServerAdmin [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
.css({ | |
'width':'300px', | |
'position':'absolute', | |
'top':'15px', | |
'right':'15px', | |
'border':'1px solid black', | |
'padding':'5px' | |
}) |
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
[user] | |
name = Arthur Klepchukov | |
email = [email protected] | |
[alias] | |
co = checkout | |
st = status | |
ci = commit | |
a = add | |
b = branch | |
d = diff |
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
test 'should delete all pages when deleted' do | |
base_url = "http://google.com/" | |
site = nil | |
assert_difference "Site.count", 1 do | |
site = create_site(:url => base_url) | |
end | |
page_urls = %w(maps movies alerts) | |
assert_difference "Page.count", page_urls.size do | |
page_urls.each do |page_url| |
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
describe User, "is created and activated properly" do | |
before(:each) do | |
@user = User.new | |
end | |
describe "new user from development environment" do | |
before(:each) do | |
@user.context = :dev | |
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 Site < ActiveRecord::Base | |
has_many :pages | |
belongs_to :account | |
validates_presence_of :url | |
validates_format_of :url, :with => URI.regexp(['http', 'https']) | |
validates_presence_of :account_id | |
validates_associated :account |