Skip to content

Commit

Permalink
fix: ruby
Browse files Browse the repository at this point in the history
  • Loading branch information
loks0n committed Sep 27, 2024
1 parent 7efc532 commit d65ac93
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 9 deletions.
15 changes: 6 additions & 9 deletions templates/ruby/lib/container/client.rb.twig
Original file line number Diff line number Diff line change
Expand Up @@ -16,22 +16,20 @@ module {{ spec.title | caseUcfirst }}
'x-sdk-platform'=> '{{ sdk.platform }}',
'x-sdk-language'=> '{{ language.name | caseLower }}',
'x-sdk-version'=> '{{ sdk.version }}'{% if spec.global.defaultHeaders | length > 0 %},{% endif %}

{% for key,header in spec.global.defaultHeaders %}
{%~ for key,header in spec.global.defaultHeaders %}
'{{key}}' => '{{header}}'{% if not loop.last %},{% endif %}
{% endfor %}

{%~ endfor %}
}
@endpoint = '{{spec.endpoint}}'
end

{% for header in spec.global.headers %}
{%~ for header in spec.global.headers %}
# Set {{header.key | caseUcfirst}}
#
{% if header.description %}
{%~ if header.description %}
# {{header.description}}
#
{% endif %}
{%- endif %}
# @param [String] value The value to set for the {{ header.key }} header
#
# @return [self]
Expand All @@ -41,7 +39,7 @@ module {{ spec.title | caseUcfirst }}
self
end

{% endfor %}
{%~ endfor %}
# Set endpoint.
#
# @param [String] endpoint The endpoint to set
Expand All @@ -64,7 +62,6 @@ module {{ spec.title | caseUcfirst }}
self
end


# Add Header
#
# @param [String] key The key for the header to add
Expand Down
1 change: 1 addition & 0 deletions tests/Ruby27Test.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ class Ruby27Test extends Base
...Base::EXCEPTION_RESPONSES,
...Base::OAUTH_RESPONSES,
...Base::MULTIPART_RESPONSES,
...Base::MULTIPART_RESPONSE_FILE,
...Base::QUERY_HELPER_RESPONSES,
...Base::PERMISSION_HELPER_RESPONSES,
...Base::ID_HELPER_RESPONSES
Expand Down

0 comments on commit d65ac93

Please sign in to comment.