Commit Graph

104 Commits

Author SHA1 Message Date
Brian Palmer 581fe4330d api documentation updates
* Allow linking to individual endpoints on the page.
* Give each endpoint a summary string, and list the summaries at the top
  of the page, with links to the endpoint details.
* Make an omnibus "all resources reference" page, which has been a
  common request. This only includes the endpoint details, not the
  summary descriptions of the resources.
* Syntax highlighting for JSON

test plan: visit /doc/api/index.html and see the changes (run rake
doc:api first if on a dev box)

Change-Id: Ib126805825d40770c36b3688668c62938348412d
Reviewed-on: https://gerrit.instructure.com/10516
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Zach Wily <zach@instructure.com>
2012-05-04 11:19:51 -06:00
Bracken Mosbacker 305372235a update ruby saml gem
This fixes SAML debugging

Change-Id: I818ad8273774cfaa19cf8cd240ec3816afe8df79
Reviewed-on: https://gerrit.instructure.com/10542
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Zach Wily <zach@instructure.com>
2012-05-03 20:36:48 -06:00
Zach Wily e2f9453063 update ruby-saml-mod and libxml gems
Change-Id: I2d0e4f457c684641edeb8beba945b1a67ca91b38
Reviewed-on: https://gerrit.instructure.com/10438
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Zach Wily <zach@instructure.com>
2012-04-30 22:21:10 -06:00
Zach Wily 525e554f22 upgrade required version of rack to 1.1.3
Change-Id: I844e69f5b9f8184e8bc9e9bf931a1b1140941527
Reviewed-on: https://gerrit.instructure.com/10410
Reviewed-by: Jon Jensen <jon@instructure.com>
Tested-by: Zach Wily <zach@instructure.com>
2012-04-30 10:05:23 -06:00
Cody Cutrer ffa0f2fc6a upgrade Mailman gem to 0.5.0
fixes #7737, #7773

Change-Id: I3a3973a7c866dde043712e7f4422f1d8d9a2fde4
Reviewed-on: https://gerrit.instructure.com/10276
Reviewed-by: Brian Palmer <brianp@instructure.com>
Tested-by: Hudson <hudson@instructure.com>
2012-04-24 15:53:42 -06:00
Ryan Shaw 92415ce548 upgrade coffee-script-source gem version
Change-Id: Ia2c08209fbbc4c75df0441f40de2eda093694475
Reviewed-on: https://gerrit.instructure.com/9990
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Ryan Shaw <ryan@instructure.com>
2012-04-24 12:35:40 -06:00
Jake Sorce 90318ab33a using custom parallelized specs gem for rspec tests
Change-Id: Ia7d9ca7fd19267e9a3a66611b50d64bfc7bf3445
Reviewed-on: https://gerrit.instructure.com/10115
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Bryan Madsen <bryan@instructure.com>
2012-04-23 13:33:29 -06:00
Cody Cutrer 3f4fb02712 support listing multiple domains in saml metadata fixes #6859
test plan:
 * ensure saml metadata is unchanged

Change-Id: I5d7e82a7fdf936492bbc2d044999d3bdad01620f
Reviewed-on: https://gerrit.instructure.com/9863
Reviewed-by: Bracken Mosbacker <bracken@instructure.com>
Tested-by: Cody Cutrer <cody@instructure.com>
2012-04-18 15:13:58 -06:00
Cody Cutrer 92b3509933 update compass to 0.12.1 (via compass-rails 1.0.1)
gets rid of "on_updating_stylesheet" deprecation warning

Change-Id: Ibec7853e251508ad663dee78de6d190af0bee0fd
Reviewed-on: https://gerrit.instructure.com/10123
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Simon Williams <simon@instructure.com>
2012-04-18 15:13:06 -06:00
Cody Cutrer b6b60c8f30 get rid of rdoctask deprecation warnings
Change-Id: I7373324ea0f5a56c9b104d37723537916a3a1716
Reviewed-on: https://gerrit.instructure.com/10107
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Simon Williams <simon@instructure.com>
2012-04-18 13:50:42 -06: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 c0f7383587 get rid of barista since we do our on cs generation
you have to do rake js:generate or run guard anyway
for handlebars (which also does CS),
so no sense in slowing dev environment by also doing 
cs with barista

