Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .rubocop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ AllCops:
NewCops: disable
SuggestExtensions: false
DisplayCopNames: true
TargetRubyVersion: 3.3.1
TargetRubyVersion: 3.4
Exclude:
- 'bin/*'
- 'spec/acceptance/fixtures/**/*'
Expand Down
2 changes: 1 addition & 1 deletion .ruby-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
3.3.1
3.4.4
154 changes: 87 additions & 67 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -8,142 +8,162 @@ PATH
GEM
remote: https://rubygems.org/
specs:
activesupport (7.1.3.3)
activesupport (8.0.2)
base64
benchmark (>= 0.3)
bigdecimal
concurrent-ruby (~> 1.0, >= 1.0.2)
concurrent-ruby (~> 1.0, >= 1.3.1)
connection_pool (>= 2.2.5)
drb
i18n (>= 1.6, < 2)
logger (>= 1.4.2)
minitest (>= 5.1)
mutex_m
tzinfo (~> 2.0)
securerandom (>= 0.3)
tzinfo (~> 2.0, >= 2.0.5)
uri (>= 0.13.1)
addressable (2.8.7)
public_suffix (>= 2.0.2, < 7.0)
ast (2.4.2)
base64 (0.2.0)
bigdecimal (3.1.8)
concurrent-ruby (1.3.4)
connection_pool (2.4.1)
ast (2.4.3)
base64 (0.3.0)
benchmark (0.4.1)
bigdecimal (3.2.2)
concurrent-ruby (1.3.5)
connection_pool (2.5.3)
contracts (0.17.2)
crack (1.0.0)
bigdecimal
rexml
debug (1.9.2)
date (3.4.1)
debug (1.10.0)
irb (~> 1.10)
reline (>= 0.3.8)
diff-lcs (1.5.1)
docile (1.4.0)
drb (2.2.1)
entitlements-app (1.1.0)
diff-lcs (1.6.2)
docile (1.4.1)
drb (2.2.3)
entitlements-app (1.2.0)
concurrent-ruby (~> 1.3, >= 1.3.1)
faraday (~> 2.0)
logger (~> 1.6)
net-ldap (~> 0.19)
octokit (~> 4.18)
optimist (~> 3.1)
ostruct (~> 0.6.0)
faraday (2.12.1)
erb (5.0.1)
faraday (2.13.1)
faraday-net_http (>= 2.0, < 3.5)
json
logger
faraday-net_http (3.4.0)
faraday-net_http (3.4.1)
net-http (>= 0.5.0)
hashdiff (1.1.0)
i18n (1.14.5)
hashdiff (1.2.0)
i18n (1.14.7)
concurrent-ruby (~> 1.0)
io-console (0.7.2)
irb (1.13.1)
io-console (0.8.0)
irb (1.15.2)
pp (>= 0.6.0)
rdoc (>= 4.0.0)
reline (>= 0.4.2)
json (2.7.2)
language_server-protocol (3.17.0.3)
logger (1.6.2)
minitest (5.23.1)
mutex_m (0.2.0)
json (2.12.2)
language_server-protocol (3.17.0.5)
lint_roller (1.1.0)
logger (1.7.0)
minitest (5.25.5)
net-http (0.6.0)
uri
net-ldap (0.19.0)
octokit (4.25.1)
faraday (>= 1, < 3)
sawyer (~> 0.9)
optimist (3.2.0)
ostruct (0.6.1)
parallel (1.25.1)
parser (3.3.4.0)
optimist (3.2.1)
ostruct (0.6.2)
parallel (1.27.0)
parser (3.3.8.0)
ast (~> 2.4.1)
racc
psych (5.1.2)
pp (0.6.2)
prettyprint
prettyprint (0.2.0)
prism (1.4.0)
psych (5.2.6)
date
stringio
public_suffix (6.0.1)
racc (1.8.0)
rack (3.0.14)
public_suffix (6.0.2)
racc (1.8.1)
rack (3.1.16)
rainbow (3.1.1)
rake (13.2.1)
rdoc (6.7.0)
rake (13.3.0)
rdoc (6.14.1)
erb
psych (>= 4.0.0)
regexp_parser (2.9.2)
reline (0.5.8)
regexp_parser (2.10.0)
reline (0.6.1)
io-console (~> 0.5)
rexml (3.3.9)
rexml (3.4.1)
rspec (3.13.0)
rspec-core (~> 3.13.0)
rspec-expectations (~> 3.13.0)
rspec-mocks (~> 3.13.0)
rspec-core (3.13.0)
rspec-core (3.13.5)
rspec-support (~> 3.13.0)
rspec-expectations (3.13.0)
rspec-expectations (3.13.5)
diff-lcs (>= 1.2.0, < 2.0)
rspec-support (~> 3.13.0)
rspec-mocks (3.13.1)
rspec-mocks (3.13.5)
diff-lcs (>= 1.2.0, < 2.0)
rspec-support (~> 3.13.0)
rspec-support (3.13.1)
rubocop (1.65.0)
rspec-support (3.13.4)
rubocop (1.77.0)
json (~> 2.3)
language_server-protocol (>= 3.17.0)
language_server-protocol (~> 3.17.0.2)
lint_roller (~> 1.1.0)
parallel (~> 1.10)
parser (>= 3.3.0.2)
rainbow (>= 2.2.2, < 4.0)
regexp_parser (>= 2.4, < 3.0)
rexml (>= 3.2.5, < 4.0)
rubocop-ast (>= 1.31.1, < 2.0)
regexp_parser (>= 2.9.3, < 3.0)
rubocop-ast (>= 1.45.1, < 2.0)
ruby-progressbar (~> 1.7)
unicode-display_width (>= 2.4.0, < 3.0)
rubocop-ast (1.31.3)
parser (>= 3.3.1.0)
rubocop-github (0.20.0)
rubocop (>= 1.37)
rubocop-performance (>= 1.15)
rubocop-rails (>= 2.17)
rubocop-performance (1.21.1)
rubocop (>= 1.48.1, < 2.0)
rubocop-ast (>= 1.31.1, < 2.0)
rubocop-rails (2.25.0)
unicode-display_width (>= 2.4.0, < 4.0)
rubocop-ast (1.45.1)
parser (>= 3.3.7.2)
prism (~> 1.4)
rubocop-github (0.26.0)
rubocop (>= 1.76)
rubocop-performance (>= 1.24)
rubocop-rails (>= 2.23)
rubocop-performance (1.25.0)
lint_roller (~> 1.1)
rubocop (>= 1.75.0, < 2.0)
rubocop-ast (>= 1.38.0, < 2.0)
rubocop-rails (2.32.0)
activesupport (>= 4.2.0)
lint_roller (~> 1.1)
rack (>= 1.1)
rubocop (>= 1.33.0, < 2.0)
rubocop-ast (>= 1.31.1, < 2.0)
rubocop (>= 1.75.0, < 2.0)
rubocop-ast (>= 1.44.0, < 2.0)
ruby-progressbar (1.13.0)
rugged (1.7.2)
rugged (1.9.0)
sawyer (0.9.2)
addressable (>= 2.3.5)
faraday (>= 0.17.3, < 3)
securerandom (0.4.1)
simplecov (0.22.0)
docile (~> 1.1)
simplecov-html (~> 0.11)
simplecov_json_formatter (~> 0.1)
simplecov-erb (1.0.1)
simplecov (< 1.0)
simplecov-html (0.12.3)
simplecov-html (0.13.1)
simplecov_json_formatter (0.1.4)
stringio (3.1.0)
stringio (3.1.7)
tzinfo (2.0.6)
concurrent-ruby (~> 1.0)
unicode-display_width (2.5.0)
unicode-display_width (3.1.4)
unicode-emoji (~> 4.0, >= 4.0.4)
unicode-emoji (4.0.4)
uri (1.0.3)
vcr (6.2.0)
webmock (3.23.1)
vcr (6.3.1)
base64
webmock (3.25.1)
addressable (>= 2.8.0)
crack (>= 0.3.2)
hashdiff (>= 0.4.0, < 2.0.0)
Expand All @@ -166,4 +186,4 @@ DEPENDENCIES
webmock (~> 3.23, >= 3.23.1)

