entitlements-app 0.3.4 → 1.1.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: a19d65245ff875ecfe3952b55e47e794cb79762c453b5ad20e0276246459a1ee
4
- data.tar.gz: e376e43125fd225fa897b6eb8f587c388e696ded51711046cc480dcac98eebe6
3
+ metadata.gz: b65ef59f26ece50f2a7924ff8fb852ee89878bc88d6a7546d66928416da99029
4
+ data.tar.gz: 3a9a391bc53f96ed3b09f0e206a9a4d6d0eeb5e0cff7013c3372c9f47e96a5fb
5
5
  SHA512:
6
- metadata.gz: c99ea08f0a07149f7d3beb79a800f6614b416f5836768fa2879eb5430c7ec4180b1f1b63d710d8597c853a56ebb0c11d32a65081a5c73a268c90ff6c80db8f51
7
- data.tar.gz: b8eb8d2b8ab832b15b80aee87543d15ab8c8bb604768d7348146696010b6a759c58787993ac0142385bfde7d2584326be059b5ab217d9588b99595a52afb730b
6
+ metadata.gz: ea71dab3560473cf24819f74dc146eb8b357c96a6751f45f1bdef5c565cfb383afd0603a9deca5ede3cf6212fc82e2ade13b3ca70bf67486bcf067d111ac173f
7
+ data.tar.gz: 2e8ee03e6577a7a798b13af0f66571792a32a6087194f0952691b6511ebea19cc268976083ce231fad67a01494ec0a2eb4fbb097241bec62001fc98aa5fbf8f5
@@ -6,6 +6,7 @@ require "ruby_version_check"
6
6
 
7
7
  # Note that contracts.ruby has two specific ruby-version specific libraries, which we have vendored into lib/
8
8
  if RubyVersionCheck.ruby_version2?
9
+ puts "WARNING: Ruby 2.x is deprecated and will be removed in a future release. Please upgrade to Ruby 3.x."
9
10
  $LOAD_PATH.unshift(File.expand_path(File.join(__dir__, "../lib/contracts-ruby2/lib")))
10
11
  else
11
12
  $LOAD_PATH.unshift(File.expand_path(File.join(__dir__, "../lib/contracts-ruby3/lib")))
@@ -275,7 +275,7 @@ module Entitlements
275
275
  raw_key, operator, val = Regexp.last_match(1), Regexp.last_match(2), Regexp.last_match(3)
276
276
 
277
277
  key = if filter_keywords.include?(raw_key)
278
- "filter_#{raw_key}"
278
+ "filter_#{raw_key}"
279
279
  elsif MODIFIERS.include?(raw_key)
280
280
  "modifier_#{raw_key}"
281
281
  else
@@ -68,7 +68,7 @@ module Entitlements
68
68
  end
69
69
 
70
70
  values = if val.is_a?(String)
71
- [val]
71
+ [val]
72
72
  elsif val.is_a?(Array)
73
73
  val
74
74
  else
@@ -164,7 +164,7 @@ module Entitlements
164
164
  Contract C::None => C::HashOf[String => C::Any]
165
165
  def parsed_data
166
166
  @parsed_data ||= if RubyVersionCheck.ruby_version2?
167
- ::YAML.load(File.read(filename)).to_h
167
+ ::YAML.load(File.read(filename)).to_h
168
168
  else
169
169
  ::YAML.load(File.read(filename), permitted_classes: [Date]).to_h
170
170
  end
@@ -80,7 +80,7 @@ module Entitlements
80
80
 
81
81
  # :nocov:
82
82
  raw_person_data = if RubyVersionCheck.ruby_version2?
83
- ::YAML.load(File.read(filename)).to_h
83
+ ::YAML.load(File.read(filename)).to_h
84
84
  else
85
85
  ::YAML.load(File.read(filename), permitted_classes: [Date]).to_h
86
86
  end
@@ -27,7 +27,7 @@ module Entitlements
27
27
  entry = ldap.read(value)
28
28
  unless entry
29
29
  message = if filename
30
- "Failed to read ldap_group = #{value} (referenced in #{filename})"
30
+ "Failed to read ldap_group = #{value} (referenced in #{filename})"
31
31
  else
