gitlab-license 0.0.1 → 1.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
- SHA1:
3
- metadata.gz: 003f891e0c79c5dad69dd13991814fd337dd842f
4
- data.tar.gz: 9a324afa2d6c474d654baddded5d8c8f06c06e2c
2
+ SHA256:
3
+ metadata.gz: 383fa8e8886da54f66d4e605027ff68ce9b32427d9924d659e58c3c5035e6338
4
+ data.tar.gz: 502a4ea974f4299d9cd2d1a0c0a02780a79d15f56bdc8332806181227b3ef072
5
5
  SHA512:
6
- metadata.gz: 902fe5b33b61f2c259a638c4ed9bfdb05cade11046e4c7913557df9030e547ea29e8fa3e363208fd0d4f13b460b3300d646a78ef3d133444106aee2209d9850f
7
- data.tar.gz: 0ca91a33ad564337b64b691ddd7badb405899bc3a7b1d6d8c8e45e08397e59b4a031d30836553ea7568f9ba49ae7c7d49af86063f08e3379b58cb152f9e18161
6
+ metadata.gz: a4a4f59660c0aed25f811fa584a281dac4f14cd60ebbec4fdb6ecc47e6ec31f4e35ba5ac0000b20b418761dbdaf20f1a3a2b7a221a2b91480d94f87a57a97862
7
+ data.tar.gz: 29b852faadaf76f0d9064c414e954f425290b83618882a7a3bfd47b10babcd8ce7a8a76ebe8990a35688d24a3a9314f69f9a1faec1179d0c5490fde09370de01
@@ -0,0 +1,22 @@
1
+ inherit_from: .rubocop_todo.yml
2
+
3
+ require: rubocop-rspec
4
+
5
+ Metrics/BlockLength:
6
+ ExcludedMethods: ['describe', 'context']
7
+
8
+ Style/Alias:
9
+ EnforcedStyle: prefer_alias_method
10
+ Enabled: true
11
+
12
+ Style/HashEachMethods:
13
+ Enabled: true
14
+
15
+ Style/HashTransformKeys:
16
+ Enabled: true
17
+
18
+ Style/HashTransformValues:
19
+ Enabled: true
20
+
21
+ RSpec/MultipleExpectations:
22
+ Enabled: false
@@ -0,0 +1,84 @@
1
+ # This configuration was generated by
2
+ # `rubocop --auto-gen-config`
3
+ # on 2020-03-02 14:37:54 -0500 using RuboCop version 0.80.1.
4
+ # The point is for the user to remove these configuration records
5
+ # one by one as the offenses are removed from the code base.
6
+ # Note that changes in the inspected code, or installation of new
7
+ # versions of RuboCop, may require this file to be generated again.
8
+
9
+ # Offense count: 6
10
+ Metrics/AbcSize:
11
+ Max: 36
12
+
13
+ # Offense count: 1
14
+ # Configuration parameters: CountComments.
15
+ Metrics/ClassLength:
16
+ Max: 129
17
+
18
+ # Offense count: 3
19
+ Metrics/CyclomaticComplexity:
20
+ Max: 16
21
+
22
+ # Offense count: 5
23
+ # Configuration parameters: CountComments, ExcludedMethods.
24
+ Metrics/MethodLength:
25
+ Max: 38
26
+
27
+ # Offense count: 3
28
+ Metrics/PerceivedComplexity:
29
+ Max: 16
30
+
31
+ # Offense count: 3
32
+ Style/Documentation:
33
+ Exclude:
34
+ - 'spec/**/*'
35
+ - 'test/**/*'
36
+ - 'lib/gitlab/license.rb'
37
+ - 'lib/gitlab/license/boundary.rb'
38
+ - 'lib/gitlab/license/encryptor.rb'
39
+
40
+ # Offense count: 12
41
+ # Cop supports --auto-correct.
42
+ # Configuration parameters: EnforcedStyle.
43
+ # SupportedStyles: always, always_true, never
44
+ Style/FrozenStringLiteralComment:
45
+ Exclude:
46
+ - 'Gemfile'
47
+ - 'Rakefile'
48
+ - 'bin/console'
49
+ - 'gitlab-license.gemspec'
50
+ - 'lib/gitlab/license.rb'
51
+ - 'lib/gitlab/license/boundary.rb'
52
+ - 'lib/gitlab/license/encryptor.rb'
53
+ - 'lib/gitlab/license/version.rb'
54
+ - 'spec/gitlab/license/boundary_spec.rb'
55
+ - 'spec/gitlab/license/encryptor_spec.rb'
56
+ - 'spec/gitlab/license_spec.rb'
57
+ - 'spec/spec_helper.rb'
58
+
59
+ # Offense count: 1
60
+ # Configuration parameters: MinBodyLength.
61
+ Style/GuardClause:
62
+ Exclude:
63
+ - 'lib/gitlab/license.rb'
64
+
65
+ # Offense count: 1
66
+ # Cop supports --auto-correct.
67
+ # Configuration parameters: EnforcedStyle.
68
+ # SupportedStyles: short, verbose
69
+ Style/PreferredHashMethods:
70
+ Exclude:
71
+ - 'lib/gitlab/license.rb'
72
+
73
+ # Offense count: 1
74
+ # Cop supports --auto-correct.
75
+ Style/RescueModifier:
76
+ Exclude:
77
+ - 'lib/gitlab/license.rb'
78
+
79
+ # Offense count: 14
80
+ # Cop supports --auto-correct.
81
+ # Configuration parameters: AutoCorrect, AllowHeredoc, AllowURI, URISchemes, IgnoreCopDirectives, IgnoredPatterns.
82
+ # URISchemes: http, https
83
+ Layout/LineLength:
84
+ Max: 104
data/README.md CHANGED
@@ -48,9 +48,9 @@ license.licensee = {
48
48
  "Email" => "douwe@gitlab.com"
49
49
  }
