gitlab-license 1.3.1 → 1.4.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/gitlab/license.rb +9 -2
- data/lib/gitlab/license/version.rb +1 -1
- 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: f525ce304f2d85f5f03f545039dccf52dea44383c11d714f1ca3c0ed78e30905
|
4
|
+
data.tar.gz: 7f34872e6678f0c3d9970cae4077122f96864bf9f1bec0219bae35709e538082
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ca9c47b79cfb8d3b6bbb780e565eccaf3005bb0b6f44c03fc9d5836bc18ae57a4a694958a8e7e74a71d83d7ec2c83384283aa6ba34f859b6df34142fafb4318f
|
7
|
+
data.tar.gz: 1c4ed9a4bb95a8094d11f3caec70aa94fae5651931546a3ef984500e8da7dd22f6c711b8ffe646f00f93283a557317ee3f415f44fe7c0fb660dffb0e16acc9d8
|
data/lib/gitlab/license.rb
CHANGED
@@ -52,7 +52,7 @@ module Gitlab
|
|
52
52
|
attr_reader :version
|
53
53
|
attr_accessor :licensee, :starts_at, :expires_at, :notify_admins_at,
|
54
54
|
:notify_users_at, :block_changes_at, :type, :last_synced_at,
|
55
|
-
:next_sync_at, :restrictions
|
55
|
+
:next_sync_at, :activated_at, :restrictions
|
56
56
|
|
57
57
|
alias_method :issued_at, :starts_at
|
58
58
|
alias_method :issued_at=, :starts_at=
|
@@ -78,6 +78,8 @@ module Gitlab
|
|
78
78
|
false
|
79
79
|
elsif next_sync_at && !next_sync_at.is_a?(DateTime)
|
80
80
|
false
|
81
|
+
elsif activated_at && !activated_at.is_a?(DateTime)
|
82
|
+
false
|
81
83
|
elsif type && type != 'cloud'
|
82
84
|
false
|
83
85
|
elsif restrictions && !restrictions.is_a?(Hash)
|
@@ -111,6 +113,10 @@ module Gitlab
|
|
111
113
|
next_sync_at
|
112
114
|
end
|
113
115
|
|
116
|
+
def activated?
|
117
|
+
activated_at
|
118
|
+
end
|
119
|
+
|
114
120
|
def expired?
|
115
121
|
will_expire? && Date.today >= expires_at
|
116
122
|
end
|
@@ -152,6 +158,7 @@ module Gitlab
|
|
152
158
|
|
153
159
|
hash['next_sync_at'] = next_sync_at if will_sync?
|
154
160
|
hash['last_synced_at'] = last_synced_at if will_sync?
|
161
|
+
hash['activated_at'] = activated_at if activated?
|
155
162
|
hash['type'] = type
|
156
163
|
|
157
164
|
hash['restrictions'] = restrictions if restricted?
|
@@ -192,7 +199,7 @@ module Gitlab
|
|
192
199
|
set_date_attribute(attr_name, attributes[attr_name])
|
193
200
|
end
|
194
201
|
|
195
|
-
%w[last_synced_at next_sync_at].each do |attr_name|
|
202
|
+
%w[last_synced_at next_sync_at activated_at].each do |attr_name|
|
196
203
|
set_datetime_attribute(attr_name, attributes[attr_name])
|
197
204
|
end
|
198
205
|
|
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: 1.
|
4
|
+
version: 1.4.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: 2021-
|
13
|
+
date: 2021-04-09 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: bundler
|