Home | History | Annotate | Download | only in GardeningServer
      1 # INSTALLING NPM/BOWER
      2 
      3 The version of npm in apt-get is too old for bower. Instead
      4 install it from http://nodejs.org/download/.
      5 
      6 Install bower with:
      7 
      8     $ npm install -g bower
      9 
     10 # SYNCING DEPENDENCIES
     11 
     12 The makefile will update dependencies, including polymer components and testing libraries:
     13 
     14     $ make update
     15 
     16 This just checks for npm and bower, and then runs:
     17 
     18     $ bower update
     19     $ npm install
     20 
     21 # RUNNING SHERIFF-O-MATIC
     22 
     23 sheriff-o-matic must be run from a server in order to handle polymer imports correctly.
     24 
     25     $ cd Tools/GardeningServer
     26     $ python -m SimpleHTTPServer
     27 
     28 Then load: http://localhost:8000/sheriff-o-matic.html
     29 
     30 # TESTING
     31 
     32 The tests can be run in the browser or from the command line.
     33 
     34 In the browser: http://localhost:8000/test/run-unit-tests.html
     35 
     36 From the command line:
     37 
     38     $ cd Tools/GardeningServer
     39     $ make test
     40 
     41 This will launch karma, run the tests and watch the source files for changes. To run once and exit, use:
     42 
     43     $ make single-test
     44 
     45 Or, you can start karma manually:
     46 
     47     $ cd Tools/GardeningServer
     48     $ ./node_modules/karma/bin/karma start
     49 
     50 You can shorten this command to 'karma start' if you run 'npm install -g karma-cli'.
     51 
     52 # PUSHING
     53 
     54 In GardeningServer:
     55 
     56 1. make update
     57 2. appcfg.py update . --version r$(git svn find-rev HEAD) --oauth2
     58 3. Go to appengine.google.com and select the sheriff-o-matic app.
     59 4. Click on the version tab
     60 5. Make the rXXXX version the default, where XXXX is:
     61    git svn find-rev HEAD
     62 
     63 The versioning is so that we can easily roll back if there's something
     64 wrong with the push and so we can know what we've pushed.
     65 
     66 If you're unsure about whether you might have broken things, before
     67 step 4, you can click on the link for that version to see that
     68 version of the server before you make it the default.
     69 
     70 # LIBRARIES
     71 
     72 sugar: Provides generic syntactic sugar for JavaScript, mostly by extending native object prototypes.
     73 
     74 karma: test runner. Runs the unit tests in an instance of Chrome and pipes the results to the command
     75        line. By default, it watches for changes to files and will automatically re-run the tests. To run
     76        once and exit, use 'karma start --single-run' or 'make single-test'.
     77 
     78 mocha: testing framework. Provides good asynchronous and synchronous test support. Tests run serially,
     79        so exceptions are reported for the right test case.
     80 
     81 chai:  assertion library.
     82