Sha256: d3c7c3929484dbbc7c64ad9219e268e55dfb250d94d1208fa831a95c4ed5c1b9

Contents?: true

Size: 657 Bytes

Versions: 15

Compression:

Stored size: 657 Bytes

Contents

module Localeapp
  module Routes
    module Base

    private

      def http_scheme
        if Localeapp.configuration.secure
          URI::HTTPS
        else
          URI::HTTP
        end
      end

      def base_options
        options = {:host => Localeapp.configuration.host, :port => Localeapp.configuration.port}
        if Localeapp.configuration.http_auth_username
          options[:userinfo] = "#{Localeapp.configuration.http_auth_username}:#{Localeapp.configuration.http_auth_password}"
        end
        options
      end

      def escape_key(key)
        URI.encode_www_form_component(key).gsub(/\./, '%2E')
      end
    end
  end
end

Version data entries

15 entries across 15 versions & 1 rubygems

Version Path
localeapp-3.3.0 lib/localeapp/routes/base.rb
localeapp-3.2.0 lib/localeapp/routes/base.rb
localeapp-3.1.3 lib/localeapp/routes/base.rb
localeapp-3.1.2 lib/localeapp/routes/base.rb
localeapp-3.1.1 lib/localeapp/routes/base.rb
localeapp-3.1.0 lib/localeapp/routes/base.rb
localeapp-3.0.1 lib/localeapp/routes/base.rb
localeapp-3.0.0 lib/localeapp/routes/base.rb
localeapp-2.5.0 lib/localeapp/routes/base.rb
localeapp-2.4.0 lib/localeapp/routes/base.rb
localeapp-2.3.0 lib/localeapp/routes/base.rb
localeapp-2.2.0 lib/localeapp/routes/base.rb
localeapp-2.1.1 lib/localeapp/routes/base.rb
localeapp-2.1.0 lib/localeapp/routes/base.rb
localeapp-2.0.0 lib/localeapp/routes/base.rb