Commit Graph

270 Commits

Author SHA1 Message Date
Brian Palmer 6f9be4fd13 use Oj for parsing and serializing json requests/responses
closes CNVS-9074

In rails2, we explicitly override `render :json` to use Oj and the
ParamsParser middleware to parse with Oj.

In rails3, we enable the oj backend for ActiveSupport::JSON. However,
sadly that's not enough because of the screwy state of JSON in Rails 3
and Rails 4.0.x. So we pull in the rails-patch-json-encode gem to fix
performance. If this ends up causing issues as we continue working
toward Rails 3.2, we'll remove this gem. A good explantion of the issues
is in the README: https://github.com/GoodLife/rails-patch-json-encode

In my local (rails2) benchmarking, json response generation is 12-14x faster
*with stringify ids* enabled. It'll be slightly faster without, but
stringify is becoming the norm. json parsing is a smaller win, 2-3x
faster, but still significant enough to warrant patching ParamsParser
(said patch goes away in rails3).

test plan:
* no behavior changes are expected
* regression testing of the api, both the json responses and sending
  json to put/post requests
* regression testing of the web ui in areas that use the api and ajax
  calls

Change-Id: I632549baaa4e51dd0ee67dede911941877911102
Reviewed-on: https://gerrit.instructure.com/25458
Reviewed-by: Brian Palmer <brianp@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: August Thornton <august@instructure.com>
Product-Review: Brian Palmer <brianp@instructure.com>
2013-11-05 23:04:56 +00:00
Nathan Mills 7c213e632e bump webex to 0.3
fixes PS-799

test plan:

* you can use external emails in webex conferences

Change-Id: I3c0ec2e964c3d9861d0176e1ac18d4d2c73ee291
Reviewed-on: https://gerrit.instructure.com/25898
Tested-by: Jenkins <jenkins@instructure.com>
Product-Review: Adam Phillipps <adam@instructure.com>
QA-Review: Adam Phillipps <adam@instructure.com>
Reviewed-by: Brandon Broschinsky <brandonbr@instructure.com>
2013-11-04 23:06:23 +00:00
Nathan Mills 3c370e7a00 update to canvas_webex 0.2
refs PS-778

test plan
*webex conference should allow non latin chars

Change-Id: I5eb7eae4ec4e2012986eaca7b8e20bcbab6990f3
Reviewed-on: https://gerrit.instructure.com/25828
Product-Review: Adam Phillipps <adam@instructure.com>
QA-Review: Adam Phillipps <adam@instructure.com>
Reviewed-by: Brandon Broschinsky <brandonbr@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
2013-11-04 23:06:09 +00:00
Cody Cutrer ee1c6d2f3d update cassandra gem to enable support for 1.2/2.0
fixes CNVS-7877

Change-Id: I196c6b7dbdfbec199397a4be9ad6c701f65d4463
Reviewed-on: https://gerrit.instructure.com/25449
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Brian Palmer <brianp@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
2013-10-29 22:06:51 +00:00
Nathan Mills e099fdf432 add canvas_webex to canvas
refs PS-691

test plan
* you should be able to use webex in canvas web conferences

Change-Id: Ia4f427ca961791d178f8225000a83667731c8a39
Reviewed-on: https://gerrit.instructure.com/25630
Tested-by: Jenkins <jenkins@instructure.com>
Product-Review: Adam Phillipps <adam@instructure.com>
QA-Review: Adam Phillipps <adam@instructure.com>
Reviewed-by: Brandon Broschinsky <brandonbr@instructure.com>
2013-10-25 17:33:43 +00:00
Jacob Fugal e80504a0cb bump rails3 attempt to 3.2
fixes CNVS-8748

needed for routing_concerns. part of this includes a (required) upgrade
to mail 2.5.4, that makes some of our tweaks to it unnecessary.

test-plan:
  ensure the following still work under rails 2.3.18 (which is currently
  the default environment)
  - common cartridge export
  - internationalization
  - mail sending and processing

Change-Id: I423860d1e1e59d91068df44c0972ffb58fd5b330
Reviewed-on: https://gerrit.instructure.com/25113
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Nick Cloward <ncloward@instructure.com>
Reviewed-by: Brian Palmer <brianp@instructure.com>
QA-Review: Jeremy Putnam <jeremyp@instructure.com>
Product-Review: Jacob Fugal <jacob@instructure.com>
2013-10-15 21:18:40 +00:00
Jacob Fugal dfab0425e3 use CANVAS_RAILS2 for conditionals
rather than CANVAS_RAILS3 or Rails.version

