Skip to content

pantoniotti/Montreal.rb

 
 

Repository files navigation

Montreal.rb website

Build Status Dependency Status Code Climate Coverage Status Stories in Priority

Description

This is the Montreal.rb organization's website. It is still in development stage so you are welcome to contribute. You can join our Slack Team if you have any question, need some help to get started or just hang around with friendly people.

Want to contribute? First thing to look at are the Issues with the priority label. You can optionnally use Waffle.io to see the development pipeline used to manage the project.

Throughput Graph

Requirements

Runtime

  • ruby 2.3.1
  • Postgresql 9.3+

Development Setup

Fork the repository and clone it to your machine. Then change directory to Montreal.rb

$ git clone <your_fork> && cd Montreal.rb

Ruby & Bundler

You should have Ruby version 2.3.1 installed using your prefered Ruby version management tool (or by globally updating your system Ruby)

Most Popular Ruby Version Managers

You should also have bundler (minimum v1.10) to help with tracking and installing the exact gems and versions that are needed.

Database

Do you have Postgres installed?

$ postgres --version
Postgresql 9.3

For the next parts, you need Postgresql installed, configured and running and a .pgpass file in your home directory. The content of that file should look like:

# hostname:port:database:username:password
localhost:5432:*:sdeziel:myverysecurepassword

Install Postgres

$ brew install postgresql

Rails

You should check out Ruby on Rails' guides if you are not familiar with the framework : http://guides.rubyonrails.org/

Setup your Project

$ bin/setup

IMPORTANT: pg gem installation error

If you experience an error during the execution of that script related to the installation of the pg gem, you might want to try the following procedure:

$ sudo find / -name "pg_config"
# Use the most appropriate path found by the command above
$ gem install pg -- --with-pg-config=<your_pg_config_path>
$ bin/setup

Once successfully completed, this setup script will:

  • install bundler for managing your gem dependencies
  • install your project's required gems
  • create and setup your database
  • cleanup logs and temporary files

Set environment variables

Omniauth is used to allow users to log in to the site using GitHub accounts. To use the GitHub API, you must set environment variables for the GitHub 'key' and 'secret.'

You can first obtain this key/secret through your GitHub account.

For image hosting Cloudinary is used. This service gives us the ability to host images with a heroku app. Sign up for a free coludinary account.

To tweet automatically when content is published, you can register an app on Twitter and set the keys to your environment variables. If you choose not to, don't set the variables and the app will simply skip the tweeting feature.

Now you need to set the environment variables on your server. The procedure will depend on your system.

For development, copy .env.sample file to .env and fill appropriately the variables settings.

If using Heroku, you can set the environment variables like this:

heroku config:add GITHUB_KEY=your_key GITHUB_SECRET=your_secret \
  CLOUDINARY_URL=cloudinary://your_key:your_secret \
  --app Montreal.rb

Start your Web Server

You should be ready to start your webserver using:

$ bin/rails server

By default, your application is accessible at http://localhost:3000 in your browser.

Testing

RSpec is used to test the application. You can run all the tests using

$ bin/rspec

or you can run a specific test file (example 1), or a single test (example 2, 17 is the line number of your test)

$ bin/rspec spec/path/to/your/file.rb    # example 1

$ bin/rspec spec/path/to/your/file.rb:17 # example 2

You can also use guard to test automatically when you save a file

$ bundle exec guard

PROTIP: install ctags and guard will automatically generate an index (or tag) file of language objects found in source files that allows these items to be quickly and easily located by a text editor.

  • ex: macos brew install ctags && sudo mv /usr/bin/ctags /usr/bin/ctags.bak
  • ex: ubuntu sudo apt-get install exuberant-ctags

Deploy

This application is automatically deployed to heroku after a successful Travis CI build of the master branch.

URLs

Bug Tracker

If you find any bug, please open an issue in the project's Github repository (https://github.com/montrealrb/Montreal.rb/issues)

Contributing

Please see CONTRIBUTING.md.

Everyone interacting in Montrealrb.com and its sub-projects' codebases, issue trackers, chat rooms, and mailing lists is expected to follow our code of conduct.

License

montrealrb.com is released under the MIT License.

About

The new Montreal.rb website

Resources

License

Code of conduct

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Ruby 85.3%
  • HTML 11.4%
  • CSS 2.7%
  • Other 0.6%