Commit Graph

59 Commits

Author SHA1 Message Date
Jacob Burroughs 55b3c879b5 Fix some rails 7.0 specs
[ignore-stage-results=Flakey Spec Catcher]

Change-Id: I969034adc9f70d7cec2e150e1e02676c0977e49a
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/293321
Reviewed-by: Aaron Ogata <aogata@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
QA-Review: Jacob Burroughs <jburroughs@instructure.com>
Product-Review: Jacob Burroughs <jburroughs@instructure.com>
2022-06-07 21:39:33 +00:00
August Thornton a906d73a94 bump debase gem for ruby 3+ compatibility
The ruby debug open source contributors have released a beta form of
debase to address Ruby 3.0.0+ compatibility. Their main goal is to
migrate from debase to the new debugging gem bundled with new ruby
versions, so it's not a priority for them to release something that
is non-beta.

See: https://github.com/ruby-debug/debase/issues/92 for more info.

flag = none

Test plan:
• `bundle install` doesn't blow up with a fresh install of Ruby 3+

Change-Id: Ib476ce0eed6a5b6a9f006d9355323857cd7db470
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/284078
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Jacob Burroughs <jburroughs@instructure.com>
QA-Review: August Thornton <august@instructure.com>
Product-Review: August Thornton <august@instructure.com>
2022-02-01 18:52:41 +00:00
Cody Cutrer c2cba46851 RuboCop: Style/StringLiterals, Style/StringLiteralsInInterpolation
[skip-stages=Flakey]

auto-corrected

Change-Id: I4a0145abfd50f126669b20f3deaeae8377bac24d
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/279535
Tested-by: Cody Cutrer <cody@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
Migration-Review: Cody Cutrer <cody@instructure.com>
Reviewed-by: Jacob Burroughs <jburroughs@instructure.com>
2021-11-25 14:03:06 +00:00
Jeremy Stanley 5e8d200f39 tweak AR_QUERY_TRACE options
* respect truthiness of AR_QUERY_TRACE env var (setting it to
  "0" or "false" turns it off)
* allow AR_QUERY_TRACE in test as well as development
* add AR_QUERY_TRACE_LEVEL option (valid values are "app", "rails",
  and "full")

Change-Id: I398b800bb42b1bc7716cf322a6e6330bfaa8955b
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/278849
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Cody Cutrer <cody@instructure.com>
Reviewed-by: Weston Dransfield <wdransfield@instructure.com>
QA-Review: Weston Dransfield <wdransfield@instructure.com>
Product-Review: Jeremy Stanley <jeremy@instructure.com>
2021-11-19 22:14:42 +00:00
Weston Dransfield 50eb12b386 Allow AR query trace in development
flag=none

Test Plan:
- Set the "AR_QUERY_TRACE" env var to "true"
- Restart Canvas
- Load a Canvas page and verify query traces
  are being logged
- Set the "AR_QUERY_TRACE_LINES" env var to some number
- Restart Canvas
- Load a Canvas page and verify the query traces
  are limited to the number you chose
- Set the "AR_QUERY_TRACE_TYPE" env var to either
  "write" or "read"
- Verify only queries of the chosen type are logged
- Verify query traces are not logged in in non-
  development environments ("test", for example)

Change-Id: I2f5f7610a71e0bbfaa80327c422fc87162a5a78b
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/278634
Product-Review: Weston Dransfield <wdransfield@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
QA-Review: Jeremy Stanley <jeremy@instructure.com>
2021-11-18 15:59:24 +00:00
Jon Scheiding 1d688efeb0 Add configurations to enable remote IDE debugging with rdebug-ide
flag=none

test plan:
- Update your .env to include docker-compose/rdebug-ide.override.yml
  in the COMPOSE_FILE variable
