Sha256: 07e45ac53232930f9e5454ce0c692358e47bee0b2df48af01f79fbcc11844bb1

Contents?: true

Size: 434 Bytes

Versions: 4

Compression:

Stored size: 434 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

4 entries across 4 versions & 1 rubygems

Version Path
jekyll-auth-2.0.0 lib/jekyll_auth/config.rb
jekyll-auth-1.0.3 lib/jekyll_auth/config.rb
jekyll-auth-1.0.2 lib/jekyll_auth/config.rb
jekyll-auth-1.0.1 lib/jekyll_auth/config.rb