BUNDLED WITH
2.5.3
2.6.9
4 changes: 4 additions & 0 deletions lib/entitlements/auditor/gitrepo.rb
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,9 @@ def setup
logger:
)
@repo.github = config["github_override"] if config["github_override"]
# rubocop:disable GitHub/AvoidObjectSendWithDynamicMethod
@repo.send(operation, checkout_directory)
# rubocop:enable GitHub/AvoidObjectSendWithDynamicMethod
@repo.configure(checkout_directory, config["git_name"], config["git_email"])
logger.debug "Directory #{checkout_directory} prepared"
end
Expand All @@ -56,6 +58,7 @@ def commit(actions:, successful_actions:, provider_exception:)
commitable_actions = actions_with_membership_change(actions)
action_hash = commitable_actions.map { |action| [action.dn, action] }.to_h

# rubocop:disable GitHub/AvoidObjectSendWithDynamicMethod
%w[update_files delete_files].each do |m|
send(
m.to_sym,
Expand All @@ -65,6 +68,7 @@ def commit(actions:, successful_actions:, provider_exception:)
valid_changes:
)
end
# rubocop:enable GitHub/AvoidObjectSendWithDynamicMethod

# If there is anything out-of-sync and the provider did not throw an exception, create
# a special sync commit to update things.
Expand Down
2 changes: 1 addition & 1 deletion spec/acceptance/tests/spec_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ def ldap_obj
host: uri.host,
port: uri.port,
encryption: (uri.scheme == "ldaps" ? :simple_tls : nil),
auth: {method: :simple, username: ENV["LDAP_BINDDN"], password: ENV["LDAP_BINDPW"]}
auth: { method: :simple, username: ENV["LDAP_BINDDN"], password: ENV["LDAP_BINDPW"] }
)