Change-Id: Ieca9f6808ae042b325f253e3c10334fc1839d282
Reviewed-on: https://gerrit.instructure.com/9512
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Brian Palmer <brianp@instructure.com>
2012-03-22 15:55:03 -06:00
Brian Palmer 553e0eb6e8 pin rbx-require-relative to 0.0.5 temporarily
there seems to be an upstream issue with the new 0.0.6 release

Change-Id: Ibefbef601d81ae3479e700fdaf016438e866a45f
Reviewed-on: https://gerrit.instructure.com/8949
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Jacob Fugal <jacob@instructure.com>
2012-02-24 15:04:55 -07:00
Bryan Madsen 82f0a83929 add custom rake tasks for parallel specs
- updated to parallel_tests-instructure 0.6.19
- created parallel:selenium rake task to execute only selenium
  tests
- created parallel:nonselenium rake task to execute all tests
  excluding selenium tests

Change-Id: I3b6790ca5e6f112f2fa6c2c8a6e4931c676072de
Reviewed-on: https://gerrit.instructure.com/8885
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Zach Wily <zach@instructure.com>
2012-02-22 12:17:33 -07:00
Bracken Mosbacker 31edfd680a simple debugging feature for saml authentication
This just gathers all the information for a single saml
login attempt so that an admin can try to debug faulty
configurations

Test Plan:
  * Setup a SAML configuration
	* Click "Start Debugging" on Authentication page
	* Login with a user on that account
	* Hit "Refresh" and observe the beautiful xml

closes #5232

Change-Id: Ic6dd2e828196d0bcbde2e301c5326d77fe55cb71
Reviewed-on: https://gerrit.instructure.com/8368
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Cody Cutrer <cody@instructure.com>
2012-02-22 10:27:53 -07:00
Jake Sorce feed218449 upgrading selenium webdriver to version 2.19
Change-Id: I771ad4f918f6ecb95628bea234774f7599a253fc
Reviewed-on: https://gerrit.instructure.com/8641
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Bryan Madsen <bryan@instructure.com>
2012-02-10 15:46:43 -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
Jake Sorce 4540b032b2 upgrading selenium webdriver to version 2.18
Change-Id: I02c181e356da8598fc6f113613bc43d59ec77d4a
Reviewed-on: https://gerrit.instructure.com/8411
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Bryan Madsen <bryan@instructure.com>
2012-02-02 17:54:53 -07:00
Bracken Mosbacker c7969a2368 allow requested_authn_context to be configured on saml auth
Test Plan
 * Try a SAML login with the value set to secure password
 * Try a SAML login with the value set to no value

Change-Id: I72ff456b7ce6a6ff691f9447a7b6684e8793ec16
Reviewed-on: https://gerrit.instructure.com/8350
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Cody Cutrer <cody@instructure.com>
2012-02-02 15:36:05 -07:00
Bryan Madsen fe98679dcc update parallel_tests-instructure to 0.6.18
there was a bug when logging failures

Change-Id: I6672e5b5157268d2f7ddf2df042bf3877e6840eb
Reviewed-on: https://gerrit.instructure.com/8378
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Jake Sorce <jake@instructure.com>
2012-01-30 15:18:40 -07:00
Bryan Madsen 990e4906a1 use parallel_tests-instructure and remove custom loggers
Change-Id: Id71849f40ae94fa073d235e178a5497284a8e3ed
Reviewed-on: https://gerrit.instructure.com/8362
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Brian Palmer <brianp@instructure.com>
2012-01-30 11:14:50 -07:00
Jake Sorce c10b404097 upgrade to selenium 2.17 webdriver
Change-Id: I896f70f81a97ab3e9a3c2399aa17c420f72c1c54
Reviewed-on: https://gerrit.instructure.com/8206
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Ryan Shaw <ryan@instructure.com>
2012-01-23 09:30:38 -07:00
Jon Jensen 0b1655e76d conversation messages for submission comments, fixes #5443
this commit makes submission first-class citizens in conversations. this
means that when submission comments are added/deleted, or assignments are
unmuted, conversations and messages will be updated accordingly

the main impacts in the ui are:

1. submissions can be deleted from conversations. if a new comment is
   added, they will reappear
2. submissions factor into the message total for the conversation. each
   submission counts as a single message, even if there are multiple
   comments
