From a9ec2c6819b546ccc088930ec54c069acb9e38b9 Mon Sep 17 00:00:00 2001 From: Josh Cooper Date: Mon, 26 Nov 2018 15:41:32 -0800 Subject: Refer to local reference instead of type reference See MODULES-8182. Also refer to github project page instead of README.md. --- README.md | 4 +--- metadata.json | 2 +- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 4c7b1f4..da5e668 100644 --- a/README.md +++ b/README.md @@ -35,11 +35,9 @@ sshkey { 'github.com': } ``` -More details can be found in the `REFERENCE.md` file. - ## Reference -Please see `REFERENCE.md` for the reference documentation. +Please see [`REFERENCE.md`](REFERENCE.md) for the reference documentation. This module is documented using Puppet Strings. diff --git a/metadata.json b/metadata.json index 6affd91..2c64f32 100644 --- a/metadata.json +++ b/metadata.json @@ -5,7 +5,7 @@ "summary": "Manage SSH authorized keys, and known hosts.", "license": "Apache-2.0", "source": "https://github.com/puppetlabs/puppetlabs-sshkeys_core", - "project_page": "https://github.com/puppetlabs/puppetlabs-sshkeys_core/blob/master/README.md", + "project_page": "https://github.com/puppetlabs/puppetlabs-sshkeys_core", "issues_url": "https://tickets.puppetlabs.com/project/MODULES", "dependencies": [ -- cgit v1.2.3 From c7b2e899ca57fcb6384bee900fa446bc2f860c2a Mon Sep 17 00:00:00 2001 From: Josh Cooper Date: Tue, 27 Nov 2018 15:57:34 -0800 Subject: Test against puppet6 --- .travis.yml | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index 2c6edb7..e8c30de 100644 --- a/.travis.yml +++ b/.travis.yml @@ -13,10 +13,10 @@ script: - 'bundle exec rake $CHECK' bundler_args: --without system_tests rvm: - - 2.4.1 + - 2.5.3 env: global: - - BEAKER_PUPPET_COLLECTION=puppet5 PUPPET_GEM_VERSION="~> 5.0" + - PUPPET_GEM_VERSION="~> 6.0" matrix: fast_finish: true include: @@ -24,6 +24,12 @@ matrix: env: CHECK="syntax lint metadata_lint check:symlinks check:git_ignore check:dot_underscore check:test_file rubocop" - env: CHECK=parallel_spec + - + env: PUPPET_GEM_VERSION="~> 5.0" CHECK=parallel_spec + rvm: 2.4.5 + - + env: PUPPET_GEM_VERSION="~> 4.0" CHECK=parallel_spec + rvm: 2.1.9 branches: only: - master -- cgit v1.2.3 From 15696869bc4b62b47b5e6b873694635b2dc86c0d Mon Sep 17 00:00:00 2001 From: Josh Cooper Date: Tue, 27 Nov 2018 16:49:54 -0800 Subject: Account for pre-5 behavior In Puppet4, the Report class requires a kind argument. Also the is_to_s and should_to_s methods returned an array of strings and a flattened array as a string. That behavior was changed in PUP-7616 (commit c14b28f9c427) so that both methods return a string as the name implies. --- spec/lib/puppet_spec/compiler.rb | 6 +++++- spec/unit/type/ssh_authorized_key_spec.rb | 6 ++++-- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/spec/lib/puppet_spec/compiler.rb b/spec/lib/puppet_spec/compiler.rb index 49a6534..4170b31 100644 --- a/spec/lib/puppet_spec/compiler.rb +++ b/spec/lib/puppet_spec/compiler.rb @@ -29,12 +29,16 @@ module PuppetSpec::Compiler end def apply_compiled_manifest(manifest, prioritizer = Puppet::Graph::SequentialPrioritizer.new) + args = [] + if Puppet.version.to_f < 5.0 + args << 'apply' + end catalog = compile_to_ral(manifest) if block_given? catalog.resources.each { |res| yield res } end transaction = Puppet::Transaction.new(catalog, - Puppet::Transaction::Report.new, + Puppet::Transaction::Report.new(*args), prioritizer) transaction.evaluate transaction.report.finalize_report diff --git a/spec/unit/type/ssh_authorized_key_spec.rb b/spec/unit/type/ssh_authorized_key_spec.rb index e375f58..866c688 100644 --- a/spec/unit/type/ssh_authorized_key_spec.rb +++ b/spec/unit/type/ssh_authorized_key_spec.rb @@ -141,12 +141,14 @@ describe Puppet::Type.type(:ssh_authorized_key), unless: Puppet.features.microso it 'property should return well formed string of arrays from is_to_s' do resource = described_class.new(name: 'whev', type: :rsa, user: 'nobody', options: ['a', 'b', 'c']) - expect(resource.property(:options).is_to_s(['a', 'b', 'c'])).to eq "['a', 'b', 'c']" + str = (Puppet.version.to_f < 5.0) ? ['a', 'b', 'c'] : "['a', 'b', 'c']" + expect(resource.property(:options).is_to_s(['a', 'b', 'c'])).to eq(str) end it 'property should return well formed string of arrays from should_to_s' do resource = described_class.new(name: 'whev', type: :rsa, user: 'nobody', options: ['a', 'b', 'c']) - expect(resource.property(:options).should_to_s(['a', 'b', 'c'])).to eq "['a', 'b', 'c']" + str = (Puppet.version.to_f < 5.0) ? 'a b c' : "['a', 'b', 'c']" + expect(resource.property(:options).should_to_s(['a', 'b', 'c'])).to eq(str) end end -- cgit v1.2.3