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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: c15aba535f2359601fa9cf8e50b45e1a5e7671717c08845f047b0eae35fb69a3
4
- data.tar.gz: e44fb5a0cc537fb0c12fd49c82f72ca7092d6f04d42c76bd7ef57803c87ea345
3
+ metadata.gz: '0967643c1140cd610c6e7784d44578c6b96881580029451268d040f910460f35'
4
+ data.tar.gz: 81e1e985e0803b25b23ac1f4852ba98640e2f318ccb23cbe796d1664e2b56080
5
5
  SHA512:
6
- metadata.gz: b43de2bf8c651358b253ab5dfb86d71349a56344adb2129bdb8fbd33bf9d202bc079d1b0054144b59a472e3e350a88b4aabb53f12850b6778f79acaad2eb9a52
7
- data.tar.gz: 570d1d302a389fb4c34071d29161fdc9e3a2122813610af1e0da9e573b49db8e5342c931584f74508896e0517d082174dbb5316a5dc7d1eaaeda528a8cc6cc6b
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
- - Once this is published, the new version of the gem can be installed in other projects like CustomersDot or GitLab via bundler or using `gem install` directly.
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
 
@@ -1,5 +1,5 @@
1
1
  module Gitlab
2
2
  class License
3
- VERSION = '2.4.0'.freeze
3
+ VERSION = '2.5.0'.freeze
4
4
  end
5
5
  end
@@ -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.0
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: 2023-12-22 00:00:00.000000000 Z
13
+ date: 2024-06-06 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: bundler