diff --git a/.travis.yml b/.travis.yml index 9153ffd..92fd22d 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,30 +1,14 @@ --- language: ruby bundler_args: --without development -before_install: rm Gemfile.lock || true +before_install: + - gem update --system + - gem install bundler sudo: false rvm: - - 1.8.7 - - 1.9.3 - - 2.0.0 - - 2.1.0 - - 2.2 + - 2.4 + - 2.5 script: bundle exec rake test env: - - PUPPET_GEM_VERSION="~> 3.6.0" - - PUPPET_GEM_VERSION="~> 3.7.0" - - PUPPET_GEM_VERSION="~> 3.8.0" - - PUPPET_GEM_VERSION="~> 4.0.0" - - PUPPET_GEM_VERSION="~> 4.1.0" -matrix: - exclude: - - rvm: 1.8.7 - env: PUPPET_GEM_VERSION="~> 4.0.0" - - rvm: 1.8.7 - env: PUPPET_GEM_VERSION="~> 4.1.0" - - rvm: 2.2 - env: PUPPET_GEM_VERSION="~> 3.6.0" - - rvm: 2.2 - env: PUPPET_GEM_VERSION="~> 3.7.0" - - rvm: 2.2 - env: PUPPET_GEM_VERSION="~> 3.8.0" + - PUPPET_GEM_VERSION="~> 5.0.0" + - PUPPET_GEM_VERSION="~> 5.5.0" diff --git a/Gemfile b/Gemfile index 3458628..def598c 100644 --- a/Gemfile +++ b/Gemfile @@ -1,7 +1,7 @@ source "https://rubygems.org" gem 'rake', '~> 10.5.0' -gem "puppet", ENV['PUPPET_GEM_VERSION'] || '~> 3.8.0' +gem "puppet", ENV['PUPPET_GEM_VERSION'] || '~> 5.5.0' gem "puppet-lint" gem "rspec-puppet", '~> 2.3.2' gem "puppetlabs_spec_helper" diff --git a/Gemfile.lock b/Gemfile.lock index f7b5d43..054455c 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -1,26 +1,38 @@ GEM remote: https://rubygems.org/ specs: - CFPropertyList (2.3.1) - builder (3.2.2) - diff-lcs (1.2.5) - domain_name (0.5.24) + CFPropertyList (2.3.6) + builder (3.2.3) + diff-lcs (1.3) + domain_name (0.5.20180417) unf (>= 0.0.5, < 1.0.0) - excon (0.45.3) - facter (1.7.6) + dry-inflector (0.1.2) + excon (0.62.0) + facter (2.5.1) + fast_gettext (1.1.2) fission (0.5.0) CFPropertyList (~> 2.2) - fog (1.32.0) + fog (1.42.1) + fog-aliyun (>= 0.1.0) fog-atmos fog-aws (>= 0.6.0) fog-brightbox (~> 0.4) - fog-core (~> 1.32) - fog-ecloud (= 0.1.1) - fog-google (>= 0.0.2) + fog-cloudatcost (~> 0.1.0) + fog-core (~> 1.45) + fog-digitalocean (>= 0.3.0) + fog-dnsimple (~> 1.0) + fog-dynect (~> 0.0.2) + fog-ecloud (~> 0.1) + fog-google (<= 0.1.0) + fog-internet-archive + fog-joyent fog-json fog-local + fog-openstack + fog-ovirt fog-powerdns (>= 0.1.1) fog-profitbricks + fog-rackspace fog-radosgw (>= 0.0.2) fog-riakcs fog-sakuracloud (>= 0.0.4) @@ -30,49 +42,92 @@ GEM fog-terremark fog-vmfusion fog-voxel + fog-vsphere (>= 0.4.0) + fog-xenserver fog-xml (~> 0.1.1) ipaddress (~> 0.5) - nokogiri (~> 1.5, >= 1.5.11) + json (~> 2.0) + fog-aliyun (0.3.3) + fog-core + fog-json + ipaddress (~> 0.8) + xml-simple (~> 1.1) fog-atmos (0.1.0) fog-core fog-xml - fog-aws (0.6.0) - fog-core (~> 1.27) + fog-aws (2.0.1) + fog-core (~> 1.38) fog-json (~> 1.0) fog-xml (~> 0.1) ipaddress (~> 0.8) - fog-brightbox (0.7.2) - fog-core (~> 1.22) + fog-brightbox (0.16.1) + dry-inflector + fog-core fog-json - inflecto (~> 0.0.2) - fog-core (1.32.0) + mime-types + fog-cloudatcost (0.1.2) + fog-core (~> 1.36) + fog-json (~> 1.0) + fog-xml (~> 0.1) + ipaddress (~> 0.8) + fog-core (1.45.0) builder - excon (~> 0.45) + excon (~> 0.58) formatador (~> 0.2) - mime-types - net-scp (~> 1.1) - net-ssh (>= 2.1.3) - fog-ecloud (0.1.1) + fog-digitalocean (0.4.0) + fog-core + fog-json + fog-xml + ipaddress (>= 0.5) + fog-dnsimple (1.0.0) + fog-core (~> 1.38) + fog-json (~> 1.0) + fog-dynect (0.0.3) + fog-core + fog-json + fog-xml + fog-ecloud (0.3.0) + fog-core + fog-xml + fog-google (0.1.0) fog-core + fog-json fog-xml - fog-google (0.0.6) + fog-internet-archive (0.0.1) fog-core fog-json fog-xml - fog-json (1.0.2) - fog-core (~> 1.0) + fog-joyent (0.0.1) + fog-core (~> 1.42) + fog-json (>= 1.0) + fog-json (1.2.0) + fog-core multi_json (~> 1.10) - fog-local (0.2.1) - fog-core (~> 1.27) - fog-powerdns (0.1.1) - fog-core (~> 1.27) - fog-json (~> 1.0) - fog-xml (~> 0.1) - fog-profitbricks (0.0.3) + fog-local (0.6.0) + fog-core (>= 1.27, < 3.0) + fog-openstack (0.3.10) + fog-core (>= 1.45, <= 2.1.0) + fog-json (>= 1.0) + ipaddress (>= 0.8) + fog-ovirt (1.1.5) fog-core + fog-json fog-xml - nokogiri - fog-radosgw (0.0.4) + ovirt-engine-sdk (>= 4.1.3) + rbovirt (~> 0.1.5) + fog-powerdns (0.2.0) + fog-core + fog-json + fog-xml + fog-profitbricks (4.1.1) + fog-core (~> 1.42) + fog-json (~> 1.0) + fog-rackspace (0.1.6) + fog-core (>= 1.35) + fog-json (>= 1.0) + fog-xml (>= 0.1) + ipaddress (>= 0.8) + fog-radosgw (0.0.5) fog-core (>= 1.21.0) fog-json fog-xml (>= 0.0.1) @@ -80,13 +135,13 @@ GEM fog-core fog-json fog-xml - fog-sakuracloud (1.0.1) + fog-sakuracloud (1.7.5) fog-core fog-json fog-serverlove (0.1.2) fog-core fog-json - fog-softlayer (0.4.7) + fog-softlayer (1.1.4) fog-core fog-json fog-storm_on_demand (0.1.1) @@ -101,53 +156,67 @@ GEM fog-voxel (0.1.0) fog-core fog-xml - fog-xml (0.1.2) + fog-vsphere (2.5.0) + fog-core + rbvmomi (~> 1.9) + fog-xenserver (1.0.0) + fog-core + fog-xml + xmlrpc + fog-xml (0.1.3) fog-core - nokogiri (~> 1.5, >= 1.5.11) + nokogiri (>= 1.5.11, < 2.0.0) formatador (0.2.5) - hiera (1.3.4) - json_pure - http-cookie (1.0.2) + hiera (3.5.0) + http-cookie (1.0.3) domain_name (~> 0.5) - inflecto (0.0.2) - ipaddress (0.8.0) - json_pure (1.8.2) + ipaddress (0.8.3) + json (2.1.0) kwalify (0.7.2) + locale (2.1.2) metaclass (0.0.4) mime-types (1.25.1) - mocha (1.1.0) + mocha (1.8.0) metaclass (~> 0.0.1) - multi_json (1.11.2) + multi_json (1.13.1) net-scp (1.2.1) net-ssh (>= 2.6.5) - net-ssh (2.9.2) - netrc (0.10.3) + net-ssh (2.9.4) + netrc (0.11.0) nokogiri (1.5.11) - puppet (3.8.1) - facter (> 1.6, < 3) - hiera (~> 1.0) - json_pure - puppet-blacksmith (3.3.1) - puppet (>= 2.7.16) - rest-client - puppet-lint (1.1.0) - puppet-syntax (2.0.0) - rake - puppetlabs_spec_helper (0.10.3) - mocha - puppet-lint - puppet-syntax + ovirt-engine-sdk (4.3.0) + json (>= 1, < 3) + pathspec (0.2.1) + puppet (5.5.10) + facter (> 2.0.1, < 4) + fast_gettext (~> 1.1.2) + hiera (>= 3.2.1, < 4) + locale (~> 2.1) + multi_json (~> 1.10) + puppet-blacksmith (4.1.2) + rest-client (~> 2.0) + puppet-lint (2.3.6) + puppet-syntax (2.4.1) rake - rspec-puppet + puppetlabs_spec_helper (2.13.1) + mocha (~> 1.0) + pathspec (~> 0.2.1) + puppet-lint (~> 2.0) + puppet-syntax (~> 2.0) + rspec-puppet (~> 2.0) rake (10.5.0) - rbvmomi (1.8.2) - builder - nokogiri (>= 1.4.1) - trollop - rest-client (1.8.0) + rbovirt (0.1.7) + nokogiri + rest-client (> 1.7.0) + rbvmomi (1.13.0) + builder (~> 3.0) + json (>= 1.8) + nokogiri (~> 1.5) + trollop (~> 2.1) + rest-client (2.0.2) http-cookie (>= 1.0.2, < 2.0) - mime-types (>= 1.16, < 3.0) - netrc (~> 0.7) + mime-types (>= 1.16, < 4.0) + netrc (~> 0.8) rspec (2.99.0) rspec-core (~> 2.99.0) rspec-expectations (~> 2.99.0) @@ -171,17 +240,19 @@ GEM rspec-system-puppet (2.2.1) rspec-system (~> 2.0) systemu (2.6.5) - trollop (2.1.2) + trollop (2.9.9) unf (0.1.4) unf_ext - unf_ext (0.0.7.1) - vagrant-wrapper (2.0.2) + unf_ext (0.0.7.5) + vagrant-wrapper (2.0.3) + xml-simple (1.1.5) + xmlrpc (0.3.0) PLATFORMS ruby DEPENDENCIES - puppet (~> 3.8.0) + puppet (~> 5.5.0) puppet-blacksmith puppet-lint puppet-syntax @@ -192,4 +263,4 @@ DEPENDENCIES vagrant-wrapper BUNDLED WITH - 1.11.2 + 1.17.3 diff --git a/manifests/repo/apt.pp b/manifests/repo/apt.pp index dc5dbc9..7cc1dbb 100644 --- a/manifests/repo/apt.pp +++ b/manifests/repo/apt.pp @@ -31,11 +31,12 @@ Class['erlang::repo::apt'] -> Package<| title == $package_name |> apt::source { 'erlang': - include_src => false, - key => $key_signature, - key_source => $remote_repo_key_location, - location => $remote_repo_location, - repos => $repos, + key => { + 'id' => $key_signature, + 'source' => $remote_repo_key_location, + }, + location => $remote_repo_location, + repos => $repos, } } diff --git a/metadata.json b/metadata.json index 43118d3..420e1e1 100644 --- a/metadata.json +++ b/metadata.json @@ -26,30 +26,31 @@ "operatingsystem": "Debian", "operatingsystemrelease": [ "6", - "7" + "7", + "8" ] }, { "operatingsystem": "Ubuntu", "operatingsystemrelease": [ - "12.04", - "14.04" + "14.04", + "16.04" ] } ], "requirements": [ { "name": "pe", - "version_requirement": "3.x" + "version_requirement": "5.x" }, { "name": "puppet", - "version_requirement": "3.x" + "version_requirement": "5.x" } ], "dependencies": [ - { "name": "puppetlabs/stdlib", "version_requirement": ">=2.0.0 <5.0.0" }, - { "name": "puppetlabs/apt", "version_requirement": ">=2.1.0" }, + { "name": "puppetlabs/stdlib", "version_requirement": ">=5.2.0" }, + { "name": "puppetlabs/apt", "version_requirement": ">=6.3.0" }, { "name": "stahnma/epel", "version_requirement": ">=1.0.0 <2.0.0" } ] } diff --git a/spec/classes/erlang_spec.rb b/spec/classes/erlang_spec.rb index 878ddad..c7b6175 100644 --- a/spec/classes/erlang_spec.rb +++ b/spec/classes/erlang_spec.rb @@ -4,20 +4,24 @@ context 'on Debian' do - let(:facts) { { - :osfamily => 'Debian', - :lsbdistid => 'debian', - :lsbdistcodename => 'squeeze', - :operatingsystemrelease => '5' - }} + let(:facts) do + { + os: { family: 'Debian', name: 'Debian', release: { major: '8', full: '8.0' } }, + lsbdistid: 'Debian', + osfamily: 'Debian', + lsbdistcodename: 'jessie', + } + end context 'with no parameters' do it { should compile.with_all_deps } it { should contain_package('erlang-nox').with_ensure('present') } it { should contain_apt__source('erlang').with( - 'key_source' => 'http://packages.erlang-solutions.com/debian/erlang_solutions.asc', - 'key' => '434975BD900CCBE4F7EE1B1ED208507CA14F4FCA' - ) } + 'key' => { + 'source' => 'http://packages.erlang-solutions.com/debian/erlang_solutions.asc', + 'id' => '434975BD900CCBE4F7EE1B1ED208507CA14F4FCA', + } + ) } end context 'with a custom version' do @@ -38,10 +42,12 @@ 'remote_repo_key_location' => 'http://example.com/debian/key.asc', } } it { should contain_apt__source('erlang').with( - 'location' => 'http://example.com/debian', - 'key_source' => 'http://example.com/debian/key.asc', - 'key' => '1234ABCD', - 'repos' => 'main' + 'location' => 'http://example.com/debian', + 'key' => { + 'id' => '1234ABCD', + 'source' => 'http://example.com/debian/key.asc', + }, + 'repos' => 'main' ) } end