Skip to content

Commit

Permalink
Merge pull request #392 from voxpupuli/modulesync
Browse files Browse the repository at this point in the history
modulesync 7.0.0
  • Loading branch information
bastelfreak authored Aug 18, 2023
2 parents e7af37a + 5cf9b17 commit 61aa9b1
Show file tree
Hide file tree
Showing 7 changed files with 15 additions and 11 deletions.
11 changes: 7 additions & 4 deletions .github/CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -232,18 +232,21 @@ simple tests against it after applying the module. You can run this
with:

```sh
BEAKER_setfile=debian11-64 bundle exec rake beaker
BEAKER_PUPPET_COLLECTION=puppet7 BEAKER_setfile=debian11-64 bundle exec rake beaker
```

You can replace the string `debian10` with any common operating system.
You can replace the string `debian11` with any common operating system.
The following strings are known to work:

* ubuntu1804
* ubuntu2004
* debian10
* ubuntu2204
* debian11
* centos7
* centos8
* centos9
* almalinux8
* almalinux9
* fedora36

For more information and tips & tricks, see [voxpupuli-acceptance's documentation](https://github.com/voxpupuli/voxpupuli-acceptance#running-tests).

Expand Down
2 changes: 1 addition & 1 deletion .msync.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@
# Managed by modulesync - DO NOT EDIT
# https://voxpupuli.org/docs/updating-files-managed-with-modulesync/

modulesync_config_version: '6.0.0'
modulesync_config_version: '7.0.0'
2 changes: 1 addition & 1 deletion Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
source ENV['GEM_SOURCE'] || 'https://rubygems.org'

group :test do
gem 'voxpupuli-test', '~> 6.0', :require => false
gem 'voxpupuli-test', '~> 7.0', :require => false
gem 'coveralls', :require => false
gem 'simplecov-console', :require => false
gem 'puppet_metadata', '~> 3.0', :require => false
Expand Down
6 changes: 3 additions & 3 deletions lib/puppet/type/openldap_database.rb
Original file line number Diff line number Diff line change
Expand Up @@ -94,17 +94,17 @@ def insync?(is)
when %r{^\{MD5\}.+}
"{MD5}#{Digest::MD5.hexdigest(should)}" == is
when %r{^\{SMD5\}.+}
salt = is[16..-1]
salt = is[16..]
md5_hash_with_salt = "#{Digest::MD5.digest(should + salt)}#{salt}"
is == "{SMD5}#{[md5_hash_with_salt].pack('m').delete("\n")}"
when %r{^\{SSHA\}.+}
decoded = Base64.decode64(is.gsub(%r{^\{SSHA\}}, ''))
salt = decoded[20..-1]
salt = decoded[20..]
"{SSHA}#{Base64.encode64("#{Digest::SHA1.digest("#{should}#{salt}")}#{salt}").chomp}" == is
when %r{^\{SHA\}.+}
"{SHA}#{Digest::SHA1.hexdigest(should)}" == is
when %r{^\{(SHA(256|384|512))\}}
matches = is.match("^\{(SHA[\\d]{,3})\}")
matches = is.match('^{(SHA[\\d]{,3})}')
raise ArgumentError, "Invalid password format: #{is}" if matches.nil?

crypto = matches[1]
Expand Down
2 changes: 1 addition & 1 deletion spec/functions/openldap_password_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

# rubocop:disable RSpec/DescribeSymbol
describe :openldap_password do
it { is_expected.not_to eq(nil) }
it { is_expected.not_to be_nil }

it 'fails with wrong number of arguments' do
is_expected.to run.with_params.and_raise_error(StandardError)
Expand Down
1 change: 1 addition & 0 deletions spec/spec_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -17,3 +17,4 @@
add_custom_fact name.to_sym, value
end
end
Dir['./spec/support/spec/**/*.rb'].sort.each { |f| require f }
2 changes: 1 addition & 1 deletion spec/spec_helper_acceptance.rb
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,6 @@

require 'voxpupuli/acceptance/spec_helper_acceptance'

configure_beaker
configure_beaker(modules: :metadata)

Dir['./spec/support/acceptance/**/*.rb'].sort.each { |f| require f }

0 comments on commit 61aa9b1

Please sign in to comment.