Giter VIP home page Giter VIP logo

clerb-rails's Introduction

CircleCI

clerb-rails

clerb-rails is the website for the Cleveland Ruby Brigade, built with Ruby on Rails.

Development

Setup

  1. Clone the repository (git clone https://github.com/clerb/clerb-rails.git)
  2. Install gems: bundle install
  3. Install npm packages: yarn install
  4. Install PostgreSQL
  5. Setup a new role with SuperUser permissions for PostgreSQL
  6. Create the database and run any pending migrations: bundle exec rake db:create db:migrate
  7. Pull down and seed the database with events from the meetup API: bundle exec rake refresh_meetup_events
  8. Start the Rails server: bundle exec rails s
  9. Visit http://localhost:3000 in your browser

Google Maps setup

The event details page contains an embedded Google Map of the event location. Google's maps API requires an authenticated API token for embeds to work. To set this up for development:

  1. Visit the Google developer console
  2. Click the project dropdown in the top left and select "New Project" in the modal. Name it something like "CLERB-dev" (doesn't really matter)
  3. Search for "Maps Embed API", click on the result, and select "Enable"
  4. Click the "Credentials" tab. Select "Create credentials" -> "API key" and copy the generated key
  5. Create a file named .env in the Rails project directory with the following contents:
GOOGLE_MAPS_API_KEY=<your_copied_key>

GitHub integration setup

  1. Visit GitHub and create a new access token here
  2. Add two variables to your .env file
GITHUB_REPO=clerb/clerb-rails
GITHUB_ACCESS_TOKEN=some-access-token-that-you-created-in-step-1

NOTE: For testing purposes, you may want to create a temporary GitHub Repo for GITHUB_REPO.

Contributing

  1. Fork it (https://github.com/clerb/clerb-rails.com/fork)
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create a new pull request on GitHub

clerb-rails's People

Contributors

dependabot-preview[bot] avatar dependabot[bot] avatar edmistond avatar joelbyler avatar jonknapp avatar schneidmaster avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

clerb-rails's Issues

Document rake task to seed data

The setup instructions should include running bundle exec rake refresh_meetup_events after the database is set up, to pull down and seed the events from the meetup API

CSS bug after clicking event link

If you click one of the "View on Meetup" links, it opens the Meetup URL in a new tab -- but if you then close the tab and return to our site, the link text appears to be missing:

screenshot 2018-09-18 12 49 58

The text itself is still there, but it looks like our bootstrap theme has a CSS :focused class selector which is making the text green. This seems undesirable at least for our site -- we should just override it back to white.

Upgrade bootstrap to 4.1.2 or above

Bootstrap 4.0 has an XSS vulnerability; we don't have any current code that is vulnerable, but it would be good to upgrade for future-proofing and to get rid of the GitHub warning. Should also test to make sure that the upgrade doesn't break our theme anywhere.

Bootstrap is installed using npm/yarn; to upgrade it, you can change the version in the package.json and then run yarn install.

Create admin interface for Cleveland based companies

Related to #4 and depends on #5 -- instead of having the companies hardcoded in HTML, it would be great to have an admin interface where we could create the companies with a form.

We'd probably need the following:

  • Company model with name, description, address, website, published attributes (maybe more? that's what comes to mind for me). It should also have a logo file attachment attribute with ActiveStorage. I can configure S3 to store the images from ActiveStorage in production once the rest is ready.
  • Standard CRUD for companies in admin -- list view, show view, new/edit forms, destroy action

Add public facing form for adding Cleveland Rails companies

Depends on #6

We should add a public facing form for Cleveland based Rails companies to be submitted for inclusion in our list. The form could just reuse the Company model, with published defaulted to false. It would be ideal if we could have it email site managers to let them know there's a new company to review. We should also have a captcha on the form with the recaptcha gem to prevent spambot submissions.

Create User model and login interface

We'll want to have an admin interface for adding/managing Cleveland based companies (and maybe other website management things down the line).

We should add a User model -- it could either just use has_secure_password, or it can use something like Devise, up to whoever implements this. We'll need at least a controller/views for users to be able to log in (reset password/more advanced functionality could come later). We should also have an admin CRUD interface for users to be able to add/manage other users, and probably a role enum attribute on users (admin -- can manage the site and other users; manager -- can manage the site but not other users).

Add test coverage for text displayed on Meetup link

In the events list, we display "View on Meetup" if the event is in the past or "RSVP on Meetup" if the event is in the future:

screenshot 2018-09-18 12 46 50

It would be good to add test coverage for this distinction. I think it probably makes sense to put this under the events feature spec. It may also be helpful to add the timecop gem which lets you freeze time (so it's easy to set up "event is in the past" or "event is in the future" cases without the test being fragile as time passes).

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.