jekyll-auth 2.1.0 → 2.1.3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (49) hide show
  1. checksums.yaml +5 -5
  2. data/.github/CODEOWNERS +3 -0
  3. data/.github/ISSUE_TEMPLATE/bug_report.md +28 -0
  4. data/.github/ISSUE_TEMPLATE/feature_request.md +21 -0
  5. data/.github/config.yml +23 -0
  6. data/.github/dependabot.yml +10 -0
  7. data/.github/funding.yml +1 -0
  8. data/.github/no-response.yml +15 -0
  9. data/.github/release-drafter.yml +4 -0
  10. data/.github/settings.yml +33 -0
  11. data/.github/stale.yml +29 -0
  12. data/.github/workflows/ci.yml +24 -0
  13. data/.github/workflows/codeql-analysis.yml +70 -0
  14. data/.rubocop.yml +13 -4
  15. data/.travis.yml +3 -3
  16. data/Gemfile +3 -1
  17. data/Rakefile +13 -11
  18. data/bin/jekyll-auth +8 -8
  19. data/docs/CODE_OF_CONDUCT.md +46 -0
  20. data/docs/CONTRIBUTING.md +88 -0
  21. data/docs/README.md +37 -0
  22. data/docs/SECURITY.md +3 -0
  23. data/docs/_config.yml +2 -0
  24. data/docs/configuring.md +36 -0
  25. data/docs/getting-started.md +63 -0
  26. data/docs/running-locally.md +24 -0
  27. data/docs/troubleshooting.md +31 -0
  28. data/jekyll-auth.gemspec +30 -25
  29. data/lib/jekyll-auth.rb +3 -0
  30. data/lib/jekyll_auth/auth_site.rb +2 -0
  31. data/lib/jekyll_auth/commands.rb +5 -1
  32. data/lib/jekyll_auth/config.rb +15 -8
  33. data/lib/jekyll_auth/config_error.rb +2 -0
  34. data/lib/jekyll_auth/helpers.rb +3 -0
  35. data/lib/jekyll_auth/jekyll_site.rb +4 -2
  36. data/lib/jekyll_auth/sinatra/auth/github.rb +8 -4
  37. data/lib/jekyll_auth/version.rb +3 -1
  38. data/spec/jekyll_auth_auth_site_spec.rb +2 -0
  39. data/spec/jekyll_auth_bin_spec.rb +2 -0
  40. data/spec/jekyll_auth_commands_spec.rb +2 -0
  41. data/spec/jekyll_auth_helpers_spec.rb +2 -0
  42. data/spec/jekyll_auth_jekyll_site_spec.rb +3 -1
  43. data/spec/jekyll_auth_spec.rb +2 -0
  44. data/spec/spec_helper.rb +3 -0
  45. data/templates/.gitignore +0 -1
  46. data/templates/Rakefile +3 -1
  47. data/templates/config.ru +3 -1
  48. metadata +143 -52
  49. data/README.md +0 -179
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
- SHA1:
3
- metadata.gz: 5252fb3ba4db62cb22f5f9949f54a2e0612ed060
4
- data.tar.gz: ae51f402692073b5b79942f62af6885533bf41fc
2
+ SHA256:
3
+ metadata.gz: 306be470270633bbb7a21020a1e1f8ddb9002b554aaeaed725d6f5563cdf38c6
4
+ data.tar.gz: 666d48dd94f5b68a82449270e34ad87753d0185ef1b432816e94730696d8bb39
5
5
  SHA512:
