mirror of
https://github.com/discourse/discourse.git
synced 2025-05-23 13:21:01 +08:00
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
This commit is contained in:

committed by
Guo Xiang Tan

parent
4e1f25197d
commit
30990006a9
@ -1,3 +1,5 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
module DiscourseNarrativeBot
|
||||
module Actions
|
||||
TIMEOUT_DURATION = 900 # 15 mins
|
||||
|
@ -1,3 +1,5 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
module DiscourseNarrativeBot
|
||||
class AdvancedUserNarrative < Base
|
||||
I18N_KEY = "discourse_narrative_bot.advanced_user_narrative".freeze
|
||||
|
@ -1,3 +1,5 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
module DiscourseNarrativeBot
|
||||
class Base
|
||||
include Actions
|
||||
|
@ -1,3 +1,5 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
module DiscourseNarrativeBot
|
||||
class CertificateGenerator
|
||||
def initialize(user, date)
|
||||
|
@ -1,3 +1,5 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
module DiscourseNarrativeBot
|
||||
class Dice
|
||||
MAXIMUM_NUM_OF_DICE = 20
|
||||
|
@ -1,3 +1,5 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
module DiscourseNarrativeBot
|
||||
class Magic8Ball
|
||||
def self.generate_answer
|
||||
|
@ -1,3 +1,5 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
require 'distributed_mutex'
|
||||
|
||||
module DiscourseNarrativeBot
|
||||
|
@ -1,3 +1,5 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
require 'excon'
|
||||
|
||||
module DiscourseNarrativeBot
|
||||
|
@ -1,3 +1,5 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
module DiscourseNarrativeBot
|
||||
class TrackSelector
|
||||
include Actions
|
||||
|
@ -1,3 +1,5 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
module DiscourseNarrativeBot
|
||||
class WelcomePostTypeSiteSetting
|
||||
def self.valid_value?(val)
|
||||
|
Reference in New Issue
Block a user