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.
- ruby 2.5.0
- Postgresql 9.3+
Fork the repository and clone it to your machine. Then change directory to Montreal.rb
$ git clone <your_fork> && cd Montreal.rb
You should have Ruby version 2.5.0
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.
For development, sqlite3 will be used.
You should check out Ruby on Rails' guides if you are not familiar with the framework : http://guides.rubyonrails.org/
$ 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 or Twitter accounts. To use the GitHub API or Twitter API, you must set environment variables for the GitHub 'key' and 'secret.' For the Twitter API you will need to set up TWITTER_CONSUMER_KEY and TWITTER_CONSUMER_SECRET environment variables.
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
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.
Rubocop is used to anaylize and enforce the code style accross all the codebase. Before opening a new pull request run:
$ rubocop -a
This command will automatically fix the majority of the code style issues and you'll make code-climate happy.
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
This application is automatically deployed to heroku after a successful Travis CI build of the master branch.
- The heroku url is: https://montreal-rb.herokuapp.com/
- The official url is: http://montrealrb.com/
If you find any bug, please open an issue in the project's Github repository (https://github.com/montrealrb/Montreal.rb/issues)
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.
montrealrb.com is released under the MIT License.