Commit Graph

27 Commits

Author SHA1 Message Date
Chris Hart b7f98c2630 Set up new styles for icon font, and refactor current icon classes
Change-Id: I3982c5ef913556323475d7d75fee329b7a9e5f86
Reviewed-on: https://gerrit.instructure.com/15195
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Ryan Shaw <ryan@instructure.com>
2012-11-13 12:38:22 -07:00
Jake Sorce c2e35e9b4e ignoring branch_tools.rb
Change-Id: I4859e87ebde0f9370f088a552fb4240ea8ec2695
Reviewed-on: https://gerrit.instructure.com/12854
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Bryan Madsen <bryan@instructure.com>
2012-08-10 15:27:40 -06:00
Ryan Shaw 77138c4d4a Merge remote-tracking branch 'origin/master' into dev/fft
Conflicts:
	app/controllers/collections_controller.rb
	app/views/layouts/application.html.erb
	config/build.js
	lib/tasks/parallel_exclude.rb

Change-Id: Ic9664c29d1469c13b514343915c5929dfb15c6ad
2012-06-26 10:14:46 -06:00
Jon Jensen dff3dec7e2 js bundle extensions for plugins, bugfixes and DRYification
allows plugins to have a bundle get auto-loaded with a corresponding
canvas bundle. uses require.js' include mechanism in build.js (when
optimized) and a rails helper tweak (when not optimized).

this happens automatically based on the path, e.g. the foo plugin's
"bundles/extensions/bar" will get automagically included whenever the
regular "bar" bundle is required.

removes the need for a plugin-level build.js, and auto-generates bundle
module definitions in canvas' build.js (via erb). this handles all
regular bundles both from canvas and plugins.

also fixes plugins so that bundle dependencies get optimized. plugin
paths are created automatically, so this means  we can remove things like
this from plugin bundles and specs:

 require.config
   paths:
     myplugin: "/plugins/myplugin/javascripts"

test plan:
1. use canvas in development mode, it should work
2. use canvas in optimized JS mode, it should work
   i.  confirm that all scripts are optimized
3. use canvas in development mode with plugins w/ JS, it should work
4. use canvas in optimized JS mode with plugins w/ JS, it should work
   i.  confirm that all scripts are optimized
5. add a bundle extension in a plugin (e.g. create
   bundles/extensions/conversations in plugin foo)
   i.  confirm that the extension code runs in development mode
   ii. confirm that the extension code runs in optimized JS mode

Change-Id: If8507afdbabab4ae8966f7db79d9b0e2284034db
Reviewed-on: https://gerrit.instructure.com/11238
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Jacob Fugal <jacob@instructure.com>
2012-06-25 10:28:49 -06:00
Ryan Shaw f8cae2c3e8 gitignore .powrc
Change-Id: If1e219e13e45738c014a52f09c75fcdfad54f61e
2012-06-08 15:40:12 -06:00
Jacob Fugal aba524e43f fix js:test for OSX, plugins, and dynamic manifest
no more maintaining spec/javascripts/supports/specs.js to tell the
runner which specs to run. instead, the runner is built from an erb that
determines the list of specs to run from the filesystem. this new way is
also plugin friendly by maintaining a plugin symlink to include plugin
specs in the spec/coffeescripts tree.

second, give the runner page to the phantomjs execution as a file:///
path rather than just a local path. the latter worked on the build
machine, but failed with the phantomjs installed viw macbrew.

third, clean up/out some slightly broken specs.

 * ENVSpec fails when the specs are reordered by the dynamic globbing,
   but is no longer necessary anyways (since ENV is global now)
 * the 'specs/helpers/' path in TemplateSpec doesn't work with the new
   setup, but just 'helpers/' does and is what it should have been using
   before anyways.
 * asyncTest is not reliable. once the specs started running in a
   slightly different order (thanks to the initial point), they started
   failing with asyncTest race conditions. use fakeTimers and
   fakeServers instead when appropriate.
 * found and fixed a minor bug in BackoffPoller while converting/fixing
   its asyncTests

test-plan:
  - run rake js:test; should run completely as before
  - add a plugin with a spec in spec_canvas/coffeescripts then run rake
    js:test again; the plugin's spec should be executed.

Change-Id: I9ce5a038829a9e747df26d878ce86dbb7da8c384
Reviewed-on: https://gerrit.instructure.com/9411
Reviewed-by: Jon Jensen <jon@instructure.com>
Tested-by: Hudson <hudson@instructure.com>
2012-03-29 10:44:21 -06:00
Jacob Fugal 678ebe39cd fix rake canvas:compile_assets for plugins
while guard was watching and handling most of this, it wasn't happening
on deploy.

