Sha256: 54c86afb2dda4e0a717ad54e3a2e90867b9f4e3dbaae787817d4589d828f9026

Contents?: true

Size: 668 Bytes

Versions: 1

Compression:

Stored size: 668 Bytes

Contents

module JasonDB
  #jason_url here doesn't include the http[s]:// part, but does include the domain and a trailing '/'
  #( so it's "rest.jasondb.com/<domain>/" )
  def JasonDB::db_auth_url mode=:secure
    return "https://michael:password@rest.jasondb.com/medea-dev/"
    config = Rails.configuration.database_configuration[Rails.env]
    
    user = config["user"]
    topic = config["topic"]
    password = config["password"]
    if config["jason_host"]
      host = config["jason_host"]
    else
      host = "rest.jasondb.com"
    end
    protocol = "http"
    protocol << "s" if mode == :secure
    "#{protocol}://#{user}:#{password}@#{host}/#{topic}/"
  end

end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
medea-0.2.30 lib/medea/jasondb.rb