¶ ↑
Welcome to the Fairnopoly repository*Current Version: 1.0.1*
<img src=“https://travis-ci.org/fairnopoly/fairnopoly.png” /> <img src=“https://coveralls.io/repos/fairnopoly/fairnopoly/badge.png?branch=master” alt=“Coverage Status” /> <img src=“https://codeclimate.com/github/fairnopoly/fairnopoly.png” />
Fairnopoly is a free market place in the hand of the users.
Read more about it at: www.fairnopoly.de
The development currently is in beta state. Please help us out by contributing code.
¶ ↑
Getting started¶ ↑
Installing Ruby and Ruby on RailsIf you are not sure how to install Ruby and the Ruby on Rails framework on your computer, have a look at Michael Hartl’s excellent tutorial on the subject.
Make sure you install ruby 1.9.3-p392 and not 2.0.0.
¶ ↑
Fairnopoly Project Setup (automated)Note: the automated process won’t work under Windows. To run Fairnopoly locally in development mode, install ruby and rails. Then open up a console and copy & paste in the following line:
git clone git@github.com:fairnopoly/fairnopoly.git && cd fairnopoly/ && git checkout release && ruby setup.rb
What this does:
-
It sets up a local git repository,
git clone git@github.com:fairnopoly/fairnopoly.git
-
switches to the fairnopoly root path,
cd fairnopoly/
-
switches the git branch to “release” (which is the branch we currently use for the beta version)
git checkout release
-
runs the Fairnopoly setup script
ruby setup.rb
¶ ↑
Fairnopoly Project Setup (manually)If the automated script doesn’t work for you, try going through these steps one by one:
-
Set up a local git repository
git clone git@github.com:fairnopoly/fairnopoly.git cd fairnopoly/
-
Install required gems (preface with rvmsudo if you are using rvm)
bundle install
-
set up local files and change the setup data if you want
cp config/environments/development.example.rb config/environments/development.rb cp config/initializers/secret_token.example config/initializers/secret_token.rb
-
migrate and seed
rake db:create && rake db:migrate && rake db:seed && rake db:test:prepare
-
if you would like to test the mailer, please open the copied file and update it according to your testing mail server
-
you may like to adopt the config/database.yml according to your wishes
-
to use the recaptcha you have to add your keys in the api.yml. You can get the keys at www.google.com/recaptcha/admin/list
-
start rails and have fun
rails s
¶ ↑
Known Issues-
Could not find pg-0.15.1 in any of the sources
If you have an error like
... rake aborted! Could not find pg-0.15.1 in any of the sources ...
Install the Postgres Library:
sudo apt-get install libpq-dev
Run Bundler
bundle install
-
(Mac) Invalid gemspec […ZenTest-4.9.1.gemspec]
If bundler constantly complains about an invalid ZenTest gemspec, run the following:
gem uninstall ZenTest rm [path to the ZenTest-4.9.1.gemspec it gave you in the error message] gem update --system bundle
¶ ↑
TestingTo run the tests: if you haven’t already, prepare the testing database
rake db:test:prepare
Then run the tests
rspec
Run an automated test tab with
autotest
If you update your branch from before, you may have to migrate the test database:
RAILS_ENV=test rake db:migrate
Click here to read more about testing in our wiki.
¶ ↑
WorkflowIf you want to help out with programming new features or fixing bugs, please consider the following guidelines:
-
If you do no have direct access to our github repository, you can fork it, make changes on your forked repo, and then submit a pull request
-
If you have access to our repository, please create a new git branch before making changes when coding a larger feature
git branch [featurename]
-
We use BDD (Behavior Driven Development). Please read our wiki page on the subject.
-
When finished with a task:
git add [corresponding files OR simply . for everything] git commit -m "[description]" git push
-
If you created a new branch for a larger feature, you need to merge the changes after you are finished:
git checkout master git merge [featurename] master [you might need to resolve merge conflicts] git commit git push
Hint: When a vim window opened after you typed “git commit” without a commit message, you can save the default message by simply typing “:wq” and pressing enter.
¶ ↑
Run Solr ServerTo avoid having the search not available in your local environment, run
script/delayed_job start rake sunspot:solr:start
For more information visit our wiki.
¶ ↑
ContributingShare the idea, take part at www.fairnopoly.de/ and make the world a better place!
Regarding the source, there are two ways to contribute.
-
Report a bug?
-
Just use the github issue tracker.
-
Please tag added bugs with the “bugs” tag
-
-
Want to help out and join feature development?
-
Send us an email at email@fairnopoly.de and work with us to make the world a better place
-
or make a github account and click on the button called “Fork” in the upper right corner of our repository. Then code a few cool features, commit and push your changes, and submit a “Pull Request” so we can implement your work.
-