(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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>