Commit Graph

23 Commits

Author SHA1 Message Date
Landon Wilkins 33a9e4fc1f da licença part 15
add consistent license headers to all source files
(ruby, coffeescript, javascript)

except for vendor files

Change-Id: Ibafb323bcc95d9f774b2dc2cc5ff634a2df3e77b
Reviewed-on: https://gerrit.instructure.com/110036
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:19 +00:00
James Williams 106afe5be1 fix bootup with specified redis database
(was making a call before AR connected)

catch the failure in Setting.get and return the default
but don't cache it

Change-Id: I6a184a818f6ec12e036a468d31c5d8ebfae3068c
Reviewed-on: https://gerrit.instructure.com/109703
Tested-by: Jenkins
Reviewed-by: Simon Williams <simon@instructure.com>
Product-Review: James Williams  <jamesw@instructure.com>
QA-Review: James Williams  <jamesw@instructure.com>
2017-04-26 12:38:29 +00:00
Cody Cutrer 66b12d1ced don't use attr_accessible for Setting
it's never used from a controller anyway

note: can't tag it as strong_params, since it gets used before
that helper method is added in initializers

Change-Id: I233cc1f2cf1d7bd2a0096b4fc08c0cfdf120add2
Reviewed-on: https://gerrit.instructure.com/95532
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-11-17 22:52:29 +00:00
Cody Cutrer 5d7d31eebf fix some boot up issues when the db isn't set up yet
with spring and preloading, this code can be hit before the db exists

Change-Id: I0f0efbb96ba5cbc0c2461a84ab823a14dbb38f74
Reviewed-on: https://gerrit.instructure.com/55942
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-06-11 15:16:38 +00:00
Rob Orton a406b2fd55 default settings values to strings
also add errors when not using strings

test plan
 - in console Setting.get('my_new_setting', true)
   should work and return 'true'

Change-Id: I9ac3b3673ba13939c0bb9a18c86cb0d11eb63cb7
Reviewed-on: https://gerrit.instructure.com/53483
Tested-by: Jenkins
Reviewed-by: Cody Cutrer <cody@instructure.com>
QA-Review: August Thornton <august@instructure.com>
Product-Review: Rob Orton <rob@instructure.com>
2015-05-07 21:24:54 +00:00
Cody Cutrer 102fdfc849 no more dynamic finders (models)
refs CNVS-15126

Change-Id: I2996e0e262c41274c34d0ea3bfde757074416b8c
Reviewed-on: https://gerrit.instructure.com/40973
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-09-24 20:51:48 +00:00
Cody Cutrer e25a0b71d0 no more Setting backcompat
Change-Id: I61a202b0a2427ab31f5d3ad59ae8fbd0eac79e5d
Reviewed-on: https://gerrit.instructure.com/35065
Reviewed-by: Nick Cloward <ncloward@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
2014-05-27 19:20:39 +00:00
Cody Cutrer 8178266194 split yaml file loading out of Setting
refs CNVS-13024

Setting wasn't properly being initialized as unsharded because
it was loading before Switchman. The reason we need Setting before
switchman is just for yaml loading, so split that into its own
class.

Change-Id: I5456e103cb216dba2d5af4e9c20a697b468c923b
Reviewed-on: https://gerrit.instructure.com/35043
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-05-21 18:27:06 +00:00
James Williams 0a1ef82fc3 set notifications and settings as unsharded for rails 3
Change-Id: Ibbb21e3cf61b55a02af924dddb5d9836efdb257a
Reviewed-on: https://gerrit.instructure.com/29428
Reviewed-by: Cody Cutrer <cody@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
Product-Review: James Williams  <jamesw@instructure.com>
QA-Review: James Williams  <jamesw@instructure.com>
2014-02-04 14:14:05 +00:00
Cody Cutrer d935ab98b1 deprecate Setting.get_cached
now that we have SIGHUP, we were changing everything to it anyway,
so just let caching in-proc be the default

Change-Id: Id1b44722522ac9693b17695da7107c99a359d5ac
Reviewed-on: https://gerrit.instructure.com/25020
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-10-10 00:42:52 +00:00
Cody Cutrer 8a20e403cc fix Setting.from_config with no env
test plan:
 * create a sms.yml, looking like:
Alltel: message.alltel.com
 * in script/console
 * CommunicationChannel.sms_carriers should return just Alltel

Change-Id: I7af78bc56d1ff083090ec8ab93c574dbe7a6b3da
Reviewed-on: https://gerrit.instructure.com/21841
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Brian Palmer <brianp@instructure.com>
QA-Review: Jeremy Putnam <jeremyp@instructure.com>
Product-Review: Brian Palmer <brianp@instructure.com>
2013-06-28 21:18:36 +00:00
Cody Cutrer 0f237c67a7 optimize Setting.from_config
refs CNVS-6018

cache the entire file, not just for the current env

