Skip to content

Commit d0d3da1

Browse files
committed
Set a default brand value
1 parent 2f7db03 commit d0d3da1

File tree

3 files changed

+6
-1
lines changed

3 files changed

+6
-1
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ RpiAuth.configure do |config|
4848
config.auth_token_url = ENV.fetch('AUTH_TOKEN_URL', nil)
4949
config.auth_client_id = ENV.fetch('AUTH_CLIENT_ID', nil)
5050
config.auth_client_secret = ENV.fetch('AUTH_CLIENT_SECRET', nil)
51-
config.brand = 'brand-name'
51+
config.brand = 'raspberrypi-org'
5252
config.host_url = ENV.fetch('HOST_URL', nil)
5353
config.identity_url = ENV.fetch('IDENTITY_URL', nil)
5454
config.user_model = 'User'

lib/rpi_auth/configuration.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ class Configuration
2020
:user_model
2121

2222
def initialize
23+
@brand = 'raspberrypi-org'
2324
@bypass_auth = false
2425
@response_type = :code
2526
@client_auth_method = :basic

spec/rpi_auth/configuration_spec.rb

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,10 @@
66
let(:auth_url) { 'https://auth.com:123/' }
77
let(:auth_token_url) { 'https://internal.auth.com:456' }
88

9+
it 'sets a default value for brand' do
10+
expect(configuration.brand).to eq 'raspberrypi-org'
11+
end
12+
913
it 'sets a default value for client_auth_method' do
1014
expect(configuration.client_auth_method).to eq :basic
1115
end

0 commit comments

Comments
 (0)