6
- metadata.gz: c85daf40909c0eca989d2c468fd68edc67d4fea09b197f64dd06194f9bfb6a045849e8766720427ba683023b80ba58e154de8d9952c2a65cd3054640e13291d8
7
- data.tar.gz: 1409e332aca6db366fa2dc1c4c8a00aea75e5dbd38f78800b21eb78f4c71ffe64d94790f8b5903758c427ba7de188db89bd2f8b1898f9c0165989d3f423e57c3
6
+ metadata.gz: f5207e1ae7ba9beafe70c083c55d0b5470ebe64bc3f13fea97155b2246508ef454ad7a508379601ed8b4372908b2a58e6c5aab6169eaebf712976ba9f4a64ee6
7
+ data.tar.gz: a4927d356e22a7cf27455a7f95f3a34ab90ada570ecea74016580bd7045c2dff650ba4173f7c5ea9e56104236415c3ff130d3f0c4ef3200bd6b06f89eed30fbb
@@ -0,0 +1,3 @@
1
+ # Require @benbalter's :+1: for changes to the .github repo-config files
2
+ # mainly due to https://github.com/probot/settings privilege escalation
3
+ .github/* @benbalter
@@ -0,0 +1,28 @@
1
+ ---
2
+ name: Bug report
3
+ about: Create a report to help us improve
4
+
5
+ ---
6
+
7
+ ### Describe the bug
8
+
9
+ A clear and concise description of what the bug is.
10
+
11
+ ### Steps to reproduce the behavior
12
+
13
+ 1. Go to '...'
14
+ 2. Click on '....'
15
+ 3. Scroll down to '....'
16
+ 4. See error
17
+
18
+ ### Expected behavior
19
+
20
+ A clear and concise description of what you expected to happen.
21
+
22
+ ### Screenshots
23
+
24
+ If applicable, add screenshots to help explain your problem.
25
+
26
+ ### Additional context
27
+
28
+ Add any other context about the problem here.
@@ -0,0 +1,21 @@
1
+ ---
2
+ name: Feature request
3
+ about: Suggest an idea for this project
4
+
5
+ ---
6
+
7
+ ### Is your feature request related to a problem? Please describe the problem you're trying to solve.
8
+
9
+ A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
10
+
11
+ ### Describe the solution you'd like
12
+
13
+ A clear and concise description of what you want to happen.
14
+
15
+ ### Describe alternatives you've considered
16
+
17
+ A clear and concise description of any alternative solutions or features you've considered.
18
+
19
+ ### Additional context
20
+
21
+ Add any other context or screenshots about the feature request here.
@@ -0,0 +1,23 @@
1
+ # Behaviorbot config. See https://github.com/behaviorbot/ for more information.
2
+ # Note: Please Don't edit this file directly.
3
+ # Edit https://github.com/benbalter/shared-community-files instead.
4
+
5
+ # Configuration for update-docs - https://github.com/behaviorbot/update-docs
6
+ updateDocsComment: "Thanks for the pull request! If you are making any changes to the user-facing functionality, please be sure to update the documentation in the `README` or `docs/` folder alongside your change. :heart:"
7
+
8
+ # Configuration for request-info - https://github.com/behaviorbot/request-info
9
+ requestInfoReplyComment: Thanks for this. Do you mind providing a bit more information about what problem you're trying to solve?
10
+ requestInfoLabelToAdd: more-information-needed
11
+
12
+ # Configuration for new-issue-welcome - https://github.com/behaviorbot/new-issue-welcome
13
+ #newIssueWelcomeComment: >
14
+ # Welcome!
15
+
16
+ # Configuration for new-pr-welcome - https://github.com/behaviorbot/new-pr-welcome
17
+ newPRWelcomeComment: Welcome! Congrats on your first pull request to Jekyll Auth. If you haven't already, please be sure to check out [the contributing guidelines](https://github.com/benbalter/jekyll-auth/blob/master/docs/CONTRIBUTING.md).
18
+
19
+ # Configuration for first-pr-merge - https://github.com/behaviorbot/first-pr-merge
20
+ firstPRMergeComment: "Congrats on getting your first pull request to Jekyll Auth merged! Without amazing humans like you submitting pull requests, we couldn’t run this project. You rock! :tada:<br /><br />If you're interested in tackling another bug or feature, take a look at [the open issues](https://github.com/benbalter/jekyll-auth/issues), especially those [labeled `help wanted`](https://github.com/benbalter/jekyll-auth/issues?q=is%3Aopen+is%3Aissue+label%3A%22help+wanted%22)."
21
+
22
+ # Bug workaround
23
+ contact_links: []
@@ -0,0 +1,10 @@
1
+ version: 2
2
+ updates:
3
+ - package-ecosystem: bundler
4
+ directory: "/"
5
+ schedule:
6
+ interval: weekly
7
+ - package-ecosystem: github-actions
8
+ directory: "/"
9
+ schedule:
10
+ interval: weekly
@@ -0,0 +1 @@
1
+ patreon: benbalter
@@ -0,0 +1,15 @@
1
+ # Configuration for probot-no-response - https://github.com/probot/no-response
2
+ # Note: Please Don't edit this file directly.
3
+ # Edit https://github.com/benbalter/shared-community-files instead.
4
+
5
+ # Number of days of inactivity before an Issue is closed for lack of response
6
+ daysUntilClose: 14
7
+ # Label requiring a response
8
+ responseRequiredLabel: more-information-needed
9
+ # Comment to post when closing an Issue for lack of response. Set to `false` to disable
10
+ closeComment: >
11
+ This issue has been automatically closed because there has been no response
12
+ to our request for more information from the original author. With only the
13
+ information that is currently in the issue, we don't have enough information
14
+ to take action. Please reach out if you have or find the answers we need so
15
+ that we can investigate further.
@@ -0,0 +1,4 @@
1
+ template: |
2
+ ## What's Changed
3
+
4
+ $CHANGES
@@ -0,0 +1,33 @@
1
+ # Repository settings set via https://github.com/probot/settings
2
+ # Note: Please Don't edit this file directly.
3
+ # Edit https://github.com/benbalter/shared-community-files instead.
4
+
5
+ repository:
6
+ has_issues: true
7
+ has_wiki: false
8
+ has_projects: false
9
+ has_downloads: false
10
+
11
+ labels:
12
+ - name: help wanted
13
+ oldname: help-wanted
14
+ color: 0e8a16
15
+ - name: more-information-needed
16
+ color: d93f0b
17
+ - name: bug
18
+ color: b60205
19
+ - name: feature
20
+ color: 1d76db
21
+ - name: good first issue
22
+ color: "5319e7"
23
+
24
+ # Not currently implemented by probot/settings, but manually implemented in script/deploy
25
+ branch_protection:
26
+ restrictions: null
27
+ enforce_admins: false
28
+ required_status_checks:
29
+ strict: true
30
+ contexts:
31
+ - "continuous-integration/travis-ci"
32
+ required_pull_request_reviews:
33
+ require_code_owner_reviews: true
data/.github/stale.yml ADDED
@@ -0,0 +1,29 @@
1
+ # Configuration for probot-stale - https://github.com/probot/stale
2
+ # Note: Please Don't edit this file directly.
3
+ # Edit https://github.com/benbalter/shared-community-files instead.
4
+
5
+ # Number of days of inactivity before an Issue or Pull Request becomes stale
6
+ daysUntilStale: 60
7
+
8
+ # Number of days of inactivity before a stale Issue or Pull Request is closed
9
+ daysUntilClose: 7
10
+
11
+ # Issues or Pull Requests with these labels will never be considered stale
12
+ exemptLabels:
13
+ - pinned
14
+ - security
15
+
16
+ # Label to use when marking as stale
17
+ staleLabel: wontfix
18
+
19
+ # Comment to post when marking as stale. Set to `false` to disable
20
+ markComment: >
21
+ This issue has been automatically marked as stale because it has not had
22
+ recent activity. It will be closed if no further activity occurs. Thank you
23
+ for your contributions.
24
+
25
+ # Comment to post when closing a stale Issue or Pull Request. Set to `false` to disable
26
+ closeComment: false
27
+
28
+ # Limit to only `issues` or `pulls`
29
+ # only: issues
@@ -0,0 +1,24 @@
1
+ on: push
2
+ name: CI
3
+ jobs:
4
+ ci:
5
+ runs-on: ubuntu-latest
6
+ steps:
7
+ - name: Checkout
8
+ uses: actions/checkout@v3
9
+
10
+ - uses: ruby/setup-ruby@v1
11
+ with:
12
+ bundler-cache: true
13
+ ruby-version: 3.0
14
+
15
+ - name: Setup Git
16
+ run: |
17
+ git config --global user.email "you@example.com"
18
+ git config --global user.name "Your Name"
19
+
20
+ - name: Bootstrap
21
+ run: script/bootstrap
22
+
23
+ - name: test
24
+ run: script/cibuild
@@ -0,0 +1,70 @@
1
+ # For most projects, this workflow file will not need changing; you simply need
2
+ # to commit it to your repository.
3
+ #
4
+ # You may wish to alter this file to override the set of languages analyzed,
5
+ # or to provide custom queries or build logic.
6
+ #
7
+ # ******** NOTE ********
8
+ # We have attempted to detect the languages in your repository. Please check
9
+ # the `language` matrix defined below to confirm you have the correct set of
10
+ # supported CodeQL languages.
11
+ #
12
+ name: "CodeQL"
13
+
14
+ on:
15
+ push:
16
+ branches: [ master ]
17
+ pull_request:
18
+ # The branches below must be a subset of the branches above
19
+ branches: [ master ]
20
+ schedule:
21
+ - cron: '36 4 * * 3'
22
+
23
+ jobs:
24
+ analyze:
25
+ name: Analyze
26
+ runs-on: ubuntu-latest
27
+ permissions:
28
+ actions: read
29
+ contents: read
30
+ security-events: write
31
+
32
+ strategy:
33
+ fail-fast: false
34
+ matrix:
35
+ language: [ 'ruby' ]
36
+ # CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python', 'ruby' ]
37
+ # Learn more about CodeQL language support at https://git.io/codeql-language-support
38
+
39
+ steps:
40
+ - name: Checkout repository
41
+ uses: actions/checkout@v3
42
+
43
+ # Initializes the CodeQL tools for scanning.
44
+ - name: Initialize CodeQL
45
+ uses: github/codeql-action/init@v2
46
+ with:
47
+ languages: ${{ matrix.language }}
48
+ # If you wish to specify custom queries, you can do so here or in a config file.
49
+ # By default, queries listed here will override any specified in a config file.
50
+ # Prefix the list here with "+" to use these queries and those in the config file.
51
+ # queries: ./path/to/local/query, your-org/your-repo/queries@main
52
+
53
+ # Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
54
+ # If this step fails, then you should remove it and run the build manually (see below)
55
+ - name: Autobuild
56
+ uses: github/codeql-action/autobuild@v2
57
+
58
+ # ℹ️ Command-line programs to run using the OS shell.
59
+ # 📚 https://git.io/JvXDl
60
+
61
+ # ✏️ If the Autobuild fails above, remove it and uncomment the following three lines
62
+ # and modify them (or add more) to build your code if your project
63
+ # uses a compiled language
64
+
65
+ #- run: |
66
+ # make bootstrap
67
+ # make release
68
+
69
+ - name: Perform CodeQL Analysis
70
+ uses: github/codeql-action/analyze@v2
data/.rubocop.yml CHANGED
@@ -1,5 +1,6 @@
1
+ require: rubocop-jekyll
1
2
  inherit_gem:
2
- jekyll: .rubocop.yml
3
+ rubocop-jekyll: .rubocop.yml
3
4
 
4
5
  Style/Documentation:
5
6
  Enabled: false
@@ -7,14 +8,22 @@ Style/Documentation:
7
8
  Metrics/MethodLength:
8
9
  Enabled: false
9
10
 
10
- Metrics/LineLength:
11
+ Layout/LineLength:
11
12
  Enabled: false
12
13
 
13
- Style/FileName:
14
+ Naming/FileName:
14
15
  Enabled: false
15
-
16
+
16
17
  Metrics/BlockLength:
17
18
  Enabled: false
18
19
 
19
20
  Style/DoubleNegation:
20
21
  Enabled: false
22
+
23
+ AllCops:
24
+ Exclude:
25
+ - vendor/**/*
26
+ - templates/**/*
27
+
28
+ Jekyll/NoPutsAllowed:
29
+ Enabled: false
data/.travis.yml CHANGED
@@ -1,8 +1,8 @@
1
1
  language: ruby