this is to be consistent, and to reinforce that any "special" branches
are for rails 2.3 backwards compatibility while trying to target rails
3, rather than rails 3 "forwards compatibility".

Change-Id: I4494b65e3f71108a43d09032c1569c478646a828
Reviewed-on: https://gerrit.instructure.com/24998
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Brian Palmer <brianp@instructure.com>
Product-Review: Jacob Fugal <jacob@instructure.com>
QA-Review: Jacob Fugal <jacob@instructure.com>
2013-10-10 15:58:43 +00:00
Nathan Mills 00b165bbc2 udpate canvas connect gem to 0.2
refs PS-489

test plan:

adobe connect conferences should now support multiple confrences

Change-Id: I4967adf7ef8b06ede90bdc9fb06b0c07888da00f
Reviewed-on: https://gerrit.instructure.com/25061
Reviewed-by: Brandon Broschinsky <brandonbr@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Adam Phillipps <adam@instructure.com>
Product-Review: Nathan Mills <nathanm@instructure.com>
2013-10-08 21:31:46 +00:00
James Williams dc9bd7d7ee pin listen gem to fix guard
Change-Id: I1dcc4e79c15a99516921ecafc461112b4734b1c9
Reviewed-on: https://gerrit.instructure.com/25054
Reviewed-by: Bracken Mosbacker <bracken@instructure.com>
Product-Review: Bracken Mosbacker <bracken@instructure.com>
QA-Review: Bracken Mosbacker <bracken@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
2013-10-07 15:57:23 +00:00
Cody Cutrer 8e1aab51a8 upgrade shackles
fixes CNVS-8317

test plan:
 * have a separate queue config, with a slave environment that uses
   a separate host
 * in script/console, execute the following:
   * Delayed::Job.connection_pool.spec.config
   * Shackles.activate!(:slave)
   * Delayed::Job.connection_pool.spec.config
   * Shackles.activate!(:master)
   * Delayed::Job.connection_pool.spec.config
 * The config output for the first and third should be identical; for
   the second time, the host key should be the one for the slave

Change-Id: Ied6ec2bea1ff0e07a47434a5ad6d80ccd06e3bee
Reviewed-on: https://gerrit.instructure.com/24819
Reviewed-by: Jacob Fugal <jacob@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: August Thornton <august@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
2013-10-01 18:28:44 +00:00
Shawn Meredith 7a019889fa gemfile fixed to handle ruby2.0 for test
Change-Id: I4ebbaec7107859a882d8f64e1b4c4521c5b4e6ef
Reviewed-on: https://gerrit.instructure.com/24551
Tested-by: Jenkins <jenkins@instructure.com>
Product-Review: Bryan Madsen <bryan@instructure.com>
QA-Review: Bryan Madsen <bryan@instructure.com>
Reviewed-by: Brian Palmer <brianp@instructure.com>
2013-09-20 17:53:53 +00:00
Brian Palmer 86464dc7a3 user request throttling
Define the cost of a request as (user cpu + time spent in db queries),
then store that using a leaky bucket algorithm in redis. The algorithm
is slightly modified from a normal leaky bucket, see the comments in the
code.

The parameters (maximum, hwm, outflow) are configurable Settings.
Because this code path is hit on every request, I've tried to keep the
added latency to a minimum.

Uses lua scripting in redis to avoid the latency of an extra round trip
(two round trips with lua, one at the beginning of the request and one
at the end, vs at least three without lua).

closes CNVS-7008

test plan:
* Given the default params, you're not going to ever hit the throttling
  limit without making multiple requests in parallel. Normally local dev
  environments won't process parallel requests, so you'll want to tweak
  the config params.
  * Setting.set('request_throttle.hwm', '2')
  * Setting.set('request_throttle.outflow', '0.1')
* Make canvas http requests as a logged in user, and verify that after a
  few requests in quick succession, you get a 403 response. After
  waiting a second for your bucket to fall back below the threshold, you
  can make requests again.
* Do the same using the api and sending your access token in the query
  string or http auth header.
* This should work correctly with a clustered redis as well.
* If possible it'd be good to test parallel requests as well. The code
  should handle this correctly and combine the cost of the parallel
  requests, rather than stomping on the values.

