The Wayback Machine - https://web.archive.org/web/20201129201612/https://github.com/github/pages-gem/pull/258
Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Disable whitelist with DISABLE_WHITELIST flag #258

Merged
merged 12 commits into from Mar 25, 2016
Merged

Conversation

@benbalter
Copy link
Contributor

@benbalter benbalter commented Mar 19, 2016

This will allow users to run non-whitelisted plugins locally, by passing the DISABLE_WHITELIST flag, which will whitelist any plugins included in the gem list.

benbalter added 2 commits Mar 19, 2016
let(:configuration) { Jekyll.configuration(test_config) }
let(:site) { Jekyll::Site.new(configuration) }
let(:effective_config) { described_class.effective_config(site.config) }
before { ENV.delete("DISABLE_WHITELIST") }
before { ENV["JEKYLL_ENV"] = "test" }

This comment has been minimized.

@parkr

parkr Mar 19, 2016
Member

before is generally seen as bad to use, because it's not specific. before(:all) or before(:each) would be preferable.

@@ -83,6 +83,10 @@ def processed(site)
site.instance_variable_set :@_github_pages_processed, true
end

def disable_whitelist?
Jekyll.env == "development" && ENV["DISABLE_WHITELIST"] == "1"

This comment has been minimized.

@parkr

parkr Mar 19, 2016
Member

What if I write DISABLE_WHITELIST=true? That'd fail here. Could we be more flexible on its value?

Gemfile Outdated

gem "jekyll_test_plugin_malicious",
:github => "jekyll/jekyll-test-plugin-malicious",
:branch => "safe-flag"

This comment has been minimized.

@parkr
Copy link
Member

@parkr parkr commented Mar 23, 2016

@benbalter still working on this?

@benbalter
Copy link
Contributor Author

@benbalter benbalter commented Mar 23, 2016

@parkr pushed up updates for your comments

Gemfile Outdated
@@ -1,3 +1,5 @@
source "https://rubygems.org"

gemspec

gem "jekyll_test_plugin_malicious", :github => "jekyll/jekyll-test-plugin-malicious"

This comment has been minimized.

@parkr

parkr Mar 24, 2016
Member

Can this be removed?

This comment has been minimized.

@benbalter

benbalter Mar 24, 2016
Author Contributor

It doesn't appear to be in Ruby gems?

This comment has been minimized.

@benbalter

benbalter Mar 25, 2016
Author Contributor

Had 2.0, not 0.2. Fixed.

quiet: false
repository: "github/pages-gem"

This comment has been minimized.

@parkr

parkr Mar 24, 2016
Member

Didn't we have a PR that grabbed this from the git remote-url?

This comment has been minimized.

@benbalter
Copy link
Contributor Author

@benbalter benbalter commented Mar 25, 2016

@parkr 👀 good to you?

@parkr
Copy link
Member

@parkr parkr commented Mar 25, 2016

@benbalter benbalter merged commit 7e6be46 into master Mar 25, 2016
2 checks passed
2 checks passed
continuous-integration/travis-ci/pr The Travis CI build passed
Details
continuous-integration/travis-ci/push The Travis CI build passed
Details
@benbalter benbalter deleted the disable-whitelist branch Mar 25, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
2 participants
You can’t perform that action at this time.