Skip to content

Commit

Permalink
Merge pull request #660 from Crown-Commercial-Service/dependabot/bund…
Browse files Browse the repository at this point in the history
…ler/dotenv-rails-3.1.0
  • Loading branch information
dependabot[bot] authored Mar 12, 2024
2 parents 990c320 + 361c3ef commit 6ba5503
Show file tree
Hide file tree
Showing 10 changed files with 33 additions and 17 deletions.
2 changes: 1 addition & 1 deletion Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ gem 'ccs-frontend_helpers', '~> 0.1.2'
group :development, :test do
# Call 'byebug' anywhere in the code to stop execution and get a debugger console
gem 'byebug', '~> 11.1.3', platforms: %i[mri mingw x64_mingw]
gem 'dotenv-rails', '~> 2.8.1', '>= 2.8.1'
gem 'dotenv-rails', '~> 3.1.0'
gem 'i18n-tasks', '~> 1.0.13'
gem 'rspec-rails', '~> 6.1.1'
gem 'rubocop', '~> 1.60.2'
Expand Down
14 changes: 7 additions & 7 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -137,10 +137,10 @@ GEM
docile (1.4.0)
domain_name (0.5.20190701)
unf (>= 0.0.5, < 1.0.0)
dotenv (2.8.1)
dotenv-rails (2.8.1)
dotenv (= 2.8.1)
railties (>= 3.2)
dotenv (3.1.0)
dotenv-rails (3.1.0)
dotenv (= 3.1.0)
railties (>= 6.1)
drb (2.2.1)
erubi (1.12.0)
et-orbi (1.2.7)
Expand All @@ -155,7 +155,7 @@ GEM
http-accept (1.7.0)
http-cookie (1.0.3)
domain_name (~> 0.5)
i18n (1.14.1)
i18n (1.14.4)
concurrent-ruby (~> 1.0)
i18n-tasks (1.0.13)
activesupport (>= 4.0.2)
Expand All @@ -169,7 +169,7 @@ GEM
rainbow (>= 2.2.2, < 4.0)
terminal-table (>= 1.5.1)
io-console (0.7.2)
irb (1.11.2)
irb (1.12.0)
rdoc
reline (>= 0.4.2)
jbuilder (2.11.5)
Expand Down Expand Up @@ -397,7 +397,7 @@ DEPENDENCIES
byebug (~> 11.1.3)
canonical-rails!
ccs-frontend_helpers (~> 0.1.2)
dotenv-rails (~> 2.8.1, >= 2.8.1)
dotenv-rails (~> 3.1.0)
i18n-tasks (~> 1.0.13)
jbuilder (~> 2.11, >= 2.11.5)
jwt (~> 2.7.1)
Expand Down
3 changes: 2 additions & 1 deletion spec/services/cognito/common_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@
let(:result) { described_class.build_secret_hash('[email protected]') }

before do
stub_const('ENV', { 'COGNITO_CLIENT_SECRET' => cognito_client_secret, 'COGNITO_CLIENT_ID' => cognito_client_id })
ENV['COGNITO_CLIENT_SECRET'] = cognito_client_secret
ENV['COGNITO_CLIENT_ID'] = cognito_client_id
end

it 'creates the same secret hash every time' do
Expand Down
4 changes: 3 additions & 1 deletion spec/services/cognito/confirm_password_reset_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,9 @@
let(:attribute_type) { double }

before do
stub_const('ENV', { 'COGNITO_AWS_REGION' => 'supersecretregion', 'COGNITO_CLIENT_SECRET' => 'supersecretkey1', 'COGNITO_CLIENT_ID' => 'supersecretkey2' })
ENV['COGNITO_AWS_REGION'] = 'supersecretregion'
ENV['COGNITO_CLIENT_SECRET'] = 'supersecretkey1'
ENV['COGNITO_CLIENT_ID'] = 'supersecretkey2'
allow(Aws::CognitoIdentityProvider::Client).to receive(:new).with(region: 'supersecretregion').and_return(client)
allow(client).to receive(:admin_get_user).and_return(cognito_user)
allow(cognito_user).to receive(:user_attributes).and_return([attribute_type])
Expand Down
4 changes: 3 additions & 1 deletion spec/services/cognito/confirm_sign_up_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,9 @@
let(:client) { instance_double(Aws::CognitoIdentityProvider::Client) }

before do
stub_const('ENV', { 'COGNITO_AWS_REGION' => 'supersecretregion', 'COGNITO_CLIENT_SECRET' => 'supersecretkey1', 'COGNITO_CLIENT_ID' => 'supersecretkey2' })
ENV['COGNITO_AWS_REGION'] = 'supersecretregion'
ENV['COGNITO_CLIENT_SECRET'] = 'supersecretkey1'
ENV['COGNITO_CLIENT_ID'] = 'supersecretkey2'
allow(Aws::CognitoIdentityProvider::Client).to receive(:new).with(region: 'supersecretregion').and_return(client)
end

