Sha256: 484360aa8dc4ac170366443bda82ba16076a08ce2c7d0137dff68e25124f306f
Contents?: true
Size: 602 Bytes
Versions: 22
Compression:
Stored size: 602 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
22 entries across 22 versions & 2 rubygems