Skip to content
bill-auger edited this page Oct 21, 2014 · 1 revision

contribution guidelines

ATTN: ADMINS - plz review these and/or add your own - following are some reasonable suggestions i would reccommend for keeping the project on track -->

  • be DRY and OOP where ever possible
  • use ruby code conventions (two space indents, underscore variable names , question mark boolean methods, etc)
  • all rspec and cucumber tests should be passing green before commtting
  • there should exist tests excersizing all new functionality
  • the first line of commit messages should generally be brief and concise (< ~60 characters)
  • commits bulding toward distinct features should be in separate pull requests (use feature branches)
  • it should be clear from the extended commit message and pull request discussion as to which feature each commit is bulding toward

installing peer4commit on GNU/linux

  • write a minimal ~/.ppcoin/ppcoin.conf
    mkdir ~/.ppcoin
    echo "testnet=1"               >  ~/.ppcoin/ppcoin.conf
    echo "listen=1"                >> ~/.ppcoin/ppcoin.conf
    echo "server=1"                >> ~/.ppcoin/ppcoin.conf
    echo "rpcuser=rpcuser"         >> ~/.ppcoin/ppcoin.conf
    echo "rpcpassword=rpcpassword" >> ~/.ppcoin/ppcoin.conf
    wget http://downloads.sourceforge.net/project/ppcoin/0.4.0/ppcoin-0.4.0-linux.tar.gz
    tar -xzf ./ppcoin-0.4.0-linux.tar.gz
    ./ppcoin-0.4.0-linux/bin/`getconf LONG_BIT`/ppcoind
  • fork this repo on github and clone your fork
    git clone https://github.com/YOUR_GITHUB_NICK/peer4commit.git
    cd ./peer4commit
  • copy the config skeletons
    cp ./config/config.yml.sample   ./config/config.yml
    cp ./config/database.yml.sample ./config/database.yml
  • edit the :username and :password associations of the :daemon hash in config/config.yml to match those in ppcoin.conf - NOTE: this is the bare minimum setup for front-end maintentnce - you will need to edit much more of this file if you plan to work on features such as registrations , github hooks , transactions , notifications , etc

  • to allow registrations without configuring the mailer you can comment out the devise :confirmable module requirement in app/models/user.rb (be sure to uncomment it again before you commit)

    # devise :confirmable, reconfirmable: true
  • setup the rails environmaent (NOTE: Gemfile is currently requiring ruby 2.0.0)
    bundle install --without production
    bundle exec rake db:migrate
    bundle exec rake db:test:prepare
  • all rspec and cucumber tests should be passing green - open an issue if they are not
    bundle exec rake spec
    bundle exec rake cucumber
Clone this wiki locally