Sha256: 7ef402708fa2084bc7139baa24d2080613dae1698b721257bf45fa9569dada94

Contents?: true

Size: 850 Bytes

Versions: 34

Compression:

Stored size: 850 Bytes

Contents

require 'uri'

module TreasureData
module Command

  def server_status(op)
    op.cmd_parse

    $stdout.puts Client.server_status
  end

  def server_endpoint(op)
    endpoint = op.cmd_parse

    if Config.cl_endpoint and endpoint != Config.endpoint
      raise ParameterConfigurationError,
            "You specified the API server endpoint in the command options as well (-e / --endpoint " +
            "option) but it does not match the value provided to the 'server:endpoint' command. " +
            "Please remove the option or ensure the endpoints URLs match each other."
    end

    Command.validate_api_endpoint(endpoint)
    Command.test_api_endpoint(endpoint)

    conf = nil
    begin
      conf = Config.read
    rescue ConfigError
      conf = Config.new
    end
    conf["account.endpoint"] = endpoint
    conf.save
  end

end
end

Version data entries

34 entries across 34 versions & 1 rubygems

Version Path
td-0.17.1 lib/td/command/server.rb
td-0.17.0 lib/td/command/server.rb
td-0.16.10 lib/td/command/server.rb
td-0.16.9 lib/td/command/server.rb
td-0.16.8 lib/td/command/server.rb
td-0.16.7 lib/td/command/server.rb
td-0.16.6 lib/td/command/server.rb
td-0.16.5 lib/td/command/server.rb
td-0.16.4 lib/td/command/server.rb
td-0.16.3 lib/td/command/server.rb
td-0.16.1 lib/td/command/server.rb
td-0.16.0 lib/td/command/server.rb
td-0.15.9 lib/td/command/server.rb
td-0.15.8 lib/td/command/server.rb
td-0.15.7 lib/td/command/server.rb
td-0.15.6 lib/td/command/server.rb
td-0.15.5 lib/td/command/server.rb
td-0.15.4 lib/td/command/server.rb
td-0.15.3 lib/td/command/server.rb
td-0.15.2 lib/td/command/server.rb