Commit Graph

385 Commits

Author SHA1 Message Date
Paul Hinze 9f1e15e111 Update ruby-saml-mod to 0.1.22
- Pulls in latest fixes to LogOutRequest signatures
 - Includes XML certificate in signed LogOutRequest

refs CNVS-5576

Test Plan:
 - Set up shibboleth as per instructions in the wiki
 - Using old code, log in as test user
 - Watching SAML debugging, observe that Shibboleth responds to log out
   message with error code
 - Restart canvas with updated ruby-saml-mod gem
 - Log in again as test user
 - Verify that shibboleth accepts log out request signature

Change-Id: I1a700fc1c27738812b4ee6773500240c63d39735
Reviewed-on: https://gerrit.instructure.com/20444
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Clare Strong <clare@instructure.com>
Reviewed-by: Paul Hinze <paulh@instructure.com>
Product-Review: Paul Hinze <paulh@instructure.com>
2013-05-09 00:15:54 +00:00
Jacob Fugal 7a6a816715 invalidate all sessions on explicit logout
when a user explicitly logs out of one pseudonym session, invalidate all
the others

fixes CNVS-1923

test-plan:
  - create a user in two different accounts
  - log them in to both accounts
  - click "log out" in one account
  - should be logged out of both accounts

Change-Id: I79e70017d753c8201429901421e015f5d20e2000
Reviewed-on: https://gerrit.instructure.com/20096
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Brian Palmer <brianp@instructure.com>
QA-Review: Clare Strong <clare@instructure.com>
Product-Review: Brian Palmer <brianp@instructure.com>
2013-05-08 19:43:55 +00:00
Brian Palmer 1163b408bf update cassandra-cql gem and set encoding of cassandra.rb
The combination of these two changes fixes an issue with using extended
utf-8 chars in cql queries (including inserts)

fixes CNVS-5719

test plan: enable cassandra page views, and from a script/console run a
test query with extended utf-8 data, for instance:

PageView::EventStream.database.execute("SELECT * FROM page_views WHERE request_id = ?", "test \xEF\xBF\xBD one")

This will return no results since that request id isn't a UUID, but the
key is it shouldn't error.

Change-Id: I1dafb6165cdda65ab64267edbf9fabc4fccd783c
Reviewed-on: https://gerrit.instructure.com/20397
Reviewed-by: Brian Palmer <brianp@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Clare Strong <clare@instructure.com>
Product-Review: Brian Palmer <brianp@instructure.com>
2013-05-08 01:04:48 +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
Brian Palmer ea7bf11883 remove require_relative gem
This gem is a no-op in ruby 1.9, it only applies to 1.8.7

Change-Id: Ibea9808ea4981e581988e05dfde824dd8304dd8e
Reviewed-on: https://gerrit.instructure.com/20345
Reviewed-by: Cody Cutrer <cody@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
Product-Review: Brian Palmer <brianp@instructure.com>
QA-Review: Brian Palmer <brianp@instructure.com>
2013-05-03 20:32:01 +00:00
Brian Palmer 31f33164b5 remove 1.8 compatibility shims
- update the Gemfile to be 1.9 only, and raise an exception on wrong
  ruby version
- remove RUBY_VERSION checks, replacing with the applicable code
- remove the FasterCSV compatibility shim, just use CSV now

test plan: trying to bundle install on ruby 1.8 or 2.0 should raise an
exception, specs should pass, canvas should work as normal on 1.9

Change-Id: I49088e9d227c59c6d5d5acb417c2df971129474a
Reviewed-on: https://gerrit.instructure.com/19806
Reviewed-by: Cody Cutrer <cody@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Clare Strong <clare@instructure.com>
Product-Review: Brian Palmer <brianp@instructure.com>
2013-05-03 01:43:52 +00:00
Shawn Meredith 93f1e8759d Revert "Revert "spec webserver options""
This reverts commit 5226145728

Change-Id: I8a76fa171fd7957853f1049b695dba2e18b0a046
Reviewed-on: https://gerrit.instructure.com/20242
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Shawn Meredith <shawn@instructure.com>
Product-Review: Shawn Meredith <shawn@instructure.com>
QA-Review: Shawn Meredith <shawn@instructure.com>
2013-05-02 00:53:05 +00:00
Shawn Meredith 5226145728 Revert "spec webserver options"
This reverts commit 1a5b73f25b

Change-Id: Ia9fb53890aaa9f301763427a4529e858ad75bec3
Reviewed-on: https://gerrit.instructure.com/20238
Reviewed-by: Shawn Meredith <shawn@instructure.com>
Product-Review: Shawn Meredith <shawn@instructure.com>
QA-Review: Shawn Meredith <shawn@instructure.com>
Tested-by: Shawn Meredith <shawn@instructure.com>
2013-05-01 07:32:25 +00:00
Shawn Meredith 1a5b73f25b spec webserver options
Change-Id: Ied46c4e90d6e994652418568a743b46761083423
Reviewed-on: https://gerrit.instructure.com/20011
Reviewed-by: Shawn Meredith <shawn@instructure.com>
Product-Review: Shawn Meredith <shawn@instructure.com>
QA-Review: Shawn Meredith <shawn@instructure.com>
Tested-by: Shawn Meredith <shawn@instructure.com>
2013-05-01 04:56:26 +00:00
Jon Willesen d8efd3e805 improve robustness of incoming message processor
replaced the mailman gem with custom code with more error
handling. this will allow the incoming message processor to
continue processing messages after encountering a message with
an encoding or parsing error. the broken messages will be moved
aside to a separate folder for later inspection.

fixes CNVS-4970

test plan:
 - read up on the new incoming_mail.yml configuration settings.
 - configure incoming_mail.yml with the test imap accounts
   using legacy settings and check for regressions.
 - reconfigure incoming_mail.yml to read from a directory.
 - copy some testing email files into the configured directory.
   test files should be a mix of:
   - emails with encoding errors
   - emails with syntax errors
   - normal emails
 - all of the normal emails should be processed normally
 - all of the error emails should be moved into the error
   subdirectory

Change-Id: I0f946a56b41492f007db2775aa6da3cdfa4fdd3f
Reviewed-on: https://gerrit.instructure.com/19729
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Zach Pendleton <zachp@instructure.com>
Product-Review: Marc LeGendre <marc@instructure.com>
QA-Review: Marc LeGendre <marc@instructure.com>
2013-04-29 14:47:09 +00:00
Brian Palmer 716cf79a29 update debugger gem
Change-Id: Icaa6998d19018386a27016c2ca55e5b36d69fcf1
Reviewed-on: https://gerrit.instructure.com/20021
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Cody Cutrer <cody@instructure.com>
QA-Review: Brian Palmer <brianp@instructure.com>
Product-Review: Brian Palmer <brianp@instructure.com>
2013-04-24 19:05:36 +00:00
Brian Palmer fa2dab1a65 upgrade ruby_parser for 1.9 syntax support
fixes CNVS-5367

this allows hairtrigger and our i18n extraction code to parse 1.9 syntax
correctly.

also fixed a issue with the i18n rake tasks, so symlinks in
vendor/plugins are now followed.

test plan: without this commit, run rake i18n:generate. then copy
config/locales/generated/en.yml somewhere.

then apply this commit, update your bundle, and run rake i18n:generate again.

compare the new en.yml against the saved one, they should be the same
(unless you have symlinks in vendor/plugins, in which case the new one
will have more strings but existing strings should be the same)

Change-Id: If0df5eae25c59822a9d3c2738fe9549a756ff9e9
Reviewed-on: https://gerrit.instructure.com/19693
Reviewed-by: Brian Palmer <brianp@instructure.com>
Reviewed-by: Jon Jensen <jon@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Clare Strong <clare@instructure.com>
Product-Review: Brian Palmer <brianp@instructure.com>
2013-04-18 16:08:55 +00:00
Cody Cutrer 6e9c843b3d switch to Shackles gem
extracted out of canvas-lms

refs CNVS-4713

test plan:
 * actions that use a slave should still work (dashboard render)
 * you should be able to switch envs and users in console

Change-Id: I07dda8057cf94383bc4579f1ef6b5a4b3ffc20b5
Reviewed-on: https://gerrit.instructure.com/19287
Reviewed-by: Cody Cutrer <cody@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
2013-04-17 16:25:06 +00:00
Brian Palmer 08714d9a69 include information about current request in SQL queries
This will help immensely when debugging slow or misbehaving queries.
Thanks to 37signals: https://github.com/37signals/marginalia

closes CNVS-5108

test plan:

cp config/marginalia.yml.example config/marginalia.yml
then edit config/marginalia.yml to uncomment the production block and
change "production" to "development".

run Canvas, and see in your log file how SQL statements have some extra,
useful information in a comment at the end. Run delayed jobs, and you'll
also see useful info on SQL statements in the log -- including job tag,
and context_id in this case will be job id.

Change-Id: I7988a9afaf674bd00c3edc6adafccaf51e7ff60f
Reviewed-on: https://gerrit.instructure.com/16008
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Cody Cutrer <cody@instructure.com>
Reviewed-by: Jacob Fugal <jacob@instructure.com>
QA-Review: Clare Hetherington <clare@instructure.com>
Product-Review: Brian Palmer <brianp@instructure.com>
2013-04-15 15:43:05 +00:00
Shawn Meredith 503a874cc5 update gemfile with new parallelized gem
Change-Id: I65d850b7ef6cb81ed7eb0626a18dd9b1b21cb5b4
Reviewed-on: https://gerrit.instructure.com/19550
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Shawn Meredith <shawn@instructure.com>
Product-Review: Shawn Meredith <shawn@instructure.com>
QA-Review: Shawn Meredith <shawn@instructure.com>
2013-04-13 04:47:38 +00:00
Ryan Florence 56dedb3f19 fix styleguide + guard issues
test plan:
1. start guard
2. save a file in app/stylesheets
   - styleguide should be created (guard will
     tell you)
3. hit enter
   - styleguide should be created