3. submission messages affect unread-ness, and are reflected in the
   timestamp and text in the conversation preview

test plan:

1. confirm submissions appear in the appropriate conversations, i.e.
   * submissions with no comments should not appear in any conversations
   * submissions where there are comments but not by instructors:
     * should appear in each instructor's private conversation with the
       submitter
     * should not appear in the submitter's private conversations with
       anyone
   * submissions where there are comments by instructors:
     * should appear in each commenting instructor's private conversation
       with the submitter
     * should appear in submitter's private conversations with each
       commenting instructor
   adding or removing submission comments should update private
   conversations accordingly (e.g. when one teacher comments on a
   submission, it should be removed from the other teachers' private
   conversations with the submitter).
2. for each scenario above where the submission comments are added and
   appear in conversations, ensure that the submission as a whole behaves
   like a single conversation message, i.e.
   * the unread conversations count is incremented and the private
     conversation is marked as unread (if it didn't exist or was already
     read)
   * the latest submission comment and timestamp should be reflected in
     the conversation pane on the left side
   * you can delete the submission from the conversation. if new comments
     are posted on the submission, the submission should reappear in the
     conversation (provided it still matches the criteria in 1.). note
     that submission can not be forwarded to other conversations.
3. submissions should differ from traditional conversation messages in
   that:
   * they should not trigger conversation notifications
   * they should not create/bump conversation stream items. if a
     conversation has non-submission messages, the submission and its
     comments should appear in the stream item, but they should not
     cause it to jump to the top

migration:

existing submissions/comments will be migrated in, but not necessarily
through a traditional rails migration. to bring in those messages, run
the following from the rails console:

 Submission.find_each{ |s| s.create_or_update_conversations!(:migrate) }

Change-Id: I06dcb8728402a6c4c613d445b80432a1f2973b73
Reviewed-on: https://gerrit.instructure.com/8086
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Jacob Fugal <jacob@instructure.com>
2012-01-20 15:56:32 -07:00
Jake Sorce 7463327968 upgrading selenium webdriver to 2.15.0
Change-Id: Ie5b8d087c70ff6ab6117257770f2f6274583a41d
Reviewed-on: https://gerrit.instructure.com/8094
Reviewed-by: Jake Sorce <jake@instructure.com>
Tested-by: Hudson <hudson@instructure.com>
2012-01-17 17:44:24 -07:00
Brian Palmer 74b9386d9c upgrade nokogiri and sanitize gems
Updating to nokogiri 1.5.0 requires updating to sanitize 2.0.3 as well.

Since the API for sanitize changed, we take this opportunity to remove
the monkey patching in config/initializers, and use the actual
transformers plugin interface for sanitize.

The changes to html in the specs are due to nokogiri making a couple
changes around empty tags -- html5 wants <img> , not <img />

test plan: The existing specs exercise both gems, to ensure
compatibility.

Change-Id: Id04d017dda056e03205b373ac9bfbf71bd338cb9
Reviewed-on: https://gerrit.instructure.com/7988
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Zach Wily <zach@instructure.com>
2012-01-10 20:57:59 -07:00
Brian Palmer 8eb455c3ff upgrade nokogiri to 1.4.7
This fixes a segfault we're hitting, https://github.com/tenderlove/nokogiri/issues/439

