Remove secrets-related code

#508
This commit is contained in:
Artur Beljajev 2017-05-15 01:49:42 +03:00
parent 5c65aa5f2b
commit 0fb8e2bde1
3 changed files with 2 additions and 14 deletions

1
.gitignore vendored
View file

@ -11,7 +11,6 @@ capybara-*.html
**.orig
config/initializers/secret_token.rb
config/deploy.rb
config/secrets.yml
config/database.yml
config/application.yml
config/environments/development.rb

View file

@ -61,19 +61,9 @@ module Soap
def initialize
if self.class.username.nil?
if Rails.application.secrets.key?(:arireg)
arireg = Rails.application.secrets[:arireg].with_indifferent_access
self.class.username = arireg[:username]
self.class.password = arireg[:password]
if self.class.wsdl.nil? # no override of config/environments/* ?
self.class.wsdl = arireg[:wsdl]
self.class.host = arireg[:host]
end
else
self.class.username = ENV['arireg_username']
self.class.password = ENV['arireg_password']
end
end
if self.class.wsdl.nil?
self.class.wsdl = ENV['arireg_wsdl']
self.class.host = ENV['arireg_host']

View file

@ -92,7 +92,6 @@ restful_whois_url: 'https://restful-whois.example.com'
#
# Estonian Business Registry
#
# config/secrets.yml --- arireg: {username, password}
arireg_username: 'kasutaja'
arireg_password: 'parool'
# config/environments/production.rb --- Soap::Arireg.wsdl, Soap::Arireg.host