jekyll-auth 1.0.0 → 1.0.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.
- checksums.yaml +4 -4
- data/lib/jekyll-auth.rb +1 -22
- data/lib/jekyll_auth/config.rb +23 -0
- data/lib/jekyll_auth/version.rb +1 -1
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 569b75a04a87e815f2827e7d0c2fcded0b9119a2
|
4
|
+
data.tar.gz: f0feb1c12f39c9ffffb763c5297e3352a676072a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0e62dc40194176c12b5b62724b93032010998b3176862a2c072000e49eed700fa89683aef2ce91a8d078d58c3d62d3d7d77b0471c3c612da91e4b9684d22e309
|
7
|
+
data.tar.gz: 35b0cfffce782c36f2acf1785d72f7c3c064033e801e0a98723a34ab43322f983e03bae734f21814390e9e718e2f2466dc1fd3e4bf9311da68454774424c7157
|
data/lib/jekyll-auth.rb
CHANGED
@@ -6,6 +6,7 @@ require 'colorator'
|
|
6
6
|
require 'mkmf'
|
7
7
|
require_relative 'jekyll_auth/version'
|
8
8
|
require_relative 'jekyll_auth/helpers'
|
9
|
+
require_relative 'jekyll_auth/config'
|
9
10
|
require_relative 'jekyll_auth/auth_site'
|
10
11
|
require_relative 'jekyll_auth/jekyll_site'
|
11
12
|
require_relative 'jekyll_auth/config_error'
|
@@ -20,26 +21,4 @@ class JekyllAuth
|
|
20
21
|
run JekyllAuth::JekyllSite
|
21
22
|
end
|
22
23
|
end
|
23
|
-
|
24
|
-
def self.config_file
|
25
|
-
File.join(Dir.pwd, "_config.yml")
|
26
|
-
end
|
27
|
-
|
28
|
-
def self.config
|
29
|
-
@config ||= begin
|
30
|
-
config = YAML.safe_load_file(config_file)
|
31
|
-
config["jekyll_auth"] || {}
|
32
|
-
rescue
|
33
|
-
{}
|
34
|
-
end
|
35
|
-
end
|
36
|
-
|
37
|
-
def self.whitelist
|
38
|
-
whitelist = JekyllAuth::config["whitelist"]
|
39
|
-
Regexp.new(whitelist.join("|")) unless whitelist.nil?
|
40
|
-
end
|
41
|
-
|
42
|
-
def self.ssl?
|
43
|
-
!!JekyllAuth::config["ssl"]
|
44
|
-
end
|
45
24
|
end
|
@@ -0,0 +1,23 @@
|
|
1
|
+
class JekyllAuth
|
2
|
+
def self.config_file
|
3
|
+
File.join(Dir.pwd, "_config.yml")
|
4
|
+
end
|
5
|
+
|
6
|
+
def self.config
|
7
|
+
@config ||= begin
|
8
|
+
config = YAML.safe_load_file(config_file)
|
9
|
+
config["jekyll_auth"] || {}
|
10
|
+
rescue
|
11
|
+
{}
|
12
|
+
end
|
13
|
+
end
|
14
|
+
|
15
|
+
def self.whitelist
|
16
|
+
whitelist = JekyllAuth::config["whitelist"]
|
17
|
+
Regexp.new(whitelist.join("|")) unless whitelist.nil?
|
18
|
+
end
|
19
|
+
|
20
|
+
def self.ssl?
|
21
|
+
!!JekyllAuth::config["ssl"]
|
22
|
+
end
|
23
|
+
end
|
data/lib/jekyll_auth/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: jekyll-auth
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ben Balter
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-
|
11
|
+
date: 2015-02-06 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: jekyll
|
@@ -224,6 +224,7 @@ files:
|
|
224
224
|
- lib/jekyll-auth.rb
|
225
225
|
- lib/jekyll_auth/auth_site.rb
|
226
226
|
- lib/jekyll_auth/commands.rb
|
227
|
+
- lib/jekyll_auth/config.rb
|
227
228
|
- lib/jekyll_auth/config_error.rb
|
228
229
|
- lib/jekyll_auth/helpers.rb
|
229
230
|
- lib/jekyll_auth/jekyll_site.rb
|