diff --git a/.env.default b/.env.default index 88aa226..b63b762 100644 --- a/.env.default +++ b/.env.default @@ -18,5 +18,4 @@ MONGO_URL='mongodb://localhost' GITHUB_URL='https://github.com' GITHUB_AUTHENTICATION=true GITHUB_ACCESS_SCOPE='[repo]' -EMAIL_DELIVERY_METHOD=sendmail DEVISE_MODULES='[database_authenticatable,recoverable,rememberable,trackable,validatable,omniauthable]' diff --git a/docs/configuration.md b/docs/configuration.md index 6257063..3815849 100644 --- a/docs/configuration.md +++ b/docs/configuration.md @@ -75,7 +75,6 @@ In order of precedence Errbit uses:
defaults to [repo]
EMAIL_DELIVERY_METHOD
:smtp or :sendmail, depending on how you want Errbit to send email -
defaults to :sendmail
SMTP_SERVER
Server address for outgoing SMTP messages
SMTP_PORT diff --git a/spec/lib/configurator_spec.rb b/spec/lib/configurator_spec.rb index 33d6b4f..74a4ce4 100644 --- a/spec/lib/configurator_spec.rb +++ b/spec/lib/configurator_spec.rb @@ -34,4 +34,28 @@ describe Configurator do }) expect(result.one).to eq('zoom') end + + it 'extracts symbol values' do + allow(ENV).to receive(:[]).with('MYSYMBOL').and_return(':asymbol') + result = Configurator.run({ mysymbol: ['MYSYMBOL'] }) + expect(result.mysymbol).to be(:asymbol) + end + + it 'extracts array values' do + allow(ENV).to receive(:[]).with('MYARRAY').and_return('[one,two,three]') + result = Configurator.run({ myarray: ['MYARRAY'] }) + expect(result.myarray).to eq(['one', 'two', 'three']) + end + + it 'extracts booleans' do + allow(ENV).to receive(:[]).with('MYBOOLEAN').and_return('true') + result = Configurator.run({ myboolean: ['MYBOOLEAN'] }) + expect(result.myboolean).to be(true) + end + + it 'extracts numbers' do + allow(ENV).to receive(:[]).with('MYNUMBER').and_return('0') + result = Configurator.run({ mynumber: ['MYNUMBER'] }) + expect(result.mynumber).to be(0) + end end -- libgit2 0.21.2