Sha256: 89b3572fe560ec7eda565e7995057999d8b6a4fbdd68d781aa3129db4eb1c846

Contents?: true

Size: 1.65 KB

Versions: 5

Compression:

Stored size: 1.65 KB

Contents

TwirpRails.configure do |config|
  # Application services proto files path
  # config.services_proto_path = 'rpc'
  #
  # Used clients proto files path
  # config.clients_proto_path = 'rpc_clients'
  #
  # Services code generator destination path (autorequired on application start)
  # config.services_twirp_code_path = 'lib/twirp'
  #
  # Clients code generator destination path (autorequired on application start)
  # config.clients_twirp_code_path = 'lib/twirp_clients'
  #
  # Swagger files generated from services proto files path (set to nil unless you need to generete swagger)
  # config.swagger_output_path = 'public/swagger'
  #
  # Instrument twirp calls and set hooks to log twirp calls
  # set to proc to customize log output
  # set to false to disable feature
  # config.log_twirp_calls = true
  #
  # Delete all files from x_twirp_code_path
  # before run protoc on proto files
  # config.purge_old_twirp_code = true
  #
  # Add API acronym to inflector
  # config.add_api_acronym = true
  #
  # Translate exceptions to Twirp::Error on services and
  # Twirp::Error to exceptions. To use service translation you
  # should mount service via mount_twirp. To use client translation
  # create client via TwirpRails.client(ClientClass, url) and
  # call bang methods. E.g. client.hello! throws exception if returns error.
  #
  # class SampleTranslator < TwirpRails::ErrorHandling::Base
  #   translate_exception Mongoid::Errors::DocumentNotFound, with: :not_found
  #   translate_error :not_found, with: Mongoid::Errors::DocumentNotFound
  # end
  # config.twirp_exception_translator_class = 'SampleTranslator'
  # default:
  # config.twirp_exception_translator_class = nil
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
twirp_rails-0.4.8 lib/twirp_rails/generators/twirp/init/templates/twirp_rails.rb
twirp_rails-0.4.7 lib/twirp_rails/generators/twirp/init/templates/twirp_rails.rb
twirp_rails-0.4.6 lib/twirp_rails/generators/twirp/init/templates/twirp_rails.rb
twirp_rails-0.4.5 lib/twirp_rails/generators/twirp/init/templates/twirp_rails.rb
twirp_rails-0.4.4 lib/twirp_rails/generators/twirp/init/templates/twirp_rails.rb