gitlab-license 2.4.0 → 2.5.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +3 -1
- data/lib/gitlab/license/version.rb +1 -1
- data/lib/gitlab/license.rb +9 -2
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: '0967643c1140cd610c6e7784d44578c6b96881580029451268d040f910460f35'
|
4
|
+
data.tar.gz: 81e1e985e0803b25b23ac1f4852ba98640e2f318ccb23cbe796d1664e2b56080
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c66cfd23e231099db7d1de6e09cbd087700653cf51bf492e537d9f413806ccf4a35b5e224037a4d113ec403fa1517a3f60bc09b1f96497d7d6f827f6751937eb
|
7
|
+
data.tar.gz: f197edefd9b05fa5f9a268839eefcaea9e38832ef526e54b19680ec7a3cb4482f812ee6eb77fc84af71df248e7ce37fa1e2a462fd02a71fc79c98689f6b9e608
|
data/README.md
CHANGED
@@ -27,7 +27,9 @@ To release a new version of this gem, follow these steps:
|
|
27
27
|
1. [Build the gem](https://guides.rubygems.org/command-reference/#gem-build) to be published: `gem build gitlab-license.gemspec`
|
28
28
|
1. [Publish the gem](https://guides.rubygems.org/publishing) to Rubygems: `gem push gitlab-license-2.1.0.gem`
|
29
29
|
- Note you will need to be added as an owner in Rubygems in order to publish.
|
30
|
-
|
30
|
+
1. Once published, the new version of the gem can be installed in projects that depend on `gitlab-license` like [CustomersDot](https://gitlab.com/gitlab-org/customers-gitlab-com) and [GitLab](https://gitlab.com/gitlab-org/gitlab).
|
31
|
+
- It is recommended to install the new version in both GitLab and CustomersDot to keep the versions aligned.
|
32
|
+
- This can be installed via bundler or using `gem install` directly.
|
31
33
|
|
32
34
|
## Usage
|
33
35
|
|
data/lib/gitlab/license.rb
CHANGED
@@ -8,7 +8,7 @@ require 'gitlab/license/encryptor'
|
|
8
8
|
require 'gitlab/license/boundary'
|
9
9
|
|
10
10
|
module Gitlab
|
11
|
-
class License
|
11
|
+
class License # rubocop:disable Metrics/ClassLength
|
12
12
|
class Error < StandardError; end
|
13
13
|
class ImportError < Error; end
|
14
14
|
class ValidationError < Error; end
|
@@ -79,7 +79,7 @@ module Gitlab
|
|
79
79
|
:activated_at, :restrictions, :cloud_licensing_enabled,
|
80
80
|
:offline_cloud_licensing_enabled, :auto_renew_enabled, :seat_reconciliation_enabled,
|
81
81
|
:operational_metrics_enabled, :generated_from_customers_dot,
|
82
|
-
:generated_from_cancellation
|
82
|
+
:generated_from_cancellation, :temporary_extension
|
83
83
|
|
84
84
|
alias_method :issued_at, :starts_at
|
85
85
|
alias_method :issued_at=, :starts_at=
|
@@ -198,6 +198,10 @@ module Gitlab
|
|
198
198
|
licensee['Company'].to_s.match?(/GitLab/i) && licensee['Email'].to_s.end_with?('@jihulab.com')
|
199
199
|
end
|
200
200
|
|
201
|
+
def temporary_extension?
|
202
|
+
temporary_extension == true
|
203
|
+
end
|
204
|
+
|
201
205
|
def restricted?(key = nil)
|
202
206
|
if key
|
203
207
|
restricted? && restrictions.has_key?(key)
|
@@ -234,6 +238,8 @@ module Gitlab
|
|
234
238
|
hash['generated_from_customers_dot'] = generated_from_customers_dot?
|
235
239
|
hash['generated_from_cancellation'] = generated_from_cancellation?
|
236
240
|
|
241
|
+
hash['temporary_extension'] = temporary_extension?
|
242
|
+
|
237
243
|
hash['restrictions'] = restrictions if restricted?
|
238
244
|
|
239
245
|
hash
|
@@ -283,6 +289,7 @@ module Gitlab
|
|
283
289
|
operational_metrics_enabled
|
284
290
|
generated_from_customers_dot
|
285
291
|
generated_from_cancellation
|
292
|
+
temporary_extension
|
286
293
|
].each do |attr_name|
|
287
294
|
public_send("#{attr_name}=", attributes[attr_name] == true)
|
288
295
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: gitlab-license
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.
|
4
|
+
version: 2.5.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Douwe Maan
|
@@ -10,7 +10,7 @@ authors:
|
|
10
10
|
autorequire:
|
11
11
|
bindir: exe
|
12
12
|
cert_chain: []
|
13
|
-
date:
|
13
|
+
date: 2024-06-06 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: bundler
|