jekyll-gitlab-letsencrypt 0.2.0 → 0.2.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.markdown +4 -0
- data/README.md +1 -0
- data/lib/jekyll/gitlab/letsencrypt/configuration.rb +5 -0
- data/lib/jekyll/gitlab/letsencrypt/gitlab_client.rb +3 -3
- data/lib/jekyll/gitlab/letsencrypt/process.rb +4 -2
- data/lib/jekyll/gitlab/letsencrypt/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1118d4b7321057dddb6e61f731ddbe2a006cd31e
|
4
|
+
data.tar.gz: df1e23291701da84974b3f568dfc211570062daf
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 28b0049ba607bd46df91bc17b21f7f57b620cd669b1b6fa26fe2dbe703bb661e337557c1806a706b85f509097dcc979c41a02c53fc411dca2cdffb6b4b807885
|
7
|
+
data.tar.gz: ab2f7fecfb1ab15cdfdecbd401dd35c94bfe73d60a94da14177839ba3285f1821c263619a46ed6ae4fa568fed9b8058ada5bc6b7713164d94c57c59dcb765839
|
data/CHANGELOG.markdown
CHANGED
data/README.md
CHANGED
@@ -67,6 +67,7 @@ gitlab-letsencrypt:
|
|
67
67
|
delay_time: 15 # How long to wait between each check once it starts looking for the file
|
68
68
|
|
69
69
|
# Optional settings you probably don't need:
|
70
|
+
gitlab_url: 'https://someurl' # Set if you need to use a self-hosted GitLab instance
|
70
71
|
endpoint: 'https://somewhere' # if you're doing the ACME thing outside of letsencrypt
|
71
72
|
branch: 'master' # Defaults to master, but you can use a different branch
|
72
73
|
layout: 'null' # Layout to use for challenge file - defaults to null, but you can change if needed
|
@@ -12,6 +12,7 @@ module Jekyll
|
|
12
12
|
DEFAULT_INITIAL_DELAY = 120
|
13
13
|
DEFAULT_DELAY_TIME = 15
|
14
14
|
DEFAULT_SCHEME = 'http'
|
15
|
+
DEFAULT_GITLAB_URL = 'https://gitlab.com'
|
15
16
|
|
16
17
|
REQUIRED_KEYS = %w{gitlab_repo email domain}
|
17
18
|
|
@@ -25,6 +26,10 @@ module Jekyll
|
|
25
26
|
jekyll_config['endpoint'] || DEFAULT_ENDPOINT
|
26
27
|
end
|
27
28
|
|
29
|
+
def gitlab_url
|
30
|
+
jekyll_config['gitlab_url'] || DEFAULT_GITLAB_URL
|
31
|
+
end
|
32
|
+
|
28
33
|
def gitlab_repo
|
29
34
|
jekyll_config['gitlab_repo']
|
30
35
|
end
|
@@ -7,7 +7,7 @@ module Jekyll
|
|
7
7
|
|
8
8
|
attr_accessor :content
|
9
9
|
|
10
|
-
delegate :filename, :personal_access_token, :gitlab_repo, :branch, :domain, to: Configuration
|
10
|
+
delegate :filename, :personal_access_token, :gitlab_url, :gitlab_repo, :branch, :domain, to: Configuration
|
11
11
|
|
12
12
|
def commit!(content)
|
13
13
|
@content = content
|
@@ -49,7 +49,7 @@ module Jekyll
|
|
49
49
|
content: content
|
50
50
|
}.to_json
|
51
51
|
end
|
52
|
-
Jekyll.logger.info "Done Commiting! Check
|
52
|
+
Jekyll.logger.info "Done Commiting! Check #{gitlab_url}/#{gitlab_repo}/commits/#{branch}"
|
53
53
|
end
|
54
54
|
|
55
55
|
private
|
@@ -73,7 +73,7 @@ module Jekyll
|
|
73
73
|
end
|
74
74
|
|
75
75
|
def connection
|
76
|
-
@connection ||= Faraday.new(url:
|
76
|
+
@connection ||= Faraday.new(url: "#{gitlab_url}/api/v3/") do |faraday|
|
77
77
|
faraday.adapter Faraday.default_adapter
|
78
78
|
faraday.headers['Content-Type'] = 'application/json'
|
79
79
|
faraday.headers['PRIVATE-TOKEN'] = personal_access_token
|
@@ -12,7 +12,7 @@ module Jekyll
|
|
12
12
|
self.new(client).process!
|
13
13
|
end
|
14
14
|
|
15
|
-
delegate :base_path, :gitlab_repo, :pretty_url?, :layout, :domain, :initial_delay, :delay_time, :scheme, to: Configuration
|
15
|
+
delegate :base_path, :gitlab_url, :gitlab_repo, :pretty_url?, :layout, :domain, :initial_delay, :delay_time, :scheme, to: Configuration
|
16
16
|
|
17
17
|
def initialize(client)
|
18
18
|
@client = client
|
@@ -31,6 +31,8 @@ module Jekyll
|
|
31
31
|
Jekyll.logger.info "Updating certificate failed... manual steps:"
|
32
32
|
display_certificate
|
33
33
|
end
|
34
|
+
|
35
|
+
Jekyll.logger.info "All finished! Don't forget to \`git pull\` in order to bring your local repo up to date with changes this plugin made."
|
34
36
|
end
|
35
37
|
|
36
38
|
private
|
@@ -84,7 +86,7 @@ module Jekyll
|
|
84
86
|
|
85
87
|
def display_certificate
|
86
88
|
Jekyll.logger.info "Certifcate retrieved!"
|
87
|
-
Jekyll.logger.info "Go to
|
89
|
+
Jekyll.logger.info "Go to #{gitlab_url}/#{gitlab_repo}/pages"
|
88
90
|
Jekyll.logger.info " - If you already have an existing entry for #{domain}, remove it"
|
89
91
|
Jekyll.logger.info " - Then click + New Domain and enter the following:"
|
90
92
|
Jekyll.logger.info ""
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: jekyll-gitlab-letsencrypt
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Justin Aiken
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-
|
11
|
+
date: 2018-03-09 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -166,7 +166,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
166
166
|
version: '0'
|
167
167
|
requirements: []
|
168
168
|
rubyforge_project:
|
169
|
-
rubygems_version: 2.6.
|
169
|
+
rubygems_version: 2.6.14
|
170
170
|
signing_key:
|
171
171
|
specification_version: 4
|
172
172
|
summary: Automate letsencrypt renewals for gitlab pages.
|