jekyll-auth 0.5.2 → 0.6.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/bin/jekyll-auth +7 -0
- data/lib/jekyll-auth/auth-site.rb +7 -1
- data/lib/jekyll-auth/version.rb +1 -1
- metadata +2 -16
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 17a79c0081692c9acc1e92e547bd29ee15b1199a
|
4
|
+
data.tar.gz: aabba861f295620d6d3b96d31d0864cffea6fd23
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3def7009c0b79da89abb0ce63685fd57fdd912cfbca4b4979a76b23caa92c96269fd88c333ce9e9a1e1edb320aa7027fc2e50dcf2736f9d6181c8885681fc2f6
|
7
|
+
data.tar.gz: 1c95a6f846f1c1012a1170a528b510199378d203d88868843c9bb55742ba3c27cc6a115cd424b6ee74535bd0397df688dcbbef0e8f1e637b520f71960a38c61f
|
data/bin/jekyll-auth
CHANGED
@@ -6,6 +6,7 @@ require 'commander/import'
|
|
6
6
|
require 'rake'
|
7
7
|
require 'jekyll-auth'
|
8
8
|
require 'git'
|
9
|
+
require 'mkmf'
|
9
10
|
|
10
11
|
def changed?
|
11
12
|
git = Git.init
|
@@ -47,6 +48,12 @@ command :setup do |c|
|
|
47
48
|
c.syntax = "jekyll-auth setup"
|
48
49
|
c.description = "Configure Heroku for use with your Jekyll Auth site"
|
49
50
|
c.action do |args, options|
|
51
|
+
|
52
|
+
if find_executable("heroku").nil?
|
53
|
+
say "Looks like we're missing the Heroku client. Let's see if we can't install it..."
|
54
|
+
`wget -qO- https://toolbelt.heroku.com/install.sh | sh`
|
55
|
+
end
|
56
|
+
|
50
57
|
git = Git.init
|
51
58
|
git.add "config.ru"
|
52
59
|
git.add "Rakefile"
|
@@ -22,7 +22,13 @@ class JekyllAuth
|
|
22
22
|
|
23
23
|
before do
|
24
24
|
pass if JekyllAuth.whitelist && JekyllAuth.whitelist.match(request.path_info)
|
25
|
-
if ENV['
|
25
|
+
if ENV['GITHUB_TEAM_IDS']
|
26
|
+
authenticate!
|
27
|
+
ENV['GITHUB_TEAM_IDS'].split(",").each do |team|
|
28
|
+
return pass if github_team_access?(team.strip)
|
29
|
+
end
|
30
|
+
halt 401
|
31
|
+
elsif ENV['GITHUB_TEAM_ID']
|
26
32
|
github_team_authenticate!(ENV['GITHUB_TEAM_ID'])
|
27
33
|
elsif ENV['GITHUB_ORG_ID']
|
28
34
|
github_organization_authenticate!(ENV['GITHUB_ORG_ID'])
|
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: 0.
|
4
|
+
version: 0.6.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ben Balter
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-
|
11
|
+
date: 2014-12-17 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: jekyll
|
@@ -66,20 +66,6 @@ dependencies:
|
|
66
66
|
- - "~>"
|
67
67
|
- !ruby/object:Gem::Version
|
68
68
|
version: '4.1'
|
69
|
-
- !ruby/object:Gem::Dependency
|
70
|
-
name: heroku
|
71
|
-
requirement: !ruby/object:Gem::Requirement
|
72
|
-
requirements:
|
73
|
-
- - "~>"
|
74
|
-
- !ruby/object:Gem::Version
|
75
|
-
version: '3.6'
|
76
|
-
type: :runtime
|
77
|
-
prerelease: false
|
78
|
-
version_requirements: !ruby/object:Gem::Requirement
|
79
|
-
requirements:
|
80
|
-
- - "~>"
|
81
|
-
- !ruby/object:Gem::Version
|
82
|
-
version: '3.6'
|
83
69
|
- !ruby/object:Gem::Dependency
|
84
70
|
name: git
|
85
71
|
requirement: !ruby/object:Gem::Requirement
|