Sha256: 7f0b93341cd0d2d2f8c862de48ba00fda46b711b37e396079847f1ab3dc4672a
Contents?: true
Size: 650 Bytes
Versions: 1
Compression:
Stored size: 650 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 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.3 | lib/medea/jasondb.rb |