2
2
  rvm:
3
- - 2.0
4
- - 2.1
5
- - 2.2
3
+ - 3.0
4
+ - 2.7
5
+ - 2.6
6
6
  script: "./script/cibuild"
7
7
 
8
8
  before_script:
data/Gemfile CHANGED
@@ -1,3 +1,5 @@
1
- source 'https://rubygems.org'
1
+ # frozen_string_literal: true
2
+
3
+ source "https://rubygems.org"
2
4
 
3
5
  gemspec
data/Rakefile CHANGED
@@ -1,20 +1,22 @@
1
- require 'rubygems/package_task'
2
- require 'rubygems/specification'
3
- require 'bundler'
4
- require 'fileutils'
5
- require 'dotenv'
1
+ # frozen_string_literal: true
6
2
 
7
- task default: [:spec]
3
+ require "rubygems/package_task"
4
+ require "rubygems/specification"
5
+ require "bundler"
6
+ require "fileutils"
7
+ require "dotenv"
8
+
9
+ task :default => [:spec]
8
10
 
9
11
  task :site do
10
12
  Dotenv.load
11
- FileUtils.chdir 'templates'
13
+ FileUtils.chdir "templates"
12
14
  `bundle exec jekyll-auth`
13
15
  end
14
16
 
15
- require 'rspec/core/rake_task'
16
- desc 'Run specs'
17
+ require "rspec/core/rake_task"
18
+ desc "Run specs"
17
19
  RSpec::Core::RakeTask.new do |t|
