Code Monkey home page Code Monkey logo

openfoodnetwork's Introduction

Build Status Code Climate View performance data on Skylight

Open Food Network

The Open Food Network is an online marketplace for local food. It enables a network of independent online food stores that connect farmers and food hubs (including coops, online farmers' markets, independent food businesses etc); with individuals and local businesses. It gives farmers and food hubs an easier and fairer way to distribute their food.

Supported by the Open Food Foundation, we are proudly open source and not-for-profit - we're trying to seriously disrupt the concentration of power in global agri-food systems, and we need as many smart people working together on this as possible.

We're part of global movement - get involved!

Getting started

Below are instructions for setting up a development environment for Open Food Network. More information is in the developer wiki.

If you're interested in provisioning a server, see the project's Ansible playbooks.

Dependencies

  • Rails 3.2.x
  • Ruby 2.1.5
  • PostgreSQL database
  • PhantomJS (for testing)
  • See Gemfile for a list of gems required

Get it

The source code is managed with Git (a version control system) and hosted at GitHub.

You can view the code at:

https://github.com/openfoodfoundation/openfoodnetwork

You can download the source with the command:

git clone https://github.com/openfoodfoundation/openfoodnetwork.git

Get it running

For those new to Rails, the following tutorial will help get you up to speed with configuring a Rails environment.

When ready, run script/setup. If the script succeeds you're ready to start developing. If not, take a look at the output as it should be informative enough to help you troubleshoot.

If you run into any other issues getting your local environment up and running please consult the wiki.

If still you get stuck do not hesitate to open an issue reporting the full output of the script.

Now, your dreams of spinning up a development server can be realised:

bundle exec rails server

To login as Spree default user, use:

email: [email protected]
password: spree123

Testing

Tests, both unit and integration, are based on RSpec. To run the test suite, first prepare the test database:

bundle exec rake db:test:prepare

Then the tests can be run with:

bundle exec rspec spec

The site is configured to use Zeus to reduce the pre-test startup time while Rails loads. See the Zeus github page for usage instructions.

Once npm dependencies are installed, AngularJS tests can be run with:

./script/karma run

If you want karma to automatically rerun the tests on file modification, use:

./script/karma start

Multilingual

Do not forget to run rake tmp:cache:clear after locales are updated to reload I18n js translations.

Credits

Licence

Copyright (c) 2012 - 2015 Open Food Foundation, released under the AGPL licence.

openfoodnetwork's People

Contributors

alexs333 avatar andrewspinks avatar bingxie avatar blancnic avatar boveus avatar dacook avatar duende13 avatar em-ak avatar enricostano avatar hugsdaniel avatar jeronimo avatar lin-d-hop avatar livcg avatar matt-yorkley avatar mjal avatar mkllnk avatar myriamboure avatar oeoeaio avatar pdelacroix avatar pmackay avatar rafaqz avatar rickginer avatar rohanm avatar saimonmoore avatar sauloperez avatar stveep avatar summerscope avatar transifex-openfoodnetwork avatar victornava avatar willrjmarshall avatar

Watchers

 avatar  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.