Bux

Installation

Install the gem and add to the application's Gemfile by executing:

bundle add UPDATE_WITH_YOUR_GEM_NAME_IMMEDIATELY_AFTER_RELEASE_TO_RUBYGEMS_ORG

If bundler is not being used to manage dependencies, install the gem by executing:

gem install UPDATE_WITH_YOUR_GEM_NAME_IMMEDIATELY_AFTER_RELEASE_TO_RUBYGEMS_ORG

Usage

Initialization

The initializer file is required for the header and footer information, as well as for hosted assets if you choose to use it. To generate the file execute the following command:

rails generate bux:setup

The intializer file will be in config/initializers/bux.rb, modify the information as fit. This will also include the required images under public/images

Style

For bux styling, choose either the imported assets or the hosted assets. To use BUX assets put in head of main view file (application.html):

<%= bux_asset_tags %>  

Then go into the initializer (config/initializers/bux.rb)

  • To use local assets: set use_cdn to false
  • To use hosted assets: set use_cdn to true

Partials

To use the OSU partials put the following in the body of the main view file

Navigation bar:

<%= render "layouts/bux/osu_navbar" %>

Header:

<%= render "layouts/bux/osu_header" %>

Footer:

<%= render "layouts/bux/osu_footer_grey" %>

or

<%= render "layouts/bux/osu_footer_white" %>

or

<%= render "layouts/bux/osu_footer_dark" %>

The dark mode currently only works with imported assets

To include signin and signout link in the footer:

<%= render "layouts/bux/osu_footer_grey", signed_in?: user_signed_in?%>

Maintenance page

The maintenance page is included on setup. If it is missing run the following command:

rails generate bux:maintenance

This generates the maintenance.html page under views/layouts/maintenance, the image assets under public/images, and the rake tasks maintenance.rake under lib/tasks

Execute

rake maintenance:update

to update the page information with the initializer file information

Development

After checking out the repo, run bin/setup to install dependencies. You can also run bin/console for an interactive prompt that will allow you to experiment.

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 the created tag, and push the .gem file to rubygems.org.

Contributing

Bug reports and pull requests are welcome on GitHub at https://github.com/[USERNAME]/bux. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the code of conduct.

License

The gem is available as open source under the terms of the MIT License.

Code of Conduct

Everyone interacting in the Bux project's codebases, issue trackers, chat rooms and mailing lists is expected to follow the code of conduct.