jekyll-auth 0.2.0 → 0.2.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
data/.gitignore CHANGED
@@ -1,3 +1,4 @@
1
1
  _site
2
2
  *.gem
3
3
  .env
4
+ Gemfile.lock
@@ -0,0 +1,17 @@
1
+ class JekyllAuth
2
+ def self.setup_config
3
+ config_file_path = File.join(Dir.pwd, "_config.yml")
4
+ config_file = YAML.safe_load_file(config_file_path)
5
+ config_file
6
+ end
7
+
8
+ def self.config
9
+ @config ||= JekyllAuth.setup_config
10
+ end
11
+
12
+ def self.whitelist
13
+ jekyll_auth_key = JekyllAuth::config["jekyll_auth"]
14
+ return nil if !jekyll_auth_key or !(whitelist = jekyll_auth_key["whitelist"])
15
+ Regexp.new(whitelist.join("|"))
16
+ end
17
+ end
@@ -1,3 +1,3 @@
1
1
  class JekyllAuth
2
- VERSION = '0.2.0'
2
+ VERSION = '0.2.1'
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: jekyll-auth
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.2.1
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -170,6 +170,7 @@ files:
170
170
  - lib/jekyll-auth/auth-site.rb
171
171
  - lib/jekyll-auth/jekyll-site.rb
172
172
  - lib/jekyll-auth/version.rb
173
+ - lib/jekyll-auth/config.rb
173
174
  - .gitignore
174
175
  homepage: https://github.com/benbalter/jekyll-auth
175
176
  licenses: