jekyll-auth 0.5.2 → 0.6.0

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 4cc223340a6520df88b06451d72ae058a1e7fccc
4
- data.tar.gz: 9e01134f5657d3907c6ec2c9fdc9669f2a1ec84d
3
+ metadata.gz: 17a79c0081692c9acc1e92e547bd29ee15b1199a
4
+ data.tar.gz: aabba861f295620d6d3b96d31d0864cffea6fd23
5
5
  SHA512:
6
- metadata.gz: bfc937312e604c1404f5b0b60227189445d2d0a55c1e956ff0fdb082db9187d38322fa401d63d7b4accb1063209c3eb904aec2f389250df756f17c558b9fcec6
7
- data.tar.gz: f8341736586ab79184449c3dc599b302763e7459610a42d300293226f35eaa3308d9b49a5c3d4c1354c0fc9a1142ee4dae27ca431627608a674f6642de199e57
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['GITHUB_TEAM_ID']
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'])
@@ -1,3 +1,3 @@
1
1
  class JekyllAuth
2
- VERSION = '0.5.2'
2
+ VERSION = '0.6.0'
3
3
  end
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.5.2
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-01 00:00:00.000000000 Z
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