Every repository with this icon (
Every repository with this icon (
Get Started
Get Waves
# latest release from Rubyforge gem install waves # relatively recent gem build from master on GitHub gem install dyoder-waves --source=http://gems.github.com # get the framework source git clone git://github.com/dyoder/waves.git cd waves rake setup # install gem dependencies needed to work from source
Create an Application
# working from gems waves ~/dev/web/killer_app # working from source ./bin/waves ~/dev/web/killer_app
This generates a default application in the target directory. The application module’s name is the constant-cased version of the target directory basename, in this case KillerApp.
Configure basic settings
Configure your database connection using the database attribute in configurations/development.rb. The default ORM is currently Sequel, but there are other ORM layers in the works. The value of database is used with Sequel.connect . Sequel’s current documentation seems to favor a URL-style argument, but we have been getting along fine with a hash.
# With the Sequel sqlite adapter, the :database parameter is read as a path # relative to the application root. database :adapter => 'sqlite', :database => 'killer_app.db'
This file is also where you configure the server host, port, and Rack Builder settings.
Create the initial db schema.
You can create a Sequel migration with:
rake schema:migration name=users vi schema/migrations/001_users.rb
And you can run migrations with:
rake schema:migrate # or with a version number rake schema:migrate version=1
Mappings
Mappings are the Waves equivalent to routes. These live in configurations/mapping.rb in a Waves application. See the mappings in the sample blog application in the Waves source for examples.
TBC






