[Ruby] Make rake tasks required to publish gem available (#424)

* Make tasks reuired to publish gem available

https://github.com/OpenAPITools/openapi-generator/issues/423

* Update samples

- bin/ruby-petstore.sh
- bin/security/ruby-petstore.sh
This commit is contained in:
Akihito Nakano 2018-07-01 15:36:48 +09:00 committed by William Cheng
parent a02b313b89
commit 8bddf12e05
17 changed files with 246 additions and 99 deletions

View File

@ -1,3 +1,5 @@
require "bundler/gem_tasks"
begin
require 'rspec/core/rake_task'

View File

@ -1,4 +1,4 @@
# Generated by: https://github.com/swagger-api/swagger-codegen.git
# Generated by: https://openapi-generator.tech
#
*.gem

View File

@ -1 +1 @@
2.3.0-SNAPSHOT
3.1.0-SNAPSHOT

View File

@ -0,0 +1,154 @@
# This file is based on https://github.com/rails/rails/blob/master/.rubocop.yml (MIT license)
# Automatically generated by OpenAPI Generator (https://openapi-generator.tech)
AllCops:
TargetRubyVersion: 2.2
# RuboCop has a bunch of cops enabled by default. This setting tells RuboCop
# to ignore them, so only the ones explicitly set in this file are enabled.
DisabledByDefault: true
Exclude:
- '**/templates/**/*'
- '**/vendor/**/*'
- 'actionpack/lib/action_dispatch/journey/parser.rb'
# Prefer &&/|| over and/or.
Style/AndOr:
Enabled: true
# Do not use braces for hash literals when they are the last argument of a
# method call.
Style/BracesAroundHashParameters:
Enabled: true
EnforcedStyle: context_dependent
# Align `when` with `case`.
Layout/CaseIndentation:
Enabled: true
# Align comments with method definitions.
Layout/CommentIndentation:
Enabled: true
Layout/ElseAlignment:
Enabled: true
Layout/EmptyLineAfterMagicComment:
Enabled: true
# In a regular class definition, no empty lines around the body.
Layout/EmptyLinesAroundClassBody:
Enabled: true
# In a regular method definition, no empty lines around the body.
Layout/EmptyLinesAroundMethodBody:
Enabled: true
# In a regular module definition, no empty lines around the body.
Layout/EmptyLinesAroundModuleBody:
Enabled: true
Layout/FirstParameterIndentation:
Enabled: true
# Use Ruby >= 1.9 syntax for hashes. Prefer { a: :b } over { :a => :b }.
Style/HashSyntax:
Enabled: false
# Method definitions after `private` or `protected` isolated calls need one
# extra level of indentation.
Layout/IndentationConsistency:
Enabled: true
EnforcedStyle: rails
# Two spaces, no tabs (for indentation).
Layout/IndentationWidth:
Enabled: true
Layout/LeadingCommentSpace:
Enabled: true
Layout/SpaceAfterColon:
Enabled: true
Layout/SpaceAfterComma:
Enabled: true
Layout/SpaceAroundEqualsInParameterDefault:
Enabled: true
Layout/SpaceAroundKeyword:
Enabled: true
Layout/SpaceAroundOperators:
Enabled: true
Layout/SpaceBeforeComma:
Enabled: true
Layout/SpaceBeforeFirstArg:
Enabled: true
Style/DefWithParentheses:
Enabled: true
# Defining a method with parameters needs parentheses.
Style/MethodDefParentheses:
Enabled: true
Style/FrozenStringLiteralComment:
Enabled: false
EnforcedStyle: always
# Use `foo {}` not `foo{}`.
Layout/SpaceBeforeBlockBraces:
Enabled: true
# Use `foo { bar }` not `foo {bar}`.
Layout/SpaceInsideBlockBraces:
Enabled: true
# Use `{ a: 1 }` not `{a:1}`.
Layout/SpaceInsideHashLiteralBraces:
Enabled: true
Layout/SpaceInsideParens:
Enabled: true
# Check quotes usage according to lint rule below.
#Style/StringLiterals:
# Enabled: true
# EnforcedStyle: single_quotes
# Detect hard tabs, no hard tabs.
Layout/Tab:
Enabled: true
# Blank lines should not have any spaces.
Layout/TrailingBlankLines:
Enabled: true
# No trailing whitespace.
Layout/TrailingWhitespace:
Enabled: false
# Use quotes for string literals when they are enough.
Style/UnneededPercentQ:
Enabled: true
# Align `end` with the matching keyword or starting expression except for
# assignments, where it should be aligned with the LHS.
Lint/EndAlignment:
Enabled: true
EnforcedStyleAlignWith: variable
AutoCorrect: true
# Use my_method(my_arg) not my_method( my_arg ) or my_method my_arg.
Lint/RequireParentheses:
Enabled: true
Style/RedundantReturn:
Enabled: true
AllowMultipleReturnValues: true
Style/Semicolon:
Enabled: true
AllowAsExpressionSeparator: true

View File

@ -1,14 +1,14 @@
# petstore
Petstore - the Ruby gem for the Swagger Petstore */ ' \" =_end -- \\r\\n \\n \\r
Petstore - the Ruby gem for the OpenAPI Petstore */ ' \" =_end -- \\r\\n \\n \\r
This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ */ ' \" =_end --
This SDK is automatically generated by the [Swagger Codegen](https://github.com/swagger-api/swagger-codegen) project:
This SDK is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project:
- API version: 1.0.0 */ ' \" =_end -- \\r\\n \\n \\r
- Package version: 1.0.0
- Build package: io.swagger.codegen.languages.RubyClientCodegen
- Build package: org.openapitools.codegen.languages.RubyClientCodegen
## Installation
@ -55,9 +55,8 @@ Please follow the [installation](#installation) procedure and then run the follo
require 'petstore'
api_instance = Petstore::FakeApi.new
opts = {
test_code_inject____end____rn_n_r: "test_code_inject____end____rn_n_r_example" # String | To test code injection */ ' \" =_end -- \\r\\n \\n \\r
unknown_base_type: Petstore::UNKNOWN_BASE_TYPE.new # Object |
}
begin
@ -71,7 +70,7 @@ end
## Documentation for API Endpoints
All URIs are relative to *https://petstore.swagger.io */ ' \" =_end -- \\r\\n \\n \\r/v2 */ ' \" =_end -- \\r\\n \\n \\r*
All URIs are relative to *petstore.swagger.io */ ' \" =_end -- \\r\\n \\n \\r/v2 */ ' \" =_end -- \\r\\n \\n \\r*
Class | Method | HTTP request | Description
------------ | ------------- | ------------- | -------------

View File

@ -1,3 +1,5 @@
require "bundler/gem_tasks"
begin
require 'rspec/core/rake_task'

View File

@ -1,6 +1,6 @@
# Petstore::FakeApi
All URIs are relative to *https://petstore.swagger.io */ ' \" =_end -- \\r\\n \\n \\r/v2 */ ' \" =_end -- \\r\\n \\n \\r*
All URIs are relative to *petstore.swagger.io */ ' \" =_end -- \\r\\n \\n \\r/v2 */ ' \" =_end -- \\r\\n \\n \\r*
Method | HTTP request | Description
------------- | ------------- | -------------
@ -18,9 +18,8 @@ To test code injection */ ' \" =_end -- \\r\\n \\n \\r
require 'petstore'
api_instance = Petstore::FakeApi.new
opts = {
test_code_inject____end____rn_n_r: "test_code_inject____end____rn_n_r_example" # String | To test code injection */ ' \" =_end -- \\r\\n \\n \\r
unknown_base_type: Petstore::UNKNOWN_BASE_TYPE.new # Object |
}
begin
@ -35,7 +34,7 @@ end
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**test_code_inject____end____rn_n_r** | **String**| To test code injection */ ' \" =_end -- \\r\\n \\n \\r | [optional]
**unknown_base_type** | [**Object**](UNKNOWN_BASE_TYPE.md)| | [optional]
### Return type
@ -48,7 +47,7 @@ No authorization required
### HTTP request headers
- **Content-Type**: application/json, */ \" =_end --
- **Accept**: application/json, */ \" =_end --
- **Accept**: Not defined

View File

@ -1,10 +1,10 @@
#!/bin/sh
#
# Generated by: https://github.com/swagger-api/swagger-codegen.git
# Generated by: https://openapi-generator.tech
#
# ref: https://help.github.com/articles/adding-an-existing-project-to-github-using-the-command-line/
#
# Usage example: /bin/sh ./git_push.sh wing328 swagger-petstore-perl "minor update"
# Usage example: /bin/sh ./git_push.sh wing328 openapi-pestore-perl "minor update"
git_user_id=$1
git_repo_id=$2
@ -39,7 +39,7 @@ git_remote=`git remote`
if [ "$git_remote" = "" ]; then # git remote not defined
if [ "$GIT_TOKEN" = "" ]; then
echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git crediential in your environment."
echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment."
git remote add origin https://github.com/${git_user_id}/${git_repo_id}.git
else
git remote add origin https://${git_user_id}:${GIT_TOKEN}@github.com/${git_user_id}/${git_repo_id}.git

View File

@ -1,12 +1,12 @@
=begin
#Swagger Petstore */ ' \" =_end -- \\r\\n \\n \\r
#OpenAPI Petstore */ ' \" =_end -- \\r\\n \\n \\r
#This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ */ ' \" =_end --
OpenAPI spec version: 1.0.0 */ ' \" =_end -- \\r\\n \\n \\r
Contact: apiteam@swagger.io */ ' \" =_end -- \\r\\n \\n \\r
Generated by: https://github.com/swagger-api/swagger-codegen.git
Swagger Codegen version: 2.3.0-SNAPSHOT
Contact: something@something.abc */ ' \" =_end -- \\r\\n \\n \\r
Generated by: https://openapi-generator.tech
OpenAPI Generator version: 3.1.0-SNAPSHOT
=end

View File

@ -1,16 +1,16 @@
=begin
#Swagger Petstore */ ' \" =_end -- \\r\\n \\n \\r
#OpenAPI Petstore */ ' \" =_end -- \\r\\n \\n \\r
#This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ */ ' \" =_end --
OpenAPI spec version: 1.0.0 */ ' \" =_end -- \\r\\n \\n \\r
Contact: apiteam@swagger.io */ ' \" =_end -- \\r\\n \\n \\r
Generated by: https://github.com/swagger-api/swagger-codegen.git
Swagger Codegen version: 2.3.0-SNAPSHOT
Contact: something@something.abc */ ' \" =_end -- \\r\\n \\n \\r
Generated by: https://openapi-generator.tech
OpenAPI Generator version: 3.1.0-SNAPSHOT
=end
require "uri"
require 'uri'
module Petstore
class FakeApi
@ -19,45 +19,39 @@ module Petstore
def initialize(api_client = ApiClient.default)
@api_client = api_client
end
# To test code injection */ ' \" =_end -- \\r\\n \\n \\r
#
# @param [Hash] opts the optional parameters
# @option opts [String] :test_code_inject____end____rn_n_r To test code injection */ ' \" =_end -- \\r\\n \\n \\r
# @option opts [Object] :unknown_base_type
# @return [nil]
def test_code_inject____end__rn_n_r(opts = {})
test_code_inject____end__rn_n_r_with_http_info(opts)
return nil
nil
end
# To test code injection */ ' \" =_end -- \\r\\n \\n \\r
#
# @param [Hash] opts the optional parameters
# @option opts [String] :test_code_inject____end____rn_n_r To test code injection */ ' \" =_end -- \\r\\n \\n \\r
# @option opts [Object] :unknown_base_type
# @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers
def test_code_inject____end__rn_n_r_with_http_info(opts = {})
if @api_client.config.debugging
@api_client.config.logger.debug "Calling API: FakeApi.test_code_inject____end__rn_n_r ..."
@api_client.config.logger.debug 'Calling API: FakeApi.test_code_inject____end__rn_n_r ...'
end
# resource path
local_var_path = "/fake"
local_var_path = '/fake'
# query parameters
query_params = {}
# header parameters
header_params = {}
# HTTP header 'Accept' (if needed)
header_params['Accept'] = @api_client.select_header_accept(['application/json', '*/ \" =_end -- '])
# HTTP header 'Content-Type'
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json', '*/ \" =_end -- '])
# form parameters
form_params = {}
form_params["test code inject */ &#39; &quot; &#x3D;end -- \r\n \n \r"] = opts[:'test_code_inject____end____rn_n_r'] if !opts[:'test_code_inject____end____rn_n_r'].nil?
# http body (model)
post_body = nil
post_body = @api_client.object_to_http_body(opts[:'unknown_base_type'])
auth_names = []
data, status_code, headers = @api_client.call_api(:PUT, local_var_path,
:header_params => header_params,

View File

@ -1,12 +1,12 @@
=begin
#Swagger Petstore */ ' \" =_end -- \\r\\n \\n \\r
#OpenAPI Petstore */ ' \" =_end -- \\r\\n \\n \\r
#This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ */ ' \" =_end --
OpenAPI spec version: 1.0.0 */ &#39; \&quot; &#x3D;_end -- \\r\\n \\n \\r
Contact: apiteam@swagger.io */ ' \" =_end -- \\r\\n \\n \\r
Generated by: https://github.com/swagger-api/swagger-codegen.git
Swagger Codegen version: 2.3.0-SNAPSHOT
Contact: something@something.abc */ ' \" =_end -- \\r\\n \\n \\r
Generated by: https://openapi-generator.tech
OpenAPI Generator version: 3.1.0-SNAPSHOT
=end
@ -31,9 +31,9 @@ module Petstore
# @option config [Configuration] Configuration for initializing the object, default to Configuration.default
def initialize(config = Configuration.default)
@config = config
@user_agent = "Swagger-Codegen/#{VERSION}/ruby"
@user_agent = "OpenAPI-Generator/#{VERSION}/ruby"
@default_headers = {
'Content-Type' => "application/json",
'Content-Type' => 'application/json',
'User-Agent' => @user_agent
}
end
@ -137,7 +137,7 @@ module Petstore
# @param [String] mime MIME
# @return [Boolean] True if the MIME is application/json
def json_mime?(mime)
(mime == "*/*") || !(mime =~ /Application\/.*json(?!p)(;.*)?/i).nil?
(mime == '*/*') || !(mime =~ /Application\/.*json(?!p)(;.*)?/i).nil?
end
# Deserialize the response to the given return type.
@ -201,12 +201,12 @@ module Petstore
when /\AArray<(.+)>\z/
# e.g. Array<Pet>
sub_type = $1
data.map {|item| convert_to_type(item, sub_type) }
data.map { |item| convert_to_type(item, sub_type) }
when /\AHash\<String, (.+)\>\z/
# e.g. Hash<String, Integer>
sub_type = $1
{}.tap do |hash|
data.each {|k, v| hash[k] = convert_to_type(v, sub_type) }
data.each { |k, v| hash[k] = convert_to_type(v, sub_type) }
end
else
# models, e.g. Pet
@ -228,7 +228,7 @@ module Petstore
encoding = nil
request.on_headers do |response|
content_disposition = response.headers['Content-Disposition']
if content_disposition and content_disposition =~ /filename=/i
if content_disposition && content_disposition =~ /filename=/i
filename = content_disposition[/filename=['"]?([^'"\s]+)['"]?/, 1]
prefix = sanitize_filename(filename)
else
@ -314,7 +314,7 @@ module Petstore
# Sets user agent in HTTP header
#
# @param [String] user_agent User agent (e.g. swagger-codegen/ruby/1.0.0)
# @param [String] user_agent User agent (e.g. openapi-generator/ruby/1.0.0)
def user_agent=(user_agent)
@user_agent = user_agent
@default_headers['User-Agent'] = @user_agent
@ -327,7 +327,7 @@ module Petstore
return nil if accepts.nil? || accepts.empty?
# use JSON when present, otherwise use all of the provided
json_accept = accepts.find { |s| json_mime?(s) }
return json_accept || accepts.join(',')
json_accept || accepts.join(',')
end
# Return Content-Type header based on an array of content types provided.
@ -338,7 +338,7 @@ module Petstore
return 'application/json' if content_types.nil? || content_types.empty?
# use JSON when present, otherwise use the first one
json_content_type = content_types.find { |s| json_mime?(s) }
return json_content_type || content_types.first
json_content_type || content_types.first
end
# Convert object (array, hash, object, etc) to JSON string.
@ -348,7 +348,7 @@ module Petstore
return model if model.nil? || model.is_a?(String)
local_body = nil
if model.is_a?(Array)
local_body = model.map{|m| object_to_hash(m) }
local_body = model.map { |m| object_to_hash(m) }
else
local_body = object_to_hash(model)
end

View File

@ -1,12 +1,12 @@
=begin
#Swagger Petstore */ ' \" =_end -- \\r\\n \\n \\r
#OpenAPI Petstore */ ' \" =_end -- \\r\\n \\n \\r
#This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ */ ' \" =_end --
OpenAPI spec version: 1.0.0 */ &#39; \&quot; &#x3D;_end -- \\r\\n \\n \\r
Contact: apiteam@swagger.io */ ' \" =_end -- \\r\\n \\n \\r
Generated by: https://github.com/swagger-api/swagger-codegen.git
Swagger Codegen version: 2.3.0-SNAPSHOT
Contact: something@something.abc */ ' \" =_end -- \\r\\n \\n \\r
Generated by: https://openapi-generator.tech
OpenAPI Generator version: 3.1.0-SNAPSHOT
=end

View File

@ -1,12 +1,12 @@
=begin
#Swagger Petstore */ ' \" =_end -- \\r\\n \\n \\r
#OpenAPI Petstore */ ' \" =_end -- \\r\\n \\n \\r
#This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ */ ' \" =_end --
OpenAPI spec version: 1.0.0 */ &#39; \&quot; &#x3D;_end -- \\r\\n \\n \\r
Contact: apiteam@swagger.io */ ' \" =_end -- \\r\\n \\n \\r
Generated by: https://github.com/swagger-api/swagger-codegen.git
Swagger Codegen version: 2.3.0-SNAPSHOT
Contact: something@something.abc */ ' \" =_end -- \\r\\n \\n \\r
Generated by: https://openapi-generator.tech
OpenAPI Generator version: 3.1.0-SNAPSHOT
=end
@ -128,9 +128,9 @@ module Petstore
attr_accessor :force_ending_format
def initialize
@scheme = 'https'
@host = 'petstore.swagger.io */ &#39; &quot; &#x3D;end -- \r\n \n \r'
@base_path = '/v2 */ &#39; \&quot; &#x3D;_end -- \\r\\n \\n \\r'
@scheme = 'http'
@host = 'localhost'
@base_path = ''
@api_key = {}
@api_key_prefix = {}
@timeout = 0
@ -170,7 +170,7 @@ module Petstore
def base_path=(base_path)
# Add leading and trailing slashes to base_path
@base_path = "/#{base_path}".gsub(/\/+/, '/')
@base_path = "" if @base_path == "/"
@base_path = '' if @base_path == '/'
end
def base_url

View File

@ -1,12 +1,12 @@
=begin
#Swagger Petstore */ ' \" =_end -- \\r\\n \\n \\r
#OpenAPI Petstore */ ' \" =_end -- \\r\\n \\n \\r
#This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ */ ' \" =_end --
OpenAPI spec version: 1.0.0 */ &#39; \&quot; &#x3D;_end -- \\r\\n \\n \\r
Contact: apiteam@swagger.io */ ' \" =_end -- \\r\\n \\n \\r
Generated by: https://github.com/swagger-api/swagger-codegen.git
Swagger Codegen version: 2.3.0-SNAPSHOT
Contact: something@something.abc */ ' \" =_end -- \\r\\n \\n \\r
Generated by: https://openapi-generator.tech
OpenAPI Generator version: 3.1.0-SNAPSHOT
=end
@ -18,7 +18,6 @@ module Petstore
# property description */ ' \" =_end -- \\r\\n \\n \\r
attr_accessor :_return
# Attribute mapping from ruby-style variable name to JSON key.
def self.attribute_map
{
@ -27,7 +26,7 @@ module Petstore
end
# Attribute type mapping.
def self.swagger_types
def self.openapi_types
{
:'_return' => :'Integer'
}
@ -39,25 +38,24 @@ module Petstore
return unless attributes.is_a?(Hash)
# convert string to symbol for hash key
attributes = attributes.each_with_object({}){|(k,v), h| h[k.to_sym] = v}
attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
if attributes.has_key?(:'return')
self._return = attributes[:'return']
end
end
# Show invalid properties with the reasons. Usually used together with valid?
# @return Array for valid properies with the reasons
# @return Array for valid properties with the reasons
def list_invalid_properties
invalid_properties = Array.new
return invalid_properties
invalid_properties
end
# Check to see if the all the properties in the model are valid
# @return true if the model is valid
def valid?
return true
true
end
# Checks equality by comparing each attribute.
@ -85,12 +83,12 @@ module Petstore
# @return [Object] Returns the model itself
def build_from_hash(attributes)
return nil unless attributes.is_a?(Hash)
self.class.swagger_types.each_pair do |key, type|
self.class.openapi_types.each_pair do |key, type|
if type =~ /\AArray<(.*)>/i
# check to ensure the input is an array given that the the attribute
# is documented as an array but the input is not
if attributes[self.class.attribute_map[key]].is_a?(Array)
self.send("#{key}=", attributes[self.class.attribute_map[key]].map{ |v| _deserialize($1, v) } )
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
end
elsif !attributes[self.class.attribute_map[key]].nil?
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
@ -172,7 +170,7 @@ module Petstore
# @return [Hash] Returns the value in the form of hash
def _to_hash(value)
if value.is_a?(Array)
value.compact.map{ |v| _to_hash(v) }
value.compact.map { |v| _to_hash(v) }
elsif value.is_a?(Hash)
{}.tap do |hash|
value.each { |k, v| hash[k] = _to_hash(v) }
@ -183,7 +181,5 @@ module Petstore
value
end
end
end
end

View File

@ -1,15 +1,15 @@
=begin
#Swagger Petstore */ ' \" =_end -- \\r\\n \\n \\r
#OpenAPI Petstore */ ' \" =_end -- \\r\\n \\n \\r
#This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ */ ' \" =_end --
OpenAPI spec version: 1.0.0 */ &#39; \&quot; &#x3D;_end -- \\r\\n \\n \\r
Contact: apiteam@swagger.io */ ' \" =_end -- \\r\\n \\n \\r
Generated by: https://github.com/swagger-api/swagger-codegen.git
Swagger Codegen version: 2.3.0-SNAPSHOT
Contact: something@something.abc */ ' \" =_end -- \\r\\n \\n \\r
Generated by: https://openapi-generator.tech
OpenAPI Generator version: 3.1.0-SNAPSHOT
=end
module Petstore
VERSION = "1.0.0"
VERSION = '1.0.0'
end

View File

@ -1,14 +1,14 @@
# -*- encoding: utf-8 -*-
#
=begin
#Swagger Petstore */ ' \" =_end -- \\r\\n \\n \\r
#OpenAPI Petstore */ ' \" =_end -- \\r\\n \\n \\r
#This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ */ ' \" =_end --
OpenAPI spec version: 1.0.0 */ &#39; \&quot; &#x3D;_end -- \\r\\n \\n \\r
Contact: apiteam@swagger.io */ ' \" =_end -- \\r\\n \\n \\r
Generated by: https://github.com/swagger-api/swagger-codegen.git
Swagger Codegen version: 2.3.0-SNAPSHOT
Contact: something@something.abc */ ' \" =_end -- \\r\\n \\n \\r
Generated by: https://openapi-generator.tech
OpenAPI Generator version: 3.1.0-SNAPSHOT
=end
@ -19,13 +19,12 @@ Gem::Specification.new do |s|
s.name = "petstore"
s.version = Petstore::VERSION
s.platform = Gem::Platform::RUBY
s.authors = ["Swagger-Codegen"]
s.email = ["apiteam@swagger.io */ &#39; \&quot; &#x3D;_end -- \\r\\n \\n \\r"]
s.homepage = "https://github.com/swagger-api/swagger-codegen"
s.summary = "Swagger Petstore */ ' \" =_end -- \\r\\n \\n \\r Ruby Gem"
s.authors = ["OpenAPI-Generator"]
s.email = ["something@something.abc */ &#39; \&quot; &#x3D;_end -- \\r\\n \\n \\r"]
s.homepage = "https://openapi-generator.tech"
s.summary = "OpenAPI Petstore */ ' \" =_end -- \\r\\n \\n \\r Ruby Gem"
s.description = "This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ */ ' \" =_end -- "
# TODO uncomment and update below with a proper license
#s.license = "Apache 2.0"
s.license = "Unlicense"
s.required_ruby_version = ">= 1.9"
s.add_runtime_dependency 'typhoeus', '~> 1.0', '>= 1.0.1'
@ -39,7 +38,7 @@ Gem::Specification.new do |s|
s.add_development_dependency 'autotest-growl', '~> 0.2', '>= 0.2.16'
s.add_development_dependency 'autotest-fsevent', '~> 0.2', '>= 0.2.12'
s.files = `find *`.split("\n").uniq.sort.select{|f| !f.empty? }
s.files = `find *`.split("\n").uniq.sort.select { |f| !f.empty? }
s.test_files = `find spec/*`.split("\n")
s.executables = []
s.require_paths = ["lib"]

View File

@ -1,3 +1,5 @@
require "bundler/gem_tasks"
begin
require 'rspec/core/rake_task'