18
- t.pattern = 'spec/**/*_spec.rb'
19
- t.rspec_opts = ['--order', 'rand', '--color']
20
+ t.pattern = "spec/**/*_spec.rb"
21
+ t.rspec_opts = ["--order", "rand", "--color"]
20
22
  end
data/bin/jekyll-auth CHANGED
@@ -1,4 +1,6 @@
1
1
  #!/usr/bin/env ruby
2
+ # frozen_string_literal: true
3
+
2
4
  # Command-line interface for jekyll-auth
3
5
 
4
6
  require "mercenary"
@@ -16,9 +18,7 @@ Mercenary.program("jekyll-auth") do |p|
16
18
  c.action do |_args, _options|
17
19
  JekyllAuth::Commands.copy_templates
18
20
 
19
- if JekyllAuth::Commands.changed?
20
- puts "Looks like we've made some changes, you may want to do a git commit and git push sometime soon".yellow
21
- end
21
+ puts "Looks like we've made some changes, you may want to do a git commit and git push sometime soon".yellow if JekyllAuth::Commands.changed?
22
22
 
23
23
  puts "Setup complete. Run `jekyll-auth` to view the authenticated site."
24
24
  end
@@ -99,13 +99,13 @@ Mercenary.program("jekyll-auth") do |p|
99
99
  p.command(:setup) do |c|
