Class: TochkaCyclopsApi::Generators::InitializerGenerator

Inherits:
Rails::Generators::Base
  • Object
show all
Defined in:
lib/tochka_cyclops_api/generators/initializer_generator.rb

Instance Method Summary collapse

Instance Method Details

#create_initializer_fileObject



7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
# File 'lib/tochka_cyclops_api/generators/initializer_generator.rb', line 7

def create_initializer_file
  create_file(
    'config/initializers/tochka_cyclops_api.rb',
    <<~TOCHKA_CYCLOPS_API_INITIALIZER_TEXT
      # frozen_string_literal: true

      TochkaCyclopsApi.configure do |config|
        config.certificate = File.read() # PATH TO TOCHKA CERTIFICATE
        config.private_key = File.read() # PATH TO TOCHKA PRIVATE KEY
        config.sign_thumbprint = '' # YOUR THUMBPRINT
        config.sign_system = '' # YOUR SYSTEM
      end
    TOCHKA_CYCLOPS_API_INITIALIZER_TEXT
  )
end