Change-Id: I1fdfd4e009d81bd6525bcf45a93437f4c395f129
Reviewed-on: https://gerrit.instructure.com/24256
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Jacob Fugal <jacob@instructure.com>
QA-Review: Jeremy Putnam <jeremyp@instructure.com>
Product-Review: Brian Palmer <brianp@instructure.com>
2013-09-17 15:09:49 +00:00
Brian Palmer 7928155ea9 extract delayed_job redis lua utilities into a gem
We'd like to re-use some of this code elsewhere, and there's nothing
canvas-specific about it.

refs CNVS-7008

test plan: redis delayed job specs still pass

Change-Id: Iaa19ee60419d01bb451cccf2861a1015a7ba087a
Reviewed-on: https://gerrit.instructure.com/24255
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Jacob Fugal <jacob@instructure.com>
QA-Review: Jeremy Putnam <jeremyp@instructure.com>
Product-Review: Brian Palmer <brianp@instructure.com>
2013-09-17 15:09:38 +00:00
Shawn Meredith 45752584a1 spec: ruby gem sel upgrade
Change-Id: I45334b2801e9b97bbb97aac540a7b52d9fb269e4
Reviewed-on: https://gerrit.instructure.com/24293
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Kyle Rosenbaum <kyler@instructure.com>
Product-Review: Kyle Rosenbaum <kyler@instructure.com>
QA-Review: Kyle Rosenbaum <kyler@instructure.com>
Tested-by: Kyle Rosenbaum <kyler@instructure.com>
2013-09-12 03:23:14 +00:00
Brian Palmer eb6b0e57a6 update the regru-premailer gem
We have a fix on master that is not yet in a release gem

refs CNVS-7945

test plan: notifications should still be successfully sent in all situations,
such as replying to discussions. this new version of the gem also fixes
an issue where <img> tags weren't getting replaced with their alt text
in some situations, which is an unrelated bug "fix". this doesn't appear
to affect canvas negatively in my testing.

Change-Id: Idbf52aa006d04252b7870cd0a3208d7bdc0e20e3
Reviewed-on: https://gerrit.instructure.com/24024
Reviewed-by: Cody Cutrer <cody@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Jeremy Putnam <jeremyp@instructure.com>
Product-Review: Brian Palmer <brianp@instructure.com>
2013-09-05 14:46:15 +00:00
Kyle Rosenbaum e923cfc078 spec: change sleneium-webdriver gem version
Change-Id: Iff12e3a6147d041c965ff81c20edb9197456d2e1
Reviewed-on: https://gerrit.instructure.com/23282
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Bryan Madsen <bryan@instructure.com>
Product-Review: Bryan Madsen <bryan@instructure.com>
QA-Review: Bryan Madsen <bryan@instructure.com>
2013-08-29 19:41:14 +00:00
Shawn Meredith 20cf5eb971 parallel_exclude rake task for reruns bug
Change-Id: I27c1bb197cf40da949642339d465bafa60be4228
Reviewed-on: https://gerrit.instructure.com/23515
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Bryan Madsen <bryan@instructure.com>
Product-Review: Bryan Madsen <bryan@instructure.com>
QA-Review: Bryan Madsen <bryan@instructure.com>
2013-08-24 05:39:54 +00:00
James Williams a9ba4a6cf5 pin execjs version to 1.4.0
Change-Id: I3cafa727fccd5d1794f42387d667faabc142e769
Reviewed-on: https://gerrit.instructure.com/23544
Reviewed-by: Cody Cutrer <cody@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
Tested-by: Cody Cutrer <cody@instructure.com>
2013-08-21 15:02:59 +00:00
Brian Palmer d27f5caa31 update fake_rails3_routes to 1.0.4
fixes CNVS-7379

test plan:
1. Log in as a student who has taken quizzes and has had assignments graded.
2. On the main and course pages, try to click on an Assignment/ Quiz link under Recent Feedback
3. The links should work without error

Change-Id: I669c057add5fc14df891608054a997b33939fd0c
Reviewed-on: https://gerrit.instructure.com/23242
Reviewed-by: Simon Williams <simon@instructure.com>
QA-Review: Clare Strong <clare@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
Product-Review: Brian Palmer <brianp@instructure.com>
2013-08-12 22:21:37 +00:00
Jacob Fugal 9821b856bb bump timecop version in Gemfile
some bugfixes, esp. around timezones and DST

