From 568fa4f514e46fb5d551645198afacab0f944d02 Mon Sep 17 00:00:00 2001 From: wing328 Date: Tue, 24 May 2016 23:20:23 +0800 Subject: [PATCH] add apache license to remaining ruby files (test, spec, etc) --- .../resources/ruby/api_client_spec.mustache | 4 ++++ .../resources/ruby/configuration.mustache | 4 ++++ .../ruby/configuration_spec.mustache | 4 ++++ .../src/main/resources/ruby/gemspec.mustache | 5 ++++ .../main/resources/ruby/git_push.sh.mustache | 15 ++++++++++++ .../main/resources/ruby/gitignore.mustache | 14 +++++++++++ .../main/resources/ruby/spec_helper.mustache | 4 ++++ samples/client/petstore/ruby/.gitignore | 14 +++++++++++ samples/client/petstore/ruby/README.md | 2 +- samples/client/petstore/ruby/git_push.sh | 15 ++++++++++++ .../ruby/lib/petstore/configuration.rb | 23 ++++++++++++++++++ samples/client/petstore/ruby/petstore.gemspec | 24 +++++++++++++++++++ 12 files changed, 127 insertions(+), 1 deletion(-) diff --git a/modules/swagger-codegen/src/main/resources/ruby/api_client_spec.mustache b/modules/swagger-codegen/src/main/resources/ruby/api_client_spec.mustache index 1ed497da21..ae32ff0ccf 100644 --- a/modules/swagger-codegen/src/main/resources/ruby/api_client_spec.mustache +++ b/modules/swagger-codegen/src/main/resources/ruby/api_client_spec.mustache @@ -1,3 +1,7 @@ +=begin +{{> api_info}} +=end + require 'spec_helper' describe {{moduleName}}::ApiClient do diff --git a/modules/swagger-codegen/src/main/resources/ruby/configuration.mustache b/modules/swagger-codegen/src/main/resources/ruby/configuration.mustache index 160fa85a57..e22b6d6f8a 100644 --- a/modules/swagger-codegen/src/main/resources/ruby/configuration.mustache +++ b/modules/swagger-codegen/src/main/resources/ruby/configuration.mustache @@ -1,3 +1,7 @@ +=begin +{{> api_info}} +=end + require 'uri' module {{moduleName}} diff --git a/modules/swagger-codegen/src/main/resources/ruby/configuration_spec.mustache b/modules/swagger-codegen/src/main/resources/ruby/configuration_spec.mustache index 4c23a06717..6ea2254349 100644 --- a/modules/swagger-codegen/src/main/resources/ruby/configuration_spec.mustache +++ b/modules/swagger-codegen/src/main/resources/ruby/configuration_spec.mustache @@ -1,3 +1,7 @@ +=begin +{{> api_info}} +=end + require 'spec_helper' describe {{moduleName}}::Configuration do diff --git a/modules/swagger-codegen/src/main/resources/ruby/gemspec.mustache b/modules/swagger-codegen/src/main/resources/ruby/gemspec.mustache index 65884d0f56..86d9a6e55d 100644 --- a/modules/swagger-codegen/src/main/resources/ruby/gemspec.mustache +++ b/modules/swagger-codegen/src/main/resources/ruby/gemspec.mustache @@ -1,4 +1,9 @@ # -*- encoding: utf-8 -*- +# +=begin +{{> api_info}} +=end + $:.push File.expand_path("../lib", __FILE__) require "{{gemName}}/version" diff --git a/modules/swagger-codegen/src/main/resources/ruby/git_push.sh.mustache b/modules/swagger-codegen/src/main/resources/ruby/git_push.sh.mustache index a9b0f28edf..3def1140af 100755 --- a/modules/swagger-codegen/src/main/resources/ruby/git_push.sh.mustache +++ b/modules/swagger-codegen/src/main/resources/ruby/git_push.sh.mustache @@ -1,4 +1,19 @@ #!/bin/sh +# +# Generated by: https://github.com/swagger-api/swagger-codegen.git +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# # 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" diff --git a/modules/swagger-codegen/src/main/resources/ruby/gitignore.mustache b/modules/swagger-codegen/src/main/resources/ruby/gitignore.mustache index a8b1cda23f..522134fcdd 100644 --- a/modules/swagger-codegen/src/main/resources/ruby/gitignore.mustache +++ b/modules/swagger-codegen/src/main/resources/ruby/gitignore.mustache @@ -1,3 +1,17 @@ +# Generated by: https://github.com/swagger-api/swagger-codegen.git +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + *.gem *.rbc /.config diff --git a/modules/swagger-codegen/src/main/resources/ruby/spec_helper.mustache b/modules/swagger-codegen/src/main/resources/ruby/spec_helper.mustache index bc4187c337..8f4bb75416 100644 --- a/modules/swagger-codegen/src/main/resources/ruby/spec_helper.mustache +++ b/modules/swagger-codegen/src/main/resources/ruby/spec_helper.mustache @@ -1,3 +1,7 @@ +=begin +{{> api_info}} +=end + # load the gem require '{{{gemName}}}' diff --git a/samples/client/petstore/ruby/.gitignore b/samples/client/petstore/ruby/.gitignore index a8b1cda23f..522134fcdd 100644 --- a/samples/client/petstore/ruby/.gitignore +++ b/samples/client/petstore/ruby/.gitignore @@ -1,3 +1,17 @@ +# Generated by: https://github.com/swagger-api/swagger-codegen.git +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + *.gem *.rbc /.config diff --git a/samples/client/petstore/ruby/README.md b/samples/client/petstore/ruby/README.md index 528cca0b76..1c3d604f20 100644 --- a/samples/client/petstore/ruby/README.md +++ b/samples/client/petstore/ruby/README.md @@ -8,7 +8,7 @@ This SDK is automatically generated by the [Swagger Codegen](https://github.com/ - API version: 1.0.0 - Package version: 1.0.0 -- Build date: 2016-05-24T17:47:46.459+08:00 +- Build date: 2016-05-24T23:13:57.542+08:00 - Build package: class io.swagger.codegen.languages.RubyClientCodegen ## Installation diff --git a/samples/client/petstore/ruby/git_push.sh b/samples/client/petstore/ruby/git_push.sh index 792320114f..7e44b9aade 100644 --- a/samples/client/petstore/ruby/git_push.sh +++ b/samples/client/petstore/ruby/git_push.sh @@ -1,4 +1,19 @@ #!/bin/sh +# +# Generated by: https://github.com/swagger-api/swagger-codegen.git +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# # 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" diff --git a/samples/client/petstore/ruby/lib/petstore/configuration.rb b/samples/client/petstore/ruby/lib/petstore/configuration.rb index 0597375328..92aeb4010e 100644 --- a/samples/client/petstore/ruby/lib/petstore/configuration.rb +++ b/samples/client/petstore/ruby/lib/petstore/configuration.rb @@ -1,3 +1,26 @@ +=begin +Swagger Petstore + +This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + +OpenAPI spec version: 1.0.0 +Contact: apiteam@swagger.io +Generated by: https://github.com/swagger-api/swagger-codegen.git + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + +http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. + +=end + require 'uri' module Petstore diff --git a/samples/client/petstore/ruby/petstore.gemspec b/samples/client/petstore/ruby/petstore.gemspec index 66258d1ff5..f52a27ba00 100644 --- a/samples/client/petstore/ruby/petstore.gemspec +++ b/samples/client/petstore/ruby/petstore.gemspec @@ -1,4 +1,28 @@ # -*- encoding: utf-8 -*- +# +=begin +Swagger Petstore + +This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + +OpenAPI spec version: 1.0.0 +Contact: apiteam@swagger.io +Generated by: https://github.com/swagger-api/swagger-codegen.git + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + +http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. + +=end + $:.push File.expand_path("../lib", __FILE__) require "petstore/version"