jekyll-auth 1.0.2 → 1.0.3

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 9d94cc333de503a6fbdb201f1ed9b31cff858cb5
4
- data.tar.gz: bfcedea76e84e2134f0bdf187bed35f30d8e99b0
3
+ metadata.gz: 89c7d075ebcbc8bf817e6fac83be184151437115
4
+ data.tar.gz: decd0c07fa9790427b1af3492e605c91486ddc3d
5
5
  SHA512:
6
- metadata.gz: ab4b0d18dfd9ee56ab8e3781990ff90decf4bb580e20f67379cf889cb836168e9a86ce1e2f495c0bc77e4417e61d21bdfaa5a95cf4f6152f464f6e43402bc0e3
7
- data.tar.gz: 3d444b873b5918a678d31acbbb18c7944cb825c9f765ad28038ce36d5b0dcc2983dd0f9261c78fba87a67c19f83eb221389ba1445d6c7d6fd1f20731c587b502
6
+ metadata.gz: df230eea9bc5a3512ac6557cba79a7c961df3b61bd3667173cd58104eacfb2ac26ad6cf7efab14129dbc5882c0d4504d5d95b3ac56113f662e34a8eeef53fcde
7
+ data.tar.gz: 3a05f6c5bacdd0214f409cccf7e38d80f9cc31be8a15078a766e3e436d7164393b0b39e31306c784e0e7e9e015fbe15ab78df4101a221086b76fc228ee01eb8d
data/README.md CHANGED
@@ -23,12 +23,15 @@ But what if you only want to share that site with a select number of people? Bef
23
23
 
