Code Monkey home page Code Monkey logo

voluntary's Introduction

Voluntary Build Status Code Climate Test Coverage Dependency Status

This is a gem which turns your rails application into a crowdsourcing platform to run on your intranet or on the internet.

Then you can add existing voluntary products like text creation or create your own products.

Installation

New Application

Run this in your console:

  rvm --create use 1.9.3@your_crowdsourcing_platform_name
  gem update bundler
  gem install rails -v 4.0.13 --no-rdoc --no-ri  
  rails new your_crowdsourcing_platform_name
  cd your_crowdsourcing_platform_name

Add this to your Gemfile:

  gem 'voluntary'

Add voluntary products to your Gemfile.

Run this in your console:

  bundle install  

Run this in your console (confirm all overwrite questions):

  rails g voluntary:install
  rake railties:install:migrations

Remove gem 'sqlite3' from your Gemfile.

Copy the content of config/database.example.yml into config/database.yml

Add this to your application.rb:

  config.generators do |g|
    g.orm :active_record
  end

Remove public/index.html

Add at least 1 controller with 1 action, 1 view and a root route.

Add a Capfile to your Rails root.

Run this in your console:

  bundle install
  rake db:create
  rake db:migrate
  rails s

New Product

  git clone https://github.com/user/voluntary_product_name.git
  cd voluntary_product_name
  rvm --create use --rvmrc 1.9.3@voluntary_product_name # if you use RVM
  gem update bundler
  gem install rails -v 4.0.13 --no-ri --no-rdoc
  cd ..
  rails plugin new voluntary_product_name --database=postgresql --skip-javascript --skip-test-unit --dummy-path=dummy --full
  cd voluntary_product_name
  # Add voluntary gem as a dependency to gemspec ('~> 0.2.1').
  # Add development dependencies from the following gemspec to product's gemspec: https://github.com/volontariat/voluntary/blob/master/voluntary.gemspec
  # add "require 'voluntary'" to lib/voluntary_product_name.rb
  # bundle install
  cd dummy
  # Add development dependencies to dummy Gemfile, see voluntary_text_creation. 
  bundle install
  # change config/boot.rb to require bundler like here: https://github.com/volontariat/voluntary_scholarship/blob/master/dummy/config/boot.rb
  # change database names to #{product_name}_#{environment} and customize user credentials in config/database.yml
  bundle exec rake db:create:all && bundle exec rails g voluntary:product_dummy # confirm all overwrite questions except of Gemfile
  cd ..
  # add gitignore file from voluntary: https://github.com/volontariat/voluntary/blob/master/.gitignore
  bundle exec rails g migration add_product_name_product
  # fill migration file with template: https://github.com/volontariat/voluntary_scholarship/blob/master/db/migrate/20140306201232_add_scholarship_product.rb
  cd dummy
  bundle exec rake railties:install:migrations
  # change database names to #{product_name}_#{environment} and customize user credentials in dummy/config/mongoid.yml
  # create a class for your new product under app/models/product/product_name.rb like: https://github.com/volontariat/voluntary_scholarship/blob/master/app/models/product/scholarship.rb  
  bundle exec rake db:migrate && bundle exec rake db:test:clone_structure
  bundle exec rails s

License

This project uses MIT-LICENSE.

voluntary's People

Contributors

volontarian avatar mcberros avatar

Stargazers

Benjamin Fleischer avatar MJ Alvarez avatar Pantelis Koukousoulas avatar  avatar

Watchers

mayulu avatar James Cloos avatar

voluntary's Issues

Improve seeding in first migration

Still use VolontariatSeed with all these data or create new minimal seeds needed by future migrations through migration code? (include user accounts like master?)
VolontariatSeed seems to create roles twice.

Activity / News Feed Notification Settings for different Profiles

Profiles could be the User Page @ voluntary server or the user's extern home page (/api/v1/users/:user_id/activities shows all activities and /api/v1/users/:user_id/activities/profiles/murd.ch filters activities by notification settings of profile named murd.ch).

Rails 4.2.1 Upgrade

Upgrade to 4.0.13, then 4.1.10, and, finally, Rails 4.2.1.

Compare generated files through http://railsdiff.org/

TODO: 4.1.10 introduces capistrano-rails as optional alternative to capistrano gem but theis requires a capistrano 3 upgrade. If capistrano-rails is required, try v 1.0.0, which supports capistrano 2, first.

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.