50
50
 
51
- # The date the license was issued.
51
+ # The date the license starts.
52
52
  # Required.
53
- license.issued_at = Date.new(2015, 4, 24)
53
+ license.starts_at = Date.new(2015, 4, 24)
54
54
  # The date the license expires.
55
55
  # Not required, to allow lifetime licenses.
56
56
  license.expires_at = Date.new(2016, 4, 23)
data/Rakefile CHANGED
@@ -1 +1 @@
1
- require "bundler/gem_tasks"
1
+ require 'bundler/gem_tasks'
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env ruby
2
2
 
3
- require "bundler/setup"
4
- require "gitlab/license"
3
+ require 'bundler/setup'
4
+ require 'gitlab/license'
5
5
 
6
6
  # You can add fixtures and/or initialization code here to make experimenting
7
7
  # with your gem easier. You can also use a different console, if you like.
@@ -10,5 +10,5 @@ require "gitlab/license"
10
10
  # require "pry"
11
11
  # Pry.start
12
12
 
13
- require "irb"
13
+ require 'irb'
14
14
  IRB.start
@@ -1,24 +1,28 @@
1
- # coding: utf-8
2
- lib = File.expand_path('../lib', __FILE__)
1
+ lib = File.expand_path('lib', __dir__)
3
2
  $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
3
  require 'gitlab/license/version'
5
4
 
6
5
  Gem::Specification.new do |spec|
7
- spec.name = "gitlab-license"
6
+ spec.name = 'gitlab-license'
8
7
  spec.version = Gitlab::License::VERSION
9
- spec.authors = ["Douwe Maan"]
10
- spec.email = ["douwe@gitlab.com"]
8
+ spec.authors = ['Douwe Maan', 'Stan Hu', 'Tyler Amos']
9
+ spec.email = ['douwe@gitlab.com', 'stanhu@gitlab.com', 'tamos@gitlab.com']
11
10
 
12
- spec.summary = %q{gitlab-license helps you generate, verify and enforce software licenses.}
13
- spec.homepage = "https://gitlab.com/gitlab-org/gitlab-license"
14
- spec.license = "MIT"
11
+ spec.summary = 'gitlab-license helps you generate, verify and enforce software licenses.'
12
+ spec.homepage = 'https://dev.gitlab.org/gitlab/gitlab-license'
13
+ spec.license = 'MIT'
15
14
 
