Skip to content
Permalink
Browse files

Add logging to gemfile to fix specs (#707)

* Add logging to gemfile to fix specs
* Get rid of huge puts in the generator test that was overwhelming travis
* Fix HTTP tests by making the new Signet::RemoteServerError retriable
  • Loading branch information...
dazuma committed Aug 22, 2018
1 parent 24be95a commit 406fcb00326cecf57d4df650b059b4dd5ff00f1f
Showing with 5 additions and 3 deletions.
  1. +1 −0 .gitignore
  2. +1 −0 Gemfile
  3. +1 −1 lib/google/apis/core/http_command.rb
  4. +2 −2 spec/google/apis/generator/generator_spec.rb
@@ -12,6 +12,7 @@ specdoc
wiki
.google-api.yaml
*.log
tmp/

#IntelliJ
.idea
@@ -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
@@ -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?
@@ -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|

0 comments on commit 406fcb0

Please sign in to comment.
You can’t perform that action at this time.