Skip to content

Commit

Permalink
Switch to datamapper/sqlite3 storage
Browse files Browse the repository at this point in the history
  • Loading branch information
feldpost committed Mar 24, 2009
1 parent e70c150 commit 0892423
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 5 deletions.
8 changes: 5 additions & 3 deletions README.textile
Expand Up @@ -4,9 +4,11 @@ h3. Dependencies

mbbx6spp-twitter4r >= 0.3.1
twibit >= twibot-0.1.3
daemon-spawn
moneta

alexvollmer-daemon-spawn
wycats-moneta
dm-core
do_sqlite3 >=0.9.11


h3. Configuration

Expand Down
1 change: 1 addition & 0 deletions data/.gitignore
@@ -0,0 +1 @@
*.db
4 changes: 2 additions & 2 deletions slap.rb
@@ -1,6 +1,6 @@
require 'rubygems'
require 'moneta'
require 'moneta/file'
require 'moneta/datamapper'

class Slap
attr_accessor :sender, :message
Expand Down Expand Up @@ -55,7 +55,7 @@ def d( recipient, text )
end

def storage
@storage ||= Moneta::File.new(:path => File.join(File.dirname(__FILE__), "slaps"))
@storage ||= Moneta::DataMapper.new(:setup => "sqlite3:///#{File.join(File.dirname(__FILE__),'data','slaps.db')}")
end

end

0 comments on commit 0892423

Please sign in to comment.