16
15
  spec.files = `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
17
- spec.bindir = "exe"
16
+ spec.bindir = 'exe'
18
17
  spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
19
- spec.require_paths = ["lib"]
18
+ spec.require_paths = ['lib']
20
19
 
21
- spec.add_development_dependency "bundler", "~> 1.9"
22
- spec.add_development_dependency "rake", "~> 10.0"
23
- spec.add_development_dependency "byebug"
20
+ spec.required_ruby_version = '>= 2.3.0'
21
+
22
+ spec.add_development_dependency 'bundler', '~> 1.9'
23
+ spec.add_development_dependency 'byebug'
24
+ spec.add_development_dependency 'rake', '~> 10.0'
25
+ spec.add_development_dependency 'rspec', '~> 3.9'
26
+ spec.add_development_dependency 'rubocop', '~> 0.80.1'
27
+ spec.add_development_dependency 'rubocop-rspec', '~> 1.38.1'
24
28
  end
@@ -1,46 +1,69 @@
1
- require "openssl"
2
- require "date"
3
- require "json"
4
- require "base64"
1
+ require 'openssl'
2
+ require 'date'
3
+ require 'json'
4
+ require 'base64'
5
5
 
6
- require "gitlab/license/version"
7
- require "gitlab/license/encryptor"
6
+ require 'gitlab/license/version'
7
+ require 'gitlab/license/encryptor'
8
+ require 'gitlab/license/boundary'
8
9
 
9
10
  module Gitlab
10
11
  class License
12
+ class Error < StandardError; end
13
+ class ImportError < Error; end
14
+ class ValidationError < Error; end
15
+
11
16
  class << self
12
- attr_accessor :encryption_key
17
+ attr_reader :encryption_key
13
18
  @encryption_key = nil
14
19
 
15
- def encryptor
16
- unless self.encryption_key && self.encryption_key.is_a?(OpenSSL::PKey::RSA)
17
- raise "No RSA encryption key provided."
18
- end
20
+ def encryption_key=(key)
21
+ raise ArgumentError, 'No RSA encryption key provided.' if key && !key.is_a?(OpenSSL::PKey::RSA)
19
22
 
20
- Encryptor.new(self.encryption_key)
23
+ @encryption_key = key
24
+ @encryptor = nil
21
25
  end
22
26
 
23
- def import(data)
24
- from_json(encryptor.decrypt(data))
27
+ def encryptor
28
+ @encryptor ||= Encryptor.new(encryption_key)
25
29
  end
26
30
 
27
- def from_json(license_json)
28
- new(JSON.parse(license_json))
31
+ def import(data)
32
+ raise ImportError, 'No license data.' if data.nil?
33
+
34
+ data = Boundary.remove_boundary(data)
35
+
36
+ begin
37
+ license_json = encryptor.decrypt(data)
38
+ rescue Encryptor::Error
39
+ raise ImportError, 'License data could not be decrypted.'
40
+ end
41
+
42
+ begin
43
+ attributes = JSON.parse(license_json)
44
+ rescue JSON::ParseError
45
+ raise ImportError, 'License data is invalid JSON.'
46
+ end
47
+
48
+ new(attributes)
29
49
  end
30
50
  end
31
51
 
32
52
  attr_reader :version
33
- attr_accessor :licensee, :issued_at, :expires_at
53
+ attr_accessor :licensee, :starts_at, :expires_at
34
54
  attr_accessor :notify_admins_at, :notify_users_at, :block_changes_at
35
55
  attr_accessor :restrictions
36
56
 
57
+ alias_method :issued_at, :starts_at
58
+ alias_method :issued_at=, :starts_at=
59
+
37
60
  def initialize(attributes = {})
38
61
  load_attributes(attributes)
39
62
  end
40
63
 
41
64
  def valid?
42
- return false if !licensee || !licensee.is_a?(Hash) || licensee.length == 0
43
- return false if !issued_at || !issued_at.is_a?(Date)
65
+ return false if !licensee || !licensee.is_a?(Hash) || licensee.empty?
66
+ return false if !starts_at || !starts_at.is_a?(Date)
44
67
  return false if expires_at && !expires_at.is_a?(Date)
45
68
  return false if notify_admins_at && !notify_admins_at.is_a?(Date)
46
69
  return false if notify_users_at && !notify_users_at.is_a?(Date)
@@ -51,39 +74,39 @@ module Gitlab
51
74
  end
52
75
 
53
76
  def validate!
54
- raise "License is invalid" unless valid?
77
+ raise ValidationError, 'License is invalid' unless valid?
55
78
  end
56
79
 
57
80
  def will_expire?
58
- self.expires_at
81
+ expires_at
59
82
  end
60
83
 
61
84
  def will_notify_admins?
62
- self.notify_admins_at
85
+ notify_admins_at
63
86
  end
64
87
 
65
88
  def will_notify_users?
66
- self.notify_users_at
89
+ notify_users_at
67
90
  end
68
91
 
69
92
  def will_block_changes?
70
- self.block_changes_at
93
+ block_changes_at
71
94
  end
72
95
 
73
96
  def expired?
74
- will_expire? && Date.today >= self.expires_at
97
+ will_expire? && Date.today >= expires_at
75
98
  end
76
99
 
77
100
  def notify_admins?
78
- will_notify_admins? && Date.today >= self.notify_admins_at
101
+ will_notify_admins? && Date.today >= notify_admins_at
79
102
  end
80
103
 
81
104
  def notify_users?
82
- will_notify_users? && Date.today >= self.notify_users_at
105
+ will_notify_users? && Date.today >= notify_users_at
83
106
  end
84
107
 
85
108
  def block_changes?
86
- will_block_changes? && Date.today >= self.block_changes_at
109
+ will_block_changes? && Date.today >= block_changes_at
87
110
  end
88
111
 
89
112
  def restricted?(key = nil)
@@ -94,32 +117,38 @@ module Gitlab
94
117
  end
95
118
  end
96
119
 
97
- def attributes
120
+ def attributes
98
121
  hash = {}
99
122
 
100
- hash["version"] = self.version
101
- hash["licensee"] = self.licensee
123
+ hash['version'] = version
124
+ hash['licensee'] = licensee
102
125
 
103
- hash["issued_at"] = self.issued_at
104
- hash["expires_at"] = self.expires_at if self.will_expire?
126
+ # `issued_at` is the legacy name for starts_at.
127
+ # TODO: Move to starts_at in a next version.
128
+ hash['issued_at'] = starts_at
129
+ hash['expires_at'] = expires_at if will_expire?
105
130
 
106
- hash["notify_admins_at"] = self.notify_admins_at if self.will_notify_admins?
107
- hash["notify_users_at"] = self.notify_users_at if self.will_notify_users?
108
- hash["block_changes_at"] = self.block_changes_at if self.will_block_changes?
131
+ hash['notify_admins_at'] = notify_admins_at if will_notify_admins?
132
+ hash['notify_users_at'] = notify_users_at if will_notify_users?
133
+ hash['block_changes_at'] = block_changes_at if will_block_changes?
109
134
 
110
- hash["restrictions"] = self.restrictions if self.restricted?
135
+ hash['restrictions'] = restrictions if restricted?
111
136
 
112
137
  hash
113
138
  end
114
139
 
115
- def to_json
116
- JSON.dump(self.attributes)
140
+ def to_json(*_args)
141
+ JSON.dump(attributes)
117
142
  end
118
143
 
119
- def export
144
+ def export(boundary: nil)
120
145
  validate!
121
146
 
122
- self.class.encryptor.encrypt(self.to_json)
147
+ data = self.class.encryptor.encrypt(to_json)
148
+
149
+ data = Boundary.add_boundary(data, boundary) if boundary
150
+
151
+ data
123
152
  end
124
153
 
125
154
  private
@@ -127,26 +156,26 @@ module Gitlab
127
156
  def load_attributes(attributes)
128
157
  attributes = Hash[attributes.map { |k, v| [k.to_s, v] }]
129
158
 
130
- version = attributes["version"] || 1
131
- unless version && version == 1
132
- raise ArgumentError, "Version is too new"
133
- end
159
+ version = attributes['version'] || 1
160
+ raise ArgumentError, 'Version is too new' unless version && version == 1
134
161
 
135
162
  @version = version
136
163
 
137
- @licensee = attributes["licensee"]
164
+ @licensee = attributes['licensee']
138
165
 
139
- %w(issued_at expires_at notify_admins_at notify_users_at block_changes_at).each do |attr|
166
+ # `issued_at` is the legacy name for starts_at.
167
+ # TODO: Move to starts_at in a next version.
168
+ %w[issued_at expires_at notify_admins_at notify_users_at block_changes_at].each do |attr|
140
169
  value = attributes[attr]
141
170
  value = Date.parse(value) rescue nil if value.is_a?(String)
142
-
171
+
143
172
  next unless value
144
173
 
145
174
  send("#{attr}=", value)
146
175
  end
147
176
 
148
- restrictions = attributes["restrictions"]
149
- if restrictions && restrictions.is_a?(Hash)
177
+ restrictions = attributes['restrictions']
178
+ if restrictions&.is_a?(Hash)
150
179
  restrictions = Hash[restrictions.map { |k, v| [k.to_sym, v] }]
151
180
  @restrictions = restrictions
152
181
  end
@@ -0,0 +1,40 @@
1
+ module Gitlab
2
+ class License
3
+ module Boundary
4
+ BOUNDARY_START = /(\A|\r?\n)-*BEGIN .+? LICENSE-*\r?\n/.freeze
5
+ BOUNDARY_END = /\r?\n-*END .+? LICENSE-*(\r?\n|\z)/.freeze
6
+
7
+ class << self
8
+ def add_boundary(data, product_name)
9
+ data = remove_boundary(data)
10
+
11
+ product_name.upcase!
12
+
13
+ pad = lambda do |message, width|
14
+ total_padding = [width - message.length, 0].max
15
+
16
+ padding = total_padding / 2.0
17
+ [
18
+ '-' * padding.ceil,
19
+ message,
20
+ '-' * padding.floor
21
+ ].join
22
+ end
23
+
24
+ [
25
+ pad.call("BEGIN #{product_name} LICENSE", 60),
26
+ data.strip,
27
+ pad.call("END #{product_name} LICENSE", 60)
28
+ ].join("\n")
29
+ end
30
+
31
+ def remove_boundary(data)
32
+ after_boundary = data.split(BOUNDARY_START).last
33
+ in_boundary = after_boundary.split(BOUNDARY_END).first
34
+
35
+ in_boundary
36
+ end
37
+ end
38
+ end
39
+ end
40
+ end
@@ -1,16 +1,20 @@
1
1
  module Gitlab
2
2
  class License
3
3
  class Encryptor
4
+ class Error < StandardError; end
5
+ class KeyError < Error; end
6
+ class DecryptionError < Error; end
7
+
4
8
  attr_accessor :key
5
9
 
6
10
  def initialize(key)
11
+ raise KeyError, 'No RSA encryption key provided.' if key && !key.is_a?(OpenSSL::PKey::RSA)
12
+
7
13
  @key = key
8
14
  end
9
15
 
10
16
  def encrypt(data)
11
- unless key.private?
12
- raise "Provided key is not a private key."
13
- end
17
+ raise KeyError, 'Provided key is not a private key.' unless key.private?
14
18
 
15
19
  # Encrypt the data using symmetric AES encryption.
16
20
  cipher = OpenSSL::Cipher::AES128.new(:CBC)
@@ -21,12 +25,12 @@ module Gitlab
21
25
  encrypted_data = cipher.update(data) + cipher.final
22
26
 
23
27
  # Encrypt the AES key using asymmetric RSA encryption.
24
- encrypted_key = self.key.private_encrypt(aes_key)
28
+ encrypted_key = key.private_encrypt(aes_key)
25
29
 
26
30
  encryption_data = {
27
- "data" => Base64.encode64(encrypted_data),
28
- "key" => Base64.encode64(encrypted_key),
29
- "iv" => Base64.encode64(aes_iv)
31
+ 'data' => Base64.encode64(encrypted_data),
32
+ 'key' => Base64.encode64(encrypted_key),
33
+ 'iv' => Base64.encode64(aes_iv)
30
34
  }
31
35
 
32
36
  json_data = JSON.dump(encryption_data)
@@ -34,27 +38,52 @@ module Gitlab
34
38
  end
35
39
 
36
40
  def decrypt(data)
37
- unless key.public?
38
- raise "Provided key is not a public key."
41
+ raise KeyError, 'Provided key is not a public key.' unless key.public?
42
+
43
+ json_data = Base64.decode64(data.chomp)
44
+
45
+ begin
46
+ encryption_data = JSON.parse(json_data)
47
+ rescue JSON::ParserError
48
+ raise DecryptionError, 'Encryption data is invalid JSON.'
39
49
  end
40
50
 
41
- json_data = Base64.decode64(data)
42
- encryption_data = JSON.parse(json_data)
51
+ unless %w[data key iv].all? { |key| encryption_data[key] }
52
+ raise DecryptionError, 'Required field missing from encryption data.'
53
+ end
43
54
 
44
- encrypted_data = Base64.decode64(encryption_data["data"])
45
- encrypted_key = Base64.decode64(encryption_data["key"])
46
- aes_iv = Base64.decode64(encryption_data["iv"])
55
+ encrypted_data = Base64.decode64(encryption_data['data'])
56
+ encrypted_key = Base64.decode64(encryption_data['key'])
57
+ aes_iv = Base64.decode64(encryption_data['iv'])
47
58
 
48
- # Decrypt the AES key using asymmetric RSA encryption.
49
- aes_key = self.key.public_decrypt(encrypted_key)
59
+ begin
60
+ # Decrypt the AES key using asymmetric RSA encryption.
61
+ aes_key = self.key.public_decrypt(encrypted_key)
62
+ rescue OpenSSL::PKey::RSAError
63
+ raise DecryptionError, 'AES encryption key could not be decrypted.'
64
+ end
50
65
 
51
66
  # Decrypt the data using symmetric AES encryption.
52
67
  cipher = OpenSSL::Cipher::AES128.new(:CBC)
53
68
  cipher.decrypt
54
- cipher.key = aes_key
55
- cipher.iv = aes_iv
56
69
 
57
- data = cipher.update(encrypted_data) + cipher.final
70
+ begin
71
+ cipher.key = aes_key
72
+ rescue OpenSSL::Cipher::CipherError
73
+ raise DecryptionError, 'AES encryption key is invalid.'
74
+ end
75
+
76
+ begin
77
+ cipher.iv = aes_iv
78
+ rescue OpenSSL::Cipher::CipherError
79
+ raise DecryptionError, 'AES IV is invalid.'
80
+ end
81
+
82
+ begin
83
+ data = cipher.update(encrypted_data) + cipher.final
84
+ rescue OpenSSL::Cipher::CipherError
85
+ raise DecryptionError, 'Data could not be decrypted.'
86
+ end
58
87
 
59
88
  data
60
89
  end
@@ -1,5 +1,5 @@
1
1
  module Gitlab
2
2
  class License
3
- VERSION = "0.0.1"
3
+ VERSION = '1.0.1'.freeze
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,16 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: gitlab-license
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 1.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Douwe Maan
8
+ - Stan Hu
9
+ - Tyler Amos
8
10
  autorequire:
9
11
  bindir: exe
10
12
  cert_chain: []
11
- date: 2015-04-29 00:00:00.000000000 Z
13
+ date: 2020-07-30 00:00:00.000000000 Z
12
14
  dependencies:
13
15
  - !ruby/object:Gem::Dependency
14
16
  name: bundler
@@ -24,6 +26,20 @@ dependencies:
24
26
  - - "~>"
25
27
  - !ruby/object:Gem::Version
26
28
  version: '1.9'
29
+ - !ruby/object:Gem::Dependency
30
+ name: byebug
31
+ requirement: !ruby/object:Gem::Requirement
32
+ requirements:
33
+ - - ">="
34
+ - !ruby/object:Gem::Version
35
+ version: '0'
36
+ type: :development
37
+ prerelease: false
38
+ version_requirements: !ruby/object:Gem::Requirement
39
+ requirements:
40
+ - - ">="
41
+ - !ruby/object:Gem::Version
42
+ version: '0'
27
43
  - !ruby/object:Gem::Dependency
28
44
  name: rake
29
45
  requirement: !ruby/object:Gem::Requirement
@@ -39,28 +55,60 @@ dependencies:
39
55
  - !ruby/object:Gem::Version
40
56
  version: '10.0'
41
57
  - !ruby/object:Gem::Dependency
42
- name: byebug
58
+ name: rspec
43
59
  requirement: !ruby/object:Gem::Requirement
44
60
  requirements:
45
- - - ">="
61
+ - - "~>"
46
62
  - !ruby/object:Gem::Version
47
- version: '0'
63
+ version: '3.9'
48
64
  type: :development
49
65
  prerelease: false
50
66
  version_requirements: !ruby/object:Gem::Requirement
51
67
  requirements:
52
- - - ">="
68
+ - - "~>"
53
69
  - !ruby/object:Gem::Version
54
- version: '0'
70
+ version: '3.9'
71
+ - !ruby/object:Gem::Dependency
72
+ name: rubocop
73
+ requirement: !ruby/object:Gem::Requirement
74
+ requirements:
75
+ - - "~>"
76
+ - !ruby/object:Gem::Version
77
+ version: 0.80.1
78
+ type: :development
79
+ prerelease: false
80
+ version_requirements: !ruby/object:Gem::Requirement
81
+ requirements:
82
+ - - "~>"
83
+ - !ruby/object:Gem::Version
84
+ version: 0.80.1
85
+ - !ruby/object:Gem::Dependency
86
+ name: rubocop-rspec
87
+ requirement: !ruby/object:Gem::Requirement
88
+ requirements:
89
+ - - "~>"
90
+ - !ruby/object:Gem::Version
91
+ version: 1.38.1
92
+ type: :development
93
+ prerelease: false
94
+ version_requirements: !ruby/object:Gem::Requirement
95
+ requirements:
96
+ - - "~>"
97
+ - !ruby/object:Gem::Version
98
+ version: 1.38.1
55
99
  description:
56
100
  email:
57
101
  - douwe@gitlab.com
102
+ - stanhu@gitlab.com
103
+ - tamos@gitlab.com
58
104
  executables: []
59
105
  extensions: []
60
106
  extra_rdoc_files: []
61
107
  files:
62
108
  - ".gitignore"
63
109
  - ".rspec"
110
+ - ".rubocop.yml"
111
+ - ".rubocop_todo.yml"
64
112
  - ".travis.yml"
65
113
  - Gemfile
66
114
  - LICENSE.txt
@@ -70,9 +118,10 @@ files:
70
118
  - bin/setup
71
119
  - gitlab-license.gemspec
72
120
  - lib/gitlab/license.rb
121
+ - lib/gitlab/license/boundary.rb
73
122
  - lib/gitlab/license/encryptor.rb
74
123
  - lib/gitlab/license/version.rb
75
- homepage: https://gitlab.com/gitlab-org/gitlab-license
124
+ homepage: https://dev.gitlab.org/gitlab/gitlab-license
76
125
  licenses:
77
126
  - MIT
78
127
  metadata: {}
@@ -84,15 +133,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
84
133
  requirements:
85
134
  - - ">="
86
135
  - !ruby/object:Gem::Version
87
- version: '0'
136
+ version: 2.3.0
88
137
  required_rubygems_version: !ruby/object:Gem::Requirement
89
138
  requirements:
90
139
  - - ">="
91
140
  - !ruby/object:Gem::Version
92
141
  version: '0'
93
142
  requirements: []
94
- rubyforge_project:
95
- rubygems_version: 2.2.2
143
+ rubygems_version: 3.0.3
96
144
  signing_key:
97
145
  specification_version: 4
98
146
  summary: gitlab-license helps you generate, verify and enforce software licenses.