ldap_object.bind
Expand Down
8 changes: 4 additions & 4 deletions spec/unit/entitlements/auditor/gitrepo_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -230,15 +230,15 @@
let(:group4) { instance_double(Entitlements::Models::Group) }
let(:group4_dn) { "cn=group4,ou=Groups,dc=kittens,dc=net" }
let(:group4_members) { Set.new(["uid=tabby,dc=kittens,dc=net"]) }
let(:group4_metadata) { { } }
let(:group4_metadata) { {} }
let(:group5) { instance_double(Entitlements::Models::Group) }
let(:group5_dn) { "cn=group5,ou=Groups,dc=kittens,dc=net" }
let(:group5_members) { Set.new(["uid=coon,dc=kittens,dc=net"]) }
let(:group5_metadata) { { } }
let(:group5_metadata) { {} }
let(:group6) { instance_double(Entitlements::Models::Group) }
let(:group6_dn) { "cn=group6,ou=Groups,dc=kittens,dc=net" }
let(:group6_members) { Set.new(["uid=tabby,dc=kittens,dc=net", "uid=coon,dc=kittens,dc=net"]) }
let(:group6_metadata) { { } }
let(:group6_metadata) { {} }
let(:action1) { instance_double(Entitlements::Models::Action) }
let(:action2) { instance_double(Entitlements::Models::Action) }
let(:action3) { instance_double(Entitlements::Models::Action) }
Expand Down Expand Up @@ -810,7 +810,7 @@
end

it "returns a static string if there is metadata" do
allow(group).to receive(:metadata).and_return({ "team_id" => 6, "team_name" => "team_name"})
allow(group).to receive(:metadata).and_return({ "team_id" => 6, "team_name" => "team_name" })
expect(subject.send(:metadata_strings_as_text, group)).to eq("metadata_team_id=6\nmetadata_team_name=team_name\n")
end
end
Expand Down
2 changes: 1 addition & 1 deletion spec/unit/entitlements/util/gitrepo_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,7 @@
tempdir = Dir.mktmpdir
allow(Dir).to receive(:mktmpdir).and_return(tempdir)

expect(Open3).to receive(:capture3).with({"GIT_SSH"=>"#{tempdir}/ssh"}, "git pet kittens", chdir: directory)
expect(Open3).to receive(:capture3).with({ "GIT_SSH" => "#{tempdir}/ssh" }, "git pet kittens", chdir: directory)
.and_return(["Your output here", "", exitstatus])
expect(logger).to receive(:debug).with("Execute: git pet kittens")

