Skip to content

Update to generator 5.2.1#36

Merged
pcothenet merged 15 commits intomainfrom
pc/5.0.0
Aug 30, 2021
Merged

Update to generator 5.2.1#36
pcothenet merged 15 commits intomainfrom
pc/5.0.0

Conversation

@pcothenet
Copy link
Contributor

@pcothenet pcothenet commented Aug 27, 2021

What

Generated by https://github.com/patch-technology/client-code-generation/pull/30

Why

  • Better track each version of the SDK
  • Bring in bug fixes and performance improvements

SDK Release Checklist

  • Have you added an integration test for the changes?
  • Have you built the gem locally and made queries against it successfully?
  • Did you update the changelog?
  • Did you bump the package version?
  • For breaking changes, did you plan for the release of the new SDK versions and deploy the API to production?

Comment on lines +159 to +166
# Save response body into a file in (the defined) temporary folder, using the filename
# from the "Content-Disposition" header if provided, otherwise a random filename.
# The response body is written to the file in chunks in order to handle files which
# size is larger than maximum Ruby String or even larger than the maximum memory a Ruby
# process can use.
#
# @see Configuration#temp_folder_path
def download_file(request)
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This seems to have mostly been moved.

Note: I don't know if we should expose as is.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's only there to support the if opts[:return_type] == 'File' case. I don't think it's hurting anything and could one day be useful so I'd leave it

Comment on lines 15 to 19
require 'constants'
require 'factory_bot'

# Require shared spec examples
Dir["./spec/support/**/*.rb"].sort.each { |f| require f }
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@kleinjm switching to 5.0.0 seem to overwrite the changes you made. We would have to move them to the corresponding template.

Comment on lines -49 to 64

# Set with nullable attributes.
# List of attributes with nullable: true
def self.openapi_nullable
nullable_properties = Set.new

nullable_properties.add("timestamp")

nullable_properties.add("gas_used")

nullable_properties.add("transaction_value_eth_gwei")

nullable_properties.add("project_id")

nullable_properties.add("create_order")

nullable_properties
Set.new([
:'timestamp',
:'gas_used',
:'transaction_value_eth_gwei',
:'project_id',
:'create_order'
])
end
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This seems like a legit cleaner way to do this.

@pcothenet pcothenet changed the title Update to generator 5.0.0 Update to generator 5.2.1 Aug 27, 2021
gem 'pry-byebug'
gem 'rubocop'
gem 'factory_bot'
gem 'rubocop', '~> 0.66.0'
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is still in the lockfile thanks to the gemspec file.

@pcothenet pcothenet requested a review from kleinjm August 27, 2021 17:42
@pcothenet pcothenet marked this pull request as ready for review August 27, 2021 17:43
s.required_ruby_version = ">= 1.9"

s.add_runtime_dependency 'typhoeus', '~> 1.0', '>= 1.0.1'
s.add_runtime_dependency 'json', '~> 2.1', '>= 2.1.0'
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Contributor

@kleinjm kleinjm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not looking super closely at every file but LGTM based on how the generator is now configured. Nice work!

gem 'rake', '~> 13.0.1'
gem 'pry-byebug'
gem 'rubocop'
gem 'factory_bot'
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is factorybot a dependency of another gem? I see it's removed here but still in the lock file

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It gets added via the gemspec file (interestingly the template does not manage the Gemfile directly)

Comment on lines +159 to +166
# Save response body into a file in (the defined) temporary folder, using the filename
# from the "Content-Disposition" header if provided, otherwise a random filename.
# The response body is written to the file in chunks in order to handle files which
# size is larger than maximum Ruby String or even larger than the maximum memory a Ruby
# process can use.
#
# @see Configuration#temp_folder_path
def download_file(request)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's only there to support the if opts[:return_type] == 'File' case. I don't think it's hurting anything and could one day be useful so I'd leave it

Co-authored-by: James Klein <kleinjm007@gmail.com>
@pcothenet pcothenet merged commit 4c8f0f5 into main Aug 30, 2021
@pcothenet pcothenet deleted the pc/5.0.0 branch August 30, 2021 21:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants