Socket
Book a DemoInstallSign in
Socket

mack-data_mapper

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

mack-data_mapper

0.8.3.1
bundlerRubygems
Version published
Maintainers
1
Created
Source

This gem provides Mack integration with the ORM Framework, DataMapper.

For more information on DataMapper please visit:

http://www.datamapper.org

== Notes

The database.yml file for a DataMapper backed application would look something like this:

MySQL:

development: default: adapter: mysql database: my_app_development host: localhost username: my_db_user password: password

test: default: adapter: mysql database: my_app_test host: localhost username: my_db_user password: password

production: default: adapter: mysql database: my_app_production host: localhost username: my_db_user password: password

PostgreSQL:

development: default: adapter: postgres database: my_app_development host: localhost username: my_db_user password: password

test: default: adapter: postgres database: my_app_test host: localhost username: my_db_user password: password

production: default: adapter: postgres database: my_app_production host: localhost username: my_db_user password: password

SQLite3:

development: default: adapter: sqlite3 database: db/my_app_development.db

test: default:
adapter: sqlite3 database: db/my_app_test.db

production: default:
adapter: sqlite3 database: db/my_app_production.db

== Testing

Tests are wrapped in a transaction so that any database activities get rolled back at the end of the test. This works with both RSpec and Test::Unit::TestCase

== Rake tasks

Drops (if it exists) the database and then creates it for your environment.

rake db:recreate

Creates the database for your environment.

rake db:create

Drops the database for your environment.

rake db:drop

Creates your test and development databases. Does NOT create your production database!

rake db:create:all

Drops your test and development databases. Does NOT create your production database!

rake db:drop:all

Drops and creates your test and development databases. Does NOT create your production database!

rake db:recreate:all

Migrate the database through scripts in db/migrations.

rake db:migrate

Rolls the schema back to the previous version. Specify the number of steps with STEP=n.

rake db:rollback

Raises an error if there are pending migrations.

rake db:abort_if_pending_migrations

Generates a controller, a model, a migration, and tests for the given resource.

rake generate:scaffold

Generates a model, a migration, and a test for the given resource.

rake generate:model

Generates a migration for the given columns

rake generate:migration

FAQs

Package last updated on 25 Jul 2009

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.