Sha256: 8972333209271efb94d8629e202016a549886d6325aa43f5ca2fd95047e6f09b

Contents?: true

Size: 1.16 KB

Versions: 6

Compression:

Stored size: 1.16 KB

Contents

require "rubygems"
require 'pp'
require 'irb/ext/save-history'
IRB.conf[:SAVE_HISTORY] = 1000
IRB.conf[:HISTORY_FILE] = "#{ENV['HOME']}/.flexmls-api-history"

if ENV["FLEXMLS_API_CONSOLE"].nil?
  require 'flexmls_api'
else
  puts "Enabling console mode for local gem"
  Bundler.require(:default, "development") if defined?(Bundler)
  path = File.expand_path(File.dirname(__FILE__) + "/../../../lib/")
  $LOAD_PATH.unshift(path) unless $LOAD_PATH.include?(path)
  require path + '/flexmls_api'
end

IRB.conf[:AUTO_INDENT]=true
IRB.conf[:PROMPT][:FLEXMLS]= {
  :PROMPT_I => "flexmlsApi:%03n:%i> ",
  :PROMPT_S => "flexmlsApi:%03n:%i%l ",
  :PROMPT_C => "flexmlsApi:%03n:%i* ",
  :RETURN => "%s\n"
} 

IRB.conf[:PROMPT_MODE] = :FLEXMLS

path = File.expand_path(File.dirname(__FILE__) + "/../../../lib/")
$LOAD_PATH.unshift(path) unless $LOAD_PATH.include?(path)
require path + '/flexmls_api'

module FlexmlsApi
  def self.logger
    if @logger.nil?
      @logger = Logger.new(STDOUT)
      @logger.level = ENV["DEBUG"].nil? ? Logger::WARN : Logger::DEBUG
    end
    @logger
  end
end

FlexmlsApi.logger.info("Client configured!")

include FlexmlsApi::Models

def c
  FlexmlsApi.client
end

Version data entries

6 entries across 6 versions & 2 rubygems

Version Path
spark_api-1.0.2 lib/spark_api/cli/setup.rb~
spark_api-1.0.1 lib/spark_api/cli/setup.rb~
spark_api-1.0.0 lib/spark_api/cli/setup.rb~
flexmls_api-0.7.3 lib/flexmls_api/cli/setup.rb
flexmls_api-0.7.5 lib/flexmls_api/cli/setup.rb
flexmls_api-0.7.0 lib/flexmls_api/cli/setup.rb