(We can't upgrade to nokogiri 1.5.x without bumping sanitize from 1.x to 2.x)

explanation of spec changes:
  * the first xss spec started failing because nokogiri no longer drops
    xml directives. however, it's not exploitable.
  * the second xss spec started failing due to nokogiri now properly
    the selected honoring charset. it's also not exploitable, since
    canvas doesn't use utf-7.
  * the final spec change is because nokogiri now strips out the invalid
    newline, where it left it in before.

test plan: specs will exercise the upgraded nokogiri gem for
compatibility in our use cases

Change-Id: Ie152c8c60f3df5150ee4f14ab41dfee95a342fa8
Reviewed-on: https://gerrit.instructure.com/7958
Reviewed-by: Brian Palmer <brianp@instructure.com>
Tested-by: Brian Palmer <brianp@instructure.com>
2012-01-10 12:09:39 -07:00
JT Olds 1bca3581c2 getting coffeescript and handlebars to work with plugins
test plan:
  * checkout patchset 1 from https://gerrit.instructure.com/7469
  * symlink the canvalytics repo into vendor/plugins/
  * symlink public/plugins/canvalytics to vendor/plugins/canvalytics/public/
  * run guard, regenerate all files
  * make sure the route /analytics/course/<id>/user/<id> renders handlebars

unit tests not provided for this scaffolding stuff

Change-Id: Ibf626555cbb79a5a97d67286ef4a7d8f28f53de8
Reviewed-on: https://gerrit.instructure.com/7470
Reviewed-by: Ryan Florence <ryanf@instructure.com>
Tested-by: Hudson <hudson@instructure.com>
2011-12-30 15:50:16 -07:00
Brian Palmer e0b58c2b94 add a rspec nested_instafail_formatter
We like instafail, but we like the nested formatter too. Imagine those
powers combined!

Change-Id: I54a332c3f294e109f796909afe3d6b67f759237a
Reviewed-on: https://gerrit.instructure.com/7718
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: JT Olds <jt@instructure.com>
2011-12-28 16:18:28 -07:00
Bryan Madsen fb6fcc9463 fix intermittently failing selenium specs
Change-Id: Ia3559ea9f516064d7a28022ede5ff002c46a8be4
Reviewed-on: https://gerrit.instructure.com/7434
Reviewed-by: Zach Wily <zach@instructure.com>
Tested-by: Hudson <hudson@instructure.com>
2011-12-14 14:21:28 -07:00
Bryan Madsen a9f4cffdc2 update selenium-webdriver and parallel_tests gems
Change-Id: I47223ecc82d53d29d258639215d587790b989538
Reviewed-on: https://gerrit.instructure.com/7417
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Ryan Shaw <ryan@instructure.com>
2011-12-13 14:39:50 -07:00
Brian Palmer 631924d162 fix user api json response having duplicate login_id keys
I added  general code to the spec helper to try and prevent this
happening again. I had to bump the json gem version because 1.5.1 has a
bug preventing the object_class option from working with subclasses of
Hash.

test plan: hit /api/v1/users/self/profile , the response json shouldn't
list login_id twice

Change-Id: Ie52401843896f46828e624f10f8a8091c10ce25b
Reviewed-on: https://gerrit.instructure.com/7320
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Bracken Mosbacker <bracken@instructure.com>
2011-12-09 09:50:34 -07:00
Brian Palmer 892c0fc82c use the new selenium webdriver remote file upload functionality
now we don't need to manually copy the test files to the remote server

testplan: run the conversations specs against a remote selenium server
that doesn't have C:\testfiles, they should still pass.

Change-Id: Icf3a2e685858ef5605512895e9be25bcab86931d
Reviewed-on: https://gerrit.instructure.com/7235
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Zach Wily <zach@instructure.com>
2011-12-01 11:09:57 -07:00
Brian Palmer 4ef50c16d8 make "stay logged in" use a one-time token
closes #6382

Previously, the "stay logged in" cookie just used the authlogic default
implementation, which is the pseudonym persistence_token. This is a
problem, because that persistence_token only ever changes when the
pseudonym password changes, so it's the same everywhere; so if that
cookie is stolen, it's valid for a very long time.

This switches us to one-time-use tokens that expire as soon as the token
logs the user in once. Each user agent also gets a different
one-time-use token.

Change-Id: I4f20cd7759fd74590e82ed55797552e342243d49
testplan:
  * Check that no token is set at all when "stay logged in" isn't
    selected.
  * Check "stay logged in", and verify:
    * That you don't have to login again after restarting your browser,
      but your _normandy_session got reset.
    * That if you save and try to replay using the same
      pseudonym_credentials, they don't work the second time.
    * That a second browser will get a different pseudonym_credentials
      value, and using one token doesn't affect the other.
    * That once the token is used, a new one is generated and set in
      your cookies. Verify this new token works as well.
    * That logging out removes the pseudonym_credentials cookie in your
      browser. And also that manually restoring this cookie still
      doesn't log you in, since it was removed server-side as well.
  * Change your password, and verify that the existing "stay logged in"
    tokens no longer work.
  * Delete your pseudonym, and verify the same.
Reviewed-on: https://gerrit.instructure.com/7093
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Cody Cutrer <cody@instructure.com>
Reviewed-by: Zach Wily <zach@instructure.com>
2011-11-22 10:15:13 -07:00
Ryan Shaw cad54cc0d0 upgrade selenium
Change-Id: I97c8209e80c0c4841651c4a5b4c3f015924b0f83
Reviewed-on: https://gerrit.instructure.com/7089
Reviewed-by: Bryan Madsen <bryan@instructure.com>
Tested-by: Hudson <hudson@instructure.com>
2011-11-21 16:32:15 -07:00
Jon Jensen ca0c0c43b4 fix performance and correctness of triggers, closes #4471, #5168
fixes the behavior such that we only toggle ungraded assignment counts
related to a particular user when his active enrollments in a given
course go from zero to one and vice versa.

also fixes performance issues in mysql. this required a custom trigger
body. see https://github.com/jenseng/hair_trigger/commit/326a10c for
the related hairtrigger commit to support this

Change-Id: Ie36b3d33ced69321f3a87468ab56480b1378d235
Reviewed-on: https://gerrit.instructure.com/6808
Reviewed-by: Jon Jensen <jon@instructure.com>
Tested-by: Hudson <hudson@instructure.com>
2011-11-21 09:06:43 -07:00
JT Olds f69d40325a add instafail to rspec
testplan: n/a

Change-Id: Ie3330717a3fbadd58fe19993c3f5d46e27e1077e
Reviewed-on: https://gerrit.instructure.com/6997
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Brian Palmer <brianp@instructure.com>
2011-11-15 16:37:04 -07:00
Bryan Madsen 227614a2a9 upgrade selenium gem to 2.12.0
Change-Id: Ia55e9b6f9f1dcf2ed5acaa4eada1d3f6971e500f
test-plan: n/a
Reviewed-on: https://gerrit.instructure.com/6905
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Jon Jensen <jon@instructure.com>
2011-11-11 17:19:15 -07:00
Zach Wily edad137315 add support for SAML encrypted assertions; fixes #5299
Change-Id: I12b9db32e324ecff043f4f72051999b0515f4e72
Reviewed-on: https://gerrit.instructure.com/6727
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Bracken Mosbacker <bracken@instructure.com>
2011-11-08 15:54:22 -07:00
Brian Palmer 4efba9ac0a update oauth lib to 0.4.5 and our usage to oauth 1.0a
This gem update required updating our twitter, linkedin, and gdocs
integrations to correctly provide the redirect uri and use the oauth
verifier on return, which we weren't doing before.

As a consequence, google no longer displays a big scary warning about
Canvas not being secure in its oauth usage.

Facebook uses oauth 2.0, so no changes were needed there.

refs #5892

refs #6127 (this stuff needs refactoring)

Change-Id: I04289638915b84dbe439bd57b36da90151c662b9
Reviewed-on: https://gerrit.instructure.com/6585
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Zach Wily <zach@instructure.com>
2011-11-01 12:08:10 -06:00
Bryan Madsen 0161a8734b update selenium-webdriver gem to 2.10.0
Change-Id: I951108682c1dc509c5194aab82151c3c44acce4c
Reviewed-on: https://gerrit.instructure.com/6569
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Ryan Shaw <ryan@instructure.com>
2011-11-01 10:23:23 -06:00
Brian Palmer a6c537f948 remove rb-fsevent/rb-inotify from the gemfile
This doesn't work with our current deploy process, so it'll need to be
in devs' local Gemfile for now

Change-Id: Ia918672fac851b132c2e688a27bf9f20555f65c3
Reviewed-on: https://gerrit.instructure.com/6598
Reviewed-by: Ryan Shaw <ryan@instructure.com>
Tested-by: Hudson <hudson@instructure.com>
2011-10-31 15:36:26 -06:00
Ryan Florence 718f9f34ea qunit + AMD javascript specs
new stuff
---------

- added curl.js AMD module loader
- converted existing js specs to use QUnit
- removed jasmine stuff
- added rake task to run js specs

dependencies!
-------------

you'll need to install http://www.phantomjs.org/
if you want to run the specs.

next step is to incorporate curl.js into our app
environment.


Change-Id: I0ba97bc9abe1494f87fdfc0eca51d987a759bc85
Reviewed-on: https://gerrit.instructure.com/6477
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Ryan Shaw <ryan@instructure.com>
Reviewed-by: Jon Jensen <jon@instructure.com>
2011-10-27 12:58:47 -06:00
Brian Palmer 20a2376fe0 switch to mocha mock framework for specs
Change-Id: Iae9689d00d71b684048a9fecfa0eb60794943ed7
Reviewed-on: https://gerrit.instructure.com/6462
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Zach Wily <zach@instructure.com>
2011-10-27 08:37:13 -06:00
Jacob Fugal 3b2d4b38af include response-content-disposition in S3 download urls
when downloading a file (attachment) that's on S3, include the
response-content-disposition parameter in the redirect url so that the user
will get a Content-Disposition header from S3 giving the file the correct
disposition (attachment, not in-browser) and the correct filename (the
'natural' filename in S3 is that of the first copy of the file uploaded;
someone else may have uploaded it again with a different filename; we want them
to see the correct filename in the download).

CAVEATS:

 * in the case of duplicate files with different filenames, the content
   disposition will cause the correct filename to be used by the browser in
   saving/prompting-to-save the file, but the actual S3 filename will still be
   present in the URL if inspected.

 * the filename in the content-disposition is correctly quoted as per RFC 2616
   for ASCII, but a lot of browsers do it wrong. we are making no attempt to
   accomodate their idiosyncracies.

 * the http quoting we do is ghetto and doesn't account for multi-byte
   characters.

fixes #4473

Change-Id: I468a6ecdaee2946ab89172984adacf20b491d541
Reviewed-on: https://gerrit.instructure.com/6506
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Cody Cutrer <cody@instructure.com>
2011-10-26 16:00:31 -06:00
Bryan Madsen 38dd77775c Add barista gem to test group
This fixes selenium/handlebars_spec on jenkins

Change-Id: I352e2269d663bdaa3d2a1ebf19db8f8fba5a895f
Reviewed-on: https://gerrit.instructure.com/6145
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Jon Jensen <jon@instructure.com>
2011-10-12 16:38:26 -06:00
Brian Palmer 1fe1b1ad6b csv lib compat in ruby 1.9.x
fastercsv is not supported in 1.9, instead csv in the stdlib has been
modified to be api compatible with fastercsv. in this first step, we
alias CSV to FasterCSV when running under 1.9. This allows 1.8.7 to
continue working with no changes.

Change-Id: I34c3a9031b6f4946380510e4833203e29a05073a
Reviewed-on: https://gerrit.instructure.com/5835
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Zach Wily <zach@instructure.com>
2011-10-12 09:36:18 -06:00
Brian Palmer 5a48da71a1 move barista gems to the development Gemfile group
Change-Id: I14059147bd974cd9cf5d90cc55c7cf970f1464b5
Reviewed-on: https://gerrit.instructure.com/6106
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Jon Jensen <jon@instructure.com>
2011-10-11 10:42:33 -06:00
Brian Palmer 2ff3d60cbe Gemfile: allow rake 0.9.x
Change-Id: I5c3d45aad0a67f011cdc43ad36fd4beff6ae5ebb
Reviewed-on: https://gerrit.instructure.com/5848
Reviewed-by: Brian Palmer <brianp@instructure.com>
Reviewed-by: Zach Wily <zach@instructure.com>
Tested-by: Hudson <hudson@instructure.com>
2011-10-10 12:35:09 -06:00
Ryan Shaw 51f7ecf586 add fs-events gem on osx/linux to make guard happy
Change-Id: I004fc6aba99cef99dcc8829ee674aec51e0bb3df
Reviewed-on: https://gerrit.instructure.com/6065
Reviewed-by: Cody Cutrer <cody@instructure.com>
Tested-by: Hudson <hudson@instructure.com>
2011-10-10 11:04:33 -06:00
Brian Palmer a72755b5c8 update to rails 2.3.14
Changelog: https://github.com/rails/rails/compare/v2.3.11...v2.3.14

The find_or_create_by_* fix is now integrated: 9f7ff621bd

Change-Id: If9ec011ef0d1bd26364fa18c7a50ff446f6792b1
Reviewed-on: https://gerrit.instructure.com/5847
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Zach Wily <zach@instructure.com>
2011-10-10 08:24:38 -06:00