Change-Id: I891a906602b6df0f964f2e502f124f5d05b4b796
Reviewed-on: https://gerrit.instructure.com/19525
Reviewed-by: Brian Palmer <brianp@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
Product-Review: Ryan Florence <ryanf@instructure.com>
QA-Review: Ryan Florence <ryanf@instructure.com>
2013-04-12 19:32:38 +00:00
Bryan Madsen 9d129a94e4 Revert "update para exclude rake tasks to use parallelized runtime"
This reverts commit 4c0f8d44a6

Change-Id: I26913b2533dd18f750a81fb3f08c234839d508ad
Reviewed-on: https://gerrit.instructure.com/19480
Reviewed-by: Bryan Madsen <bryan@instructure.com>
Product-Review: Bryan Madsen <bryan@instructure.com>
QA-Review: Bryan Madsen <bryan@instructure.com>
Tested-by: Bryan Madsen <bryan@instructure.com>
2013-04-10 17:05:43 +00:00
Bryan Madsen a7b0e8eb02 update dress_code gem to version 1.0.2
Change-Id: Ib41c56f20ec6958cdee6f3229ce7b8d7f1b3d2eb
Reviewed-on: https://gerrit.instructure.com/19477
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Jon Jensen <jon@instructure.com>
Product-Review: Bryan Madsen <bryan@instructure.com>
QA-Review: Bryan Madsen <bryan@instructure.com>
2013-04-10 16:37:34 +00:00
Shawn Meredith 4c0f8d44a6 update para exclude rake tasks to use parallelized runtime
Change-Id: Idf7b1abbccc83800bc3582e8713641c7a8b71139
Reviewed-on: https://gerrit.instructure.com/19462
Reviewed-by: Shawn Meredith <shawn@instructure.com>
Product-Review: Shawn Meredith <shawn@instructure.com>
QA-Review: Shawn Meredith <shawn@instructure.com>
Tested-by: Shawn Meredith <shawn@instructure.com>
2013-04-10 00:44:08 +00:00
Ryan Florence 6601753eb7 implemented dress_code
also added styles to make .form-controls look
good in dialogs.

closes #CNVS-4302

Change-Id: Ibe54ee4046ac255b0b0ea83d32afc88e4a820464
Reviewed-on: https://gerrit.instructure.com/19331
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Jon Jensen <jon@instructure.com>
QA-Review: Ryan Florence <ryanf@instructure.com>
Product-Review: Ryan Florence <ryanf@instructure.com>
2013-04-09 15:43:16 +00:00
Cody Cutrer 6849fb9797 upgrade pg gem to latest
>= 0.11.0 passes all params on to libpq, so need to restrict our initializer
to restrict the params from database.yml to avoid errors

Change-Id: Ie7cab5163a960b05eb3feb4c8487f0a1a36ae4a1
Reviewed-on: https://gerrit.instructure.com/19370
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Brian Palmer <brianp@instructure.com>
QA-Review: Clare Hetherington <clare@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
2013-04-08 18:16:38 +00:00
Shawn Meredith c3eb434e9d paragem update enchanced failure log info and slow spec
Change-Id: I6ca008c2b054600a79473cfce4febf53034302d1
Reviewed-on: https://gerrit.instructure.com/19352
Reviewed-by: Jake Sorce <jake@instructure.com>
Product-Review: Jake Sorce <jake@instructure.com>
QA-Review: Jake Sorce <jake@instructure.com>
Tested-by: Jake Sorce <jake@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
2013-04-04 21:21:20 +00:00
Mark Severson 5e86a00745 upgrade nokogiri and libxml-ruby
delayed job workers segfault often when using libxml2 and ruby 1.9

these issues are not present when using version 2.9.0 of libxml2,
however, newer versions of nokogiri and libxml-ruby are required in
order to compile against the newer libxml2

fixes #CNVS-4669

Change-Id: I5100ba6e0f4779da49bce471cff03cb83b3c06b2
Reviewed-on: https://gerrit.instructure.com/18658
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Bracken Mosbacker <bracken@instructure.com>
Product-Review: Bracken Mosbacker <bracken@instructure.com>
QA-Review: Adam Phillipps <adam@instructure.com>
2013-04-02 20:07:38 +00:00
Cody Cutrer 4ca2c0465f update rake to 10.0.4
/me hates the bundle exec

test plan:
 * rake tasks should work

Change-Id: I68da20c9ac7e54053612afc4bbbea77d55dce054
Reviewed-on: https://gerrit.instructure.com/19223
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Duane Johnson <duane@instructure.com>
Reviewed-by: Brian Palmer <brianp@instructure.com>
QA-Review: Clare Hetherington <clare@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
2013-04-02 00:20:47 +00:00
Kyle Rosenbaum 8407944d52 paragem update for notify changes
Change-Id: I56bf54444d649ddfa6b71725ff66306dbbcdca45
Reviewed-on: https://gerrit.instructure.com/19150
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Shawn Meredith <shawn@instructure.com>
Product-Review: Shawn Meredith <shawn@instructure.com>
QA-Review: Shawn Meredith <shawn@instructure.com>
2013-03-29 20:08:31 +00:00
Kyle Rosenbaum 79fad58ad1 para-gem update slow spec formatter
Change-Id: I46e9300ff7d9df5f6ea57003880ce38f5c340b88
Reviewed-on: https://gerrit.instructure.com/19031
Reviewed-by: Shawn Meredith <shawn@instructure.com>
Product-Review: Shawn Meredith <shawn@instructure.com>
QA-Review: Shawn Meredith <shawn@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
2013-03-27 20:47:22 +00:00
Brian Palmer a9d33591c2 get rspec 2 running with rails 3.0
Not passing, just running

for example spec/models: 2511 examples, 2322 failures, 2 pending

refs CNVS-4711

Change-Id: If744731cf801c47349d2ae49daf43874ae9309dd
Reviewed-on: https://gerrit.instructure.com/18893
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Cody Cutrer <cody@instructure.com>
Product-Review: Brian Palmer <brianp@instructure.com>
QA-Review: Brian Palmer <brianp@instructure.com>
2013-03-27 15:41:28 +00:00
Brian Palmer 530ca79609 bump rails to 2.3.18
fixes CNVS-4745

changelog is at https://github.com/rails/rails/commits/v2.3.18

Change-Id: Ice2b9ab302965ca69b3e59f336900b106d694605
Reviewed-on: https://gerrit.instructure.com/18957
Reviewed-by: Brian Palmer <brianp@instructure.com>
Product-Review: Brian Palmer <brianp@instructure.com>
QA-Review: Brian Palmer <brianp@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
2013-03-26 20:26:05 +00:00
Ryan Florence 859beb1fbb don't use bootstrap gem
fixes CNVS-4891

Change-Id: I1d3fc49cc0a5e93e208843379a986765f0d7e1be
Reviewed-on: https://gerrit.instructure.com/18965
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Brian Palmer <brianp@instructure.com>
Product-Review: Brian Palmer <brianp@instructure.com>
QA-Review: Brian Palmer <brianp@instructure.com>
2013-03-25 22:25:28 +00:00
Stanley Stuart 8045a59313 upgrade coffee-script to 1.6.2
test plan:
  - make sure you have the coffee binary from npm:
    `npm install -g coffee-script@1.6.2`
  - run rake js:generate, make sure all coffeescript still compiles
    correctly
  - open a coffeescript file and make sure it still gets automatically
    compiled when saved by guard.
  - rejoice at the arrival of source maps.

Change-Id: I06ce9e83a76be9d4cc0e2b2c80566a0db19f9d7e
Reviewed-on: https://gerrit.instructure.com/18842
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Ryan Florence <ryanf@instructure.com>
Product-Review: Stanley Stuart <stanley@instructure.com>
QA-Review: Stanley Stuart <stanley@instructure.com>
2013-03-22 20:37:52 +00:00
Brian Palmer cb5e957965 start adding rails 3.0 support
This can successfully load rails console and rails server. There are
many, many problems still. The idea is this won't change anything under
rails 2.3, it's all backwards compatible.

closes CNVS-4711

test plan: `touch RAILS3` in your Canvas Rails.root directory. The run
`bundle update` and verify that you get rails 3 installed. Run `bundle
exec rails c` to load console or `bundle exec rails s` to start a
webrick server. You can login, though the dashboard currently breaks.
Also jammit isn't working yet.

But more importantly, Rails 2.3 should still work same as ever. All
tests should pass, and a basic regression sanity check would be good too.

Change-Id: Idd6f35de88adde84cd2db3a650f44b71bd6e9684
Reviewed-on: https://gerrit.instructure.com/18453
Reviewed-by: Brian Palmer <brianp@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Clare Hetherington <clare@instructure.com>
Product-Review: Bracken Mosbacker <bracken@instructure.com>
2013-03-22 19:08:40 +00:00
Shawn Meredith e6ed6445ab paragem version bump
Change-Id: Ie439d4eb9a91ee8230542b5eb1adc43474cba518
Reviewed-on: https://gerrit.instructure.com/18911
Reviewed-by: Jake Sorce <jake@instructure.com>
Product-Review: Jake Sorce <jake@instructure.com>
QA-Review: Jake Sorce <jake@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
2013-03-22 18:55:47 +00:00
Cody Cutrer a5ccb6bc2a fake arel!
closes CNVS-4705

 * use the fake_arel gem to get a good portion of the way there
 * override fake_arel's AR override even more to get proper behavior
   of select and group merging
 * add even more Rails 3 query methods to Scope (except, reorder,
   pluck, uniq)
 * fix some spots in our code that break with the new semantics

test plan:
 * test all the things!

Change-Id: I4290d00db407f3250570df4e89c8c78283fe5f5f
Reviewed-on: https://gerrit.instructure.com/18427
Reviewed-by: Brian Palmer <brianp@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Clare Hetherington <clare@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
2013-03-19 11:10:22 -06:00
Cody Cutrer b5e5deee98 update rake
it's functionally the same as 9, it just removes a bunch of
deprecated stuff we're not using

