Sha256: e99c274bdf19bff23c062c78bd398d9375c1972181ae59dd707b0343738b0c3b

Contents?: true

Size: 376 Bytes

Versions: 1

Compression:

Stored size: 376 Bytes

Contents

require 'octokit'

module Octokit
  module Enterprise
    module_function

    CUSTOM_ENDPOINTS = [:api_endpoint, :web_endpoint, :status_api_endpoint]

    def hostname=(_hostname_)
      Octokit.configure do |c|
        CUSTOM_ENDPOINTS.each do |endpoint|
          c.send "#{endpoint}=", c.send(endpoint).sub('github.com', _hostname_)
        end
      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
octokit-enterprise-0.0.1 lib/octokit/enterprise.rb