Sha256: c72b6de8aed0d91782369716aa4da6c11207fa762fee24a5e6d523595d773b8c

Contents?: true

Size: 566 Bytes

Versions: 25

Compression:

Stored size: 566 Bytes

Contents

class <%= class_name %>::Configuration
  attr_accessor <%= [*initialize_signatures, :ssl, :path, :logger].map { |k| ":#{k}" }.join(', ') %>

  def initialize
    @path = ''
    @logger = ::Logger.new(Rails.env.development? ? $stdout : 'log/<%=file_name %>.log')
  end

  def url
    raise "No given host to #{self.class.name}" unless host

    https = true
    https = ssl unless ssl.nil?
    https = <%= class_name %>.ssl unless <%= class_name %>.ssl.nil?

    "URI::HTTP#{https.to_b ? 'S' : ''}".constantize.build(host:, path: [path, version].join('/'))
  end
end

Version data entries

25 entries across 25 versions & 1 rubygems

Version Path
kapellmeister-0.10.2 lib/generators/kapellmeister/templates/lib/third_party/configuration.rb.tt
kapellmeister-0.10.1 lib/generators/kapellmeister/templates/lib/third_party/configuration.rb.tt
kapellmeister-0.10.0 lib/generators/kapellmeister/templates/lib/third_party/configuration.rb.tt
kapellmeister-0.9.9.rc3 lib/generators/kapellmeister/templates/lib/third_party/configuration.rb.tt
kapellmeister-0.9.9.rc2 lib/generators/kapellmeister/templates/lib/third_party/configuration.rb.tt
kapellmeister-0.9.9.rc1 lib/generators/kapellmeister/templates/lib/third_party/configuration.rb.tt
kapellmeister-0.9.8.rc1 lib/generators/kapellmeister/templates/lib/third_party/configuration.rb.tt
kapellmeister-0.9.8.pre.rc1 lib/generators/kapellmeister/templates/lib/third_party/configuration.rb.tt
kapellmeister-0.9.8 lib/generators/kapellmeister/templates/lib/third_party/configuration.rb.tt
kapellmeister-0.9.7 lib/generators/kapellmeister/templates/lib/third_party/configuration.rb.tt
kapellmeister-0.9.6 lib/generators/kapellmeister/templates/lib/third_party/configuration.rb.tt
kapellmeister-0.9.5 lib/generators/kapellmeister/templates/lib/third_party/configuration.rb.tt
kapellmeister-0.9.4 lib/generators/kapellmeister/templates/lib/third_party/configuration.rb.tt
kapellmeister-0.9.3 lib/generators/kapellmeister/templates/lib/third_party/configuration.rb.tt
kapellmeister-0.9.2 lib/generators/kapellmeister/templates/lib/third_party/configuration.rb.tt
kapellmeister-0.9.1 lib/generators/kapellmeister/templates/lib/third_party/configuration.rb.tt
kapellmeister-0.9.0 lib/generators/kapellmeister/templates/lib/third_party/configuration.rb.tt
kapellmeister-0.8.0 lib/generators/kapellmeister/templates/lib/third_party/configuration.rb.tt
kapellmeister-0.7.3 lib/generators/kapellmeister/templates/lib/third_party/configuration.rb.tt
kapellmeister-0.7.2 lib/generators/kapellmeister/templates/lib/third_party/configuration.rb.tt