Skip to content

Commit

Permalink
fix spec tests
Browse files Browse the repository at this point in the history
  • Loading branch information
cristifalcas committed Nov 4, 2015
1 parent 573f0ba commit 43cd60d
Show file tree
Hide file tree
Showing 8 changed files with 29 additions and 41 deletions.
5 changes: 4 additions & 1 deletion .fixtures.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
fixtures:
repositories:
stdlib: "git://github.com/puppetlabs/puppetlabs-stdlib.git"
symlinks:
journald: "#{source_dir}"
journald: "#{source_dir}"

3 changes: 0 additions & 3 deletions .puppet-lint.rc

This file was deleted.

4 changes: 0 additions & 4 deletions .rspec

This file was deleted.

6 changes: 1 addition & 5 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -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
15 changes: 3 additions & 12 deletions Gemfile
Original file line number Diff line number Diff line change
@@ -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'
Expand All @@ -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
33 changes: 19 additions & 14 deletions Rakefile
Original file line number Diff line number Diff line change
@@ -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

2 changes: 1 addition & 1 deletion manifests/config.pp
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
}

file { '/etc/systemd/journald.conf':
ensure => present,
ensure => 'file',
owner => 0,
group => 0,
content => template("${module_name}/journald.conf.erb"),
Expand Down
2 changes: 1 addition & 1 deletion metadata.json
Original file line number Diff line number Diff line change
@@ -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"
Expand Down

0 comments on commit 43cd60d

Please sign in to comment.