Sha256: 82e331677206e938783067f05aca97e3b1dbf84461ff2b2ea6f2832a6c725010

Contents?: true

Size: 1.06 KB

Versions: 31

Compression:

Stored size: 1.06 KB

Contents

module Capricorn
  module Actors # :nodoc:
    class Sqlite3Actor < Capricorn::Actor
      
      after_install_satellite :write_config_file
      
      # write the +database.yml+ config file.
      def write_config_file
        system.as_user(system.web_user, system.web_group) do
          
          config = %{# SQLite version 3.x
#   gem install sqlite3-ruby (not necessary on OS X Leopard)
development:
  adapter: sqlite3
  database: db/system/development.sqlite3
  pool: 5
  timeout: 5000

# Warning: The database defined as "test" will be erased and
# re-generated from your development database when you run "rake".
# Do not set this db to the same as development or production.
test:
  adapter: sqlite3
  database: db/system/test.sqlite3
  pool: 5
  timeout: 5000

production:
  adapter: sqlite3
  database: db/system/production.sqlite3
  pool: 5
  timeout: 5000
}
          
          db_file = File.join(system.satellite_root, 'config', 'database.yml')
          File.open(db_file, 'w+') { |f| f.write config }
          
        end
      end
      
    end
  end
end

Version data entries

31 entries across 31 versions & 2 rubygems

Version Path
simonmenke-capricorn-0.2.00 lib/capricorn/actors/sqlite3_actor.rb
simonmenke-capricorn-0.2.03 lib/capricorn/actors/sqlite3_actor.rb
simonmenke-capricorn-0.2.07 lib/capricorn/actors/sqlite3_actor.rb
simonmenke-capricorn-0.2.25 lib/capricorn/actors/sqlite3_actor.rb
simonmenke-capricorn-0.2.26 lib/capricorn/actors/sqlite3_actor.rb
capricorn-0.2.25 lib/capricorn/actors/sqlite3_actor.rb
capricorn-0.2.24 lib/capricorn/actors/sqlite3_actor.rb
capricorn-0.2.23 lib/capricorn/actors/sqlite3_actor.rb
capricorn-0.2.22 lib/capricorn/actors/sqlite3_actor.rb
capricorn-0.2.21 lib/capricorn/actors/sqlite3_actor.rb
capricorn-0.2.20 lib/capricorn/actors/sqlite3_actor.rb
capricorn-0.2.19 lib/capricorn/actors/sqlite3_actor.rb
capricorn-0.2.18 lib/capricorn/actors/sqlite3_actor.rb
capricorn-0.2.17 lib/capricorn/actors/sqlite3_actor.rb
capricorn-0.2.16 lib/capricorn/actors/sqlite3_actor.rb
capricorn-0.2.15 lib/capricorn/actors/sqlite3_actor.rb
capricorn-0.2.14 lib/capricorn/actors/sqlite3_actor.rb
capricorn-0.2.13 lib/capricorn/actors/sqlite3_actor.rb
capricorn-0.2.12 lib/capricorn/actors/sqlite3_actor.rb
capricorn-0.2.11 lib/capricorn/actors/sqlite3_actor.rb