Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 17 additions & 16 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,43 +1,44 @@
# DahliaDataModels
# Dahlia Data Models

Welcome to your new gem! In this directory, you'll find the files you need to be able to package up your Ruby library into a gem. Put your Ruby code in the file `lib/dahlia_data_models`. To experiment with that code, run `bin/console` for an interactive prompt.

TODO: Delete this and the text above, and describe your gem
This gem provides a shared Rails engine consisting of ActiveRecord models used by the Regional DAHLIA websites ([admin repo](https://github.com/Exygy/dahlia-admin) / [listings repo](https://github.com/Exygy/dahlia-listings)).

## Installation

Add this line to your application's Gemfile:

```ruby
gem 'dahlia_data_models'
gem 'dahlia_data_models', git: 'https://github.com/Exygy/dahlia_data_models.git'
```

(_Note: you can add `ref: 'xyz'` at the end of the line if you want to reference a specific commit hash._)

And then execute:

$ bundle

Or install it yourself as:
If the app into which you're importing this gem is responsible for setting up the DAHLIA database, you'll need to import migrations to your app:

$ gem install dahlia_data_models
rails g dahlia_data_models:install
rails db:migrate

## Usage
## Development Testing

TODO: Write usage instructions here
Run `rake spec` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.

## Development
## Migrations

After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake spec` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
When migration generators are added to `lib/generators`, you will need to cd into `spec/dummy` and run `rails g dahlia_data_models:install` so that the migrations are available for the rspec test suite.

To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).
## Releasing

## Migrations
_Note: this section is still under review._

When migration generators are added to `lib/generators`, you will need to cd into `spec/dummy` and run `rails g dahlia_data_models:install` so that the migrations are available for the rspec test suite.
To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).

## Contributing

Bug reports and pull requests are welcome on GitHub at https://github.com/[USERNAME]/dahlia_data_models.
Bug reports and pull requests are welcome on GitHub at https://github.com/Exygy/dahlia_data_models.

## License

The gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).
The gem is available as open source under the terms of the GNU General Public License v3 (see LICENSE.txt).