32
32
  # :nocov:
33
33
  "Failed to read ldap_group = #{value}"
@@ -383,7 +383,7 @@ module Entitlements
383
383
  Contract Net::LDAP::Entry => C::ArrayOf[String]
384
384
  def self.member_array(entry)
385
385
  members = if entry[:objectclass].include?("groupOfUniqueNames")
386
- entry[:uniquemember]
386
+ entry[:uniquemember]
387
387
  elsif entry[:objectclass].include?("groupOfNames")
388
388
  entry[:member]
389
389
  elsif entry[:objectclass].include?("posixGroup")
@@ -26,7 +26,7 @@ module Entitlements
26
26
  end
27
27
 
28
28
  file = if plugin["file"] !~ %r{/}
29
- File.expand_path(File.join("../plugins", plugin["file"]), File.dirname(__FILE__))
29
+ File.expand_path(File.join("../plugins", plugin["file"]), File.dirname(__FILE__))
30
30
  elsif plugin["file"].start_with?("/")
31
31
  plugin["file"]
32
32
  else
@@ -81,7 +81,7 @@ module Entitlements
81
81
 
82
82
  dir = Entitlements.config["groups"][group]["dir"]
83
83
  result_dir = if dir.nil?
84
- File.join(Entitlements.config_path, group)
84
+ File.join(Entitlements.config_path, group)
85
85
  elsif dir.start_with?("/")
86
86
  dir
87
87
  else
data/lib/version.rb CHANGED
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Entitlements
4
4
  module Version
5
- VERSION = "0.3.4"
5
+ VERSION = "1.1.0"
6
6
  end
7
7
  end
metadata CHANGED
@@ -1,49 +1,49 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: entitlements-app
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.4
4
+ version: 1.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - GitHub, Inc. Security Ops
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2024-05-29 00:00:00.000000000 Z
11
+ date: 2024-09-27 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: concurrent-ruby
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - '='
17
+ - - "~>"
18
+ - !ruby/object:Gem::Version
19
+ version: '1.3'
20
+ - - ">="
18
21
  - !ruby/object:Gem::Version
19
- version: 1.1.9
22
+ version: 1.3.1
20
23
  type: :runtime
21
24
  prerelease: false
22
25
  version_requirements: !ruby/object:Gem::Requirement
23
26
  requirements:
24
- - - '='
27
+ - - "~>"
25
28
  - !ruby/object:Gem::Version
26
- version: 1.1.9
29
+ version: '1.3'
30
+ - - ">="
31
+ - !ruby/object:Gem::Version
32
+ version: 1.3.1
27
33
  - !ruby/object:Gem::Dependency
28
34
  name: faraday
29
35
  requirement: !ruby/object:Gem::Requirement
30
36
  requirements:
31
- - - ">"
37
+ - - "~>"
32
38
  - !ruby/object:Gem::Version
33
39
  version: '2.0'
34
- - - "<="
35
- - !ruby/object:Gem::Version
36
- version: 2.7.10
37
40
  type: :runtime
38
41
  prerelease: false
39
42
  version_requirements: !ruby/object:Gem::Requirement
40
43
  requirements:
41
- - - ">"
44
+ - - "~>"
42
45
  - !ruby/object:Gem::Version
43
46
  version: '2.0'
44
- - - "<="
45
- - !ruby/object:Gem::Version
46
- version: 2.7.10
47
47
  - !ruby/object:Gem::Dependency
48
48
  name: net-ldap
49
49
  requirement: !ruby/object:Gem::Requirement
@@ -76,60 +76,80 @@ dependencies:
76
76
  name: optimist
77
77
  requirement: !ruby/object:Gem::Requirement
78
78
  requirements:
79
- - - '='
79
+ - - "~>"
80
80
  - !ruby/object:Gem::Version
81
- version: 3.0.0
81
+ version: '3.1'
82
82
  type: :runtime
83
83
  prerelease: false
84
84
  version_requirements: !ruby/object:Gem::Requirement
85
85
  requirements:
86
- - - '='
86
+ - - "~>"
87
87
  - !ruby/object:Gem::Version
88
- version: 3.0.0
88
+ version: '3.1'
89
89
  - !ruby/object:Gem::Dependency
