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 Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ gem_sources.each { |gem_source| source gem_source }
group :syntax do
gem 'metadata-json-lint'
gem 'puppet-lint-trailing_comma-check', require: false
gem 'rubocop', '~> 1.84.0'
gem 'rubocop', '~> 1.87.0'
gem 'rubocop-performance', '~> 1.26.0'
gem 'rubocop-rake', '~> 0.7.1'
gem 'rubocop-rspec', '~> 3.7.0'
Expand Down
5 changes: 4 additions & 1 deletion build/simp-utils.spec
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ end

Summary: SIMP Utils
Name: simp-utils
Version: 6.8.1
Version: 6.8.2
Release: %{lua: print(package_release)}%{?dist}
License: Apache License, Version 2.0
Group: Applications/System
Expand Down Expand Up @@ -113,6 +113,9 @@ chmod -R u=rwx,g=rx,o=rx %{buildroot}/usr/local/*bin
# Post uninstall stuff

%changelog
* Sun Jun 07 2026 Steven Pritchard <steve@sicura.us> - 6.8.2-1
- Additional cleanup for rubocop

* Wed Sep 17 2025 Steven Pritchard <steve@sicura.us> - 6.8.1-1
- Cleanup for rubocop

Expand Down
2 changes: 1 addition & 1 deletion scripts/bin/set_environment
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ require 'yaml'
module Simp; end

# Simp::YamlNodeClassifier class
class Simp::YamlNodeClassifier
class Simp::YamlNodeClassifier # rubocop:disable Style/OneClassPerFile
DEFAULT_CONFIG_FILE = '/etc/puppetlabs/puppet/environments.yaml'.freeze
DEFAULT_ENVIRONMENT = 'production'.freeze

Expand Down
6 changes: 3 additions & 3 deletions scripts/sbin/gen-ldap-update
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,13 @@ end
# Try /etc/openldap/ldap.conf first.
base_dn = nil
if File.readable?('/etc/openldap/ldap.conf')
File.open('/etc/openldap/ldap.conf', 'r').each do |ln|
File.foreach('/etc/openldap/ldap.conf') do |ln|
if ln =~ %r{^\s*BASE\s+(.*)$}
base_dn = Regexp.last_match(1).strip
end
end
elsif File.readable?('/etc/ldap.conf')
File.open('/etc/ldap.conf').each do |ln|
File.foreach('/etc/ldap.conf') do |ln|
if ln =~ %r{^\s*base\s+(.*)$}
base_dn = Regexp.last_match(1).strip
end
Expand Down Expand Up @@ -55,7 +55,7 @@ update_dn = [
new_entries = {}

current_dn = nil
File.open(default_ldif, 'r').each do |ln|
File.foreach(default_ldif) do |ln|
if %r{^\s*$}.match?(ln)
current_dn = nil
end
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -156,14 +156,11 @@ def convert_user(attrs)
end

# Read in the slapcat file
fh = File.open(input_ldif, 'r')
begin
ldifs = Net::LDAP::Dataset.read_ldif(fh)
ldifs = File.open(input_ldif, 'r') { |fh| Net::LDAP::Dataset.read_ldif(fh) }
rescue StandardError => e
warn "ERROR: Malformed LDIF input:\n#{e}\n#{e.backtrace.join("\n")}"
exit 1
ensure
fh.close
end

basedn ||= ldifs.select { |_k, v| v[:structuralobjectclass].include?('domain') }.keys.first
Expand Down