Expand Down
Binary file removed vendor/cache/activesupport-7.1.3.3.gem
Binary file not shown.
Binary file added vendor/cache/activesupport-8.0.2.gem
Binary file not shown.
Binary file removed vendor/cache/ast-2.4.2.gem
Binary file not shown.
Binary file added vendor/cache/ast-2.4.3.gem
Binary file not shown.
Binary file removed vendor/cache/base64-0.2.0.gem
Binary file not shown.
Binary file added vendor/cache/base64-0.3.0.gem
Binary file not shown.
Binary file added vendor/cache/benchmark-0.4.1.gem
Binary file not shown.
Binary file removed vendor/cache/bigdecimal-3.1.8.gem
Binary file not shown.
Binary file added vendor/cache/bigdecimal-3.2.2.gem
Binary file not shown.
Binary file removed vendor/cache/concurrent-ruby-1.3.4.gem
Binary file not shown.
Binary file added vendor/cache/concurrent-ruby-1.3.5.gem
Binary file not shown.
Binary file removed vendor/cache/connection_pool-2.4.1.gem
Binary file not shown.
Binary file added vendor/cache/connection_pool-2.5.3.gem
Binary file not shown.
Binary file added vendor/cache/date-3.4.1.gem
Binary file not shown.
Binary file added vendor/cache/debug-1.10.0.gem
Binary file not shown.
Binary file removed vendor/cache/debug-1.9.2.gem
Binary file not shown.
Binary file removed vendor/cache/diff-lcs-1.5.1.gem
Binary file not shown.
Binary file added vendor/cache/diff-lcs-1.6.2.gem
Binary file not shown.
Binary file removed vendor/cache/docile-1.4.0.gem
Binary file not shown.
Binary file added vendor/cache/docile-1.4.1.gem
Binary file not shown.
Binary file removed vendor/cache/drb-2.2.1.gem
Binary file not shown.
Binary file added vendor/cache/drb-2.2.3.gem
Binary file not shown.
Binary file removed vendor/cache/entitlements-app-1.1.0.gem
Binary file not shown.
Binary file added vendor/cache/entitlements-app-1.2.0.gem
Binary file not shown.
Binary file added vendor/cache/erb-5.0.1.gem
Binary file not shown.
Binary file removed vendor/cache/faraday-2.12.1.gem
Binary file not shown.
Binary file added vendor/cache/faraday-2.13.1.gem
Binary file not shown.
Binary file removed vendor/cache/faraday-net_http-3.4.0.gem
Binary file not shown.
Binary file added vendor/cache/faraday-net_http-3.4.1.gem
Binary file not shown.
Binary file removed vendor/cache/hashdiff-1.1.0.gem
Binary file not shown.
Binary file added vendor/cache/hashdiff-1.2.0.gem
Binary file not shown.
Binary file removed vendor/cache/i18n-1.14.5.gem
Binary file not shown.
Binary file added vendor/cache/i18n-1.14.7.gem
Binary file not shown.
Binary file removed vendor/cache/io-console-0.7.2.gem
Binary file not shown.
Binary file added vendor/cache/io-console-0.8.0.gem
Binary file not shown.
Binary file removed vendor/cache/irb-1.13.1.gem
Binary file not shown.
Binary file added vendor/cache/irb-1.15.2.gem
Binary file not shown.
Binary file added vendor/cache/json-2.12.2.gem
Binary file not shown.
Binary file removed vendor/cache/json-2.7.2.gem
Binary file not shown.
Binary file removed vendor/cache/language_server-protocol-3.17.0.3.gem
Binary file not shown.
Binary file not shown.
Binary file added vendor/cache/lint_roller-1.1.0.gem
Binary file not shown.
Binary file removed vendor/cache/logger-1.6.2.gem
Binary file not shown.
Binary file added vendor/cache/logger-1.7.0.gem
Binary file not shown.
Binary file removed vendor/cache/minitest-5.23.1.gem
Binary file not shown.
Binary file added vendor/cache/minitest-5.25.5.gem
Binary file not shown.
Binary file removed vendor/cache/mutex_m-0.2.0.gem
Binary file not shown.
Binary file removed vendor/cache/optimist-3.2.0.gem
Binary file not shown.
Binary file added vendor/cache/optimist-3.2.1.gem
Binary file not shown.
Binary file removed vendor/cache/ostruct-0.6.1.gem
Binary file not shown.
Binary file added vendor/cache/ostruct-0.6.2.gem
Binary file not shown.
Binary file removed vendor/cache/parallel-1.25.1.gem
Binary file not shown.
Binary file added vendor/cache/parallel-1.27.0.gem
Binary file not shown.
Binary file removed vendor/cache/parser-3.3.4.0.gem
Binary file not shown.
Binary file added vendor/cache/parser-3.3.8.0.gem
Binary file not shown.
Binary file added vendor/cache/pp-0.6.2.gem
Binary file not shown.
Binary file added vendor/cache/prettyprint-0.2.0.gem
Binary file not shown.
Binary file added vendor/cache/prism-1.4.0.gem
Binary file not shown.
Binary file removed vendor/cache/psych-5.1.2.gem
Binary file not shown.
Binary file added vendor/cache/psych-5.2.6.gem
Binary file not shown.
Binary file removed vendor/cache/public_suffix-6.0.1.gem
Binary file not shown.
Binary file added vendor/cache/public_suffix-6.0.2.gem
Binary file not shown.
Binary file removed vendor/cache/racc-1.8.0.gem
Binary file not shown.
Binary file added vendor/cache/racc-1.8.1.gem
Binary file not shown.
Binary file removed vendor/cache/rack-3.0.14.gem
Binary file not shown.
Binary file added vendor/cache/rack-3.1.16.gem
Binary file not shown.
Binary file removed vendor/cache/rake-13.2.1.gem
Binary file not shown.
Binary file added vendor/cache/rake-13.3.0.gem
Binary file not shown.
Binary file added vendor/cache/rdoc-6.14.1.gem
Binary file not shown.
Binary file removed vendor/cache/rdoc-6.7.0.gem
Binary file not shown.
Binary file added vendor/cache/regexp_parser-2.10.0.gem
Binary file not shown.
Binary file removed vendor/cache/regexp_parser-2.9.2.gem
Binary file not shown.
Binary file removed vendor/cache/reline-0.5.8.gem
Binary file not shown.
Binary file added vendor/cache/reline-0.6.1.gem
Binary file not shown.
Binary file removed vendor/cache/rexml-3.3.9.gem
Binary file not shown.
Binary file added vendor/cache/rexml-3.4.1.gem
Binary file not shown.
Binary file removed vendor/cache/rspec-core-3.13.0.gem
Binary file not shown.
Binary file added vendor/cache/rspec-core-3.13.5.gem
Binary file not shown.
Binary file removed vendor/cache/rspec-expectations-3.13.0.gem
Binary file not shown.
Binary file added vendor/cache/rspec-expectations-3.13.5.gem
Binary file not shown.
Binary file removed vendor/cache/rspec-mocks-3.13.1.gem
Binary file not shown.
Binary file added vendor/cache/rspec-mocks-3.13.5.gem
Binary file not shown.
Binary file removed vendor/cache/rspec-support-3.13.1.gem
Binary file not shown.
Binary file added vendor/cache/rspec-support-3.13.4.gem
Binary file not shown.
Binary file removed vendor/cache/rubocop-1.65.0.gem
Binary file not shown.
Binary file added vendor/cache/rubocop-1.77.0.gem
Binary file not shown.
Binary file removed vendor/cache/rubocop-ast-1.31.3.gem
Binary file not shown.
Binary file added vendor/cache/rubocop-ast-1.45.1.gem
Binary file not shown.
Binary file removed vendor/cache/rubocop-github-0.20.0.gem
Binary file not shown.
Binary file added vendor/cache/rubocop-github-0.26.0.gem
Binary file not shown.
Binary file removed vendor/cache/rubocop-performance-1.21.1.gem
Binary file not shown.
Binary file added vendor/cache/rubocop-performance-1.25.0.gem
Binary file not shown.
Binary file removed vendor/cache/rubocop-rails-2.25.0.gem
Binary file not shown.
Binary file added vendor/cache/rubocop-rails-2.32.0.gem
Binary file not shown.
Binary file removed vendor/cache/rugged-1.7.2.gem
Binary file not shown.
Binary file added vendor/cache/rugged-1.9.0.gem
Binary file not shown.
Binary file added vendor/cache/securerandom-0.4.1.gem
Binary file not shown.
Binary file removed vendor/cache/simplecov-html-0.12.3.gem
Binary file not shown.
Binary file added vendor/cache/simplecov-html-0.13.1.gem
Binary file not shown.
Binary file removed vendor/cache/stringio-3.1.0.gem
Binary file not shown.
Binary file added vendor/cache/stringio-3.1.7.gem
Binary file not shown.
Binary file removed vendor/cache/unicode-display_width-2.5.0.gem
Binary file not shown.
Binary file added vendor/cache/unicode-display_width-3.1.4.gem
Binary file not shown.
Binary file added vendor/cache/unicode-emoji-4.0.4.gem
Binary file not shown.
Binary file removed vendor/cache/vcr-6.2.0.gem
Binary file not shown.
Binary file added vendor/cache/vcr-6.3.1.gem
Binary file not shown.
Binary file removed vendor/cache/webmock-3.23.1.gem
Binary file not shown.
Binary file added vendor/cache/webmock-3.25.1.gem
Binary file not shown.
Loading