Sha256: 0ea66064f4d0bf8ec4ebb2b0a361e08d3bf2dd7f4880376c9b17bc7bbea46447

Contents?: true

Size: 432 Bytes

Versions: 1

Compression:

Stored size: 432 Bytes

Contents

class JekyllAuth
  def self.config_file
    File.join(Dir.pwd, "_config.yml")
  end

  def self.config
    @config ||= begin
      config = YAML.safe_load_file(config_file)
      config["jekyll_auth"] || {}
    rescue
      {}
    end
  end

  def self.whitelist
    whitelist = JekyllAuth.config["whitelist"]
    Regexp.new(whitelist.join("|")) unless whitelist.nil?
  end

  def self.ssl?
    !!JekyllAuth.config["ssl"]
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
jekyll-auth-2.1.0 lib/jekyll_auth/config.rb