Class: Jekyll::Gitlab::Letsencrypt::Process
- Inherits:
-
Object
- Object
- Jekyll::Gitlab::Letsencrypt::Process
- Defined in:
- lib/jekyll/gitlab/letsencrypt/process.rb
Instance Attribute Summary collapse
-
#client ⇒ Object
Returns the value of attribute client.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(client) ⇒ Process
constructor
A new instance of Process.
- #process! ⇒ Object
Constructor Details
#initialize(client) ⇒ Process
Returns a new instance of Process.
17 18 19 |
# File 'lib/jekyll/gitlab/letsencrypt/process.rb', line 17 def initialize(client) @client = client end |
Instance Attribute Details
#client ⇒ Object
Returns the value of attribute client.
8 9 10 |
# File 'lib/jekyll/gitlab/letsencrypt/process.rb', line 8 def client @client end |
Class Method Details
.process! ⇒ Object
10 11 12 13 |
# File 'lib/jekyll/gitlab/letsencrypt/process.rb', line 10 def self.process! client = Acme.new.register! self.new(client).process! end |
Instance Method Details
#process! ⇒ Object
21 22 23 24 25 26 27 28 29 30 31 32 33 34 |
# File 'lib/jekyll/gitlab/letsencrypt/process.rb', line 21 def process! Jekyll.logger.abort_with "Client is already authorized." if client. commit_to_gitlab! wait_until_challenge_is_present request_verification! await_verification_confirmation if update_gitlab_pages Jekyll.logger.info "Success!" else Jekyll.logger.info "Updating certificate failed... manual steps:" display_certificate end end |