Class: Kybus::CLI::Bot::Config::ConfigDefaultGenerator
- Inherits:
-
FileProvider
- Object
- FileProvider
- Kybus::CLI::Bot::Config::ConfigDefaultGenerator
show all
- Defined in:
- lib/kybus/cli/bot/file_providers/config_default_generator.rb
Constant Summary
collapse
- DB_CONFIGS =
{
'sequel' => <<~SEQUEL.chomp,
'dynamoid' => <<~DYNAMOID.chomp
name: json
storage: ./storage
DYNAMOID
}.freeze
Instance Method Summary
collapse
autoregister!, #bot_name, #bot_name_class, #bot_name_constantize, #bot_name_snake_case, #generate, #initialize, #skip_file?
Instance Method Details
#keep_files ⇒ Object
26
27
28
|
# File 'lib/kybus/cli/bot/file_providers/config_default_generator.rb', line 26
def keep_files
['models/migrations/.keep']
end
|
#make_contents ⇒ Object
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
|
# File 'lib/kybus/cli/bot/file_providers/config_default_generator.rb', line 30
def make_contents
<<~YAML + db_config.gsub('${bot_name_snake_case}', bot_name_snake_case)
logger:
stdout: yes
severity: debug
bots:
main:
pool_size: 1
inline_args: true
provider:
name: REPLACE_ME
token: REPLACE_ME
debug: true
state_repository:
YAML
end
|
#saving_path ⇒ Object
22
23
24
|
# File 'lib/kybus/cli/bot/file_providers/config_default_generator.rb', line 22
def saving_path
'config/config.default.yaml'
end
|