Commit Graph

14 Commits

Author SHA1 Message Date
David Taylor 6417173082
DEV: Apply syntax_tree formatting to `lib/*` 2023-01-09 12:10:19 +00:00
Sam Saffron 3af00a65e6 FIX: site settings loading default values when no db
This fixes a condition where an intermittent db connection could cause
invalid site settings to be stored

It also removes a catch all we had.

Somewhere around Rails 5 `db:create` started wanting full environment
this is a problem for Discourse since it needs to boot up data from the
db.

This removes the catch all and surgically adds a db / redis bypass to
db:create task.
2019-06-14 14:21:07 +10:00
Sam Saffron 30990006a9 DEV: enable frozen string literal on all files
This reduces chances of errors where consumers of strings mutate inputs
and reduces memory usage of the app.

Test suite passes now, but there may be some stuff left, so we will run
a few sites on a branch prior to merging
2019-05-13 09:31:32 +08:00
Sam cb824a6b33 DEV: remove all calls to SqlBuilder use DB.build instead
This is part of the migration to mini_sql, SqlBuilder.new is being
deprecated and replaced with DB.build
2018-06-20 17:53:49 +10:00
Sam 54c0aa788c FIX: db:create was failing due to site settings 2018-06-07 14:51:14 +10:00
Guo Xiang Tan ad4c25e004 PERF: Only save site setting if values have been changed. 2018-04-17 21:07:39 +08:00
Guo Xiang Tan 22a1db7b8a FIX: Make `DbProvider#table_exits?` work with multisite. 2017-08-07 16:37:42 +09:00
Guo Xiang Tan 5012d46cbd Add rubocop to our build. (#5004) 2017-07-28 10:20:09 +09:00
Régis Hanol 3ee5cea9e2 fix the build 2015-09-09 15:34:53 +02:00
Régis Hanol 9a999bfe84 FIX: ensure we never have a string when an enum is Fixnum 2015-09-09 12:59:49 +02:00
Sam 9aec32688b BUGFIX: when RTT is short likes may not appear to work
BUGFIX: site settings db provider not triggering updates
  at the correct point
2014-03-31 12:34:13 +11:00
Sam 34be27f425 table_exists should be called aggresively while it is false or nil, to avoid bootstrapping issues
don't test 1.9.3 in travis, it blows up randomly due to incorrect implementation of weak refs in 1.9.3
2013-10-30 11:02:10 +11:00
Stephan Kaag 89b621d31a Refactor update_all statements in order to prevent deprecation warnings in Rails 4 2013-07-02 18:36:47 +02:00
Sam 0b94c3c456 fix all sorts of issues with random spec order
SiteSetting no longer persisted across tests
2013-06-23 13:35:25 +10:00