Skip to content

Commit 4e6fe50

Browse files
committed
add Telekomlabs project settings and tool chain
TelekomLabs-DCO-1.1-Signed-off-by: Edmund Haselwanter <[email protected]> (github: ehaselwanter)
1 parent fa5a318 commit 4e6fe50

File tree

8 files changed

+129
-0
lines changed

8 files changed

+129
-0
lines changed

.gitignore

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
exp.*
2+
.kitchen
3+
Berksfile.lock
4+
Puppetfile.lock
5+
.kitchen.local.yml
6+
shared_test_repo/
7+
.librarian/
8+
.tmp/
9+
test/integration
10+
Gemfile.lock

.puppet-lint.rc

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
--no-autoloader_layout-check
2+
--no-80chars-check
3+
--no-inherits_across_namespaces-check

.rubocop.yml

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
AllCops:
2+
Exclude:
3+
- vendor/**
4+
- metadata.rb
5+
- '**/Puppetfile'
6+
- Puppetfile
7+
8+
Documentation:
9+
Enabled: false
10+
AlignParameters:
11+
Enabled: true
12+
Encoding:
13+
Enabled: true
14+
HashSyntax:
15+
Enabled: false
16+
LineLength:
17+
Enabled: false
18+
MethodLength:
19+
Max: 30
20+
NumericLiterals:
21+
MinDigits: 10

.travis.yml

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
rvm:
2+
- 1.8.7
3+
- 1.9.3
4+
- 2.0.0
5+
language: ruby
6+
bundler_args: --without development integration openstack
7+
env:
8+
- PUPPET_VERSION="~> 2.7.0"
9+
- PUPPET_VERSION="~> 3.0.0"
10+
- PUPPET_VERSION="~> 3.5.0"
11+
- PUPPET_VERSION="~> 3.6.0"
12+
matrix:
13+
fast_finish: true
14+
exclude:
15+
- rvm: 1.9.3
16+
env: PUPPET_VERSION="~> 2.7.0"
17+
- rvm: 2.0.0
18+
env: PUPPET_VERSION="~> 2.7.0"
19+
- rvm: 2.0.0
20+
env: PUPPET_VERSION="~> 3.0.0"

Gemfile

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
source 'https://rubygems.org'
2+
3+
if puppetversion = ENV['PUPPET_VERSION']
4+
gem 'puppet', puppetversion, :require => false
5+
else
6+
gem 'puppet', :require => false
7+
end
8+
9+
group :test do
10+
gem 'rake'
11+
gem 'rspec-puppet'
12+
# avoid NoMethodError: private method `clone' called for #<RuboCop::Cop::CopStore:0x00000104e286c8>
13+
gem 'puppetlabs_spec_helper', :git => "https://github.com/ehaselwanter/puppetlabs_spec_helper"
14+
gem 'puppet-lint'
15+
gem 'rubocop', '~> 0.23' if RUBY_VERSION > "1.9.2"
16+
end
17+
18+
group :development do
19+
gem 'guard-rake'
20+
end
21+
22+
group :integration do
23+
gem 'test-kitchen'
24+
gem 'kitchen-vagrant'
25+
gem 'kitchen-puppet', '~> 0.0.11'
26+
gem 'librarian-puppet'
27+
gem 'kitchen-sharedtests', '~> 0.2.0'
28+
end
29+
30+
group :openstack do
31+
gem 'kitchen-openstack'
32+
end

Guardfile

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
guard 'rake', :task => 'lint' do
2+
watch(%r{^.*$})
3+
end

Rakefile

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
# encoding: UTF-8
2+
3+
require 'puppet-lint/tasks/puppet-lint'
4+
require 'puppetlabs_spec_helper/rake_tasks'
5+
6+
PuppetLint.configuration.send('disable_autoloader_layout')
7+
PuppetLint.configuration.send('disable_80chars')
8+
PuppetLint.configuration.send('disable_inherits_across_namespaces')
9+
PuppetLint.configuration.fail_on_warnings = true
10+
PuppetLint.configuration.ignore_paths = ['vendor/**/*.pp']
11+
12+
if RUBY_VERSION > '1.9.2'
13+
require 'rubocop'
14+
require 'rubocop/rake_task'
15+
16+
desc 'Run all linters: rubocop and puppet-lint'
17+
task :run_all_linters => [:rubocop, :lint]
18+
19+
# Rubocop
20+
desc 'Run Rubocop lint checks'
21+
task :rubocop do
22+
RuboCop::RakeTask.new
23+
end
24+
25+
task :default => [:run_all_linters, :spec]
26+
27+
else
28+
desc 'Run all linters: rubocop and puppet-lint'
29+
task :run_all_linters => [:lint]
30+
31+
task :default => [:lint, :spec]
32+
end

Thorfile

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
# encoding: utf-8
2+
3+
require 'bundler'
4+
require 'bundler/setup'
5+
require 'kitchen_sharedtests'
6+
require 'kitchen/sharedtests_thor_tasks'
7+
8+
Kitchen::SharedtestsThorTasks.new

0 commit comments

Comments
 (0)