Commit Graph

11 Commits

Author SHA1 Message Date
Ryan Shaw 59744dbcee move 'parallel' gem to the everything group
before, we only used 'parallel' in asset generation
tasks, now we do it in prod too.

Change-Id: I107b339330173894942ba35f133d7e9602906b7c
Reviewed-on: https://gerrit.instructure.com/58839
Tested-by: Rob Orton <rob@instructure.com>
Reviewed-by: Rob Orton <rob@instructure.com>
Product-Review: Rob Orton <rob@instructure.com>
QA-Review: Rob Orton <rob@instructure.com>
2015-07-20 22:03:21 +00:00
Strand McCutchen 7f659c2ce7 cleanup refactor of Rubocop's Lint/DeprecatedClassMethods
fixes: CNVS-20009

This change replaces deprecated methods (like `.exists?`)
with their current counterparts (like `.exist?`)

This cleanup refactor was automatically generated using
this command:

  `rubocop $(find . -name '*.rb') --only Lint/DeprecatedClassMethods --auto-correct`

These code changes were autocorrected then reviewed.

Change-Id: I385dbfc402d94a1f37330293123c6003aaac5b30
Reviewed-on: https://gerrit.instructure.com/52886
Reviewed-by: Cody Cutrer <cody@instructure.com>
Tested-by: Jenkins
Product-Review: Strand McCutchen <smccutchen@instructure.com>
QA-Review: Strand McCutchen <smccutchen@instructure.com>
2015-04-28 18:38:24 +00:00
Mark Severson a1dde79530 extract handlebars_tasks gem
fixes CNVS-11180

test plan:
 * ensure the jst rake commands operate correctly
	 * jst:compile
	 * jst:ember

Change-Id: Ibe3109cf2708abf08783e06b180eba9299472ccb
Reviewed-on: https://gerrit.instructure.com/29920
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Clare Strong <clare@instructure.com>
Reviewed-by: Jon Jensen <jon@instructure.com>
Product-Review: Simon Williams <simon@instructure.com>
2014-04-21 19:48:22 +00:00
Braden Anderson 8217ad25cd guard: print handlebars errors
fixes CNVS-11640

test plan:
  * start guard
  * introduce a syntax error in a handlebars file
  * verify that the error is displayed

Change-Id: I17f624a709c96dfbd9114b4c7204c8bec51cd425
Reviewed-on: https://gerrit.instructure.com/31340
Reviewed-by: Ryan Shaw <ryan@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Steven Shepherd <sshepherd@instructure.com>
Product-Review: Braden Anderson <banderson@instructure.com>
2014-03-05 21:35:41 +00:00
Jon Jensen 97e1783e71 fix guard run_on_deletion issue
use correct method name so guard doesn't die when a handlebars template is
removed

test plan:
1. start guard
2. create a handlebars template
3. confirm the .js file gets created
4. delete the template
5. confirm the .js file gets deleted
6. guard should not asplode

Change-Id: I58456ef9d7d4a9bdaffb8d61d39d7e22c42d8d1a
Reviewed-on: https://gerrit.instructure.com/20605
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Stanley Stuart <stanley@instructure.com>
Product-Review: Jon Jensen <jon@instructure.com>
QA-Review: Jon Jensen <jon@instructure.com>
2013-05-13 22:21:09 +00:00
Jon Jensen c84b33060f fix guard for non-symlinked plugins
also remove the need for Guardfile within plugins (and stop including
them)

note that guard still can't detect changes to files in symlinked plugins
on the mac (due to fsevent), though you can hit enter to recompile everything

test plan:
1. clone a plugin into vendor/plugins
2. start up guard
3. edit a coffee file in the plugin
4. guard should detect it and compile it in the right place
5. edit a coffee spec file in the plugin
6. guard should detect it and compile it in the right place
7. edit a handlebars file in the plugin
8. guard should detect it and compile it in the right place
9. hit enter
10. guard should compile all coffee/handlebars files in the right place

