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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 4aa19772ee6eb9fbc74b590baa566f4cfde43db9
4
- data.tar.gz: 57f5f353d78eee5a174165adac509ef69ddb1a8a
3
+ metadata.gz: 1118d4b7321057dddb6e61f731ddbe2a006cd31e
4
+ data.tar.gz: df1e23291701da84974b3f568dfc211570062daf
5
5
  SHA512:
6
- metadata.gz: b0b7ca49d5056a76e89530cee2f40913660649054d15294871ffe2e02e80348082103366493630cac0d3236930d597c90017269b650647b5f7d8016e8539ce37
7
- data.tar.gz: 124da27fd3bfee7347f7972b84d6112dbe9e86c22ae70eb770b5ae02fcbcd3ef57c7aaeef3f8477363c04e9aa00e493bbf2bc75424e24816d16d83538b6f3b96
6
+ metadata.gz: 28b0049ba607bd46df91bc17b21f7f57b620cd669b1b6fa26fe2dbe703bb661e337557c1806a706b85f509097dcc979c41a02c53fc411dca2cdffb6b4b807885
7
+ data.tar.gz: ab2f7fecfb1ab15cdfdecbd401dd35c94bfe73d60a94da14177839ba3285f1821c263619a46ed6ae4fa568fed9b8058ada5bc6b7713164d94c57c59dcb765839
@@ -1,3 +1,7 @@
1
+ # 0.2.1
2
+
3
+ - Add custom GitLab URL setting
4
+
1
5
  # 0.2.0
2
6
 
3
7
  - #8 - Fully automated! Use new gitlab API for the last step
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 https://gitlab.com/#{gitlab_repo}/commits/#{branch}"
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: 'https://gitlab.com/api/v3/') do |faraday|
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 https://gitlab.com/#{gitlab_repo}/pages"
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 ""
@@ -1,7 +1,7 @@
1
1
  module Jekyll
2
2
  module Gitlab
3
3
  module Letsencrypt
4
- VERSION = "0.2.0"
4
+ VERSION = "0.2.1"
5
5
  end
6
6
  end
7
7
  end
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.0
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-01-22 00:00:00.000000000 Z
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.13
169
+ rubygems_version: 2.6.14
170
170
  signing_key:
171
171
  specification_version: 4
172
172
  summary: Automate letsencrypt renewals for gitlab pages.