[Ruby] Rename files/folders (#534)

* Rename templateDir: rails5 -> ruby-on-rails-server

* Rename script: rails5-petstore-server.sh -> ruby-on-rails-server-petstore.sh

* Rename sample folder: rails5 -> ruby-on-rails

* Rename script(openapi3): rails5-petstore-server.sh -> ruby-on-rails-server-petstore.sh

* Update ruby-on-rails-server-petstore.sh

* Rename templateDir: sinatra -> ruby-sinatra-server

* Rename script: sinatra-petstore-server.sh -> ruby-sinatra-server-petstore.sh

* Rename sample folder: sinatra -> ruby-sinatra

* Update script

* Rename templateDir: ruby -> ruby-client

* Rename script: ruby-petstore.sh -> ruby-client-petstore.sh

* Update scripts

* Update samples

- bin/ruby-sinatra-server-petstore.sh
- bin/ruby-on-rails-server-petstore.sh
- bin/ruby-client-petstore.sh
- bin/security/ruby-client-petstore.sh
This commit is contained in:
Akihito Nakano
2018-07-13 23:28:17 +09:00
committed by William Cheng
parent 6c14b4271f
commit 26e70fe642
200 changed files with 428 additions and 424 deletions

View File

@@ -0,0 +1,5 @@
# Be sure to restart your server when you modify this file. Action Cable runs in a loop that does not support auto reloading.
module ApplicationCable
class Channel < ActionCable::Channel::Base
end
end

View File

@@ -0,0 +1,5 @@
# Be sure to restart your server when you modify this file. Action Cable runs in a loop that does not support auto reloading.
module ApplicationCable
class Connection < ActionCable::Connection::Base
end
end

View File

@@ -0,0 +1,2 @@
class ApplicationController < ActionController::API
end

View File

@@ -0,0 +1,59 @@
=begin
OpenAPI Petstore
This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters.
OpenAPI spec version: 1.0.0
Generated by: https://github.com/openapitools/openapi-generator.git
=end
class PetController < ApplicationController
def create
# Your code here
render json: {"message" => "yes, it worked"}
end
def destroy
# Your code here
render json: {"message" => "yes, it worked"}
end
def find_pets_by_status
# Your code here
render json: {"message" => "yes, it worked"}
end
def find_pets_by_tags
# Your code here
render json: {"message" => "yes, it worked"}
end
def show
# Your code here
render json: {"message" => "yes, it worked"}
end
def update_pet
# Your code here
render json: {"message" => "yes, it worked"}
end
def update_pet_with_form
# Your code here
render json: {"message" => "yes, it worked"}
end
def upload_file
# Your code here
render json: {"message" => "yes, it worked"}
end
end

View File

@@ -0,0 +1,35 @@
=begin
OpenAPI Petstore
This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters.
OpenAPI spec version: 1.0.0
Generated by: https://github.com/openapitools/openapi-generator.git
=end
class StoreController < ApplicationController
def delete_order
# Your code here
render json: {"message" => "yes, it worked"}
end
def get_inventory
# Your code here
render json: {"message" => "yes, it worked"}
end
def get_order_by_id
# Your code here
render json: {"message" => "yes, it worked"}
end
def place_order
# Your code here
render json: {"message" => "yes, it worked"}
end
end

View File

@@ -0,0 +1,59 @@
=begin
OpenAPI Petstore
This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters.
OpenAPI spec version: 1.0.0
Generated by: https://github.com/openapitools/openapi-generator.git
=end
class UserController < ApplicationController
def create
# Your code here
render json: {"message" => "yes, it worked"}
end
def create_users_with_array_input
# Your code here
render json: {"message" => "yes, it worked"}
end
def create_users_with_list_input
# Your code here
render json: {"message" => "yes, it worked"}
end
def destroy
# Your code here
render json: {"message" => "yes, it worked"}
end
def show
# Your code here
render json: {"message" => "yes, it worked"}
end
def login_user
# Your code here
render json: {"message" => "yes, it worked"}
end
def logout_user
# Your code here
render json: {"message" => "yes, it worked"}
end
def update
# Your code here
render json: {"message" => "yes, it worked"}
end
end

View File

@@ -0,0 +1,2 @@
class ApplicationJob < ActiveJob::Base
end

View File

@@ -0,0 +1,4 @@
class ApplicationMailer < ActionMailer::Base
default from: 'from@example.com'
layout 'mailer'
end

View File

@@ -0,0 +1,14 @@
=begin
OpenAPI Petstore
This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters.
OpenAPI spec version: 1.0.0
Generated by: https://github.com/openapitools/openapi-generator.git
=end
class ApiResponse < ApplicationRecord
end

View File

@@ -0,0 +1,3 @@
class ApplicationRecord < ActiveRecord::Base
self.abstract_class = true
end

View File

@@ -0,0 +1,14 @@
=begin
OpenAPI Petstore
This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters.
OpenAPI spec version: 1.0.0
Generated by: https://github.com/openapitools/openapi-generator.git
=end
class Category < ApplicationRecord
end

View File

@@ -0,0 +1,14 @@
=begin
OpenAPI Petstore
This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters.
OpenAPI spec version: 1.0.0
Generated by: https://github.com/openapitools/openapi-generator.git
=end
class Order < ApplicationRecord
end

View File

@@ -0,0 +1,18 @@
=begin
OpenAPI Petstore
This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters.
OpenAPI spec version: 1.0.0
Generated by: https://github.com/openapitools/openapi-generator.git
=end
class Pet < ApplicationRecord
validates_presence_of :name
validates_presence_of :photo_urls
serialize :photo_urls, Array
serialize :tags, Array
end

View File

@@ -0,0 +1,14 @@
=begin
OpenAPI Petstore
This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters.
OpenAPI spec version: 1.0.0
Generated by: https://github.com/openapitools/openapi-generator.git
=end
class Tag < ApplicationRecord
end

View File

@@ -0,0 +1,14 @@
=begin
OpenAPI Petstore
This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters.
OpenAPI spec version: 1.0.0
Generated by: https://github.com/openapitools/openapi-generator.git
=end
class User < ApplicationRecord
end

View File

@@ -0,0 +1,13 @@
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<style>
/* Email styles need to be inline */
</style>
</head>
<body>
<%= yield %>
</body>
</html>

View File

@@ -0,0 +1 @@
<%= yield %>