Change-Id: Ia4682b5487381ac741db5d2a7b1e8199495510d0
Reviewed-on: https://gerrit.instructure.com/9293
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Ryan Florence <ryanf@instructure.com>
2012-03-08 09:19:33 -07:00
Cody Cutrer d7500827a9 automatically maintain plugin symlinks
test plan:
 * install a plugin with a public directory
 * remove public/plugins
 * start script/server
 * it should generate public/plugins/<plugin>
 * remove public/plugins
 * run rake canvas:compile_assets
 * it should generate public/plugins/<plugin>

Change-Id: I0acd530dfc29d3263abed01f27d6eb449b6d029b
Reviewed-on: https://gerrit.instructure.com/8994
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Jacob Fugal <jacob@instructure.com>
2012-02-28 16:23:47 -07:00
Ryan Shaw e5e6e6922b handle having a ton of assignments in gradebook2
test plan:
 * in a class with a ton of assignments, open
   gradebook2, make sure the header column doesn't
   wrap.

Change-Id: Ie1a178a3f28f3d6c8554330bad8131f69790b569
fixes: #7195
Reviewed-on: https://gerrit.instructure.com/8628
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Jake Sorce <jake@instructure.com>
2012-02-10 11:12:44 -07:00
Ryan Florence a1e31c8c9a AMD Conversion
"Trivial" JavaScript / CoffeeScript changes
--------------------------------------------------

For the most part, all javascript was simply
wrapped in `require` or `define`. The dependencies
were found with a script that matched regexes in
the files, it errs on the side of listing too many
dependencies, so its worth double checking each
file's dependencies (over time, anyway).

i18n API changes
--------------------------------------------------

No longer have to do I18n.scoped calls, just
list i18n as a dependency with the scope and it's
imported already scoped

  require ['i18n!some_scope'], (I18n) ->
    I18n.t 'im_scoped', 'I'm scoped!'

JS bundling now done with r.js, not Jammit
--------------------------------------------------

We don't use jammit to bundle JS anymore. Simply
list dependencies for your JS modules in the file
and RequireJS handles the rest.

To optimize the JavaScript, first make sure you
have node.js 0.4.12+ installed and then run:

  $ rake js:build

The app defaults to the optimized build in
production. You can use non-optimized in
production by putting ?debug_assets=true in the
url just like before.

You can also test the optimized JavaScript in
development with ?optimized_js=true.

Significant changes
--------------------------------------------------

These files have "real" changes to them (unlike
the JavaScript that is simply wrapped in require
and define).  Worth taking a really close look at:

- app/helpers/application_helper.rb
- app/views/layouts/application.html.erb
- config/assets.yml
- config/build.js
- lib/handlebars/handlebars.rb
- lib/i18n_extraction/js_extractor.rb
- lib/tasks/canvas.rake
- lib/tasks/i18n.rake
- lib/tasks/js.rake

Change-Id: I4bc5ecb1231f331aaded0fef2bcc1f3a9fe482a7
Reviewed-on: https://gerrit.instructure.com/6986
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Ryan Florence <ryanf@instructure.com>
2012-02-06 16:41:40 -07:00
Cameron Matheson 110ea7ce17 better ignore pattern for vim swap files
Test plan:
  - open a file in vim
  - open that same file in another vim
  - git stat

Change-Id: If79e3393b81e15fd970235c8d77225c0acd0b476
Reviewed-on: https://gerrit.instructure.com/8203
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Cameron Matheson <cameron@instructure.com>
2012-01-25 21:01:40 -07:00
Brian Palmer 4d70f07d9e rename doc/templates/rest to doc/api
test plan: run the doc:api rake task, verify the docs are still
generated

Change-Id: I9f372a8e68de1019619b452c14f1ebbb1895cecf
Reviewed-on: https://gerrit.instructure.com/7745
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Brian Whitmer <brian@instructure.com>
2011-12-30 09:00:27 -07:00
Ryan Shaw fa8497bf73 gitignore compiled handlebars and coffeescript
this means that if someone pulls the repo,
they need to run:

  bundle exec canvas:compile_assets

...before doing script/server

Change-Id: Ib1ac917f9e6f05db6feb53868d7123cb2dbee14c
Reviewed-on: https://gerrit.instructure.com/7464
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Ryan Shaw <ryan@instructure.com>
2011-12-16 09:35:02 -07:00
Ryan Shaw 73cc5b1ade gitignore javascript spec helpers
they should be written in coffeescript

Change-Id: I82a9a86b9f31ac0155caeac4a8ac8bb7b17c7059
Reviewed-on: https://gerrit.instructure.com/7185
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Ryan Florence <ryanf@instructure.com>
2011-11-29 13:23:44 -07:00
Ryan Shaw 06ed4ed95d ignore generated js from our qUnit specs
we can do this because if someone is running qUnit
tests we can expect they have all the gems in the
"test" gemset so they will be using guard.