90
- name: debug
90
+ name: ostruct
91
91
  requirement: !ruby/object:Gem::Requirement
92
92
  requirements:
93
- - - "<="
93
+ - - "~>"
94
94
  - !ruby/object:Gem::Version
95
- version: 1.8.0
96
- type: :development
95
+ version: 0.6.0
96
+ type: :runtime
97
97
  prerelease: false
98
98
  version_requirements: !ruby/object:Gem::Requirement
99
99
  requirements:
100
- - - "<="
100
+ - - "~>"
101
101
  - !ruby/object:Gem::Version
102
- version: 1.8.0
102
+ version: 0.6.0
103
103
  - !ruby/object:Gem::Dependency
104
- name: rake
104
+ name: logger
105
105
  requirement: !ruby/object:Gem::Requirement
106
106
  requirements:
107
- - - '='
107
+ - - "~>"
108
+ - !ruby/object:Gem::Version
109
+ version: '1.6'
110
+ type: :runtime
111
+ prerelease: false
112
+ version_requirements: !ruby/object:Gem::Requirement
113
+ requirements:
114
+ - - "~>"
108
115
  - !ruby/object:Gem::Version
109
- version: 13.0.6
116
+ version: '1.6'
117
+ - !ruby/object:Gem::Dependency
118
+ name: debug
119
+ requirement: !ruby/object:Gem::Requirement
120
+ requirements:
121
+ - - "<="
122
+ - !ruby/object:Gem::Version
123
+ version: 1.8.0
110
124
  type: :development
111
125
  prerelease: false
112
126
  version_requirements: !ruby/object:Gem::Requirement
113
127
  requirements:
114
- - - '='
128
+ - - "<="
115
129
  - !ruby/object:Gem::Version
116
- version: 13.0.6
130
+ version: 1.8.0
117
131
  - !ruby/object:Gem::Dependency
118
- name: rspec
132
+ name: rake
119
133
  requirement: !ruby/object:Gem::Requirement
120
134
  requirements:
121
- - - '='
135
+ - - "~>"
122
136
  - !ruby/object:Gem::Version
123
- version: 3.8.0
137
+ version: '13.2'
138
+ - - ">="
139
+ - !ruby/object:Gem::Version
140
+ version: 13.2.1
124
141
  type: :development
125
142
  prerelease: false
126
143
  version_requirements: !ruby/object:Gem::Requirement
127
144
  requirements:
128
- - - '='
145
+ - - "~>"
129
146
  - !ruby/object:Gem::Version
130
- version: 3.8.0
147
+ version: '13.2'
148
+ - - ">="
149
+ - !ruby/object:Gem::Version
150
+ version: 13.2.1
131
151
  - !ruby/object:Gem::Dependency
132
- name: rspec-core
152
+ name: rspec
133
153
  requirement: !ruby/object:Gem::Requirement
134
154
  requirements:
135
155
  - - '='
@@ -146,44 +166,44 @@ dependencies:
146
166
  name: rubocop
147
167
  requirement: !ruby/object:Gem::Requirement
148
168
  requirements:
149
- - - '='
169
+ - - "~>"
150
170
  - !ruby/object:Gem::Version
151
- version: 1.29.1
171
+ version: '1.64'
152
172
  type: :development
153
173
  prerelease: false
154
174
  version_requirements: !ruby/object:Gem::Requirement
155
175
  requirements:
156
- - - '='
176
+ - - "~>"
157
177
  - !ruby/object:Gem::Version
158
- version: 1.29.1
178
+ version: '1.64'
159
179
  - !ruby/object:Gem::Dependency
160
180
  name: rubocop-github
161
181
  requirement: !ruby/object:Gem::Requirement
162
182
  requirements:
163
- - - '='
183
+ - - "~>"
164
184
  - !ruby/object:Gem::Version
165
- version: 0.17.0
185
+ version: '0.20'
166
186
  type: :development
167
187
  prerelease: false
168
188
  version_requirements: !ruby/object:Gem::Requirement
169
189
  requirements:
170
- - - '='
190
+ - - "~>"
171
191
  - !ruby/object:Gem::Version
172
- version: 0.17.0
192
+ version: '0.20'
173
193
  - !ruby/object:Gem::Dependency
