Created
September 11, 2010 01:17
-
-
Save knowtheory/574648 to your computer and use it in GitHub Desktop.
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
| >> @chrome_history = "sqlite3:///Users/knowtheory/data/chrome_history" | |
| => "sqlite3:///Users/knowtheory/data/chrome_history" | |
| >> require 'dm-chrome-history' | |
| => true | |
| >> url = Url.first; url.valid?; url.errors | |
| => #<DataMapper::Validations::ValidationErrors:0x101619890 @errors=#<OrderedHash {:url=>["Url has an invalid format"], :last_visit_time=>["Last visit time must be an integer"]}, resource#<Url @id=1 @url=#<Addressable::URI:0x80b0d044 URI:http://mail.knowtheory.net/ @title="Knowtheory Mail" @visit_count=108 @typed_count=72 @last_visit_time=Wed Aug 25 09:32:57 -0400 2010 @hidden=0 @favicon_id=2> | |
| >> class Url; property :url, String, :format => :url; property :last_visit_time, Integer, :required => true; end | |
| => #<DataMapper::Property::Integer @model=Url @name=:last_visit_time> | |
| >> url = Url.first; url.valid?; url.errors | |
| => #<DataMapper::Validations::ValidationErrors:0x101596ff8 @errors=#<OrderedHash {}>, resource#<Url @id=1 @url="http://mail.knowtheory.net/" @title="Knowtheory Mail" @visit_count=108 @typed_count=72 @last_visit_time=12927216777008553 @hidden=0 @favicon_id=2> |
Author
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
see http://github.com/knowtheory/dm-chrome-history/tree/master/lib/ for the required files.