Change-Id: I751e14a09aae3356fdd543c2dd822354e113b326
Reviewed-on: https://gerrit.instructure.com/7090
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Ryan Florence <ryanf@instructure.com>
2011-11-22 14:09:44 -07: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
Jon Jensen e1debe40ad generate js translation files as part of compiling assets
Change-Id: I0fa75273af3c9b43d9ca7deee1eccce0ec27e3f5
Reviewed-on: https://gerrit.instructure.com/4909
Reviewed-by: Brian Palmer <brianp@instructure.com>
Tested-by: Hudson <hudson@instructure.com>
2011-08-03 15:42:39 -06:00
Brian Palmer 94fc36c7c2 some api doc updates for oauth, and make the api accessible from canvas
Once rake doc:api or canvas:compile_assets is run, the API will be
accessible from within Canvas at /doc/api/index.html

Change-Id: I503701c0ef3dc0df0ea67477053b328411553352
Reviewed-on: https://gerrit.instructure.com/4723
Reviewed-by: Zach Wily <zach@instructure.com>
Tested-by: Hudson <hudson@instructure.com>
2011-07-19 13:43:34 -06:00
Jon Jensen 8ef63a56cb add core en translations (date/time/number formats, etc.)
Change-Id: Id8d75238dd344813682ef34246160297c3458318
Reviewed-on: https://gerrit.instructure.com/4329
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Brian Palmer <brianp@instructure.com>
2011-06-22 13:39:20 -06:00
Jon Jensen 58a25bd462 preliminary i18n setup, closes #4124
* i18n key scoping for controller/model/js/etc.
 * inline English translation support
 * rdiscount gem for markdown'ed translations
 * html_safe interpolation tweaks
 * label helpers
 * crummy tweak to translate symbol keys
 * internationalized most of lib, and some plugins/messages
 * conference i18n (view/model/controller/js)

Change-Id: I42772b9e19a110efbe855dc83a681be49ec98df2
Reviewed-on: https://gerrit.instructure.com/4080
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Zach Wily <zach@instructure.com>
Reviewed-by: Brian Palmer <brianp@instructure.com>
2011-06-06 14:19:03 -06:00
Brian Palmer 401aacec00 gitignore config/*.yml rather than individual yml file names
Change-Id: Id48ff37abcefa9bcd1e70ea90d282ac9b5d0ba79
Reviewed-on: https://gerrit.instructure.com/2631
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: JT Olds <jt@instructure.com>
2011-03-14 15:00:12 -06:00
tom metge 62ba756243 ignore demo database files
Change-Id: I01c3a08a6d5201d66ccdaeb22cdbd64e5dc2059f
Reviewed-on: https://gerrit.instructure.com/2257
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: JT Olds <jt@instructure.com>
Reviewed-by: Brian Whitmer <brian@instructure.com>
2011-02-11 12:54:14 -07:00
Brian Whitmer dfd90c83d9 make things work on windows with less hackery
The closure-compiler gem has an undocumented
dependency on Windows with Ruby < 1.9.  I've added
this to the Gemfile and also sent a message to
the gem's owner to hopefully get this fixed.

Change-Id: Ifb06b97013d541238cb834ca1773e16c1db11355
Reviewed-on: https://gerrit.instructure.com/2213
Reviewed-by: Brian Whitmer <brian@instructure.com>
Tested-by: Hudson <hudson@instructure.com>
2011-02-10 13:33:26 -07:00
Bracken Mosbacker a44c9acb27 external migration data will be deleted once imported
refs #3519

Change-Id: I2ecd672365f696f3467414d429a15151b181fc50
Reviewed-on: https://gerrit.instructure.com/2177
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Brian Whitmer <brian@instructure.com>
2011-02-07 14:42:50 -07:00
JT Olds 48228b225a add selenium config to gitignore
Change-Id: Iebfc8718f40fabdbe8113949e76e5dbe9fddb101
Reviewed-on: https://gerrit.instructure.com/2144
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Brian Palmer <brianp@instructure.com>
2011-02-03 14:28:25 -07:00
JT Olds 903bcdd371 move gem_home configuration for delayed_jobs to config folder
right now, the documentation tells people to change script/canvas_init, which
kinda sucks for people hoping to upgrade by doing git pull.

this seems sort of hacky - i'm open to suggestions.

Change-Id: I66bf3deb2f51c22c23c1963369c6ab3e5f391d33
Reviewed-on: https://gerrit.instructure.com/2145
Reviewed-by: Brian Palmer <brianp@instructure.com>
Tested-by: Hudson <hudson@instructure.com>
2011-02-03 13:38:32 -07:00
Brian Whitmer 8b8173dcc9 Initial commit.
closes #6988138
2011-01-31 18:57:29 -07:00