174
194
  name: rubocop-performance
175
195
  requirement: !ruby/object:Gem::Requirement
176
196
  requirements:
177
- - - '='
197
+ - - "~>"
178
198
  - !ruby/object:Gem::Version
179
- version: 1.13.3
199
+ version: '1.21'
180
200
  type: :development
181
201
  prerelease: false
182
202
  version_requirements: !ruby/object:Gem::Requirement
183
203
  requirements:
184
- - - '='
204
+ - - "~>"
185
205
  - !ruby/object:Gem::Version
186
- version: 1.13.3
206
+ version: '1.21'
187
207
  - !ruby/object:Gem::Dependency
188
208
  name: rugged
189
209
  requirement: !ruby/object:Gem::Requirement
@@ -208,58 +228,70 @@ dependencies:
208
228
  name: simplecov
209
229
  requirement: !ruby/object:Gem::Requirement
210
230
  requirements:
211
- - - '='
231
+ - - "~>"
212
232
  - !ruby/object:Gem::Version
213
- version: 0.16.1
233
+ version: 0.22.0
214
234
  type: :development
215
235
  prerelease: false
216
236
  version_requirements: !ruby/object:Gem::Requirement
217
237
  requirements:
218
- - - '='
238
+ - - "~>"
219
239
  - !ruby/object:Gem::Version
220
- version: 0.16.1
240
+ version: 0.22.0
221
241
  - !ruby/object:Gem::Dependency
222
242
  name: simplecov-erb
223
243
  requirement: !ruby/object:Gem::Requirement
224
244
  requirements:
225
- - - '='
245
+ - - "~>"
246
+ - !ruby/object:Gem::Version
247
+ version: '1.0'
248
+ - - ">="
226
249
  - !ruby/object:Gem::Version
227
250
  version: 1.0.1
228
251
  type: :development
229
252
  prerelease: false
230
253
  version_requirements: !ruby/object:Gem::Requirement
231
254
  requirements:
232
- - - '='
255
+ - - "~>"
256
+ - !ruby/object:Gem::Version
257
+ version: '1.0'
258
+ - - ">="
233
259
  - !ruby/object:Gem::Version
234
260
  version: 1.0.1
235
261
  - !ruby/object:Gem::Dependency
236
262
  name: vcr
237
263
  requirement: !ruby/object:Gem::Requirement
238
264
  requirements:
239
- - - '='
265
+ - - "~>"
240
266
  - !ruby/object:Gem::Version
241
- version: 4.0.0
267
+ version: '6.2'
242
268
  type: :development
243
269
  prerelease: false
244
270
  version_requirements: !ruby/object:Gem::Requirement
245
271
  requirements:
246
- - - '='
272
+ - - "~>"
247
273
  - !ruby/object:Gem::Version
248
- version: 4.0.0
274
+ version: '6.2'
249
275
  - !ruby/object:Gem::Dependency
250
276
  name: webmock
251
277
  requirement: !ruby/object:Gem::Requirement
252
278
  requirements:
253
- - - '='
279
+ - - "~>"
280
+ - !ruby/object:Gem::Version
281
+ version: '3.23'
282
+ - - ">="
254
283
  - !ruby/object:Gem::Version
255
- version: 3.4.2
284
+ version: 3.23.1
256
285
  type: :development
257
286
  prerelease: false
258
287
  version_requirements: !ruby/object:Gem::Requirement
259
288
  requirements:
260
- - - '='
289
+ - - "~>"
261
290
  - !ruby/object:Gem::Version
262
- version: 3.4.2
291
+ version: '3.23'
292
+ - - ">="
293
+ - !ruby/object:Gem::Version
294
+ version: 3.23.1
263
295
  description: The Ruby Gem that Powers Entitlements - GitHub's Identity and Access
264
296
  Management System
265
297
  email: opensource+entitlements-app@github.com
@@ -502,7 +534,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
502
534
  requirements:
503
535
  - - ">="
504
536
  - !ruby/object:Gem::Version
505
- version: '0'
537
+ version: 3.0.0
506
538
  required_rubygems_version: !ruby/object:Gem::Requirement
507
539
  requirements:
508
540
  - - ">="