Change-Id: I1e7c12f1368af66dee024e258899412526bb3fd2
Reviewed-on: https://gerrit.instructure.com/20219
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Ryan Florence <ryanf@instructure.com>
Product-Review: Jon Jensen <jon@instructure.com>
QA-Review: Jon Jensen <jon@instructure.com>
2013-05-06 15:19:49 +00:00
Jon Jensen 28d062f33b fix Guard::JST#run_on_deletion
actually delete compiled templates when run_on_deletion runs, rather than
firing the JST guard. now guard won't be sad when you delete a handlebars
template (e.g. if you change branches)

test plan:
1. `bundle exec guard`
2. `touch app/views/jst/poo.handlebars`
   confirm that public/javascripts/jst/poo.js gets created
3. `rm app/views/jst/poo.handlebars`
   confirm that public/javascripts/jst/poo.js gets deleted

Change-Id: Ic11a519d946e130ab2ca3202662efdf7ecdbf6b0
Reviewed-on: https://gerrit.instructure.com/20143
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Stanley Stuart <stanley@instructure.com>
Product-Review: Stanley Stuart <stanley@instructure.com>
QA-Review: Stanley Stuart <stanley@instructure.com>
2013-04-29 15:01:55 +00:00
Ryan Shaw 25725a198e parallelize build tasks
a faster rake js:generate, js:build, canvas:compile_assets, and guard

will use 'coffee' binary if installed

even if it doesn't use 'coffee' binary it will be
a lot faster

`time rake js:generate`
before               => real	0m29.960s
with 'coffee' binary => real	0m4.342s
without              => real	0m8.202s

test plan:
 * run bundle exec guard; ensure coffeescripts are compiled to the
   correct directories
 * run rake js:generate; ditto

Change-Id: I8fc4d4a415e5c77d1efa910c0922588d3095446b
Reviewed-on: https://gerrit.instructure.com/9989
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Ryan Shaw <ryan@instructure.com>
Reviewed-by: Jacob Fugal <jacob@instructure.com>
2012-04-16 16:38:23 -06:00
Ryan Shaw aa96b021e9 delete compiled js file if you delete a handlebars fie
couldn't actually get the run_on_deletion method working
but if you start guard and hit enter in that terminal window
it will delete the entire public/javascripts/jst directory
and re compile all

Change-Id: I25df0bc2cc0031c61e32c0141cef7d3f688a1056
Reviewed-on: https://gerrit.instructure.com/6171
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Ryan Florence <ryanf@instructure.com>
2011-10-18 17:17:54 -06:00
Ryan Shaw 84c3f3641a dont let JST guard die and don't have leading slash
Change-Id: I280bc6014b4779b81cab049064229323b6f77480
Reviewed-on: https://gerrit.instructure.com/6008
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Ryan Florence <ryanf@instructure.com>
2011-10-06 09:20:53 -06:00
Ryan Florence 0f9d86d0d8 Added JavaScript Specs and Client-side Templates
- New rake task `rake jst:compile` to precompile
  JavaScript templates into functions.

  Add handlebars templates to app/views/jst and
  they'll get compiled to public/javascripts/jst

- New rake task `rake jasmine` and `jasmine:ci` to
  run JavaScript specs.

  Add specs to spec/coffeescripts and they'll get
  compiled into spec/javascripts

- Added Guard gem `$ guard` that watches
  coffeescript and handlebars files and compiles
  them when changes are made.

- Created Handlebars Ruby class that precompiles
  the templates into JavaScript functions

- Added JS Template constructor to abstract
  our tempting API



Change-Id: Ie993d0fc50d49b161ed94dbc066c4475cefdc427
Reviewed-on: https://gerrit.instructure.com/5813
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Ryan Shaw <ryan@instructure.com>
2011-09-26 16:49:18 -06:00