Change-Id: Iee9b6f0ae57607bbf481f6c90fd0007a3b3d9133
Reviewed-on: https://gerrit.instructure.com/18679
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Brian Palmer <brianp@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
2013-03-18 12:52:07 -06:00
Shawn Meredith 341985f37d gem update custom rerun threshold and sel ruby driver
Change-Id: I4ad5563d90d7f3341a09a460e395dd91daf6785f
Reviewed-on: https://gerrit.instructure.com/18643
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Bryan Madsen <bryan@instructure.com>
QA-Review: Bryan Madsen <bryan@instructure.com>
2013-03-15 23:14:53 -06:00
Paul Hinze 25f65d8caf support multiple SAML private keys for decryption
this sets us to to be able to rotate the SAML keypair without breaking
existing integrations that use encrypted assertions.

refs CNVS-4354

test plan:
 - set up openam/canvas saml authentication with a 1024-bit key
 - turn on assertion encryption in openam, should work fine
 - generate new 2048-bit saml key and restart canvas (keep old keypair)
 - openam integration should break since it's encrypting with wrong key
 - add old private key under additional_private keys, restart canvas
 - openam integration should work again

Change-Id: I8b4d71e4942a93184097fdb444621bdd0aca25ed
Reviewed-on: https://gerrit.instructure.com/18425
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Brian Palmer <brianp@instructure.com>
QA-Review: Clare Hetherington <clare@instructure.com>
2013-03-15 14:31:57 -06:00
Cody Cutrer fec3ae76a7 more aggressively set context on page views
fixes CNVS-4455

you can never have too much context

also, apparently this is the first integration spec that uses the
API from a session (not an access token), so fix API forgery
protection to respect the allow_forgery_protection option
(what's set for specs to not have to worry about forgery
protection), and clean up enabling of it in specs to use
stubbing

test plan:
 * do an action that counts as participating, but wasn't a GET
   (i.e. comment on a discussion)
 * you should see a page view for the user in that course

Change-Id: I8714de45575123d6877e0265623e0fcaf9e7fa58
Reviewed-on: https://gerrit.instructure.com/18504
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Brian Palmer <brianp@instructure.com>
QA-Review: Clare Hetherington <clare@instructure.com>
2013-03-14 17:38:20 -06:00
Cameron Matheson 6f497aa38a upgrade rb-inotify
Change-Id: I6229d7476c5d66afcd0ec4c283b154e4b48bf835
Reviewed-on: https://gerrit.instructure.com/18584
Reviewed-by: Simon Williams <simon@instructure.com>
QA-Review: Simon Williams <simon@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
2013-03-13 16:32:05 -06:00
Jon Jensen c762d2e3a4 show a warning to unsupported browsers, fixes CNVS-4579
test plan:
1. use canvas in any supported browser (including mobile)
2. you should not see a warning
3. use canvas in an unsupported browser (e.g. ie8, old firefox)
4. you should see an orangish warning at the top of every page
5. it should not be dismissable

Change-Id: I092455c416a754d102ddadbda99280856b4082de
Reviewed-on: https://gerrit.instructure.com/18524
QA-Review: Jon Jensen <jon@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Joe Tanner <joe@instructure.com>
2013-03-13 10:38:32 -06:00
Cody Cutrer 40309819b7 upgrade mocha
Change-Id: I2209531a3bfaf68932455dc9a1eb2471067b754f
Reviewed-on: https://gerrit.instructure.com/18550
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Brian Palmer <brianp@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
2013-03-12 17:55:53 -06:00
Cody Cutrer b843f68a38 upgrade attachment_fu to use aws-sdk gem instead of aws-s3
closes CNVS-4248

this gains us EU region support, and no longer using a forked aws-s3 gem

in the process, setting bucket_name via a plugin is no longer supported

test plan:
 * should be able to upload new files via various methods
 * should be able to download old and new files still

Change-Id: If32fa5f381f5a4ac493948fa32230175a695f51e
Reviewed-on: https://gerrit.instructure.com/18282
QA-Review: Clare Hetherington <clare@instructure.com>
Tested-by: Cody Cutrer <cody@instructure.com>
Reviewed-by: Brian Palmer <brianp@instructure.com>
2013-03-11 15:55:58 -06:00
Zach Pendleton 5a29ab82d5 stop encoding errors on non-ASCII incoming mail.
fixes CNVS-4374

update mail gem to 2.5.3 for ruby 1.9, and patch the
broken parse_message method in it.

test plan:
  * send a mail message with non-ASCII characters in it;
  * verify that it is processed and doesn't throw any
    errors re: encoding.

Change-Id: Iaa5a992b4bb9b6c183c02f43201f8aeb9515d92c
Reviewed-on: https://gerrit.instructure.com/18235
Reviewed-by: Zach Wily <zach@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Jon Willesen <jonw@instructure.com>
QA-Review: Marc LeGendre <marc@instructure.com>
2013-03-06 10:36:38 -07:00
Ryan Florence 926cb0ca24 Fully adopt Bootstrap & update css to work with it, closes: #CNVS-1344
this commit does the following:
* upgrade bootstrap-sass gem to most recent version
* switches to using bootstrap's normalize.css and forms.css
  which fixes a whole bunch of misformatting of how bootstrap
  stuff is supposed to look, but changing those 2 affects
  a lot of our old stylesheets.
* gets rid of unified_buttons.sass and just uses bootstraps buttons.
  .ui-button @extends these because we still have to support .ui-button
  for modals & buttonsets. but .button is no longer supported.