- Start your Docker environment
- Configure remote debugging in VS Code or RubyMine
  (see https://instructure.atlassian.net/wiki/x/BACP-w)
- Launch the remote debugger and set a breakpoint somewhere ubiquitous
  (e.g. in `ApplicationController`)
- Navigate to your local Canvas and confirm
  that your breakpoint

Change-Id: I87d7bed838e7a593201a4bfd21f911216329343b
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/270409
Reviewed-by: Cody Cutrer <cody@instructure.com>
Reviewed-by: James Butters <jbutters@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
QA-Review: Nate Armstrong <narmstrong@instructure.com>
Product-Review: Jon Scheiding <jon.scheiding@instructure.com>
2021-09-16 18:33:11 +00:00
Cody Cutrer 3629d22273 remove the env var for not including byebug gem
conditional gemfiles are generally discouraged (yes, we do it
for rails version switches, but we also redirect the lockfile
when we do so). and this shouldn't be needed anymore

Change-Id: I63839eee119a4e4c8d65bcd28e2d2f194e56656f
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/270161
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Rob Orton <rob@instructure.com>
QA-Review: Rob Orton <rob@instructure.com>
Product-Review: Rob Orton <rob@instructure.com>
2021-07-28 19:36:51 +00:00
Cody Cutrer 4e09b12caa add frozen_string_literal comment to Gemfile and Rakefile
Change-Id: I721bd841d310efb7389a232001b3d36bb8efbf0b
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/261812
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Rob Orton <rob@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
2021-03-30 17:51:26 +00:00
Aaron Ogata af2422813c use spring for rspec loading
Change-Id: I1f1a5f02d26c68e5fc0bfa9e554d6b099be61d76
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/253994
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
Reviewed-by: Jacob Burroughs <jburroughs@instructure.com>
2021-03-10 20:32:49 +00:00
Cody Cutrer e0cd137946 add (springified) binstub for rubocop
Change-Id: Iff04dbe1d24f55ff2c160df472d615cf680256dc
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/259774
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
Reviewed-by: Jacob Burroughs <jburroughs@instructure.com>
2021-03-10 20:32:21 +00:00
Simon Williams 40bdf71d41 bump some patch-level gem versions
refs FOO-1219
flag = none

test plan: specs pass

Change-Id: I44b3d4f6c5883fbc90d2aca3ec838475e675c90b
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/252868
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Rob Orton <rob@instructure.com>
QA-Review: Simon Williams <simon@instructure.com>
Product-Review: Simon Williams <simon@instructure.com>
2020-11-17 16:13:06 +00:00
Simon Williams 17a9f7c9c1 bump development gems
Change-Id: I74a20cb3d22a9377942daf50cbff03a9475ef20f
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/227282
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: James Williams <jamesw@instructure.com>
QA-Review: Simon Williams <simon@instructure.com>
Product-Review: Simon Williams <simon@instructure.com>
2020-02-21 15:41:16 +00:00
Simon Williams aa617d61a1 update development gem dependencies
byebug: https://github.com/deivid-rodriguez/byebug/blob/master/CHANGELOG.md
letter_opener: https://github.com/ryanb/letter_opener/blob/master/CHANGELOG.md
spring: https://github.com/rails/spring/blob/master/CHANGELOG.md

Change-Id: Ia98b3ea4049384737c625048883dd458d28a1862
Reviewed-on: https://gerrit.instructure.com/200494
Tested-by: Jenkins
Reviewed-by: Cody Cutrer <cody@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
2019-07-09 19:55:20 +00:00
Cody Cutrer 1a549f3240 bump byebug
Change-Id: I81d39925821da0dafcb0ef9219c35fe982f81d0f
Reviewed-on: https://gerrit.instructure.com/183443
Tested-by: Jenkins
Reviewed-by: Rob Orton <rob@instructure.com>
QA-Review: Rob Orton <rob@instructure.com>
Product-Review: Rob Orton <rob@instructure.com>
2019-03-04 17:40:59 +00:00
Simon Williams 9676afe013 bump byebug
Change-Id: Iaa1ef635c9ef7f30dc7cccf6a219cdcfe1d481c9
Reviewed-on: https://gerrit.instructure.com/145617
Reviewed-by: Cody Cutrer <cody@instructure.com>
Tested-by: Jenkins
Product-Review: Simon Williams <simon@instructure.com>
QA-Review: Simon Williams <simon@instructure.com>
2018-04-03 18:57:23 +00:00
Robert Lamb 1335088d6e spec: include 'colorize' gem in test environment
The AMI packer build runs bundle install for the rails test
environment, and tatl_tael uses the 'colorize' gem in the
canvas__linters-and-js build.

Change-Id: I51061ccc5ea8a61b8f5d4c9c16d20c8d26a23905
Reviewed-on: https://gerrit.instructure.com/144510
Tested-by: Jenkins
Reviewed-by: David Tan <dtan@instructure.com>
QA-Review: David Tan <dtan@instructure.com>
Reviewed-by: Cody Cutrer <cody@instructure.com>
Product-Review: Robert Lamb <rlamb@instructure.com>
2018-03-23 15:43:43 +00:00
Simon Williams cf712f9dd4 bump byebug
Change-Id: Iec20adc10df865aab9facff8693395027b438857
Reviewed-on: https://gerrit.instructure.com/144463
Reviewed-by: Cody Cutrer <cody@instructure.com>
Tested-by: Jenkins
Product-Review: Simon Williams <simon@instructure.com>
QA-Review: Simon Williams <simon@instructure.com>
2018-03-23 14:49:16 +00:00
Simon Williams e43732583b bump letter_opener
Change-Id: Ice1b2100ed6d8d99e9d12fafd7aaa7a6d2e04813
Reviewed-on: https://gerrit.instructure.com/139864
Tested-by: Jenkins
Reviewed-by: Rob Orton <rob@instructure.com>
Product-Review: Simon Williams <simon@instructure.com>
QA-Review: Simon Williams <simon@instructure.com>
2018-02-07 16:26:35 +00:00
Simon Williams cd8a07f05c bump byebug
Change-Id: I7fb2ef758d2aac1066b4e3ba8e5e8b9a563a9229
Reviewed-on: https://gerrit.instructure.com/139860
Tested-by: Jenkins
Reviewed-by: Cody Cutrer <cody@instructure.com>
Product-Review: Simon Williams <simon@instructure.com>
QA-Review: Simon Williams <simon@instructure.com>
2018-02-05 21:26:46 +00:00
Derek Bender c966d809aa Revert "enable better_errors for development part two"
This reverts commit ba72375012.

Change-Id: I6b086a276c00abbebbe781ec42c1a43e3f3cf8fb
Closes: CNVS-40917
Reviewed-on: https://gerrit.instructure.com/137873
Tested-by: Jenkins
Reviewed-by: Spencer Olson <solson@instructure.com>
Reviewed-by: Rob Orton <rob@instructure.com>
QA-Review: Eric Coan <ecoan@instructure.com>
Product-Review: Derek Bender <djbender@instructure.com>
2018-01-13 00:50:47 +00:00
Simon Williams b8ae202176 bump development gems
Change-Id: If914c89e87beb7d20ce171064db20bd72c5721a5
Reviewed-on: https://gerrit.instructure.com/131137
Reviewed-by: Cody Cutrer <cody@instructure.com>
Tested-by: Jenkins
Product-Review: Simon Williams <simon@instructure.com>
QA-Review: Simon Williams <simon@instructure.com>
2017-10-30 21:04:27 +00:00
Derek Bender ba72375012 enable better_errors for development part two
This re-enables better_errors with an opt in policy for
binding_of_caller (which powers the browser REPL) to safeguard
by defautl against RCE with tools like ssh, ngrok or localtunnel

The key for enabling the console is BETTER_ERRORS_ENABLE_CONSOLE
and the key for disabling better_errors altogether is
BETTER_ERRORS_DISABLE.

Docker users: set your TRUSTED_IP address in your environment
variables to access better errors in you web container.

fixes: GRADE-156

test plan:
 - by default, no live REPL console should be present when the
   error page is present (e.g. /accounts/0)
 - given BETTER_ERRORS_ENABLE_CONSOLE=true
 - the live REPL console is now present
 - given BETTER_ERRORS_DISABLE=true
 - the better errors page is not displayed (e.g. /accounts/0)

Change-Id: Ia259bc466136d678aa0b33047dda5f2aa0b3c28d
Reviewed-on: https://gerrit.instructure.com/95120
QA-Review: Keith T. Garner <kgarner@instructure.com>
Tested-by: Jenkins
Reviewed-by: Keith T. Garner <kgarner@instructure.com>
Product-Review: Keith T. Garner <kgarner@instructure.com>
2017-10-23 16:09:33 +00:00
Cody Cutrer e151b9c6f7 bump lots of minor gem versions
Change-Id: Ife54e460d9cf61890b3e3a8850686f62f2597a96
Reviewed-on: https://gerrit.instructure.com/120718
Tested-by: Jenkins
Reviewed-by: Simon Williams <simon@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
2017-07-27 22:02:15 +00:00
Landon Wilkins 8403054825 da licença part 22
add consistent license headers to all source files
(ruby, coffeescript, javascript)

except for vendor files

Change-Id: I289eec4c72b19324a049188939dc14b5965c1f25
Reviewed-on: https://gerrit.instructure.com/110044
Tested-by: Jenkins
Reviewed-by: Jon Jensen <jon@instructure.com>
Product-Review: Jon Jensen <jon@instructure.com>
QA-Review: Jon Jensen <jon@instructure.com>
2017-04-27 21:51:33 +00:00
Ryan Shaw 5b88629fe0 Remove RequireJS support
closes: CNVS-31785

test plan:
all builds should pass

Change-Id: I2925934692a3d2f115f1289d7b50cb72d8cb907f
Reviewed-on: https://gerrit.instructure.com/104492
Reviewed-by: Jon Jensen <jon@instructure.com>
Tested-by: Jenkins
QA-Review: Jeremy Putnam <jeremyp@instructure.com>
Product-Review: Ryan Shaw <ryan@instructure.com>
2017-03-13 22:10:23 +00:00
Simon Williams 320d36469d upgrade guard and pin development gems
this also upgrades our custom guard plugins to watch the correct
directories for plugins files.  they were never updated after plugins
moved from vendor/plugins to gems/plugins.

Note: there is a small inconsistency between the latest guard and latest
thor gems resulting in a warning being printed on guard startup:
  "Expected string default value for '--listen-on'; got false (boolean)"
I have a pull request open to fix this here:
  https://github.com/guard/guard/pull/862

refs CNVS-34084

test plan:
- run guard
- change files
- guard should do the right thing

Change-Id: Iffc0297a458f6261130e12c151d37ecbc38ee0ec
Reviewed-on: https://gerrit.instructure.com/98657
Tested-by: Jenkins
Reviewed-by: Rob Orton <rob@instructure.com>
Product-Review: Simon Williams <simon@instructure.com>
QA-Review: Simon Williams <simon@instructure.com>
2017-01-03 22:05:03 +00:00
Simon Williams 6862281ba6 Revert "enable better_errors for development"
This reverts commit c0e20beb55.

Change-Id: Ic8663b4c50ff15e535e3cb27af7a002502314111
Reviewed-on: https://gerrit.instructure.com/94946
Tested-by: Jenkins
Reviewed-by: Cody Cutrer <cody@instructure.com>
Product-Review: Simon Williams <simon@instructure.com>
QA-Review: Simon Williams <simon@instructure.com>
2016-11-11 18:27:52 +00:00
Derek Bender c0e20beb55 enable better_errors for development
To turn off, set DISABLE_BETTER_ERRORS ENV variable:

    export DISABLE_BETTER_ERRORS=true

To re-enable, delete or unset the DISABLE_BETTER_ERRORS ENV var.
Setting the key to false will not work.

Change-Id: Icfe3985365d7fb3c3f2d005e998807bb9614fba1
Reviewed-on: https://gerrit.instructure.com/84383
Reviewed-by: Shahbaz Javeed <sjaveed@instructure.com>
Tested-by: Jenkins
Reviewed-by: Neil Gupta <ngupta@instructure.com>
Product-Review: Keith T. Garner <kgarner@instructure.com>
QA-Review: Keith T. Garner <kgarner@instructure.com>
2016-10-14 19:09:06 +00:00
Cody Cutrer 884d611a8c Revert "bump buard and listen"
This reverts commit 1d06836be5.
2016-10-13 16:20:11 -06:00
Cody Cutrer 1d06836be5 bump buard and listen
Change-Id: Ia1d5e1458d5ac516874316bbde613c3e03a6860b
Reviewed-on: https://gerrit.instructure.com/92370
Tested-by: Jenkins
Reviewed-by: Simon Williams <simon@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
2016-10-10 18:21:27 +00:00
Cody Cutrer 095e760ad4 update spring and binstub
fixes `bin/rake css:styleguide` and gemfile confusion

Change-Id: I4f46b9fdb2e610b4ff64af49b888f33aea0cdbdb
Reviewed-on: https://gerrit.instructure.com/92163
Tested-by: Jenkins
Reviewed-by: Rob Orton <rob@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
2016-10-06 20:25:33 +00:00
Ben Rinaca a9865a0136 Add support for remote debugging
Using remote byebug means you don't have to alter the configuration of
your docker containers to get a byebug session. Also makes it possible
to byebug a running job.

This will only run byebug when the process is started outside of a TTY,
ex: in a docker container, so that we're sure we don't interfere with
byebug when running locally instead of in docker.

Also add some notes on how to use pry-remote if someone prefers pry over
byebug.

Change-Id: I38b4365ce2ab7536bf16548f26a37b951273b792
Reviewed-on: https://gerrit.instructure.com/80772
Reviewed-by: Mark Severson <markse@instructure.com>
Tested-by: Jenkins
Product-Review: Ben Rinaca <brinaca@instructure.com>
QA-Review: Ben Rinaca <brinaca@instructure.com>
2016-05-31 22:11:35 +00:00
Cody Cutrer 45df40ccb7 allow ruby 2.3
Change-Id: I83a3e44e60715d33778bbf889dc96c0dd97a1449
Reviewed-on: https://gerrit.instructure.com/69565
Reviewed-by: Rob Orton <rob@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
Tested-by: Cody Cutrer <cody@instructure.com>
2016-01-05 20:19:12 +00:00
Derek Bender d79fbdb31b Bump byebug to 8.2 for eval/threading fix
See github issue:
  https://github.com/deivid-rodriguez/byebug/issues/184

fixes CNVS-25086

Change-Id: I85f69faea659a814b7961a2bc87e0b36aea2d59e
Reviewed-on: https://gerrit.instructure.com/67251
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
Tested-by: Jenkins
Product-Review: Derek Bender <djbender@instructure.com>
QA-Review: Derek Bender <djbender@instructure.com>
2015-11-17 14:56:13 +00:00
Derek Bender 40e2d21dc7 Bump byebug, fixes CNVS-24904
Expand object by default
Version 6.0.2 had the following problem:
  https://github.com/deivid-rodriguez/byebug/issues/177

This means that in previous to this patch objects like [nil]
would print as blank lines in byebug.

Change-Id: I4ba20becd4e145dfa4f7d461dd380b72373a0898
Reviewed-on: https://gerrit.instructure.com/66724
Tested-by: Jenkins
Reviewed-by: Keith T. Garner <kgarner@instructure.com>
Product-Review: Derek Bender <djbender@instructure.com>
QA-Review: Derek Bender <djbender@instructure.com>
2015-11-09 17:33:35 +00:00
Cody Cutrer d3ba427472 bump byebug
Change-Id: Ibe63ec281c9da75cca5de04f9e21a9b94003307a
Reviewed-on: https://gerrit.instructure.com/65055
Tested-by: Jenkins
Reviewed-by: Rob Orton <rob@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
2015-10-13 09:06:01 +00:00
Cody Cutrer 0f329d3960 bump byebug
Change-Id: I17abb6888fe12ed7a703732bc78a6bdedcf4b551
Reviewed-on: https://gerrit.instructure.com/59872
Tested-by: Jenkins
Reviewed-by: Rob Orton <rob@instructure.com>
QA-Review: August Thornton <august@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
2015-08-07 16:57:45 +00:00
Ryan Shaw ddc0955bdf ensure node_modules are up-to-date for guard & compile_assets
this will do a check to make sure all the node_modules
from our package.json are up-to-date before
running rake canvas:compile_assets or guard

there have been a lot of devs lately that have
been tripped up not knowing what to do because
they needed to `npm install`

Change-Id: I7c9d0896a6d7611bf9d89672a96cb9505099fa2c
Reviewed-on: https://gerrit.instructure.com/58580
Tested-by: Jenkins
Reviewed-by: Cody Cutrer <cody@instructure.com>
QA-Review: Jeremy Putnam <jeremyp@instructure.com>
Product-Review: Ryan Shaw <ryan@instructure.com>
2015-07-16 19:17:54 +00:00
Ryan Shaw 9b5dcf918a fix problem in conversations#index
I think the problem that we were getting was because
we added guard-gulp to our development gemfile
and it maybe require's mkmf, which adds the
.with_config scope.

test plan:
* go to conversations in dev mode, it should work
* run `bundle exec guard`, it should work
* with guard running, change a coffee/js file
* guard should see the change and regenerate the appropriate file
  and you should see gulp 'rev' run.

Change-Id: Ia43e9436e19b32eb3959f6f2d9c2d8d7674aa109
Reviewed-on: https://gerrit.instructure.com/57777
Reviewed-by: Jacob Fugal <jacob@instructure.com>
Reviewed-by: Matthew Wheeler <mwheeler@instructure.com>
Reviewed-by: Cody Cutrer <cody@instructure.com>
Tested-by: Jenkins
Product-Review: Ryan Shaw <ryan@instructure.com>
QA-Review: Ryan Shaw <ryan@instructure.com>
2015-07-07 00:03:21 +00:00
Ryan Shaw 84a7192a36 A new way of doing css/sass & New Canvas Theme Editor
what this does:
* Changes the way we generate css so we are able to generate custom
  css for people that use the theme editor.
* Sets everything up so we can push all of our static assets
  (js, fonts, css, images, etc) to s3 pre-deploy and serve them
  from cloudfront. Yay! faster canvas for everyone!
* as part of that, this enables the rails asset pipeline just so we
  can use it to put md5s in our urls.  we don't use it for any of the
  coffeescript/sass/sprockets transformer stuff.
* adds a new "Theme editor" functionality (only for people that have
  have the use-new-styles feature flag turned on) where an admin for
  an account can pick their own colors/images for all the users
  at their account/school.
* when the user is done saving things in theme editor, it will,
  in a delayed job, generate all the css with against the variables
  that user specified and push it to s3 so it will be available to
  anyone else that requests it.  (the delayed job will shell
  out to a node.js executable called `brandable_css`).
* ability to pick an existing shared theme and to reset to
  blank theme. closes: CNVS-19685
* gets rid of jammit.

test plan:
(this is exaustive, so not every person has to do every step
but we should make sure at least someone does each of these things.
maybe as part of the review add a comment if you have done one of these
bulletpoints)

* before you check this out, compile all css and copy the
  public/stylsheets_compiled directory somewhere. after you check out
  this code and regenerate all the css. make sure there are no
  significant changes to the css output. (we updated the versions of
  node-sass and autoprefixer that we use so we want to make sure they
  don't change things in a way we weren't expecting)

* make sure the way we load css for handlebars templates still works.
  eg: if there is a handlebars template at
  app/views/jst/some/template.handlebars
  if there is also a scss file at
  app/stylesheets/jst/some/template.scss
  then that stylesheet should get loaded when that template is rendered

* check out the code and run migrations. browse around canvas,
  make sure css and js files load correctly as before.

* cody, jacob, or someone on queso: look at the db migrations and
  make sure everything looks good and that I am handling sharding
  correctly.
* verify that both rake canvas:compile_assets and guard, works as well
  as `node_modules/.bin/brandable_css` (note: if you have
  "node_modules/.bin" in your PATH (which you should), it will also
  work with just `brandable_css`)

* verify that passing the --watch option to
  `.bin/node_modules/brandable_css` works and picks up changes to
  sass files, images, fonts, or any other resource that goes into
  a css file. and that it only recompiles the css files that actually
  depend on that file.

* go to https://github.com/ryankshaw/brandable_css and check out the
  code there. that is what is actually doing the sass compiling

* create a config/canvas_cdn.yml file and add aws access creds and
  an s3 bucket and cdn hostname (for testing, you can use the credentials
  for instructure_uploads_engineering from
  https://gollum.instructure.com/OtherServiceTestAccounts ). for a test
  cdn hostname you can use https://diu0rq5m1weh1.cloudfront.net. that
  is a cloudfront bucket I set up on my personal account that points to
  instructure_uploads_engineering

* run rake canvas:compile_assets again, this time, at the end, you
  should see it run the assets:precompile task that puts md5s in filenames
  and, gzipps them, and copys them to public/assets.
  then you should see it run canvas:cdn:upload_to_s3
  (look at log/development.log for progress),
  which pushes everything to s3.
  closes: CNVS-17333 CNVS-17430 CNVS-17337

* try out the theme editor: turn on new styles, go to accounts/x
  (where x is the @domain root acount you are testing from) and click
  the "theme editor" button on the right side of the page.
  that should take you to a page that has the ability to pick colors/images
  on the left side and preview your changes in an iframe on the right
  closes: CNVS-19360 CNVS-20551

* test the "preview", "save", "reset", and "choose existing" functionality
  closes: CNVS-17339 CNVS-17338 CNVS-19685

* make sure that the themeeditor works both if you have
  config/canvas_cdn.yml set up and enabled as well as if you don't.
  if it is enabled, you should see it push the css for just that new
  brand config to s3 when you hit preview, and the css
  should be accessible from the cdn you configured.

Change-Id: Ie0a812d04f5eeb40e7df7e71941ff63ea51a4d22
Reviewed-on: https://gerrit.instructure.com/53873
Tested-by: Jenkins
QA-Review: Jeremy Putnam <jeremyp@instructure.com>
Reviewed-by: Jacob Fugal <jacob@instructure.com>
Product-Review: Ryan Shaw <ryan@instructure.com>
2015-07-02 22:42:18 +00:00
Cody Cutrer d892a13556 bump byebug
Change-Id: I9f6999987f472c6d00a113cf172b15b37a09172d
Reviewed-on: https://gerrit.instructure.com/53294
Tested-by: Jenkins
Reviewed-by: Ethan Vizitei <evizitei@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
2015-05-01 19:57:13 +00:00
Ethan Vizitei 1329e71c53 colorize rlint output
Change-Id: I357a15e38c454991efd556491cd8f047a07f701a
Reviewed-on: https://gerrit.instructure.com/52008
Reviewed-by: Braden Anderson <braden@instructure.com>
Product-Review: Braden Anderson <braden@instructure.com>
QA-Review: Braden Anderson <braden@instructure.com>
Tested-by: Jenkins
2015-04-10 20:13:36 +00:00
Ethan Vizitei 13f8256e92 add heavy mode and INFO on only touched lines
lets rlint only run with local changeset unless you specify "--heavy"

Also checks for whether you actually touched a line
or not before deciding an INFO comment is relevant

Change-Id: I4a960c72644dfc46aca7a51d04321711cef0850c
Reviewed-on: https://gerrit.instructure.com/51992
Reviewed-by: Jon Jensen <jon@instructure.com>
Product-Review: Ethan Vizitei <evizitei@instructure.com>
QA-Review: Ethan Vizitei <evizitei@instructure.com>
Tested-by: Ethan Vizitei <evizitei@instructure.com>
2015-04-10 16:59:07 +00:00
Cody Cutrer b078234eff don't auto-require gems that are just dependencies
we have them in the gemfile to lock them to a specific version,
but normal behavior doesn't auto-require them

also, use 1.9 hash syntax in gemfiles (_except_ _before.rb)

Change-Id: I549c2775c65d48ff23ba1358b43713965df97813
Reviewed-on: https://gerrit.instructure.com/51636
Tested-by: Jenkins
Reviewed-by: Ethan Vizitei <evizitei@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
2015-04-08 15:55:26 +00:00
Cody Cutrer 8993232f35 require released version of spring that incorporate the fix canvas needs
Change-Id: If1317a2c8376a940646a4d64767cf77f64b3d126
Reviewed-on: https://gerrit.instructure.com/48885
Tested-by: Jenkins
Reviewed-by: Rob Orton <rob@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
2015-02-18 23:04:23 +00:00
Nathan Mills a99c397662 Google Drive Collaborations & Submissions
force users to auth google drive when the plugin is enabled

Add support for google drive in collaborations and homework submissions
Everything still looks like google docs to the user.

fixes PLAT-892
fixes PLAT-893
fixes PLAT-894

Test plan:

create a google docs integration
and enable the google drive plugin
when you visit the colaborations page it should ask you to authorize canvas to use google drive

Regression test homework submissions with google doc and drive
Regression test collaborations with google doc and drive

Change-Id: I79bdbdcae915b08a19cc9a078a64b49ef5f34796
Reviewed-on: https://gerrit.instructure.com/48583
Tested-by: Jenkins
Reviewed-by: Brad Humphrey <brad@instructure.com>
QA-Review: August Thornton <august@instructure.com>
Product-Review: Brad Horrocks <bhorrocks@instructure.com>
2015-02-18 16:02:25 +00:00
Cody Cutrer 33800152fa bump columnize gem
Change-Id: Id0235ea8fcc8845099b895abc739cf613726fc88
Reviewed-on: https://gerrit.instructure.com/46950
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Rob Orton <rob@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
2015-01-12 22:30:10 +00:00
Cody Cutrer 8311ebb6c0 use bundler platform specifications for ruby 2.2
Change-Id: I14f09ef4a99d7cd5799eb97115c0d6f683957ce7
Reviewed-on: https://gerrit.instructure.com/46382
Reviewed-by: Jon Jensen <jon@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
2015-01-06 00:00:15 +00:00
Cody Cutrer 2cd0721bca bump byebug
Change-Id: I055356d527f06e04d50ac713e06466493e42c37b
Reviewed-on: https://gerrit.instructure.com/43958
Reviewed-by: Jacob Fugal <jacob@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
2014-11-06 16:32:26 +00:00
James Williams 81558f728c remove rails 2 support
closes #CNVS-14261

Change-Id: I1b0e8a4438ab659ecd1ac8462bc3559d810989b3
Reviewed-on: https://gerrit.instructure.com/38744
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>
2014-08-06 18:16:19 +00:00