Giter Club home page Giter Club logo

code-dot-org's Introduction

Build setup

Windows note: use an Ubuntu VM

Many Windows developers have found that setting up an Ubuntu virtual machine is less painful than getting Ruby and other prerequisites running on Windows.

Install OS-specific prerequisites

OS X Mavericks

  1. Install Homebrew: ruby -e "$(curl -fsSL https://raw.github.com/Homebrew/homebrew/go/install)"
  2. brew install https://raw.github.com/quantiverge/homebrew-binary/pdftk/pdftk.rb enscript gs mysql imagemagick rbenv ruby-build
  3. If it complains about an old version of X, run brew unlink X and run brew install X again
  4. Set up MySQL
  5. Have launchd start mysql at login: ln -sfv /usr/local/opt/mysql/*.plist ~/Library/LaunchAgents
  6. Start mysql now: launchctl load ~/Library/LaunchAgents/homebrew.mxcl.mysql.plist
  7. Set up RBENV and Ruby 2.0
  8. Add if which rbenv > /dev/null; then eval "$(rbenv init -)"; fi to ~/.profile
  9. source ~/.profile
  10. rbenv install 2.0.0-p451
  11. rbenv global 2.0.0-p451
  12. rbenv rehash

Ubuntu 14.04

  1. sudo apt-get install -y aptitude
  2. sudo aptitude update
  3. sudo aptitude upgrade
  4. sudo aptitude install -y git mysql-server mysql-client libmysqlclient-dev libxslt1-dev libssl-dev zlib1g-dev imagemagick libmagickcore-dev libmagickwand-dev nodejs openjdk-7-jre-headless libcairo2-dev libjpeg8-dev libpango1.0-dev libgif-dev curl
  • Hit enter and select default options for any configuration popups
  1. sudo aptitude install npm
  2. sudo ln -s /usr/bin/nodejs /usr/bin/node
  3. sudo npm update -g npm
  4. sudo npm install -g grunt-cli

Common setup

  1. git clone https://github.com/code-dot-org/code-dot-org.git
  2. gem install bundler
  3. cd code-dot-org/aws
  4. bundle install
  5. cd ../dashboard
  6. bundle install
  7. bundle exec rake db:create db:schema:load seed:all
  8. cd ../pegasus
  9. bundle install
  10. echo CREATE DATABASE pegasus_development | mysql -uroot
  11. rake db:migrate
  12. rake seed:migrate

Organizational Structure

Our code is segmented into four parts:

  • Blockly Core is the visual programming language platform used for the interactive tutorials.
  • Blockly includes apps—blockly puzzles built based on Blockly Core.
  • Dashboard, is the tutorial platform which organizes blockly levels into tutorials.
  • Pegasus is the main site which also includes the teacher dashboard (support for teachers to track student progress).

Running Dashboard

  1. cd code-dot-org/dashboard
  2. bundle exec rails server
  3. Note: after major code updates (or if something seems broken), run bundle exec rake db:migrate seed:all
  4. Visit http://localhost.studio.code.org:3000/

Running Pegasus

  1. cd code-dot-org/pegasus
  2. ./up
  3. Note: after major code updates (or if something seems broken), run rake db:migrate seed:migrate
  4. Visit http://localhost.code.org:9393/

Building Blockly and Blockly-core (optional)

The learn.code.org default dashboard install includes a static build of blockly, but if you want to make modifications to blockly or blockly-core:

  1. cd code-dot-org/dashboard
  2. bundle exec rake 'blockly:dev[../blockly]'
  • This symlinks to dashboard reference the dev version of blockly
  1. Follow the blockly build instructions at blockly/README or blockly-core build instructions at blockly-core/README

Contributing

We'd love to have you join our group of contributors!

Before You Push

Anyone who would like to contribute to code.org projects must read and sign the Contribution License Agreement. We aren't able to accept any pull requests from contributors who haven't signed the CLA first.

For the time being—email [email protected] to get an electronic CLA to sign (takes less than a minute).

Getting Started Contributing

HipChat room

Join our community development HipChat room for help getting set up, picking a task, etc. We're happy to have you!

If you want to make sure you get our attention, include an @all (everyone) or @here (everyone currently in the room) in your message.

Pivotal Tracker

We pull our tasks from a Pivotal Tracker and mark certain tickets as volunteer-friendly.

For the time being—for access to Pivotal Tracker, email [email protected].

Submitting Contributions

Testing your changes

Manually

We support recent versions of Firefox, Chrome, IE9, iOS Safari and the Android browsers. Be sure to try your feature out in IE9, iOS and Android if it's a risk. BrowserStack live or Sauce Labs manual let you run manual tests in these browsers remotely.

Unit tests

For dashboard changes, be sure to test your changes using rake test. For blockly changes, see our grunt testing instructions.

UI tests

Our continuous integration server regularly runs a suite of UI tests using Selenium / Cucumber which run against many browsers via BrowserStack Automate, and can also be run locally using chromedriver. See the README in that folder for instructions.

If your changes might affect level paths, blockly UI, or critical path site logic, be sure to test your changes with a local UI test.

Submitting your Pull Request

Contributors should follow the GitHub fork-and-pull model to submit pull requests into this repository.

  1. On your fork, you'll either push to your own finished branch or checkout a new branch for your feature before you start your feature
    • git checkout -b branch_name
  2. Develop the new feature and push the changes to your fork and branch
    • git add YYY
    • git commit -m "ZZZ"
    • git push origin branch_name
  3. Go to the code-dot-org GitHub page
  4. For your submissinon to be reviewed
    • Click on the "Pull Request" link, look over and confirm your diff
    • Submit a pull request for your branch to be merged into staging
    • For bonus points, include screenshots in the description. Command + Ctrl + Shift + 4 in OS X lets you copy a screen selection to your clipboard, which GitHub will let you paste right into the description
  5. After your pull request is merged into staging, you can review your changes on the following sites:

code-dot-org's People

Contributors

bcjordan avatar bjvanminnen avatar breville avatar cpirich avatar davidsbailey avatar deploy-code-org avatar geoffrey-elliott avatar joshlory avatar laurelfan avatar rlhawk avatar tanyaparker avatar wjordan avatar

Watchers

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