100
100
  c.syntax "setup"
101
101
  c.description "Configure Heroku for use with your Jekyll Auth site"
102
- c.option "client_id", "--client_id", "Your oauth app client id"
103
- c.option "client_secret", "--client_secret", "Your oauth app client secret"
104
- c.option "team_id", "--team_id", "The team to authenticate against"
105
- c.option "org_name", "--org_name", "An organization to authenticate against"
102
+ c.option "client_id", "--client_id <ID>", "Your oauth app client id"
103
+ c.option "client_secret", "--client_secret <SECRET>", "Your oauth app client secret"
104
+ c.option "team_id", "--team_id <ID>", "The team to authenticate against"
105
+ c.option "org_name", "--org_name <NAME>", "An organization to authenticate against"
106
106
  c.action do |_args, options|
107
107
  if find_executable("heroku").nil?
108
- say "Looks like we're missing the Heroku client. Let's see if we can't install it..."
108
+ puts "Looks like we're missing the Heroku client. Let's see if we can't install it..."
109
109
  JekyllAuth::Commands.execute_command "wget", "-qO-", "https://toolbelt.heroku.com/install.sh", "|", "sh"
110
110
  end
111
111
 
@@ -0,0 +1,46 @@
1
+ # Contributor Covenant Code of Conduct
2
+
3
+ ## Our Pledge
4
+
5
+ In the interest of fostering an open and welcoming environment, we as contributors and maintainers pledge to making participation in our project and our community a harassment-free experience for everyone, regardless of age, body size, disability, ethnicity, gender identity and expression, level of experience, nationality, personal appearance, race, religion, or sexual identity and orientation.
6
+
7
+ ## Our Standards
8
+
9
+ Examples of behavior that contributes to creating a positive environment include:
10
+
11
+ * Using welcoming and inclusive language
12
+ * Being respectful of differing viewpoints and experiences
13
+ * Gracefully accepting constructive criticism
14
+ * Focusing on what is best for the community
15
+ * Showing empathy towards other community members
16
+
17
+ Examples of unacceptable behavior by participants include:
18
+
19
+ * The use of sexualized language or imagery and unwelcome sexual attention or advances
20
+ * Trolling, insulting/derogatory comments, and personal or political attacks
21
+ * Public or private harassment
22
+ * Publishing others' private information, such as a physical or electronic address, without explicit permission
23
+ * Other conduct which could reasonably be considered inappropriate in a professional setting
24
+
25
+ ## Our Responsibilities
26
+
27
+ Project maintainers are responsible for clarifying the standards of acceptable behavior and are expected to take appropriate and fair corrective action in response to any instances of unacceptable behavior.
28
+
29
+ Project maintainers have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct, or to ban temporarily or permanently any contributor for other behaviors that they deem inappropriate, threatening, offensive, or harmful.
30
+
31
+ ## Scope
32
+
33
+ This Code of Conduct applies both within project spaces and in public spaces when an individual is representing the project or its community. Examples of representing a project or community include using an official project e-mail address, posting via an official social media account, or acting as an appointed representative at an online or offline event. Representation of a project may be further defined and clarified by project maintainers.
34
+
35
+ ## Enforcement
36
+
37
+ Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by contacting the project team at ben@balter.com. The project team will review and investigate all complaints, and will respond in a way that it deems appropriate to the circumstances. The project team is obligated to maintain confidentiality with regard to the reporter of an incident. Further details of specific enforcement policies may be posted separately.
38
+
39
+ Project maintainers who do not follow or enforce the Code of Conduct in good faith may face temporary or permanent repercussions as determined by other members of the project's leadership.
40
+
41
+ ## Attribution
42
+
43
+ This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4, available at [http://contributor-covenant.org/version/1/4][version]
44
+
45
+ [homepage]: http://contributor-covenant.org
46
+ [version]: http://contributor-covenant.org/version/1/4/
@@ -0,0 +1,88 @@
1
+ # Contributing to Jekyll Auth
2
+
3
+ Hi there! We're thrilled that you'd like to contribute to Jekyll Auth. Your help is essential for keeping it great.
4
+
5
+ Jekyll Auth is an open source project supported by the efforts of an entire community and built one contribution at a time by users like you. We'd love for you to get involved. Whatever your level of skill or however much time you can give, your contribution is greatly appreciated. There are many ways to contribute, from writing tutorials or blog posts, improving the documentation, submitting bug reports and feature requests, helping other users by commenting on issues, or writing code which can be incorporated into Jekyll Auth itself.
6
+
7
+ Following these guidelines helps to communicate that you respect the time of the developers managing and developing this open source project. In return, they should reciprocate that respect in addressing your issue, assessing changes, and helping you finalize your pull requests.
8
+
9
+ ## Troubleshooting
10
+
11
+ Having trouble with Jekyll Auth? Check out [the troubleshooting guidelines](troubleshooting.md) for solutions to common problems.
12
+
13
+
14
+ ## How to report a bug
15
+
16
+ Think you found a bug? Please check [the list of open issues](https://github.com/benbalter/jekyll-auth/issues) to see if your bug has already been reported. If it hasn't please [submit a new issue](https://github.com/benbalter/jekyll-auth/issues/new).
17
+
18
+ Here are a few tips for writing *great* bug reports:
19
+
20
+ * Describe the specific problem (e.g., "widget doesn't turn clockwise" versus "getting an error")
21
+ * Include the steps to reproduce the bug, what you expected to happen, and what happened instead
22
+ * Check that you are using the latest version of the project and its dependencies
23
+ * Include what version of the project your using, as well as any relevant dependencies
24
+ * Only include one bug per issue. If you have discovered two bugs, please file two issues
25
+ * Include screenshots or screencasts whenever possible
26
+ * Even if you don't know how to fix the bug, including a failing test may help others track it down
27
+
28
+ **If you find a security vulnerability, do not open an issue. Please email ben@balter.com instead.**
29
+
30
+ ## How to suggest a feature or enhancement
31
+
32
+ If you find yourself wishing for a feature that doesn't exist in Jekyll Auth, you are probably not alone. There are bound to be others out there with similar needs. Many of the features that Jekyll Auth has today have been added because our users saw the need.
33
+
34
+ Feature requests are welcome. But take a moment to find out whether your idea fits with the scope and goals of the project. It's up to you to make a strong case to convince the project's developers of the merits of this feature. Please provide as much detail and context as possible, including describing the problem you're trying to solve.
35
+
36
+ [Open an issue](https://github.com/benbalter/jekyll-auth/issues/new) which describes the feature you would like to see, why you want it, how it should work, etc.
37
+
38
+
39
+
40
+ ## Your first contribution
41
+
42
+ We'd love for you to contribute to the project. Unsure where to begin contributing to Jekyll Auth? You can start by looking through these "good first issue" and "help wanted" issues:
43
+
44
+ * [Good first issues](https://github.com/benbalter/jekyll-auth/issues?q=is%3Aissue+is%3Aopen+label%3A%22good+first+issue%22) - issues which should only require a few lines of code and a test or two
45
+ * [Help wanted issues](https://github.com/benbalter/jekyll-auth/issues?q=is%3Aissue+is%3Aopen+label%3A%22help+wanted%22) - issues which may be a bit more involved, but are specifically seeking community contributions
46
+
47
+ *p.s. Feel free to ask for help; everyone is a beginner at first* :smiley_cat:
48
+
49
+ ## How to propose changes
50
+
51
+ Here's a few general guidelines for proposing changes:
52
+
53
+ * If you are changing any user-facing functionality, please be sure to update the documentation
54
+ * If you are adding a new behavior or changing an existing behavior, please be sure to update the corresponding test(s)
55
+ * Each pull request should implement **one** feature or bug fix. If you want to add or fix more than one thing, submit more than one pull request
56
+ * Do not commit changes to files that are irrelevant to your feature or bug fix
57
+ * Don't bump the version number in your pull request (it will be bumped prior to release)
58
+ * Write [a good commit message](http://tbaggery.com/2008/04/19/a-note-about-git-commit-messages.html)
59
+
60
+ At a high level, [the process for proposing changes](https://guides.github.com/introduction/flow/) is:
61
+
62
+ 1. [Fork](https://github.com/benbalter/jekyll-auth/fork) and clone the project
63
+ 2. Configure and install the dependencies: `script/bootstrap`
64
+ 3. Make sure the tests pass on your machine: `script/cibuild`
65
+ 4. Create a descriptively named branch: `git checkout -b my-branch-name`
66
+ 5. Make your change, add tests and documentation, and make sure the tests still pass
67
+ 6. Push to your fork and [submit a pull request](https://github.com/benbalter/jekyll-auth/compare) describing your change
68
+ 7. Pat your self on the back and wait for your pull request to be reviewed and merged
69
+
70
+ **Interesting in submitting your first Pull Request?** It's easy! You can learn how from this *free* series [How to Contribute to an Open Source Project on GitHub](https://egghead.io/series/how-to-contribute-to-an-open-source-project-on-github)
71
+
72
+ ## Bootstrapping your local development environment
73
+
74
+ `script/bootstrap`
75
+
76
+ ## Running tests
77
+
78
+ `script/cibuild`
79
+
80
+ ## Code of conduct
81
+
82
+ This project is governed by [the Contributor Covenant Code of Conduct](CODE_OF_CONDUCT.md). By participating, you are expected to uphold this code.
83
+
84
+ ## Additional Resources
85
+
86
+ * [Contributing to Open Source on GitHub](https://guides.github.com/activities/contributing-to-open-source/)
87
+ * [Using Pull Requests](https://help.github.com/articles/using-pull-requests/)
88
+ * [GitHub Help](https://help.github.com)
data/docs/README.md ADDED
@@ -0,0 +1,37 @@
1
+ # Jekyll Auth
2
+
3
+ *A simple way to use GitHub OAuth to serve a protected Jekyll site to your GitHub organization*
4
+
5
+ [![Gem Version](https://badge.fury.io/rb/jekyll-auth.png)](http://badge.fury.io/rb/jekyll-auth) [![Build Status](https://travis-ci.org/benbalter/jekyll-auth.png?branch=master)](https://travis-ci.org/benbalter/jekyll-auth) [![PRs Welcome](https://img.shields.io/badge/PRs-welcome-brightgreen.svg?style=flat-square)](http://makeapullrequest.com)
6
+
7
+ ## Status
8
+
9
+ This project is end of life. If you are looking to serve a Jekyll site privately, consider [changing the visibility of your GitHub Pages site](https://docs.github.com/en/enterprise-cloud@latest/pages/getting-started-with-github-pages/changing-the-visibility-of-your-github-pages-site).
10
+
11
+ ## The problem
12
+
13
+ [Jekyll](http://github.com/mojombo/jekyll) and [GitHub Pages](http://pages.github.com) are awesome, right? Static site, lightning fast, everything versioned in Git. What else could you ask for?
14
+
15
+ But what if you only want to share that site with a select number of people? Before, you were SOL. Now, simply host the site on a free, [Heroku](http://heroku.com) Dyno, and whenever someone tries to access it, it will Oauth them against GitHub, and make sure they're a member of your Organization. Pretty cool, huh?
16
+
17
+ ## Requirements
18
+
19
+ 1. A GitHub account (one per user)
20
+ 2. A GitHub Organization (of which members will have access to the Jekyll site)
21
+ 3. A GitHub Application (you can [register one](https://github.com/settings/applications/new) for free)
22
+ 4. A Heroku account (you can technically use this elsewhere, but the instructions are for Heroku)
23
+
24
+ ## Under the hood
25
+
26
+ Every time you push to Heroku, we take advantage of the fact that Heroku automatically runs the `rake assets:precompile` command (normally used for Rails sites) to build our Jekyll site and store it statically, just like GitHub pages would.
27
+
28
+ Anytime a request comes in for a page, we run it through [Sinatra](http://www.sinatrarb.com/) (using the `_site` folder as the static file folder, just as `public` would be normally), and authenticate it using [sinatra\_auth\_github](https://github.com/atmos/sinatra_auth_github).
29
+
30
+ If they're in the org, they get the page. Otherwise, all they ever get is [the bouncer](http://octodex.github.com/bouncer/).
31
+
32
+ ## Further reading
33
+
34
+ * [Configuring](configuring.md)
35
+ * [Getting started](getting-started.md)
36
+ * [Running locally](running-locally.md)
37
+ * [Troubleshooting](troubleshooting.md)
data/docs/SECURITY.md ADDED
@@ -0,0 +1,3 @@
1
+ # Security Policy
2
+
3
+ To report a security vulnerability, please email [ben@balter.com](mailto:ben@balter.com).
data/docs/_config.yml ADDED
@@ -0,0 +1,2 @@
1
+ title: Jekyll Auth
2
+ permalink: pretty
@@ -0,0 +1,36 @@
1
+ ## Configuration
2
+
3
+ ### Whitelisting
4
+
5
+ Don't want to require authentication for every part of your site? Fine! Add a whitelist to your Jekyll's **config.yml** file:
6
+
7
+ ```yaml
8
+ jekyll_auth:
9
+ whitelist:
10
+ - drafts?
11
+ ```
12
+
13
+ `jekyll_auth.whitelist` takes an array of regular expressions as strings. The default auth behavior checks (and blocks) against root (`/`). Any path defined in the whitelist won't require authentication on your site.
14
+
15
+ What if you want to go the other way, and unauthenticate the entire site *except* for certain portions? You can define some regex magic for that:
16
+
17
+ ```yaml
18
+ jekyll_auth:
19
+ whitelist:
20
+ - "^((?!draft).)*$"
21
+ ```
22
+
23
+ There is also a more [extensive article containing installation instructions for Jekyll-Auth](http://fabian-kostadinov.github.io/2014/11/13/installation-of-jekyll-auth/) and a second one on [how to find your GitHub team ID](http://fabian-kostadinov.github.io/2015/01/16/how-to-find-a-github-team-id/).
24
+
25
+ ### Requiring SSL
26
+
27
+ If [you've got SSL set up](https://devcenter.heroku.com/articles/ssl-endpoint), simply add the following your your `_config.yml` file to ensure SSL is enforced.
28
+
29
+ ```yaml
30
+ jekyll_auth:
31
+ ssl: true
32
+ ```
33
+
34
+ ### Using a custom 404
35
+
36
+ Just like GitHub Pages, Jekyll Auth will honor a custom 404 page, if it's generated as `/404.html` in the built site.