Expand Down
5 changes: 4 additions & 1 deletion spec/services/cognito/create_user_from_cognito_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,10 @@
let(:client) { instance_double(Aws::CognitoIdentityProvider::Client) }

before do
stub_const('ENV', { 'COGNITO_AWS_REGION' => 'supersecretregion', 'COGNITO_CLIENT_SECRET' => 'supersecretkey1', 'COGNITO_CLIENT_ID' => 'supersecretkey2', 'COGNITO_USER_POOL_ID' => 'myuserpool' })
ENV['COGNITO_AWS_REGION'] = 'supersecretregion'
ENV['COGNITO_CLIENT_SECRET'] = 'supersecretkey1'
ENV['COGNITO_CLIENT_ID'] = 'supersecretkey2'
ENV['COGNITO_USER_POOL_ID'] = 'myuserpool'
allow(Aws::CognitoIdentityProvider::Client).to receive(:new).with(region: 'supersecretregion').and_return(client)
end

Expand Down
4 changes: 3 additions & 1 deletion spec/services/cognito/forgot_password_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,9 @@
let(:client) { instance_double(Aws::CognitoIdentityProvider::Client) }

before do
stub_const('ENV', { 'COGNITO_AWS_REGION' => 'supersecretregion', 'COGNITO_CLIENT_SECRET' => 'supersecretkey1', 'COGNITO_CLIENT_ID' => 'supersecretkey2' })
ENV['COGNITO_AWS_REGION'] = 'supersecretregion'
ENV['COGNITO_CLIENT_SECRET'] = 'supersecretkey1'
ENV['COGNITO_CLIENT_ID'] = 'supersecretkey2'
allow(Aws::CognitoIdentityProvider::Client).to receive(:new).with(region: 'supersecretregion').and_return(client)
end

Expand Down
4 changes: 3 additions & 1 deletion spec/services/cognito/resend_confirmation_code_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,9 @@
let(:client) { instance_double(Aws::CognitoIdentityProvider::Client) }

before do
stub_const('ENV', { 'COGNITO_AWS_REGION' => 'supersecretregion', 'COGNITO_CLIENT_SECRET' => 'supersecretkey1', 'COGNITO_CLIENT_ID' => 'supersecretkey2' })
ENV['COGNITO_AWS_REGION'] = 'supersecretregion'
ENV['COGNITO_CLIENT_SECRET'] = 'supersecretkey1'
ENV['COGNITO_CLIENT_ID'] = 'supersecretkey2'
allow(Aws::CognitoIdentityProvider::Client).to receive(:new).with(region: 'supersecretregion').and_return(client)
end

Expand Down
6 changes: 4 additions & 2 deletions spec/services/cognito/sign_in_user_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
let(:password) { 'password123!' }
let(:redirect_uri) { 'https://test.com' }

before { stub_const('ENV', { 'CALLBACK_URLS' => '[https://test.com]' }) }
before { ENV['CALLBACK_URLS'] = '[https://test.com]' }

describe '.valid?' do
context 'when both email and password are present' do
Expand Down Expand Up @@ -94,7 +94,9 @@
let(:client) { instance_double(Aws::CognitoIdentityProvider::Client) }

before do
stub_const('ENV', { 'COGNITO_AWS_REGION' => 'supersecretregion', 'COGNITO_CLIENT_SECRET' => 'supersecretkey1', 'COGNITO_CLIENT_ID' => 'supersecretkey2', 'CALLBACK_URLS' => '[https://test.com]' })
ENV['COGNITO_AWS_REGION'] = 'supersecretregion'
ENV['COGNITO_CLIENT_SECRET'] = 'supersecretkey1'
ENV['COGNITO_CLIENT_ID'] = 'supersecretkey2'
allow(Aws::CognitoIdentityProvider::Client).to receive(:new).with(region: 'supersecretregion').and_return(client)
end

Expand Down
4 changes: 3 additions & 1 deletion spec/services/cognito/sign_up_user_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -308,7 +308,9 @@
let(:client) { instance_double(Aws::CognitoIdentityProvider::Client) }

before do
stub_const('ENV', { 'COGNITO_AWS_REGION' => 'supersecretregion', 'COGNITO_CLIENT_SECRET' => 'supersecretkey1', 'COGNITO_CLIENT_ID' => 'supersecretkey2' })
ENV['COGNITO_AWS_REGION'] = 'supersecretregion'
ENV['COGNITO_CLIENT_SECRET'] = 'supersecretkey1'
ENV['COGNITO_CLIENT_ID'] = 'supersecretkey2'
allow(Aws::CognitoIdentityProvider::Client).to receive(:new).with(region: 'supersecretregion').and_return(client)
end

Expand Down

0 comments on commit 6ba5503

Please sign in to comment.