24
24
  1. Navigate to [the GitHub app registration page](https://github.com/settings/applications/new)
25
25
  2. Give your app a name
26
- 3. Tell GitHub the URL you want the app to eventually live at
27
- 4. Hit Save, but leave the page open, you'll need some of the information in a moment
26
+ 3. Tell GitHub the URL you want the app to eventually live at. If using a free Heroku account, this will be something like http://my-site.herokuapp.com
27
+ 4. Specify the callback URL; should be like this: https://my-site.herokuapp.com/auth/github/callback; note that this is **https**, not http.
28
+ 5. Hit Save, but leave the page open, you'll need some of the information in a moment
29
+
30
+ Remember the 'my-site' part for later on when using `heroku create`. Also, my-site is often called 'app-name' in Heroku documenation.
28
31
 
29
32
  ### Add Jekyll Auth to your site
30
33
 
31
- 1. Add `gem 'jekyll-auth'` to your `Gemfile` or if you don't already have a `Gemfile`, create a file called `Gemfile` in the root of your site's repository with the following content:
34
+ 1. Within your new site repository or orphaned github [branch](https://help.github.com/articles/creating-project-pages-manually/) (the branch could be named anything except 'gh-pages' since this would then be public on github!), add `gem 'jekyll-auth'` to your `Gemfile` or if you don't already have a `Gemfile`, create a file called `Gemfile` in the root of your site's repository with the following content:
32
35
 
33
36
  ```ruby
34
37
  source "https://rubygems.org"
@@ -36,7 +39,7 @@ But what if you only want to share that site with a select number of people? Bef
36
39
  gem 'jekyll-auth'
37
40
  ```
38
41
 
39
- 2. `cd` into your project's directory and run `bundle install`.
42
+ 2. `cd` into your project's directory and run `bundle install`. If you get an error using `bundle install`, see Troubleshooting below.
40
43
 
41
44
  3. Run `bundle exec jekyll-auth new` which will copy the necessary files to set up the server
42
45
 
@@ -44,7 +47,7 @@ But what if you only want to share that site with a select number of people? Bef
44
47
 
45
48
  #### Automatically
46
49
 
47
- Run `bundle exec jekyll-auth --client_id XXX --client_secret XXX --org_id XXX`
50
+ Run `bundle exec jekyll-auth setup --client_id XXX --client_secret XXX --org_id XXX`
48
51
 
49
52
  (or `--team_id XXX`)
50
53
 
@@ -52,9 +55,9 @@ Run `bundle exec jekyll-auth --client_id XXX --client_secret XXX --org_id XXX`
52
55
 
53
56
  1. You may need to add and commit the files generated by `jekyll-auth new` to Git before continuing
54
57
  2. Make sure you have [the Heroku toolbelt](https://toolbelt.heroku.com/) installed
55
- 3. Run `herkou create` from your site's directory
58
+ 3. Run `heroku create my-site` from your site's directory; make sure my-site matches what you specified in the Githup application registration above.
56
59
  4. `heroku config:set GITHUB_CLIENT_ID=XXX GITHUB_CLIENT_SECRET=XXX GITHUB_ORG_ID=XXX` (or `GITHUB_TEAM_ID`)
57
- 5. `git push heroku`
60
+ 5. `git push heroku`, or if you are maintaining the site in an orphaned branch of your github repo (say 'heroku-pages'), do `git push heroku heroku-pages:master`
58
61
  6. `heroku open` to open the site in your browser
59
62
 
60
63
  #### Finding the team ID
@@ -147,3 +150,22 @@ If they're in the org, they get the page. Otherwise, all they ever get is [the b
147
150
  4. Remove any Jekyll Auth specific requirements from your `Gemfile`
148
151
  5. Follow [the instructions above](https://github.com/benbalter/jekyll-auth#add-jekyll-auth-to-your-site) to get started
149
152
  6. When prompted, select "n" if Heroku is already set up
153
+
154
+ ## Troubleshooting
155
+
156
+ * **ERROR: YOUR SITE COULD NOT BE BUILT** during install, either locally or on Heroku. You likely need to add `exclude: [vendor]` to `_config.yml` in your branch's root directory (create the file if it does not exist already). If you still have problems on the *local* install, you may have better luck using `bundle install --deployment`, but be sure to add the resulting 'vendor' directory to .gitignore. For completeness, the full error may look something like this:
157
+
158
+ ```
159
+ remote: Configuration file: none
160
+ remote: ERROR: YOUR SITE COULD NOT BE BUILT:
161
+ remote: ------------------------------------
162
+ remote: Invalid date '0000-00-00': Post '/vendor/bundle/ruby/2.0.0/gems/jekyll-2.5.3/lib/site_template/_posts/0000-00-00-welcome-to-jekyll.markdown.erb' does not have a valid date in the filename.
163
+ ```
164
+
165
+ * **Pushing to heroku**. If you are working from a new github-cloned repo (where you have not run `heroku create`), you may also want to push to heroku. You do not add the remote in the standard way using git, but instead do this:
166
+
167
+ ```
168
+ heroku git:remote -a my-site
169
+ ```
170
+
171
+
@@ -4,7 +4,6 @@
4
4
  require 'mercenary'
5
5
  require 'jekyll-auth'
6
6
  require 'open3'
7
- require 'jekyll-auth'
8
7
 
9
8
  Mercenary.program("jekyll-auth") do |p|
10
9
  p.version JekyllAuth::VERSION
@@ -62,9 +61,9 @@ Mercenary.program("jekyll-auth") do |p|
62
61
  exit 1
63
62
  end
64
63
 
65
- team_id = JekyllAuth::Comands.team_id(org, team)
64
+ team_id = JekyllAuth::Commands.team_id(org, team)
66
65
 
67
- if found
66
+ if team_id
68
67
  puts "The team ID for `@#{org}/#{team}` is `#{team_id}`".green
69
68
  else
70
69
  puts "Couldn't find the `@#{org}/#{team}` team.".red
@@ -17,7 +17,7 @@ Gem::Specification.new do |s|
17
17
  s.add_dependency "jekyll", "~> 2.0"
18
18
  s.add_dependency "sinatra-index", "~> 0.0"
19
19
  s.add_dependency "sinatra_auth_github", "~> 1.1"
20
- s.add_dependency "rack", "1.5.2"
20
+ s.add_dependency "rack", "~> 1.6"
21
21
  s.add_dependency "dotenv", "~> 1.0"
22
22
  s.add_dependency "rake", "~> 10.3"
23
23
  s.add_dependency "rack-ssl-enforcer", "~> 0.2"
@@ -1,3 +1,3 @@
1
1
  class JekyllAuth
2
- VERSION = '1.0.2'
2
+ VERSION = '1.0.3'
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: 1.0.2
4
+ version: 1.0.3
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-02-16 00:00:00.000000000 Z
11
+ date: 2015-06-17 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: jekyll
@@ -56,16 +56,16 @@ dependencies:
56
56
  name: rack
57
57
  requirement: !ruby/object:Gem::Requirement
58
58
  requirements:
59
- - - '='
59
+ - - "~>"
60
60
  - !ruby/object:Gem::Version
61
- version: 1.5.2
61
+ version: '1.6'
62
62
  type: :runtime
63
63
  prerelease: false
64
64
  version_requirements: !ruby/object:Gem::Requirement
65
65
  requirements:
66
- - - '='
66
+ - - "~>"
67
67
  - !ruby/object:Gem::Version
68
- version: 1.5.2
68
+ version: '1.6'
69
69
  - !ruby/object:Gem::Dependency
70
70
  name: dotenv
71
71
  requirement: !ruby/object:Gem::Requirement
@@ -268,7 +268,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
268
268
  version: '0'
269
269
  requirements: []
270
270
  rubyforge_project:
271
- rubygems_version: 2.2.0
271
+ rubygems_version: 2.2.3
272
272
  signing_key:
273
273
  specification_version: 4
274
274
  summary: A simple way to use Github OAuth to serve a protected jekyll site to your