Repository URL to install this package:
|
Version:
4.0.0.pre.3 ▾
|
| app |
| config |
| db |
| lib |
| spec |
| README.md |
| Rakefile |
This is a Rails Engine which provides the core (shared) functionality. This allows us to share commonly used components (like models, mailers, etc.) across the web-service, dashboard and other projects.
This is designed to be added as a gem to another Rails project. It's optional
to mount the routes, but if necessary:
# config/routes.rb Rails.application.routes.draw do mount Core::Engine => '/' end
This will also make the route helpers available, which are used in certain operations. Odd errors will appear if these are used and not present. You should open an issue if this isn't expected.
Additionally, you should configure an initializer to configure settings. This should suffice:
# config/initializers/core_engine.rb Core.configure do |config| config.stripe_token = ENV['STRIPE_TOKEN'] config.opencage_geocoder = ENV['OPENCAGE_TOKEN'] end
Core.redis provides a shared Redis instance.Core::User
has_many: BookingsCore::Organisation
has_many: VenuesCore::Venue
belongs_to: Organisationhas_many: Events, InstructorsCore::Event
belongs_to: Venuehas_many: ActivityTypes, InstructorsCore::Booking
belongs_to: User, EventCore::ActivityTypeCore::Instructor
belongs_to: VenueCore::Utils::Payments: provides abstracted payment handling functionality.Specs are provided by RSpec and aim to cover the whole project. To run:
bundle exec rspec