Change-Id: I53df7f7e8d9af38dd300828795d017df7f304a57
test-plan: N/A
Reviewed-on: https://gerrit.instructure.com/23126
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
Product-Review: Jeremy Stanley <jeremy@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Jacob Fugal <jacob@instructure.com>
2013-08-07 21:13:33 +00:00
Brian Palmer 9835a23678 switch to rails lts for continuing rails 2.3 support
closes CNVS-7093

the changelog from rails 2.3.18 is at https://github.com/makandra/rails/commits/2-3-lts
so far it's mostly packaging changes, with explict config options to opt
out of some stuff like enable_xml_parsing

test plan:
* without RAILS_LTS file, specs should pass, general regression testing
* ditto with RAILS_LTS file pointing at the private gem repo (ask for
  creds, we aren't allowed to share them publicly)

Change-Id: I3526c57ce5769dd73c84ffe8055fa084874b2bd5
Reviewed-on: https://gerrit.instructure.com/21654
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-07-31 21:43:17 +00:00
Mark Ericksen 96f02fb6d4 use newer adobe_connect gem
fixes CNVS-6734

also displays errors encountered when joining
a conference rather than leaving it unhandled

testing steps:
* a legacy conference should work to start or join
  after the update
  * prior performing the update, create a conference
    that is not yet started
  * prior performing the update, create a conference
    that has started but not yet ended
  * verify both conferences can be started or joined

* new conferences should work to create and join

* conference unique ID clashes should error gracefully
  * create a new conference, in a console, change the
    setting :meeting_url_id to be set to an existing
    meetings meeting_url_id and verify attempts to join
    it fail with a nicer error message.

  * in the console:
    c = WebConference.find [insert ID of meeting]
    c.settings[:meeting_url_id] = 'canvas-meeting-[ID of legacy meeting]'
    c.save
  * reload the conferences web page and attempt to join
    the meeting

Change-Id: I39085eba54f1cfe51335d3df5c81df1930791a8e
Reviewed-on: https://gerrit.instructure.com/22196
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Jon Willesen <jonw@instructure.com>
QA-Review: Cam Theriault <cam@instructure.com>
Product-Review: Mark Ericksen <marke@instructure.com>
2013-07-11 20:56:20 +00:00
Cody Cutrer 2362fe640d improve db level sorting
refs gh-319

if we have pg_collkey, use the current locale instead of 'root', but
only if the current locale differs (so pg can still use the index
as much as possible)

test plan:
 * add three users to a course, named "n", "na", and "ñ"
 * set your language to English
 * the people page of the course should sort as "n", "ñ",
   "na"
 * set your language to Spanish
 * the people page of the course should sort as "n", "na",
   "ñ"

Change-Id: Id01be92cb2dc103cc5f9e651da43cba6597bab22
Reviewed-on: https://gerrit.instructure.com/21648
Reviewed-by: Jacob Fugal <jacob@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Jeremy Putnam <jeremyp@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
2013-07-01 20:39:57 +00:00
Cody Cutrer 72773303a4 remove mysql gem
mysql2 is required now

Change-Id: I71ef9d713df2d52b16c7b0f53c436d11594325df
Reviewed-on: https://gerrit.instructure.com/21810
Reviewed-by: Brian Palmer <brianp@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
2013-06-27 21:25:50 +00:00
Brian Palmer d2bbc3e0be integrate fake_rails3_routes
This allows us to upgrade our routes file to rails 3 syntax while still
staying compatible with rails 2.3

refs CNVS-5146

test plan:

This affects literally every URL in Canvas, but shouldn't introduce any
new behavior. The automated integration and selenium tests still pass,
which is a good smoke test. Other than that, it's really just making
sure that routes are generated and recognized as before (regression
testing).

Change-Id: I443d006e3fcb5a0a0f8d6db46a8873a498ae7fd4
Reviewed-on: https://gerrit.instructure.com/21729
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-06-26 21:22:20 +00:00
Brian Palmer 89ec89930c rails3 fixes
* disable i18nema until we're on rails 3.2
* fix how we access session_options
* fix how we access the basic auth header
* fix attachment_fu callbacks

test plan: none of these fixes should affect rails 2

Change-Id: I7f9b6f18c04d51284ec3e5e9fdd39fb93539c91b
Reviewed-on: https://gerrit.instructure.com/21728
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-06-26 20:22:26 +00:00
Shawn Meredith 236af51a50 spec: gem simplecov install handling
Change-Id: I0ac8a1bf9d984198133d4cd0e7146949e1c4459e
Reviewed-on: https://gerrit.instructure.com/21534
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Bryan Madsen <bryan@instructure.com>
Product-Review: Bryan Madsen <bryan@instructure.com>
QA-Review: Bryan Madsen <bryan@instructure.com>
2013-06-26 17:25:56 +00:00
Cody Cutrer 772af74638 update rake
Change-Id: Ifc75eeee31fceee17e5c7f944b36dcff147d3424
Reviewed-on: https://gerrit.instructure.com/21740
Reviewed-by: Brian Palmer <brianp@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
2013-06-26 00:59:34 +00:00
Shawn Meredith 8dacc21cd7 paragem update directory and asset management issues
Change-Id: I65e0e796efbb7dce4154e064c78e0c0b83abee55
Reviewed-on: https://gerrit.instructure.com/21313
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Bryan Madsen <bryan@instructure.com>
Product-Review: Bryan Madsen <bryan@instructure.com>
QA-Review: Bryan Madsen <bryan@instructure.com>
2013-06-12 18:08:40 +00:00
Jon Jensen 81e50dbc71 switch out i18n backend, closes CNVS-5938
test plan:
1. specs should pass
2. run canvas with RAILS_LOAD_ALL_LOCALES=1
3. you should be able to switch locales and see translations
4. run i18n:generate on the parent commit and on this commit, the
   resulting config/locales/generated/en.yml should be identical

Change-Id: I5164943dc6e682c663145e91d7a9791331e9b4cc
Reviewed-on: https://gerrit.instructure.com/21014
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Cody Cutrer <cody@instructure.com>
QA-Review: Marc LeGendre <marc@instructure.com>
Product-Review: Marc LeGendre <marc@instructure.com>
2013-06-06 18:11:28 +00:00
Ryan Shaw f7bf153ae3 use sass for jammit css compression, no more java!
jammit can use sass to minify css.  this is great
because now we don't need the yui-compressor.
which means that we don't need java.

Change-Id: I22d0f35340077a866ffe1000443bc5a061a9e613
Reviewed-on: https://gerrit.instructure.com/11588
Reviewed-by: Cody Cutrer <cody@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
Reviewed-by: Jacob Fugal <jacob@instructure.com>
Product-Review: Bryan Madsen <bryan@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
2013-06-04 18:25:56 +00:00
Brian Palmer b00422f01b update the json gem
this removes some deprecation warnings

Change-Id: If593236c67620c6e9126130128c38ed2564656bc
Reviewed-on: https://gerrit.instructure.com/21070
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-05-31 16:12:12 +00:00
Shawn Meredith e3c113c640 simplecov implementation
Change-Id: I8528b62abce60e25777f5c5210c6e38a6d809455
Reviewed-on: https://gerrit.instructure.com/20882
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Bryan Madsen <bryan@instructure.com>
Product-Review: Bryan Madsen <bryan@instructure.com>
QA-Review: Bryan Madsen <bryan@instructure.com>
2013-05-30 17:30:45 +00:00
Zach Pendleton 5ff7d55ef0 bump canvas_connect to 0.1.0.
test plan:
  * create and join an adobe connect conference; verify
    that it works as expected.

Change-Id: I30a1748e4c04da478bfbe8ddde2802efa90022df
Reviewed-on: https://gerrit.instructure.com/20512
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Joel Hough <joel@instructure.com>
Product-Review: Marc LeGendre <marc@instructure.com>
QA-Review: Marc LeGendre <marc@instructure.com>
2013-05-10 20:57:34 +00:00
Eric Berry ee59a60e66 resolved html emails including html tags
fixes CNVS-5493

test steps:

Trigger the following emails and ensure that the HTML and plain text
versions of the email appear proper.

* conversation message received
* new announcement
* new discussion entry
* new discussion topic
* updated wiki page
* summary (daily or weekly)

Change-Id: I9638badb500eeb6cb23e4a83bd8395cd5dc40608
Reviewed-on: https://gerrit.instructure.com/20296
Reviewed-by: Jon Jensen <jon@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
Product-Review: Eric Berry <ericb@instructure.com>
QA-Review: Eric Berry <ericb@instructure.com>
2013-05-10 16:48:50 +00:00
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