Git Product home page Git Product logo

thatb96 / ohloh-ui Goto Github PK

View Code? Open in Web Editor NEW

This project forked from blackducksoftware/ohloh-ui

0.0 1.0 0.0 19.93 MB

Web Application for the Ohloh Stack. Currently Rails 4.2.7 & Ruby 2.2.5

Home Page: https://www.openhub.net

License: Other

Ruby 52.22% Dockerfile 0.02% JavaScript 7.75% CoffeeScript 1.70% HTML 13.21% CSS 6.28% PHP 0.75% Assembly 0.01% PLpgSQL 17.36% Gherkin 0.05% SQLPL 0.37% Puppet 0.26% Shell 0.02%

ohloh-ui's Introduction

OhlohUI

Dependencies:

  • OhlohUI uses the ruby version 2.2.5. Please install ruby 2.
  • OhlohUI uses the postgresql database. Please install postgresql and create a new user on it.

Getting Started:

$ git clone [email protected]:blackducksoftware/ohloh-ui.git
$ cd ohloh-ui
$ gem install bundler
$ bundle install

The OhlohUI data is split between two databases in production. The development setup needs to reflect the same. The database names are configured in a file specific to each environment. For development, create a file env.development, with the following contents.

DB_ENCODING = 'UTF-8'

DB_HOST = localhost
DB_NAME =
DB_USERNAME =
DB_PASSWORD =

FOREIGN_DB_HOST = localhost
FOREIGN_DB_NAME =
FOREIGN_DB_USERNAME =
FOREIGN_DB_PASSWORD =

The default DB encoding was set to SQL_ASCII to support data encoded by older ruby. For new data, the UTF-8 encoding should work fine. The *_USERNAME and *_PASSWORD entries need to reflect the user created in postgresql. The *DB_NAME entries should be new database names. These will be created during our setup.

$ rake db:create
$ rake db:structure:load
$ rake db:second_base:structure:load

This might throw a bunch of errors about relations and constraints already existing. Please ignore them and proceed.

Setup a default admin user. The arguments are optional. By default a user with the login admin_user, password admin_password and email [email protected] will be created.

$ ruby script/setup_default_admin.rb <login> <passsword> <email>
$ rails s

Visit localhost:3000 to checkout the site.

Tests:

Add the following to the .env.development file. Fill in the blank values appropriately. Modify .env.test to reflect the values that were added here.

TEST_DB_HOST = localhost
TEST_DB_NAME =
TEST_DB_USERNAME =
TEST_DB_PASSWORD =

FOREIGN_TEST_DB_HOST = localhost
FOREIGN_TEST_DB_NAME =
FOREIGN_TEST_DB_USERNAME =
FOREIGN_TEST_DB_PASSWORD =

Then run the following:

$ rake db:test:prepare
$ rake test

Integration Tests:

The following packages need to be installed to make the feature specs work:

Mac OSX

$ brew install brew-cask
$ brew cask install google-chrome
$ brew install chromedriver

Ubuntu

$ sudo apt-get install chromium-browser
$ sudo apt-get install chromium-chromedriver
$ sudo ln -s /usr/lib/chromium-browser/chromedriver /usr/bin/chromedriver

Recording/fixing VCR cassettes for Fisbot API:

Define an alias for vcr.localhost.org in /etc/hosts:

127.0.0.1 vcrlocalhost.org

Start the fisbot server(test environment) at localhost:4004. Manually clean the fisbot tables after each recording.

Pull Request Builder:

The OhlohUI CI uses the following task to verify PR compatibility.

$ rake ci:all_tasks

This runs:

  • rubocop
  • haml-lint
  • brakeman
  • bundle audit
  • teaspoon
  • rake test
  • spinach

ohloh-ui's People

Contributors

alebruck avatar aruncsengr avatar bobofraggins avatar drubio1989 avatar hyxnat avatar jebingeosil avatar johnson-imaginea avatar notalex avatar pdegenportnoy avatar rapbhan avatar santhanakarthikeyan avatar

Watchers

 avatar

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.