Commit Graph

10 Commits

Author SHA1 Message Date
Cody Cutrer 9f36dde2c1 rails 5.1: fix a bunch of deprecation warnings
refs CORE-1196

Change-Id: Ib83beabb75153f4c18c2b5f4ebfd1426ad0f3be3
Reviewed-on: https://gerrit.instructure.com/144655
Tested-by: Jenkins
Reviewed-by: Rob Orton <rob@instructure.com>
Product-Review: Rob Orton <rob@instructure.com>
QA-Review: Rob Orton <rob@instructure.com>
2018-03-23 18:46:48 +00:00
Landon Wilkins 5ba312a04d da licença part 32
add consistent license headers to all source files
(ruby, coffeescript, javascript)

except for vendor files

Change-Id: Ibb971e1256b9ebf4ed4b50efac991472abba82fc
Reviewed-on: https://gerrit.instructure.com/110058
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 22:00:01 +00:00
Jon Jensen 2e5427203f make ModelCache a model ruby citizen, refs SD-2103
don't have it `include` itself dynamically into other classes after the
fact. this doesn't change any app behavior, but it does mostly fix the
selinimum autoload tracking in the selenium post-merge build

a recent plugin change made ConversationParticipant (and others) no longer
need to get required at startup time. so when selinimum's autoload
extensions would hide the constant and its dependencies (ModelCache) at the
end of a spec, User's add_to_caches after_create hook could go 💥 in a
subsequent spec since ModelCache was no longer in the module tree... iow,
if ModelCache is not explicitly loaded along with User, selinimum has no
way of knowing it's a dependency and will not restore it

test plan: specs

Change-Id: I8daa8b9ef5f9d7ab7ffae77a987f1b339865ea47
Reviewed-on: https://gerrit.instructure.com/102586
Tested-by: Jenkins
Reviewed-by: Landon Wilkins <lwilkins@instructure.com>
Product-Review: Landon Wilkins <lwilkins@instructure.com>
QA-Review: Landon Wilkins <lwilkins@instructure.com>
2017-02-17 23:40:55 +00:00
James Williams f23f3b0ff2 remove rails 4.0 support
Change-Id: Id1900160375644ea33badaa9d9f9185fab6b81ac
Reviewed-on: https://gerrit.instructure.com/92726
Reviewed-by: Cody Cutrer <cody@instructure.com>
Tested-by: Jenkins
Product-Review: James Williams  <jamesw@instructure.com>
QA-Review: James Williams  <jamesw@instructure.com>
2016-10-25 17:17:22 +00:00
James Williams c0ac1dfcdd rails 4.2: allow bootup
refs #CNVS-26056

Change-Id: I4a4d91c8f96a9d86646bdd14ba9ed75e365a9764
Reviewed-on: https://gerrit.instructure.com/69227
Tested-by: Jenkins
Reviewed-by: Cody Cutrer <cody@instructure.com>
Product-Review: James Williams  <jamesw@instructure.com>
QA-Review: James Williams  <jamesw@instructure.com>
2015-12-30 18:30:27 +00:00
James Williams 02d141abd2 rails4: remove dynamic matching overrides from modelcache
they were broken in rails4 because the original non-cached
method (e.g. "find_by_id") would define itself the first
time it went through the method_missing mess, undoing
all the ModelCache overrides

turns out we weren't using them anyway

refs #CNVS-21596

Change-Id: Ibd4b9c14f1312d2218420fde107ce6278d45c465
Reviewed-on: https://gerrit.instructure.com/57933
Tested-by: Jenkins
Reviewed-by: Cody Cutrer <cody@instructure.com>
Product-Review: James Williams  <jamesw@instructure.com>
QA-Review: James Williams  <jamesw@instructure.com>
2015-07-13 15:22:15 +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
Cody Cutrer 0ddad6ef86 fix model cache for rails 3
Change-Id: I642731a7bb26580bf236fd275fd8ce30565ef2eb
Reviewed-on: https://gerrit.instructure.com/29553
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Jon Willesen <jonw@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
2014-02-05 19:27:09 +00: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
Jon Jensen 4e5cf14742 faster bulk message sending, refs #7277
various tweaks to speed up bulk message sending (~75% backend runtime
reduction, for both current and stale caches. ~55% frontend runtime
reduction. ymmv). highlights:

1. lots of preloading. some vanilla rails stuff, more hand-rolled.
2. conversation model hooks to reuse existing ruby objects if requested
   (e.g. c.conversation_participants[0].conversation.equal?(c)
   when done in a ModelCache.cache block).
3. more (and better) caching. some User# methods are now cached up to a
   day (or until the user is touched).
4. various model tweaks to reduce redundant or unnecessary queries.
5. don't animate existing private conversations after the response
   comes back. for bulk private messages going out to tons of existing
   conversations, this would peg the client CPU and cause sadness.
6. defer delayed job creation

test plan:
1. run rails in production mode (so stream items and notifications
   happen in delayed jobs, otherwise it's going to be *really* slow)
2. confirm that sending a bulk private message to a lot of people (e.g.
   500) is faster
3. also confirm that nothing is broken :)

Change-Id: I92094f27ac51094a8047cb67f2cbb680a1839779
Reviewed-on: https://gerrit.instructure.com/9157
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Jacob Fugal <jacob@instructure.com>
2012-04-02 14:34:39 -06:00