* a lot of css file reorganization (there's no more 'blue' and
  'normal canvas', there's just canvas)
* a bunch of files had to be tweaked to look good with these changes.

test plan:
This change touches every page in canvas so, no kidding, we need to make
sure every page looks OK. In order to do that:
1. each sprint team needs to give a +1 after they make sure all the
   pages in the features they are over look good.
2. the QA person on each team needs to look at the pages for their
   teams features for a QA +1

things to look for specifically when testing:
* buttons: this gets rid of all those red 'cancel' links
  that are actually buttons, make sure all the buttons you see
  look right.  if you see 2 plain gray buttons next to each other
  like [Save] [Cancel], we should make the primary one blue (by
  adding the .btn-primary class)
* Forms: a lot of this change has to do with how form elements look,
  especially <select>s, <input>s and <label>s. look at the diffs
  for the ones that have the most changes and make sure those look
  good, but also check for the ones I missed and make sure those
  look good too.
* and just random style changes, if something looks ugly or broken
  (and it didn't before), we should fix that.

Also:
just use a link instead of a drop-menu for adding event from sidebar

we used to have a drop down menu for adding events
to cal2 from the sidebar where you'd hit a cog
and it'd ask you if you wanted to add an event or
an assignment.  this just simplifies it to an add
icon.

this: http://cl.ly/image/133a2A3q3q1M
instead of: http://cl.ly/image/46463o2s3W0g

Change-Id: I384fe273934bca96bf28423afb1402c7792d8766
Reviewed-on: https://gerrit.instructure.com/15422
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Ryan Florence <ryanf@instructure.com>
QA-Review: Ryan Florence <ryanf@instructure.com>
2013-02-28 21:06:45 -07:00
Cody Cutrer 56e317e4ab use mysql2 gem for mysql
closes CNVS-4199

Change-Id: I81a14efca365a61ff9e5d29892ec95ace64aabb3
Reviewed-on: https://gerrit.instructure.com/18089
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Brian Palmer <brianp@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
2013-02-27 14:10:37 -07:00
Eric Berry bae14712cf updated canvas_connect gem version to 0.0.8
latest version of gem (0.0.8) fixes the issue with the
Canvas::Plugins::AdobeConnect superclass mismatch

test steps:
- perform a bundle install
- disable all cacheing (development-local.rb)
- navigate around the app and ensure that there are no errors containing
  Canvas::Plugins::AdobeConnect in the logs.

Change-Id: I2a4d13b1ad927a4bd73db5c7ee66ac052edb5225
Reviewed-on: https://gerrit.instructure.com/17824
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Zach Pendleton <zachp@instructure.com>
QA-Review: Marc LeGendre <marc@instructure.com>
2013-02-25 12:38:50 -07:00
Joe Tanner 52d4c1279a update timezones to use the latest data in the tzinfo gem
closes #CNVS-2900

this change is because Moscow/St. Petersburg no longer observe
Daylight Savings

test plan:
- go to /profile/settings and click 'Edit Settings'
- the Time Zone dropdown entries for Moscow and St. Petersburg
  should be (+04:00) instead of (+03:00)

Change-Id: I4ef3665cbb265a557906c9475242a54b1bcfebf1
Reviewed-on: https://gerrit.instructure.com/17982
Reviewed-by: Jon Jensen <jon@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Cam Theriault <cam@instructure.com>
2013-02-22 14:56:27 -07:00
Jon Willesen e9b6ea9012 stick mail gem to version 2.4.4, even in ruby 1.9
v2.5.3 of the gem has a regex parsing error where it performs
negative lookahead on whitespace after the blank link that
separates the header from the body. This means that it will
misparse a message when the body starts with whitespace.

There is a fix on the master branch of the gem's repository, so
the next version of the gem should work. We should stick to
2.4.4 until we drop 1.8 support and the new gem has been
released.

fixes CNVS-4026

test plan:
 - bundle update and make sure bundler installs and uses
   version 2.4.4 of the mail gem

Change-Id: I4f3d2405e742a724e217fc803945e15c906f0f37
Reviewed-on: https://gerrit.instructure.com/17947
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Zach Pendleton <zachp@instructure.com>
QA-Review: Zach Pendleton <zachp@instructure.com>
2013-02-22 14:44:36 -07:00
Paul Hinze 8b973cdc21 Sign log out requests
Updates to version 0.1.20 of the ruby-saml-mod gem which will cause us
to start signing SAML log out requests.

Fixes CNVS-1765

Test Plan:
 - set up a SAML identity provider like SimpleSAMLPHP or OpenAM
 - configure the provider to expect log out requests to be signed
 - logging out from Canvas should still work

Change-Id: I1cefb02140a692e496079bd2badc713fcfdf4164
Reviewed-on: https://gerrit.instructure.com/17780
QA-Review: Clare Hetherington <clare@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Brian Palmer <brianp@instructure.com>
2013-02-22 13:40:00 -07:00
Zach Wily 259d122371 use safe_yaml
Includes the safe_yaml gem, which replaces YAML.load and friends with a "safe"
version by default, that does not create arbitrary objects.

DelayedJobs was modified to use unsafe_load, as it relies on deserializing
ruby objects.

The biggest impact is with serialized columns - many of those store
non-simple data types. Most commonly HashWithIndifferentAccess, but
there are a few others as well. Our version of the safe_yaml gem allows
for whitelisting certain classes.

The I18nExtraction::SafeYAML class was also removed, as it's no longer
needed. The extraction task was updated to call YAML.safe_load to be
explicit.

Currently, Gemfile is pointing to the Instructure fork of the safe_yaml
gem on github. This needs to be released as a gem.

Closes CNVS-3784

test plan: If any serialized YAML columns contain a class that we missed
in our whitelist, then that column will fail to deserialize and the
model will behave incorrectly. It's difficult to say what exactly should
be tested, as all the classes should be whitelisted. A general
regression test on migrations, course copy, scribd, and quizzes would
cover most of it.

Change-Id: I3e1a95e101ada3a1b2366ff1ca70db6d17742cce
Reviewed-on: https://gerrit.instructure.com/17404
Reviewed-by: Jon Jensen <jon@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Jacob Fugal <jacob@instructure.com>
QA-Review: Clare Hetherington <clare@instructure.com>
2013-02-20 12:24:41 -07:00
Eric Berry e0460850f0 integrated adobe connect gem
fixes CNVS-3418

test plan:
  - create a conference room and start/enter it
  - in a different browser (or private) log in as someone else and
    join the same conference
  - ensure that both people can connect to the conference

Change-Id: Id043e2c69a1fea13197cccffc8fda5f41b798718
Reviewed-on: https://gerrit.instructure.com/17709
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Zach Pendleton <zachp@instructure.com>
QA-Review: Myller de Araujo <myller@instructure.com>
2013-02-15 17:39:22 -07:00
Shawn Meredith d1a6006a1c jenkins build and rerun summary
Change-Id: I6f24cf17204006290c5e1108510bbe011bdd3305
Reviewed-on: https://gerrit.instructure.com/17405
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Jake Sorce <jake@instructure.com>
QA-Review: Jake Sorce <jake@instructure.com>
2013-02-12 16:02:54 -07:00
Brian Palmer 7602a0443e bump rails gem and json gem
to address: CVE-2013-0276 CVE-2013-0277 CVE-2013-0269

fixes CNVS-3779

Change-Id: I758b21251101170869c24d2f535318f6756c2d3c
Reviewed-on: https://gerrit.instructure.com/17611
Reviewed-by: Jacob Fugal <jacob@instructure.com>
Reviewed-by: Paul Hinze <paulh@instructure.com>
Reviewed-by: Zach Wily <zach@instructure.com>
Tested-by: Brian Palmer <brianp@instructure.com>
QA-Review: Brian Palmer <brianp@instructure.com>
2013-02-11 12:47:58 -07:00
Mark Ericksen 73c27a24ab Allow the ruby-debug related gems to be conditionally excluded for IDE development.
Fixes #CNVS-3710

Testing Notes:
===========
* Using an editor like RubyMine, add an environment setting for development
   called DISABLE_RUBY_DEBUGGING with a value of something like "1". Specific
   value is unimportant.
* Start a 'debug' session and set breakpoints and verify they fire.
* Using console based debugging, verify that the execution pauses
   when a DEBUG statement is reached.

Change-Id: Iec59efeb291827ee600b7184bce3990145189b47
Reviewed-on: https://gerrit.instructure.com/17540
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Jon Willesen <jonw@instructure.com>
QA-Review: Marc LeGendre <marc@instructure.com>
2013-02-08 13:34:17 -07:00
Ahmad Amireh 76790e4cff integrate yard-appendix plugin with canvas YARD cfg
Useful things the commit brings:

  1. Source documentation can now include images and out-of-source examples
  2. Source documentation can now be supplemented by "appendixes" for
     documenting advanced or uncommon usage, auxiliary examples, or any
     supplementary content
  3. An implementation of the YARD @see tag that utilizes the canvas
     YARD linkify helper

Necessary changes for integration were:

  * Gemfile now includes 'yard-appendix'
  * Rake task for generating API docs (doc:api) made more readable and
    now supports asset migration (images and examples)
  * Canvas YARD 'api' template now handles :appendix sections provided
    by the plugin
	* Canvas YARD 'linkify' helper modified:
    * uses a shared linker to look up a topic and controller
    * overrides default handling of 'Appendix: ' links
    * defaults to using the @object title as the link body when no title
      was explicitly passed instead of the path.to.object
  * Canvas YARD 'fulldoc' handler respects a
    DOC_OPTIONS[:all_resource_appendixes] that when turned on would
    generate appendix entries in the All Resources section[1]

[1] I've already implemented this functionality because I misread the
requirement (as seen in PB 6) so I thought we could keep it around and
toggle it if need be. The options are inside lib/tasks/docs.rake

---

Testing:

To verify that the changes do not alter or affect the current API docs,
fire up a terminal and do the following (inline comments for directions):

```bash
	cd /path/to/canvas;
	# generate the original docs before pulling these changes
	bundle exec rake doc:api
	mv public/doc public/doc_original
	# checkout these changes into a branch... after that:
	bundle install
	bundle exec rake doc:api
	diff -r -y -q public/doc_original/api public/doc/api
```

The output of the last command should look like this:

Only in doc/api: examples
Only in doc/api: images

To test the actual @!appendix functionality:

  * see https://github.com/amireh/yard-appendix for directions on how to
    define Appendix entries
  * write an Appendix in any controller, optionally reference it in some
    method (using @see or {link})
  * Appendix entry should be shown at the bottom of the controller's doc
    page
  * reference to the appendix entry should take you to it

Alternatively, you can check-out the gerrit change 17454 at
https://gerrit.instructure.com/#/c/17454/ which utilizes this
functionality.

Change-Id: Id667b77ff8d36b0f503e0f6752045e3d05bc3649
Reviewed-on: https://gerrit.instructure.com/17453
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Brian Palmer <brianp@instructure.com>
QA-Review: Simon Williams <simon@instructure.com>
2013-02-08 11:50:37 -07:00
Cameron Matheson 41bf60bce0 lock rb-inotify at version guard likes
Change-Id: I7353e0841aaf0b762359680f18db15fbac5a056b
Reviewed-on: https://gerrit.instructure.com/17503
Reviewed-by: Zach Pendleton <zachp@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Cameron Matheson <cameron@instructure.com>
2013-02-06 16:17:25 -07:00
Brian Palmer 44b76489b5 upgrade rails to 2.3.16
The html_escape changes were backported from rails 3 in 2.3.16, so I've
removed our modified version.

Change-Id: I0067b9d84e49459dd7d46ba53a1d597d2e0efb67
Reviewed-on: https://gerrit.instructure.com/17379
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Cody Cutrer <cody@instructure.com>
Reviewed-by: Cameron Matheson <cameron@instructure.com>
QA-Review: Clare Hetherington <clare@instructure.com>
2013-02-05 08:44:57 -07:00
Paul Hinze 991fe731c0 spec: introduce timecop for time-sensitive specs
https://github.com/travisjeffery/timecop

Timecop allows you to freeze time at a specific point for a block in a
time-sensitive spec, making it more resilient to sporatic failures based
on the local time of the box running tests.

Included the gem in the Gemfile as well as an initial usage to fix a
spec that was failing for me locally in late night MST.

Change-Id: Ia3635be16d3cc65697a20ccdcebde8d8df07bbe4
Reviewed-on: https://gerrit.instructure.com/17271
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Jacob Fugal <jacob@instructure.com>
QA-Review: Stanley Stuart <stanley@instructure.com>
2013-01-31 17:16:42 -07:00
Shawn Meredith ff4e388127 jenkins build summary
Change-Id: I783b53b9d3245d1361316d67964433f2e9ecef2d
Reviewed-on: https://gerrit.instructure.com/17171
Reviewed-by: Jake Sorce <jake@instructure.com>
QA-Review: Jake Sorce <jake@instructure.com>
Tested-by: Jake Sorce <jake@instructure.com>
2013-01-29 16:06:32 -07:00
Jeremy Stanley 81954472cd update rubyzip to 0.9.5 for non-ASCII filename support
test plan:
 - import a Canvas course containing attachments with non-ASCII
   filenames, on ruby 1.9 (there must be at least two attachments)

fixes #CNVS-3195

Change-Id: I0c7f19b6f7a477858bfba3cd2501bcbf16ba0567
Reviewed-on: https://gerrit.instructure.com/17006
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Bracken Mosbacker <bracken@instructure.com>
QA-Review: Adam Phillipps <adam@instructure.com>
2013-01-22 09:29:05 -07:00
Zach Pendleton 2159034353 update canvas_connect gem version.
update to 0.0.2 for better compatibility with a wider range
of connect instances.

Change-Id: Ide388541e55151f07ea77be36fc70fc4d92203e1
Reviewed-on: https://gerrit.instructure.com/17009
Reviewed-by: Joel Hough <joel@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Marc LeGendre <marc@instructure.com>
2013-01-21 16:38:09 -07:00
Shawn Meredith 9b9178673a parallelized gem update for plugins and 1.9.3
Change-Id: If0da7773cf15f825db2b1ba49d945ec1cd27953a
Reviewed-on: https://gerrit.instructure.com/16825
Reviewed-by: Bryan Madsen <bryan@instructure.com>
QA-Review: Bryan Madsen <bryan@instructure.com>
Tested-by: Bryan Madsen <bryan@instructure.com>
2013-01-15 16:14:05 -07:00
Shawn Meredith e6d9aae7ae parallelized gem update better escaping for rerun examples
Change-Id: Iad81d8d40f8e6cb0c5470ba20690aa13622353f5
Reviewed-on: https://gerrit.instructure.com/16747
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Jake Sorce <jake@instructure.com>
Tested-by: Jake Sorce <jake@instructure.com>
QA-Review: Jake Sorce <jake@instructure.com>
2013-01-11 15:41:03 -07:00
Zach Pendleton 090a00b0c4 include adobe connect web conferences gem. fixes CNVS-1275
test plan:
  * bundle install and verify that canvas_connect is
    installed;
  * as a site or account admin, navigate to /plugins and
    verify that the adobe connect plugin is visible.

Change-Id: I60eac7abbc7f014b79d86a04e77c197c0e1eb976
Reviewed-on: https://gerrit.instructure.com/16256
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Marc LeGendre <marc@instructure.com>
Reviewed-by: Jon Willesen <jonw@instructure.com>
2013-01-11 11:02:15 -07:00
Brian Palmer f1c826d137 bump rails to 2.3.15
Closes #CNVS-2691

test plan: In theory this could affect most anything. However, most of
the differences between 2.3.14 and 2.3.15 were security patches that
we'd already applied manually. See
https://github.com/rails/rails/commit/v2.3.15

Change-Id: I60626ba66a2b257674cb3e412282979558464954
Reviewed-on: https://gerrit.instructure.com/16641
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Clare Hetherington <clare@instructure.com>
Reviewed-by: Jacob Fugal <jacob@instructure.com>
2013-01-10 14:59:13 -07:00
Shawn Meredith c4d07b680f parallelized gem update to handle rspec thread failures
Change-Id: I37ad7bcdc788182e5d9f3889c4eb33e561c37b57
Reviewed-on: https://gerrit.instructure.com/16602
Reviewed-by: Jake Sorce <jake@instructure.com>
QA-Review: Jake Sorce <jake@instructure.com>
Tested-by: Jake Sorce <jake@instructure.com>
2013-01-08 11:04:31 -07:00
Zach Pendleton 95d31fccfb update guard and coffeescript.
also include notification libraries for all platforms to
avoid polling.

test plan:
  * run guard (bundle exec guard);
  * edit a coffeescript file and verify that it is properly
    compiled.

Change-Id: I125c744b2d342eaeb5550ce10cd089a64272b44f
Reviewed-on: https://gerrit.instructure.com/16361
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Ryan Florence <ryanf@instructure.com>
QA-Review: Marc LeGendre <marc@instructure.com>
2013-01-02 16:35:55 -07:00
Shawn Meredith ca27d23da5 parallelized gem updated thread failure reflection
Change-Id: Ic2cde451dcd106059732d2e4188a595a435a6e1d
Reviewed-on: https://gerrit.instructure.com/16152
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Jake Sorce <jake@instructure.com>
QA-Review: Jake Sorce <jake@instructure.com>
2012-12-18 12:32:17 -07:00
Shawn Meredith e126afc762 xvfb compatiability and webdriver 2.26
Change-Id: Ia0dd10e9272e97783dc6f4fc32613576a36e9276
Reviewed-on: https://gerrit.instructure.com/16126
Reviewed-by: Jake Sorce <jake@instructure.com>
QA-Review: Jake Sorce <jake@instructure.com>
Tested-by: Jake Sorce <jake@instructure.com>
2012-12-17 11:00:43 -07:00
Shawn Meredith d1d720a449 selenium xvfb parallelized pass\fail 1.9.3
Change-Id: I6b4bdae86dc2731cfeb3c8054a9727106a22088c
Reviewed-on: https://gerrit.instructure.com/16105
Reviewed-by: Jake Sorce <jake@instructure.com>
QA-Review: Jake Sorce <jake@instructure.com>
Tested-by: Jake Sorce <jake@instructure.com>
2012-12-14 16:03:19 -07:00
Mark Severson 38440280e5 updated version of mime-types gem (needed for newer Mechanize)
refs #CNVS-122

Change-Id: Ic82694c46fe2f58b1be744afba180c15080928f2
Reviewed-on: https://gerrit.instructure.com/15846
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Bracken Mosbacker <bracken@instructure.com>
QA-Review: Bracken Mosbacker <bracken@instructure.com>
2012-12-10 08:11:38 -07:00
Shawn Meredith 73a7b27c2f integrate cassandra to run in a parallel test environment
Change-Id: Ic04ee524be774f89aba0b3c0186dc970cde3c329
Reviewed-on: https://gerrit.instructure.com/15640
Reviewed-by: Bryan Madsen <bryan@instructure.com>
QA-Review: Bryan Madsen <bryan@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
2012-12-06 16:04:54 -07:00
Jacob Fugal 396c03f40d pin mail gem for 1.8; fixes #11952
this commit in the 2.5+ versions of the mail gem breaks things in 1.8

Change-Id: I146550ecd2d1c45aedf17e55a41fc5bfd473c773
Reviewed-on: https://gerrit.instructure.com/15581
Reviewed-by: Brian Palmer <brianp@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
2012-11-26 12:34:04 -07:00
Brian Palmer 151009e876 bump aws-s3-instructure gem version
This new version only has one change, adding ECONNRESET to the list of
exceptions to retry uploading on.

fixes #11818

Change-Id: I13775e98f1f745cd0545a34914e4d86d9c0b8ccd
Reviewed-on: https://gerrit.instructure.com/15356
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Jacob Fugal <jacob@instructure.com>
2012-11-19 13:42:26 -07:00
Sterling Cobb c0809345a9 Allow accounts to specify session timeout time
fixes #11388

This should work for single and multiple accounts. 
You can now enable a plugin that lets you set
how long (in minutes) before users on your account
are automatically logged of because of inactivity.
You are required to set this to at least 20 
minutes or more.

Test Plan
  Steps: 
  1. log in as a site admin 
  2. [plugins] 
  3. [Sessions] 
  4. on the account drop down menu, select all 
     accounts, then enter a time in the text field
     in minutes. At least 20 minutes
  5. [Apply] 
  6. log out 
  7. go to /login and make sure the
     "stay signed in" checkbox is checked 
  8. log in with any user that can get on the
     account you enabled the plugin to work for 
  9. wait for a little longer than the amount of
     time you set the plugin for 
  10. try to complete an action, like clicking on
     course or the canvas home page logo

You should be logged out

Thanks Adam for writing this test plan.

Change-Id: If7dc772e4a1a59e646645c698d732308d3e0a19f
Reviewed-on: https://gerrit.instructure.com/15231
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
2012-11-16 09:35:48 -07:00
Brian Palmer 5055490b95 1.9: bump nokogiri gem to 1.5.5
1.5.0 has trouble compiling against our libxml

Change-Id: I55ea3ddfeb03a32e037480f5b36dd6a53d7242eb
Reviewed-on: https://gerrit.instructure.com/15364
Tested-by: Jenkins <jenkins@instructure.com>
Tested-by: Jacob Fugal <jacob@instructure.com>
Reviewed-by: Zach Wily <zach@instructure.com>
Reviewed-by: Brian Palmer <brianp@instructure.com>
2012-11-15 14:51:19 -07:00
Brian Palmer 8b9fc64162 upgrade instructure-redis-store gem
The new version contains a fix to treat TypeErrors during unmarshalling
as a cache miss, to help facilitate the 1.8 -> 1.9 transition.

refs #11768

Change-Id: If8ddf3636fb7b09f60e48c36767cfc576b09a91c
Reviewed-on: https://gerrit.instructure.com/15322
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Stanley Stuart <stanley+gerrit@instructure.com>
2012-11-13 16:28:55 -07:00
Brian Palmer 880fb622f6 upgrade hairtrigger gem version
This new version has a ruby 1.9 fix

Change-Id: Ie9deb4a24a9575130b779f9a43331ffce2a6b508
Reviewed-on: https://gerrit.instructure.com/15095
Reviewed-by: Jon Jensen <jon@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
2012-11-07 13:00:21 -07:00
Shawn Meredith 56591cd12d gemfile update for parallelized spec reruns
Change-Id: Ic261f5d5be71100c65a4e7472952a3411c0754dd
Reviewed-on: https://gerrit.instructure.com/15056
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Bryan Madsen <bryan@instructure.com>
2012-11-06 19:55:12 -07:00
Shawn Meredith 3fb48ed38d gemfile update for reruns
Change-Id: I2923f65e99fb2d17d5c8e4b217621dc49728479d
Reviewed-on: https://gerrit.instructure.com/15008
Tested-by: Bryan Madsen <bryan@instructure.com>
Reviewed-by: Bryan Madsen <bryan@instructure.com>
2012-11-02 18:14:38 -06:00
Shawn Meredith f9f3c58d3b updated gemfile for parallelized gem
Change-Id: I3bbdce926ed0690c4ee0d0559da1acd9bf4b54d4
Reviewed-on: https://gerrit.instructure.com/14886
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Jake Sorce <jake@instructure.com>
Tested-by: Jake Sorce <jake@instructure.com>
2012-10-31 13:17:42 -06:00
Shawn Meredith 5d11299e92 updated gemfile for parallelized_specs gem
Change-Id: Iedc6d08292cc7c8ea730e82e0ee7dcb6e2973686
Reviewed-on: https://gerrit.instructure.com/14703
Reviewed-by: Jake Sorce <jake@instructure.com>
Tested-by: Jake Sorce <jake@instructure.com>
2012-10-25 11:41:39 -06:00
Brian Palmer 005e42a757 cassandra store for page views
Adds a new back-end store for page_views, using a Cassandra cluster. All
the current page view queries are supported, many using denormalized
views on the data.

test plan:

first, canvas instances that are currently using AR page views
should function as before.

by Setting.set('enable_page_views', 'cassandra') and restarting, you will
switch to cassandra page views. a script to migrate the AR page views to
Cassandra is coming. all page view functionality should work as before.
note that the format of the pagination headers in the
/api/v1/users/X/page_views endpoint has changed.

Change-Id: I2d1feb4d83b06a0c852e49508e85e8dce87507b4
Reviewed-on: https://gerrit.instructure.com/14258
Reviewed-by: Jacob Fugal <jacob@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
2012-10-24 17:23:56 -06:00
Shawn Meredith e5d4af2d38 gemfile update for selenium_trending
Change-Id: I5e6bd3d2a919e74613d30d2ae8e3597b8ee0e816
Reviewed-on: https://gerrit.instructure.com/14679
Reviewed-by: Jake Sorce <jake@instructure.com>
Tested-by: Jake Sorce <jake@instructure.com>
2012-10-24 15:58:48 -06:00
Shawn Meredith 9353dc405f Revert "gemfile update for new parallelized_specs gem"
This reverts commit b6e372762b

Change-Id: Iabb65a035b96f6179d4bbac5317662c503c1a0a9
Reviewed-on: https://gerrit.instructure.com/14658
Reviewed-by: Bryan Madsen <bryan@instructure.com>
Tested-by: Bryan Madsen <bryan@instructure.com>
2012-10-23 17:34:00 -06:00
Shawn Meredith b6e372762b gemfile update for new parallelized_specs gem
Change-Id: Ie79086c2fe919ed616d0e07deca4ea12cf5abc72
Reviewed-on: https://gerrit.instructure.com/14470
Reviewed-by: Jake Sorce <jake@instructure.com>
Tested-by: Jake Sorce <jake@instructure.com>
2012-10-23 16:54:33 -06:00
Shawn Meredith 13af4f1028 updated parallelized_gem version
Change-Id: Ib705d270c85e85607f66e6347494fdd0fc483709
Reviewed-on: https://gerrit.instructure.com/14421
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Jake Sorce <jake@instructure.com>
Tested-by: Jake Sorce <jake@instructure.com>
2012-10-15 17:48:01 -06:00
Ryan Shaw 0b88c81e54 update and use sass gem instead of haml
sass is no longer going to be included in the haml
gem, and trying to do so is deprecated.

test plan: run bundle exec compass compile --force
and make sure pages look good in the app

Change-Id: Iba268de061d196d29b012ab4d2b48a4f945e17d2
Reviewed-on: https://gerrit.instructure.com/13936
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Zach Pendleton <zachp@instructure.com>
Reviewed-by: Joe Tanner <joe@instructure.com>
2012-10-08 10:51:09 -06:00
Shawn Meredith 8b2f1a4eec parallelized_specs gem update version
Change-Id: Iad0609125c063eb4adc76a2403aed23b6b3b823f
Reviewed-on: https://gerrit.instructure.com/14196
Reviewed-by: Jake Sorce <jake@instructure.com>
Tested-by: Jake Sorce <jake@instructure.com>
2012-10-05 11:14:35 -06:00
Shawn Meredith dd3690d749 gemfile update for parallelized_specs gem
Change-Id: I4709917e930ed22d12b7b2de5554d99158f2ab83
Reviewed-on: https://gerrit.instructure.com/14157
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Jake Sorce <jake@instructure.com>
2012-10-04 12:54:44 -06:00
Bracken Mosbacker c54d3060b2 allow multiple saml auth configs and full aac api
An account can now have multiple SAML configurations, and
can set an auth discovery url.

The old AAC API has been deprecated and this adds a normal
resource API for AACs

Test Plan:
 * Test the api be doing lots of things
 * Create two saml configurations
 * Test the individual login urls for each (/login/{id}) and verify they work
 * Test that the new SAML AAC UI works.
 * Test that the SAML configuration in position 1 is used as the default

closes #10497

Change-Id: Ibe35fcf788d9506542b1079cc7420912a1e9d9a2
Reviewed-on: https://gerrit.instructure.com/14042
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Cody Cutrer <cody@instructure.com>
2012-10-03 15:23:56 -06:00
Shawn Meredith 182eaf86f2 update gemfile for parallelized_specs version
Change-Id: Icaffec4019cd61f99dd5ad65b1a755e02a519543
Reviewed-on: https://gerrit.instructure.com/14034
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Jake Sorce <jake@instructure.com>
2012-09-28 16:07:10 -06:00
Shawn Meredith 64a28a2aca gem parallelized_spec version update
Change-Id: If5a1a5b5505a2ccd3edbaa9ffb46c94c2cd80970
Reviewed-on: https://gerrit.instructure.com/14018
Reviewed-by: Jake Sorce <jake@instructure.com>
Tested-by: Jake Sorce <jake@instructure.com>
2012-09-27 17:23:09 -06:00
Shawn Meredith 446636f622 updated parallelized gem
Change-Id: I0567e6bdd70bd1c71cba54cbe16aa47e3dd2955c
Reviewed-on: https://gerrit.instructure.com/14015
Tested-by: Jake Sorce <jake@instructure.com>
Reviewed-by: Jake Sorce <jake@instructure.com>
2012-09-27 16:36:39 -06:00
Cameron Matheson b5f566f1f6 crocodoc integration
Adds support for optionally viewing documents with Crocodoc.

closes #9865

Test plan:
  * configure the crocodoc plugin
  * add an assignment that allows file uploads
  * make a submission for that assignment with a pdf or doc or ppt
    - on the 'submission details' page, opening a preview of the
      assignment should display it in crocodoc
    - speedgrader should display the submission in crocodoc too
  * make a submission with odt or rtf
    - the submission should be displayed with scribd or google docs
  * if you disable the crocodoc plugin, submissions could continue being
    previewed in google docs or scribd

Change-Id: I7dd2547f8e2d907c98ebe894a7f1ee9d58f1e030
Reviewed-on: https://gerrit.instructure.com/13668
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Jon Jensen <jon@instructure.com>
2012-09-21 12:57:02 -06:00
Shawn Meredith 835fb3896d spec: upgrading selenium webdriver to 2.25
Change-Id: I5b305ac069d90ce899ba5980f09fc0542d03b43d
Reviewed-on: https://gerrit.instructure.com/13578
Reviewed-by: Jake Sorce <jake@instructure.com>
Tested-by: Jake Sorce <jake@instructure.com>
2012-09-10 10:36:15 -06:00
Brian Palmer 308bf58f0f some ruby 1.9.3 fixes
* fix some invalid syntax that's snuck in recently
 * fix an issue with initializing tempfiles in Canvas::HTTP
 * fix some "can't modify frozen object" errors in specs
 * upgrade mocha to 0.12.3

Change-Id: I6b6f25bcfff2466774e2941d35fafb7af7c50569
Reviewed-on: https://gerrit.instructure.com/13344
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Simon Williams <simon@instructure.com>
2012-09-04 10:49:55 -06:00
Brian Palmer 786a8643db update ruby-saml-mod gem
Change-Id: I30ad2d7b332c8f57147f05689b385c40a5f343c0
Reviewed-on: https://gerrit.instructure.com/13423
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Bracken Mosbacker <bracken@instructure.com>
2012-09-04 10:48:58 -06:00
Zach Wily 324f02544d add ffi to Gemfile
Change-Id: If859be8662babec75b2c237be32fa9a0da2c7a4b
Reviewed-on: https://gerrit.instructure.com/13418
Reviewed-by: Cody Cutrer <cody@instructure.com>
Reviewed-by: Brian Palmer <brianp@instructure.com>
Tested-by: Zach Wily <zach@instructure.com>
2012-09-03 22:04:06 -06:00
Brian Palmer 9923198e07 upgrade mailman to 0.5.3
This new gem version supports SSL over IMAP. The advantage of using IMAP
for mailman instead of POP3 is that messages are deleted one-by-one as
they are processed for IMAP, rather than all at once at the end with
POP3. So if the processing of messages gets aborted by an exception or a
killed process, the messages won't get processed again the next time
IncomingMessageProcessor runs.

test plan: test that incoming emails are still processed with the
current config. then change the config to use imap with ssl, and verify
that messages are still processed.

Change-Id: I3af158de66051f4c93068cde3da17a670493787b
Reviewed-on: https://gerrit.instructure.com/13352
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Zach Wily <zach@instructure.com>
2012-08-31 14:19:46 -06:00
Cody Cutrer b7b407248f multi-factor authentication closes #9532
test plan:
 * enable optional MFA, and check the following:
   * normal log in should not be affected
   * you can enroll in MFA from your profile page
   * you can re-enroll in MFA from your profile page
   * you can disable MFA from your profile page
   * MFA can be reset by an admin on your user page
   * when enrolled, you are asked for verification code after
     username/password when logging in
   * you can't access any other part of the site directly until
     until entering your verification code
 * enable required MFA, and check the following
   * when not enrolled in MFA, and you log in, you are forced to
     enroll
   * you cannot disable MFA from your profile page
   * you can re-enroll in MFA from your profile page
   * an admin (other than himself) can reset MFA from the user page
 * for enrolling in MFA
   * use Google Authenticator and scan the QR code; you should have
     30-seconds or so of extra leeway to enter your code
   * having no SMS communication channels on your profile, the
     enrollment page should just have a form to add a new phone
   * having one or more SMS communication channels on your profile,
     the enrollment page should list them, or allow you to create
     a new one (and switch back)
   * having more than one SMS communication channel on your profile,
     the enrollment page should remember which one you have selected
     after you click "send"
   * an unconfirmed SMS channel should go to confirmed when it's used
     to enroll in MFA
   * you should not be able to go directly to /login/otp to enroll
     if you used "Remember me" token to log in
 * MFA login flow
   * if configured with SMS, it should send you an SMS after you
     put in your username/password; you should have about 5 minutes
     of leeway to put it in
   * if you don't check "remember computer" checkbox, you should have
     to enter a verification code each time you log in
   * if you do check it, you shouldn't have to enter your code
     anymore (for three days). it also shouldn't SMS you a
     verification code each time you log in
 * setting MFA to required for admins should make it required for
   admins, optional for other users
 * with MFA enabled, directly go to /login/otp after entering
   username/password but before entering a verification code; it
   should send you back to the main login page
 * if you enrolled via SMS, you should not be able to remove that
   SMS from your profile
 * there should not be a reset MFA link on a user page if they
   haven't enrolled
 * test a login or required enrollment sequence with CAS and/or SAML

Change-Id: I692de7405bf7ca023183e717930ee940ccf0d5e6
Reviewed-on: https://gerrit.instructure.com/12700
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Brian Palmer <brianp@instructure.com>
2012-08-16 13:09:07 -06:00
Cody Cutrer 97d6a4db39 update net-ldap gem fixes #3500
test plan:
 * set up an LDAP search filter like
 (&(!(userAccountControl:1.2.840.113556.1.4.803:=2))(sAMAccountName={{login}}))
   and ensure you don't get a page error trying to log in

Change-Id: I7b431783f646cbdaf2b1c78778a05224e9c88183
Reviewed-on: https://gerrit.instructure.com/12913
Reviewed-by: Cody Cutrer <cody@instructure.com>
Tested-by: Cody Cutrer <cody@instructure.com>
2012-08-16 10:18:34 -06:00
Jeremy Stanley 290be02cc4 update ruby-saml to validate saml assertions with libxmlsec1
fixes #9634

test plan:
 * saml should still work
 * some problematic SAML IDPs (e.g., shibboleth) should now work

Change-Id: Ie4307d0bc5490af5117055b0b342f5b4e3266984
Reviewed-on: https://gerrit.instructure.com/12731
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Zach Wily <zach@instructure.com>
2012-08-07 12:10:24 -06:00
Brian Palmer 426fcd241c track request timing and error reports with statsd
Adds an infrastructure for using statsd (configured with
config/statsd.yml) and uses it to track a few basic stats. Stat names
are appended with the hostname.

test plan: without statsd enabled, make sure no errors are raised when
doing requests. add a statsd.yml configuration, restart the server, and
verify that stats are sent over UDP to the given host/port (this could
even be checked without statsd available, by monitoring UDP traffic)

Change-Id: Ie8c3ece7e08ff48616ffd968069bd760300e4fd2
Reviewed-on: https://gerrit.instructure.com/12673
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Simon Williams <simon@instructure.com>
2012-08-07 08:50:49 -06:00
Brian Palmer 3e769e1a46 remove uglifier gem
This isn't currently used and won't be used in this way even once we
start using it.

Change-Id: Iba86bd4da6e7a7b08d5a73066f74994dbc667e51
Reviewed-on: https://gerrit.instructure.com/12596
Reviewed-by: Jon Jensen <jon@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
2012-07-30 14:21:53 -06:00
Brian Palmer e66fa507cf update the redis gem to 3.0.1
This required building our own fork of the redis-store gem so that we
could update its dependency, and fix one small issue with redis connect
strings getting nil instead of the default value for the port number.

The redis 3.0.x gem now catches all Errno and Timeout errors and
re-raises them as subclasses of Redis::BaseConnectionError. It also now
handles EAGAIN internally, retrying when appropriate. So we've modified
our redis failure handling code to match.

test plan: verify the redis failure handling code still works (specs
pass). for instance, stop redis locally and see that canvas works in the
degraded state. make sure that redis still works for both caching and
non-caching code such as login attempts.

Change-Id: I9e8d3929afa06c522656d30f71efc0427e4ef7cc
Reviewed-on: https://gerrit.instructure.com/11521
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Cody Cutrer <cody@instructure.com>
2012-07-10 09:42:44 -06:00
Jake Sorce c174ed7c89 spec: upgrade selenium web driver and server to 2.24
also upgrade firefox to 13.0.1

Change-Id: I8275010953fed253ea15e6c5bee83f459f16addd
Reviewed-on: https://gerrit.instructure.com/11998
Reviewed-by: Jake Sorce <jake@instructure.com>
Tested-by: Jake Sorce <jake@instructure.com>
2012-07-02 13:10:37 -06:00
Ryan Shaw 8ed9ada2fc pin bootstrap-sass gem
Change-Id: I5cac81b774160e034a88ff1f93bcff5fffcd5ec5
2012-06-26 10:22:31 -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
Jeremy Stanley 3dd2888e2e update ruby-saml-mod; fixes #8936
test plan:
 - set up saml endpoint with query parameter
   (e.g., http://example.com/logout?param=foo)
 - make sure we don't duplicate the question mark when forwarding
   e.g., we should go to
    http://example.com/logout?param=foo&SAMLRequest=...
   instead of
    http://example.com/logout?param=foo?SAMLRequest=...

Change-Id: Ica7f29f45364a5edc95bb8566f891c910731fcdb
Reviewed-on: https://gerrit.instructure.com/11703
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Cody Cutrer <cody@instructure.com>
2012-06-20 14:23:57 -06:00
Cameron Matheson 665d295ce7 Merge branch 'master' into dev/fft
Conflicts:
	Gemfile
	app/controllers/courses_controller.rb

Change-Id: Ie01f68d5ab6f02e3a581d70adf674f222b88574b
2012-06-18 15:24:09 -06:00
Ryan Shaw 0c28d6e68b there are no 'new' styles, take 2
Change-Id: I852836e112732a8e1b78a971f3ecf4ab7af49990
2012-06-13 13:58:19 -06:00
Brian Palmer 9e396136cd make a separate i18n_tools gem group
This way the i18n:generate rake task can be run from production
environments as well

test plan: run rake i18n:generate, it should still output the new yml
file as before.

Change-Id: I17104686e5c7de3bacbfae9d164a9709182e2499
Reviewed-on: https://gerrit.instructure.com/11557
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Jon Jensen <jon@instructure.com>
2012-06-13 09:42:42 -06:00
Brian Palmer cd1e6e3607 pin the guard gem to 1.0.3
The new 1.1.x series throws a ton of warnings

Change-Id: Icae6554dc192241678a08d279c8c9967cd762603
Reviewed-on: https://gerrit.instructure.com/11508
Reviewed-by: Cameron Matheson <cameron@instructure.com>
Tested-by: Brian Palmer <brianp@instructure.com>
2012-06-12 12:18:23 -06:00
Jon Jensen b61331effb Merge remote-tracking branch 'origin/master' into dev/fft
Conflicts:
	app/models/group.rb
	spec/selenium/profile_spec.rb

Change-Id: Ifbe09f50e90756a965d532f098f94c700225fc20
2012-06-06 15:14:35 -06:00
Jake Sorce 31fa2e6cb6 spec: upgrade selenium webdriver gem to version 2.22.2
Change-Id: I1c90e41ae6b813cabd20b2f2f4aeff563d139afb
Reviewed-on: https://gerrit.instructure.com/11357
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Bryan Madsen <bryan@instructure.com>
2012-06-06 10:31:46 -06:00
Zach Wily 544a0bab97 Merge branch 'master' into dev/fft 2012-06-05 12:34:35 -06:00
Jake Sorce 1b4c421279 spec: upgrade selenium webdriver gem to version 2.22.1
Change-Id: I938b17319de7280696b71780cae81a2082956836
Reviewed-on: https://gerrit.instructure.com/11222
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Bryan Madsen <bryan@instructure.com>
2012-06-01 15:04:28 -06:00
Jon Jensen 7322030773 Merge remote-tracking branch 'origin/master' into dev/fft 2012-06-01 10:57:32 -06:00
Jake Sorce 1a4359309e spec: upgrade selenium webdriver to version 2.22
Change-Id: If4e90390e12be1037f3a188dfa571b9ea12fdd92
Reviewed-on: https://gerrit.instructure.com/11124
Reviewed-by: Jake Sorce <jake@instructure.com>
Tested-by: Jake Sorce <jake@instructure.com>
2012-06-01 08:52:11 -06:00
Ryan Shaw 20a95333d0 add a way to create test bookmarklets
Change-Id: Ib1abff9d0fe512df42596c66ad82dbb75553f034
2012-05-23 17:06:10 -06:00
Cody Cutrer 8550336b1b update encrypted_cookie_store to 1.0.1
test plan:
 * wait for your session to expire, and refresh the page
 * it shouldn't page error

Change-Id: Ic2c8f3f26dfd14dc5cf98d180ba9b233c37d04d9
Reviewed-on: https://gerrit.instructure.com/10901
Reviewed-by: Brian Palmer <brianp@instructure.com>
Tested-by: Brian Palmer <brianp@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
2012-05-21 12:36:02 -06:00
Brian Palmer 9ff857f5b0 link_data endpoint for canvas collections
Canvas will use this to pull the data about a link before creating a
collection item (currently uses embed.ly)

test plan: not possible to test this through the UI yet

Change-Id: Ie248be4081871aa3aa747510d96edc3c7cc3a0a6
Reviewed-on: https://gerrit.instructure.com/10777
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Ryan Shaw <ryan@instructure.com>
2012-05-21 10:35:31 -06:00
Cody Cutrer 77ac562f97 encrypted/compressed/expiring cookie session store
test plan:
 * log in
 * accept a course invitation
 * add google docs to your profile
 * everything should work, including flash notices
 * if you keep refreshing the same page, the server should only send
   the cookie once every five minutes
 * if you haven't visited any page in 1 day, and you click go back,
   you should be logged out

Change-Id: Iee283829f6d81b241b87a50ae0e8fa18c051b89a
Reviewed-on: https://gerrit.instructure.com/10632
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Brian Palmer <brianp@instructure.com>
2012-05-17 17:12:41 -06:00
Zach Wily 6ebf3e03f5 upgrade ruby-saml gem
This version fixes the case where a SAML response arrives that doesn't have a
signature around the whole thing, but has a signature in the encrypted
portion.

test plan: Set up SAML and configure it to not sign the entire response, and
to encrypt assertions. Make sure you can still log in.

Change-Id: I3306b5595b82750c344a3c4a229aff1d86bbdde6
Reviewed-on: https://gerrit.instructure.com/10735
Reviewed-by: Simon Williams <simon@instructure.com>
Tested-by: Zach Wily <zach@instructure.com>
2012-05-14 14:33:20 -06:00
Zach Wily e2d6cf8332 switch to debugger gem for 1.9
It appears that ruby-debug is mostly no longer maintained. debugger is a fork
that appears to get regular updates, for now.

Change-Id: I026dabbede9404c6fc6a505e8ff2dca19d8961d5
Reviewed-on: https://gerrit.instructure.com/10710
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Brian Palmer <brianp@instructure.com>
Reviewed-by: Cody Cutrer <cody@instructure.com>
2012-05-14 14:24:47 -06:00
Zach Wily ad6c1d8229 upgrade ruby-saml gem
The new version fixes a problem where the correct canonicalization algorithm
is not always used.

Change-Id: I2d5e93ec544dd51f0de480c0d60e9676d2c2e5e7
Reviewed-on: https://gerrit.instructure.com/10717
Reviewed-by: Jon Jensen <jon@instructure.com>
Tested-by: Zach Wily <zach@instructure.com>
2012-05-13 15:38:36 -06:00
Zach Wily 3eb5c0133e update ruby-saml gem
The updated gem fixes a problem with assertions with multiple signatures.

test plan: set up shibboleth and configure it to sign several parts of your
assertions. make sure you can use that to log into canvas. good luck. :)

Change-Id: I2cd675230ad89545b010f39dae3a9e09744d21d8
Reviewed-on: https://gerrit.instructure.com/10714
Reviewed-by: Bracken Mosbacker <bracken@instructure.com>
Tested-by: Zach Wily <zach@instructure.com>
2012-05-12 19:46:24 -06:00
Zach Wily 5433f63b29 fixes for ruby 1.9.3
* gemfile tweaks
 * removed ruby-debug (since it's broken in 1.9.3)
 * removed colons from case statements
 * turned off whiny nils for tests (they cause a 2X perf hit)
 * added utf-8 encoding markers to files with multibyte chars
 * removed an instance of calling String#map, which no longer works
 * fixed an issue in the assets file where the yaml emitter doesn't output the
   same whitespace as it did in 1.8.7
 * fix call to .map without block
 * fix yaml engine initialization for delayed jobs (was happening too late)
 * fix rspec instafail
 * fix UserProfile#id calls
 * fix ModelCache for instance_methods now returning symbols
 * fix user_spec collection not seeing the new objects
 * fix course specs where POST lines are slightly different in 1.9
 * fix utc_datetime in the time initializer

Change-Id: Ic95dda23cb910579e2828fb448323d4fc18902a2
Reviewed-on: https://gerrit.instructure.com/10705
Reviewed-by: Brian Palmer <brianp@instructure.com>
Tested-by: Zach Wily <zach@instructure.com>
2012-05-12 14:34:23 -06:00
Brian Palmer 07a3e14d3f use ruby-debug19 in ruby 1.9
also add the test-unit library for rspec in 1.9

Change-Id: I1be6d3c97421d9664cbbd46bc045b608694d1026
Reviewed-on: https://gerrit.instructure.com/5840
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Brian Palmer <brianp@instructure.com>
2012-05-12 07:07:21 -06:00
Cody Cutrer 0c004fcf64 prepare for foreign keys refs #6895
* add the foreigner gem so plugins can begin adding foreign keys
   immediately
 * add an extension to do less locking when creating foreign keys
   on postgres 9.1+
 * fix a few pieces of code that either don't properly clean up
   foreign dependencies, or create objects in the wrong order
   to maintain referential integrity
 * change the specs to truncate all tables in a single command
   for postgres (to avoid referential integrity errors; also
   slightly faster)

test plan:
  * no user visible functionality should change

Change-Id: I185e478b99fbe598d408912053c34a064aa9c461
Reviewed-on: https://gerrit.instructure.com/10580
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Brian Palmer <brianp@instructure.com>
2012-05-10 09:46:05 -06:00
Jake Sorce 450b8b6ce6 testing updating parallelized_specs gem
current revison: gem cleanup - 0.1.9

Change-Id: Iba3e69171d1c7937d56082be367ab28d5ae4dced
Reviewed-on: https://gerrit.instructure.com/10337
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Bryan Madsen <bryan@instructure.com>
2012-05-08 13:12:47 -06:00
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
Bryan Madsen a13ae7c11d update test gems
Change-Id: I73ef873dcb8e1f7f2a6816f8466740f30dd2a8c1
Reviewed-on: https://gerrit.instructure.com/5927
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Ryan Shaw <ryan@instructure.com>
2011-10-03 09:27:27 -06:00
Jacob Fugal 7dd98cb064 fix google docs integration
use src from <content> element to download, instead of constructing our
own url (fragile!). also, use https instead of http.

Change-Id: I9e2ca48558b63522bc730309d64411208ad92f9c
Reviewed-on: https://gerrit.instructure.com/5922
Reviewed-by: Zach Wily <zach@instructure.com>
Reviewed-by: Brian Palmer <brianp@instructure.com>
Tested-by: Jacob Fugal <jacob@instructure.com>
2011-09-29 16:15:58 -06:00
Ryan Shaw f9acb060ed upgrade compass to latest version
Change-Id: Idc2281df9d35ca8ec9713050fafd6bd1c32d0da3
Reviewed-on: https://gerrit.instructure.com/5851
Reviewed-by: Zach Pendleton <zachp@instructure.com>
Tested-by: Hudson <hudson@instructure.com>
2011-09-29 12:44:23 -06:00
Ryan Shaw dbe7197867 fix Gaurdfile to handle nested directories
now we can have things like
app/coffeescripts/lib/myWidget.cofffee

(also changed to regex watch pattern to get rid
of deprecation warning)

Change-Id: Ia6561dcb57215b2b1b405bcd64c43d7fd2ded85d
Reviewed-on: https://gerrit.instructure.com/5894
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Ryan Florence <ryanf@instructure.com>
2011-09-28 15:15:03 -06:00
Ryan Shaw 44089f8ea1 pin coffee-script-source so generated code is same from all devs
Change-Id: I6b7858300250c870a15aaad80a0ab686fc817509
Reviewed-on: https://gerrit.instructure.com/5893
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Ryan Florence <ryanf@instructure.com>
2011-09-28 15:14:52 -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
Bryan Madsen d259963460 enable parallelization of selenium tests
Change-Id: I2cbe3f19df3df1442a45479337607bb829b54188
Reviewed-on: https://gerrit.instructure.com/5739
Reviewed-by: Brian Palmer <brianp@instructure.com>
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Zach Wily <zach@instructure.com>
2011-09-26 15:45:35 -06:00
Zach Wily cb703c969e add some url filtering to cutycapt websnap processing
Change-Id: I2931e6d10d6b58409c1fd9fe97061d3bda7609b3
Reviewed-on: https://gerrit.instructure.com/5413
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Brian Palmer <brianp@instructure.com>
2011-09-06 14:46:14 -06:00
Bryan Madsen 381c398de0 fix broken selenium tests
Change-Id: I8363cd2fce7b79a07a7d2c2c0c629e0b585cb712
Reviewed-on: https://gerrit.instructure.com/5260
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Zach Wily <zach@instructure.com>
2011-09-01 14:51:07 -06:00
Ryan Shaw 43b89f7487 fix markdown'ed text being truncated at first newline
Change-Id: I5b095a6f1269b9a72c97bfbaacc94e5d2b4ef18d
fixes: #5342
Reviewed-on: https://gerrit.instructure.com/5158
Reviewed-by: JT Olds <jt@instructure.com>
Tested-by: Hudson <hudson@instructure.com>
2011-08-19 14:56:12 -06:00
Zach Wily cd762f4129 pin closure-compiler to 1.0.0
Change-Id: I32f600ba35c8b503aaf884357de00169730bf1d1
Reviewed-on: https://gerrit.instructure.com/5096
Reviewed-by: Brian Palmer <brianp@instructure.com>
Tested-by: Zach Wily <zach@instructure.com>
2011-08-16 10:24:11 -06:00
Brian Palmer 6583ec3e7e pin macaddr gem to 1.0.0 , 1.2.0 has a dependency issue
Change-Id: I68b4d50134a5b1113d282aef2ef4e3892a82b6c7
Reviewed-on: https://gerrit.instructure.com/5031
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Bracken Mosbacker <bracken@instructure.com>
2011-08-10 12:06:07 -06:00
Zach Wily e3f02ecb15 upgrade selenium-webdriver gem
Change-Id: I514798d7be1b0270c3a12f0e0acaf6b27abeb249
Reviewed-on: https://gerrit.instructure.com/4756
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Brian Palmer <brianp@instructure.com>
2011-07-22 09:17:33 -06:00
Brian Palmer 630200c32e support redis as well as memcache for a rails cache store
closes #4498

Change-Id: Icf29882d8c0d351574496ba0494c1d8c518a3e7f
Reviewed-on: https://gerrit.instructure.com/4580
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Zach Wily <zach@instructure.com>
2011-07-20 14:59:03 -06:00
Jon Jensen b5035fe0d4 translation import/export scripts
Change-Id: I611fff95935c77caa818386e6ade5c8636df4e75
Reviewed-on: https://gerrit.instructure.com/4685
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Cody Cutrer <cody@instructure.com>
Reviewed-by: Brian Palmer <brianp@instructure.com>
Reviewed-by: Zach Wily <zach@instructure.com>
2011-07-20 09:24:39 -06:00
Brian Palmer 6a2cc50391 document our oauth2 native app flow
next step: implement it

Change-Id: I6c6777ce046892d06048a2dcaac9a561a9fb7d3c
Reviewed-on: https://gerrit.instructure.com/4673
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Zach Wily <zach@instructure.com>
2011-07-18 22:27:24 -06:00
Brian Palmer cf75405d03 upgrade selenium-webdriver gem to 2.0.1
and add a before check to make sure that the screen size is large enough
to successfully run the specs

Change-Id: I8ea55528add155d805047347965f93c45d64a00a
Reviewed-on: https://gerrit.instructure.com/4644
Reviewed-by: Brian Palmer <brianp@instructure.com>
Tested-by: Zach Wily <zach@instructure.com>
2011-07-13 16:25:21 -06:00
Bracken Mosbacker fe43ecbe26 update saml gem to allow shiboleth logins
Change-Id: I83d013867464f18f3bee805799ea0c0a060b0512
Reviewed-on: https://gerrit.instructure.com/4352
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Brian Palmer <brianp@instructure.com>
2011-06-23 12:09:13 -06:00
Jon Jensen f544db6bc1 translation checker/extractor for rb/erb files
Change-Id: I019f701758d35d630bf39141bb283911cc483aa5
Reviewed-on: https://gerrit.instructure.com/4237
Reviewed-by: Zach Wily <zach@instructure.com>
Reviewed-by: Brian Palmer <brianp@instructure.com>
Tested-by: Hudson <hudson@instructure.com>
2011-06-17 10:30:02 -06:00