Skip to content

codeforbuenosaires/codeforbuenosaires.org

Repository files navigation

Codeforbuenosaires

Acerca de Code For Buenos Aires

Code for Buenos Aires es un programa apoyado por Code for All cuyo objetivo es promover la transparencia, los datos abiertos y la tecnología cívica en la Ciudad de Buenos Aires.

Somos un grupo de ingenieros, innovadores, programadores, diseñadores, comunicadores, periodistas y entusiastas cívicos que nos reunimos para crear aplicaciones útiles para los ciudadanos usando código abierto.

Quienes somos?

Technical Docs

Build Status

Running local server

Git pre push hook

You can modify the pre-push.sh script to run different scripts before you git push (e.g Rspec, Linters). Then you need to run the following:

  chmod +x script/pre-push.sh
  ln -s ../../script/pre-push.sh .git/hooks/pre-push

You can skip the hook by adding --no-verify to your git push.

1- Installing Ruby

  • Clone the repository by running git clone git@github.com:Wolox/codeforbuenosaires.git
  • Go to the project root by running cd codeforbuenosaires
  • Download and install Rbenv.
  • Download and install Ruby-Build.
  • Install the appropriate Ruby version by running rbenv install [version] where version is the one located in .ruby-version

2- Installing Rails gems

  gem install bundler --no-ri --no-rdoc
  rbenv rehash
  • Install basic dependencies if you are using Ubuntu:
  sudo apt-get install build-essential libpq-dev nodejs
  • Install all the gems included in the project.
  bundle -j 20

Database Setup

Run in terminal:

  sudo -u postgres psql
  CREATE ROLE "codeforbuenosaires" LOGIN CREATEDB PASSWORD 'codeforbuenosaires';

Log out from postgres and run:

  bundle exec rake db:create db:migrate

Your server is ready to run. You can do this by executing rails server and going to http://localhost:3000. Happy coding!

Deploy Guide

Heroku

If you want to deploy your app using Heroku you need to do the following:

  • Add the Heroku Git URL to your remotes
  • Push to heroku
  • Run migrations
	git remote add heroku-prod your-git-url
	git push heroku-prod your-branch:master
	heroku run rake db:migrate -a your-app-name

Documentation

You can find more documentation in the docs folder

Contributing

  1. Fork it
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Run rspec tests (bundle exec rspec spec -fd)
  5. Run scss lint (bundle exec scss-lint app/assets/stylesheets/)
  6. Run rubocop lint (bundle exec rubocop app spec -R)
  7. Push your branch (git push origin my-new-feature)
  8. Create a new Pull Request

License

See LICENSE.md