Method: Xpost::Configuration.sample_configuration

Defined in:
lib/xpost/configuration.rb

.sample_configurationObject



12
13
14
15
16
17
18
19
20
21
22
23
24
25
# File 'lib/xpost/configuration.rb', line 12

def self.sample_configuration
  api_key_line    = File.readlines('.env').first.chomp
  secret_key_line = File.readlines('.env').last.chomp
  api_key         = api_key_line.split('=').last
  secret_key      = secret_key_line.split('=').last

  sample_configuration = Xpost.configure do |config|
    config.api_key        = api_key
    config.secret_key     = secret_key
    config.staging_url    = "https://api.staging.lbcx.ph/v1"
    config.production_url = "https://api.staging.lbcx.ph/v1"
  end
  Xpost.configuration
end