Skip to content
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

Add logging to gemfile to fix specs #707

Merged
merged 3 commits into from
Aug 22, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ specdoc
wiki
.google-api.yaml
*.log
tmp/

#IntelliJ
.idea
Expand Down
1 change: 1 addition & 0 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ group :development do
gem 'os', '~> 0.9'
gem 'rmail', '~> 1.1'
gem 'redis', '~> 3.2'
gem 'logging', '~> 2.2'
end

platforms :jruby do
Expand Down
2 changes: 1 addition & 1 deletion lib/google/apis/core/http_command.rb
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ def execute(client)
# NotFound, etc
auth_tries = (try == 1 && authorization_refreshable? ? 2 : 1)
Retriable.retriable tries: auth_tries,
on: [Google::Apis::AuthorizationError, Signet::AuthorizationError],
on: [Google::Apis::AuthorizationError, Signet::AuthorizationError, Signet::RemoteServerError],
on_retry: proc { |*| refresh_authorization } do
execute_once(client).tap do |result|
if block_given?
Expand Down
4 changes: 2 additions & 2 deletions spec/google/apis/generator/generator_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,10 @@
generator = Google::Apis::Generator.new(api_names: File.join(FIXTURES_DIR, 'files', 'api_names.yaml'))
discovery = File.read(File.join(FIXTURES_DIR, 'files', 'test_api.json'))
generated_files = generator.render(discovery)
puts generator.dump_api_names
# puts generator.dump_api_names
tempdir = Dir.mktmpdir
generated_files.each do |key, content|
puts content
# puts content
path = File.join(tempdir, key)
FileUtils.mkdir_p(File.dirname(path))
File.open(path, 'w') do |f|
Expand Down