jekyll-auth 0.2.0 → 0.2.1
Sign up to get free protection for your applications and to get access to all the features.
- data/.gitignore +1 -0
- data/lib/jekyll-auth/config.rb +17 -0
- data/lib/jekyll-auth/version.rb +1 -1
- metadata +2 -1
data/.gitignore
CHANGED
@@ -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
|
data/lib/jekyll-auth/version.rb
CHANGED
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.
|
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:
|