-
Notifications
You must be signed in to change notification settings - Fork 2
Update gem dependencies #7
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 18 commits
759d70c
48d9fea
fd61483
6b6346c
df57020
22da276
a275c64
a4bf6db
b3ac79b
8fa8023
3fe7b0e
4a32047
10f1e48
9afc055
f38f176
586d47f
7cf84be
941ea8d
5d43d4e
7fb5e05
02d2408
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
name: Run Tests | ||
|
||
on: | ||
pull_request: | ||
branches: | ||
- main | ||
|
||
jobs: | ||
# Test on code-dot-org Ruby version | ||
test_3_0_5: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v3 | ||
|
||
- name: Set up Ruby | ||
uses: ruby/setup-ruby@v1 | ||
with: | ||
ruby-version: 3.0.5 | ||
bundler-cache: true | ||
|
||
- name: Install gems | ||
run: bundle install | ||
|
||
- name: Run tests | ||
run: bundle exec rake test | ||
|
||
#Test on latest Ruby | ||
test_3_3: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v3 | ||
|
||
- name: Set up Ruby | ||
uses: ruby/setup-ruby@v1 | ||
with: | ||
ruby-version: 3.3 | ||
bundler-cache: true | ||
|
||
- name: Install gems | ||
run: bundle install | ||
|
||
- name: Run tests | ||
run: bundle exec rake test |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
3.0.5 |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
FROM ruby:3.0.5 | ||
cat5inthecradle marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
WORKDIR /app | ||
|
||
# Copy bare minimum files to install gems | ||
COPY Gemfile aws-google.gemspec /app/ | ||
COPY lib /app/lib | ||
RUN bundle install |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
version: '3' | ||
services: | ||
ruby: | ||
build: . | ||
volumes: | ||
- .:/app | ||
working_dir: /app | ||
command: bash |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -83,9 +83,9 @@ | |
it 'refreshes expired Google auth token credentials' do | ||
m = mock | ||
m.stubs(:refresh!) | ||
m.stubs(:id_token). | ||
returns(JWT.encode({ email: 'email', exp: Time.now.to_i - 1 }, '')). | ||
then.returns(JWT.encode({ email: 'email' }, '')) | ||
m.stubs(:id_token) | ||
.returns(JWT.encode({ email: 'email', exp: Time.now.to_i - 1 }, '')) | ||
.then.returns(JWT.encode({ email: 'email' }, '')) | ||
Google::Auth.stubs(:get_application_default).returns(m) | ||
|
||
system.times(5) | ||
|
@@ -108,6 +108,7 @@ | |
expiration = provider.expiration | ||
_(expiration).must_equal(provider.expiration) | ||
Timecop.travel(1.5.hours.from_now) do | ||
provider.refresh! | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @Hamms The newer versions of aws-sdk-core do not automatically refresh when you check the |
||
_(expiration).wont_equal(provider.expiration) | ||
end | ||
end | ||
|
@@ -124,7 +125,7 @@ | |
Aws::Google.any_instance.expects(:refresh).never | ||
Aws::Google.new(config).credentials | ||
end | ||
|
||
it 'uses config defaults for new AWS clients' do | ||
Aws::Google.stubs(:config).returns(config) | ||
@oauth_default.once | ||
|
@@ -204,7 +205,7 @@ | |
Aws::Google.new(config).credentials | ||
end | ||
end | ||
|
||
describe 'no shared config' do | ||
before do | ||
Aws.shared_config.fresh( | ||
|
Uh oh!
There was an error while loading. Please reload this page.