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
gem "mongo", '0.18.3' | |
gem "mongo_ext", '0.18.3' |
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
Mongo::OperationFailure (ModSet::createNewFromMods - RIGHT_SUBFIELD should be impossible): | |
mongo (0.19.1) lib/./lib/mongo/connection.rb:375:in `send_message_with_safe_check' | |
mongo (0.19.1) lib/./lib/mongo/collection.rb:309:in `update' | |
/Users/tomk32/.bundle/ruby/1.8/bundler/gems/mongoid-7c52c9062e8404a8881d39f6d2b48690383a9f58-master/lib/mongoid/collections/mimic.rb:38:in `send' | |
/Users/tomk32/.bundle/ruby/1.8/bundler/gems/mongoid-7c52c9062e8404a8881d39f6d2b48690383a9f58-master/lib/mongoid/collections/mimic.rb:38 | |
/Users/tomk32/.bundle/ruby/1.8/bundler/gems/mongoid-7c52c9062e8404a8881d39f6d2b48690383a9f58-master/lib/mongoid/collections/mimic.rb:22:in `call' | |
/Users/tomk32/.bundle/ruby/1.8/bundler/gems/mongoid-7c52c9062e8404a8881d39f6d2b48690383a9f58-master/lib/mongoid/collections/mimic.rb:22:in `attempt' | |
/Users/tomk32/.bundle/ruby/1.8/bundler/gems/mongoid-7c52c9062e8404a8881d39f6d2b48690383a9f58-master/lib/mongoid/collections/mimic.rb:39:in `update' | |
/Users/tomk32/.bundle/ruby/1.8/bundler/gems/mong |
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/ruby | |
require 'rubygems' | |
require 'nokogiri' | |
require 'open-uri' | |
puts | |
for letter in ('a'..'z').to_a | |
doc = Nokogiri::HTML(open('http://www.flickr.com/groups/?q=' + letter + '&m=names')) | |
doc.css('.Results').each do |link| |
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 File.expand_path(File.dirname(__FILE__) + '/../spec_helper') | |
describe Album do | |
before :each do | |
@website = Factory(:website) | |
@album = @website.albums.build(Factory(:album).attributes) | |
@album.save | |
end | |
it "should be valid" do | |
@album.should be_valid |
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
Process: Safari [31060] | |
Path: /Applications/Safari.app/Contents/MacOS/Safari | |
Identifier: org.webkit.nightly.WebKit | |
Version: r58209 (58209) | |
Code Type: X86-64 (Native) | |
Parent Process: launchd [144] | |
Date/Time: 2010-05-03 14:17:45.086 +0200 | |
OS Version: Mac OS X 10.6.3 (10D573) | |
Report Version: 6 |
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
development: | |
adapter: sqlite3 | |
database: db/development.sqlite3 | |
pool: 5 | |
timeout: 5000 |
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
development: | |
adapter: sqlite3 | |
database: db/development.sqlite3 | |
pool: 5 | |
timeout: 5000 |
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
class Source::FlickrAccount < Source | |
def call_worker | |
self.update_attributes(:status => 'updating') | |
Navvy::Job.enqueue(Source::FlickrAccount, :process_update, {:id => self.id}) | |
end | |
# TODO import and create albums | |
def update_data | |
# ... |
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
# put this into app/helpers/custom_form_builder.rb | |
module Padrino | |
module Helpers | |
module FormBuilder #:nodoc: | |
class CustomFormBuilder < StandardFormBuilder | |
end | |
end | |
end | |
end |