diff --git a/.fixtures.yml b/.fixtures.yml index 887751c..d8db45e 100644 --- a/.fixtures.yml +++ b/.fixtures.yml @@ -1,3 +1,6 @@ fixtures: + repositories: + stdlib: "git://github.com/puppetlabs/puppetlabs-stdlib.git" symlinks: - journald: "#{source_dir}" \ No newline at end of file + journald: "#{source_dir}" + diff --git a/.puppet-lint.rc b/.puppet-lint.rc deleted file mode 100644 index 50816ba..0000000 --- a/.puppet-lint.rc +++ /dev/null @@ -1,3 +0,0 @@ ---fail-on-warnings ---no-80chars-check ---no-class_inherits_from_params_class-check diff --git a/.rspec b/.rspec deleted file mode 100644 index f07c903..0000000 --- a/.rspec +++ /dev/null @@ -1,4 +0,0 @@ ---format documentation ---color ---pattern "spec/*/*_spec.rb" -#--backtrace diff --git a/.travis.yml b/.travis.yml index 0b9d6cf..bd7bede 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,13 +1,9 @@ --- -# This file is managed centrally by modulesync -# https://github.com/katello/foreman-installer-modulesync +script: "bundle exec rake validate && bundle exec rake lint && bundle exec rake spec SPEC_OPTS='--format documentation'" rvm: - 1.8.7 - 1.9.3 - 2.0.0 - - 2.1.5 env: - - PUPPET_VERSION=3.5 - PUPPET_VERSION=3.8 -bundler_args: --without development sudo: false diff --git a/Gemfile b/Gemfile index 04f0e09..a3207a3 100644 --- a/Gemfile +++ b/Gemfile @@ -1,11 +1,7 @@ -# This file is managed centrally by modulesync -# https://github.com/theforeman/foreman-installer-modulesync +source ENV['GEM_SOURCE'] || "https://rubygems.org" -source 'https://rubygems.org' - -gem 'puppet', ENV.key?('PUPPET_VERSION') ? "~> #{ENV['PUPPET_VERSION']}" : '>= 2.7' - -# gem 'rake' +gem 'puppet', ENV.key?('PUPPET_VERSION') ? "~> #{ENV['PUPPET_VERSION']}" : "~> 3.0" +gem 'rake' gem 'rspec-puppet', '~> 2.0' gem 'puppetlabs_spec_helper', '>= 0.8.0' gem 'puppet-lint', '>= 1' @@ -19,13 +15,8 @@ gem 'puppet-lint-leading_zero-check' gem 'puppet-lint-trailing_comma-check' gem 'puppet-lint-file_ensure-check' gem 'simplecov' -gem 'puppet-blacksmith', '>= 3.1.0', {"groups"=>["development"]} -gem 'rest-client', '< 1.7', {"platforms"=>["ruby_18"], "groups"=>["development"]} -gem 'mime-types', '~> 1.0', {"platforms"=>["ruby_18"], "groups"=>["development"]} gem 'rspec-puppet-facts' gem 'metadata-json-lint' gem 'rspec', '< 3.2.0', {"platforms"=>["ruby_18"]} gem 'json' -gem 'webmock' -# vim:ft=ruby diff --git a/Rakefile b/Rakefile index d1e11f7..67558fc 100644 --- a/Rakefile +++ b/Rakefile @@ -1,18 +1,23 @@ -require 'rubygems' +require 'bundler' +Bundler.require(:rake) +require 'rake/clean' + +CLEAN.include('spec/fixtures/', 'doc', 'pkg') +CLOBBER.include('.tmp', '.librarian') + require 'puppetlabs_spec_helper/rake_tasks' -require 'puppet-lint/tasks/puppet-lint' + +task :default => [:clean, :spec] + +PuppetLint.configuration.fail_on_warnings = true +PuppetLint.configuration.send('relative') PuppetLint.configuration.send('disable_80chars') +PuppetLint.configuration.send('disable_class_inherits_from_params_class') +PuppetLint.configuration.send('disable_class_parameter_defaults') +PuppetLint.configuration.send('disable_documentation') +PuppetLint.configuration.send('disable_single_quote_string_with_variables') +PuppetLint.configuration.send('disable_empty_string_assignment') +PuppetLint.configuration.send('disable_variable_contains_upcase') PuppetLint.configuration.ignore_paths = ["spec/**/*.pp", "pkg/**/*.pp"] -desc "Validate manifests, templates, and ruby files" -task :validate do - Dir['manifests/**/*.pp'].each do |manifest| - sh "puppet parser validate --noop #{manifest}" - end - Dir['spec/**/*.rb','lib/**/*.rb'].each do |ruby_file| - sh "ruby -c #{ruby_file}" unless ruby_file =~ /spec\/fixtures/ - end - Dir['templates/**/*.erb'].each do |template| - sh "erb -P -x -T '-' #{template} | ruby -c" - end -end + diff --git a/manifests/config.pp b/manifests/config.pp index 0e66f49..c07fcdc 100644 --- a/manifests/config.pp +++ b/manifests/config.pp @@ -15,7 +15,7 @@ } file { '/etc/systemd/journald.conf': - ensure => present, + ensure => 'file', owner => 0, group => 0, content => template("${module_name}/journald.conf.erb"), diff --git a/metadata.json b/metadata.json index 8848040..3de86b0 100644 --- a/metadata.json +++ b/metadata.json @@ -1,7 +1,7 @@ { "name": "cristifalcas-journald", "author": "Cristian Falcas", - "version": "0.1.7", + "version": "0.2.0", "dependencies": [{ "name": "puppetlabs/stdlib", "version_requirement": "4.x"