Class: GemEnforcer::Configuration
- Inherits:
-
Object
- Object
- GemEnforcer::Configuration
- Includes:
- ClassComposer::Generator
- Defined in:
- lib/gem_enforcer/configuration.rb
Constant Summary collapse
- GITHUB_ACCESS_TOKEN =
Proc.new do token = ENV.fetch("GITHUB_TOKEN") do ENV.fetch("BUNDLE_GITHUB__COM") do raise GemEnforcer::Error, "Expected access token in `GITHUB_TOKEN` or `BUNDLE_GITHUB__COM`" end end if token.end_with?(":x-oauth-basic") token.split(":x-oauth-basic")[0] else token end end
- DEFAULT_YAML_PATH =
Proc.new do if defined?(Rails) "#{Rails.root}/config/gem_enforcer.yml" else "/gem/gem_enforcer.yml" end end