class Jekyll::Gitlab::Letsencrypt::Configuration

Constants

DEFAULT_BRANCH
DEFAULT_COMMIT_MESSAGE
DEFAULT_DELAY_TIME
DEFAULT_ENDPOINT
DEFAULT_FILENAME
DEFAULT_GITLAB_URL
DEFAULT_INITIAL_DELAY
DEFAULT_LAYOUT
DEFAULT_SCHEME
REQUIRED_KEYS

Public Class Methods

append_str() click to toggle source
# File lib/jekyll/gitlab/letsencrypt/configuration.rb, line 46
def append_str
  jekyll_config['append_str'] || ''
end
base_path() click to toggle source
# File lib/jekyll/gitlab/letsencrypt/configuration.rb, line 38
def base_path
  jekyll_config['base_path'] || ''
end
branch() click to toggle source
# File lib/jekyll/gitlab/letsencrypt/configuration.rb, line 66
def branch
  jekyll_config['branch'] || DEFAULT_BRANCH
end
commit_message() click to toggle source
# File lib/jekyll/gitlab/letsencrypt/configuration.rb, line 94
def commit_message
  jekyll_config['commit_message'] || DEFAULT_COMMIT_MESSAGE
end
delay_time() click to toggle source
# File lib/jekyll/gitlab/letsencrypt/configuration.rb, line 78
def delay_time
  jekyll_config['delay_time'] || DEFAULT_DELAY_TIME
end
domain() click to toggle source
# File lib/jekyll/gitlab/letsencrypt/configuration.rb, line 62
def domain
  jekyll_config['domain']
end
email() click to toggle source
# File lib/jekyll/gitlab/letsencrypt/configuration.rb, line 58
def email
  jekyll_config['email']
end
endpoint() click to toggle source
# File lib/jekyll/gitlab/letsencrypt/configuration.rb, line 26
def endpoint
  jekyll_config['endpoint'] || DEFAULT_ENDPOINT
end
filename() click to toggle source
# File lib/jekyll/gitlab/letsencrypt/configuration.rb, line 70
def filename
  jekyll_config['filename'] || DEFAULT_FILENAME
end
gitlab_repo() click to toggle source
# File lib/jekyll/gitlab/letsencrypt/configuration.rb, line 34
def gitlab_repo
  jekyll_config['gitlab_repo']
end
gitlab_url() click to toggle source
# File lib/jekyll/gitlab/letsencrypt/configuration.rb, line 30
def gitlab_url
  jekyll_config['gitlab_url'] || DEFAULT_GITLAB_URL
end
initial_delay() click to toggle source
# File lib/jekyll/gitlab/letsencrypt/configuration.rb, line 74
def initial_delay
  jekyll_config['initial_delay'] || DEFAULT_INITIAL_DELAY
end
jekyll_config() click to toggle source
# File lib/jekyll/gitlab/letsencrypt/configuration.rb, line 90
def jekyll_config
  @jekyll_config ||= (Jekyll.configuration({})['gitlab-letsencrypt'] || {})
end
layout() click to toggle source
# File lib/jekyll/gitlab/letsencrypt/configuration.rb, line 50
def layout
  jekyll_config['layout'] || DEFAULT_LAYOUT
end
personal_access_token() click to toggle source
# File lib/jekyll/gitlab/letsencrypt/configuration.rb, line 54
def personal_access_token
  jekyll_config['personal_access_token'].presence || ENV['GITLAB_TOKEN'].presence
end
pretty_url?() click to toggle source
# File lib/jekyll/gitlab/letsencrypt/configuration.rb, line 42
def pretty_url?
  !!jekyll_config['pretty_url']
end
reset!() click to toggle source
# File lib/jekyll/gitlab/letsencrypt/configuration.rb, line 86
def reset!
  @jekyll_config = nil
end
scheme() click to toggle source
# File lib/jekyll/gitlab/letsencrypt/configuration.rb, line 82
def scheme
  jekyll_config['scheme'] || DEFAULT_SCHEME
end
valid?() click to toggle source
# File lib/jekyll/gitlab/letsencrypt/configuration.rb, line 22
def valid?
  REQUIRED_KEYS.all? { |key| jekyll_config.has_key? key } && personal_access_token
end