test plan:
 * canvas should still boot and stuff

Change-Id: I09068452c9bafb3b3208b49abe3d19cf9fce1e8a
Reviewed-on: https://gerrit.instructure.com/20976
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Duane Johnson <duane@instructure.com>
Reviewed-by: Brian Palmer <brianp@instructure.com>
QA-Review: Brian Palmer <brianp@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
2013-06-07 16:53:57 +00:00
Brian Palmer 77ca8ac013 remove deprecated rails constant usage
basically convert RAILS_ROOT -> Rails.root , RAILS_ENV -> Rails.env ,
RAILS_DEFAULT_LOGGER -> Rails.logger

This is necessary for rails 3

Change-Id: I138e1aa217fa8fb186d23ac09b04031c1e2b665e
Reviewed-on: https://gerrit.instructure.com/18412
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Eric Berry <ericb@instructure.com>
Reviewed-by: Cody Cutrer <cody@instructure.com>
QA-Review: Clare Hetherington <clare@instructure.com>
2013-03-11 12:14:08 -06:00
Cody Cutrer facf63b34d allow Setting.from_config files to be ERBs for test only
refs CNVS-2932

Change-Id: Ic6b025c8f78bdecdc9f1e2c31477fbe642afe278
Reviewed-on: https://gerrit.instructure.com/18101
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Brian Palmer <brianp@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
2013-02-26 16:32:18 -07:00
Brian Palmer c38aacdc61 don't error Setting.from_config on empty .yml file
test plan: create a file config/test.yml that contains nothing but
whitespace. in a console, run Setting.from_config('test') and verify nil
is returned, no error is raised.

Change-Id: Ibc276626c50ac2d719021dcec82ae02f8459df98
Reviewed-on: https://gerrit.instructure.com/13722
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Bracken Mosbacker <bracken@instructure.com>
2012-09-14 15:17:50 -06:00
Cody Cutrer 72f298bf46 a little more flexibility with cache_store config refs #10114
no user visible change

test plan:
 * smoke test with and without caching configured

Change-Id: Ia21a996988021d647e56f85cd8ce818b64001681
Reviewed-on: https://gerrit.instructure.com/13248
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Brian Palmer <brianp@instructure.com>
2012-08-28 10:55:26 -06:00
Brian Palmer ca999b70c0 Revert "query the slave for settings and Account#account_users_for"
This reverts commit acee113da4

Change-Id: Ib14805c2c024c908397bb16c52e2a2967be713ca
Reviewed-on: https://gerrit.instructure.com/13234
Tested-by: Jenkins <jenkins@instructure.com>
Tested-by: Brian Palmer <brianp@instructure.com>
Reviewed-by: Brian Palmer <brianp@instructure.com>
2012-08-26 20:44:25 -06:00
Brian Palmer acee113da4 query the slave for settings and Account#account_users_for
Change-Id: Ie423821410080c361d44faa8619ee56321e3bdbd
Reviewed-on: https://gerrit.instructure.com/13230
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Zach Wily <zach@instructure.com>
2012-08-26 19:28:17 -06:00
Jon Jensen b4f518d5f1 conversations api, closes #4753
also streamlined conversations json and made it more consistent

Change-Id: I422d9eaf5e2e8d228c184302cb2e95d2755f50d4
Reviewed-on: https://gerrit.instructure.com/5399
Reviewed-by: Brian Palmer <brianp@instructure.com>
Tested-by: Hudson <hudson@instructure.com>
2011-09-13 09:28:57 -06:00
Jon Jensen f73513f798 fix saml/cas login account scoping, closes #4973
Change-Id: Ida8a9c56979e3dceb7d1e4b4253dde838a63ce82
Reviewed-on: https://gerrit.instructure.com/4488
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Brian Palmer <brianp@instructure.com>
2011-06-29 17:46:34 -06:00
Cody Cutrer bdbebfaec8 check all models for protecting attributes refs #3847
Change-Id: I7cba6e26ad98e91723e2ccf0a28b8db79bb37b5c
Reviewed-on: https://gerrit.instructure.com/3631
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Jon Jensen <jon@instructure.com>
Reviewed-by: Brian Palmer <brianp@instructure.com>
2011-05-25 17:38:50 -06:00
Brian Palmer 17b89a1751 add support for using sendmail for outgoing mail, closes #3880
This involved some refactoring, since we were using
ActionMailer::Base.smtp_settings[:domain] for generating "From"
addresses.

Change-Id: I6cac6d48971d396a56e07314e042b63a0081a4b6
Reviewed-on: https://gerrit.instructure.com/2398
Reviewed-by: Bracken Mosbacker <bracken@instructure.com>
Tested-by: Hudson <hudson@instructure.com>
2011-02-23 08:41:50 -07:00
Brian Whitmer 8b8173dcc9 Initial commit.
closes #6988138
2011-01-31 18:57:29 -07:00