Skip to content
This repository was archived by the owner on May 5, 2023. It is now read-only.

Commit 0a655d4

Browse files
author
Joseph Yaworski
committed
Update from voxpupuli modulesync_config
1 parent 40edbc3 commit 0a655d4

14 files changed

+69
-84
lines changed

.gitignore

+2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
pkg/
22
Gemfile.lock
3+
Gemfile.local
34
vendor/
5+
.vendor/
46
spec/fixtures/
57
.vagrant/
68
.bundle/

.rubocop.yml

+7
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,11 @@
1+
require: rubocop-rspec
12
AllCops:
3+
TargetRubyVersion: 1.9
24
Include:
35
- ./**/*.rb
46
Exclude:
57
- vendor/**/*
8+
- .vendor/**/*
69
- pkg/**/*
710
- spec/fixtures/**/*
811

@@ -64,3 +67,7 @@ Style/BlockDelimiters:
6467

6568
Style/MultilineBlockLayout:
6669
Enabled: False
70+
71+
# Rspec
72+
RSpec/DescribeClass:
73+
Enabled: False

.sync.yml

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
---
2+
.travis.yml:
3+
secure: "Gi2pSwUXV0VzdVVfxAW8/9/2/ZYUuOaFxr7klw2lDh1/+pbvINyn3m6121AVY8Z3W3wfJGqnnsIHC/3pS1671xsVES9VPEXqc5v93P+VHmtxEBCFakEBkQ6B+EqCiB5w58L6At+ZM85ejcdTPy3Pg4gNEaJc5rKAHZkq3FMamzA="
4+
...

.travis.yml

+16-13
Original file line numberDiff line numberDiff line change
@@ -2,26 +2,30 @@
22
sudo: false
33
language: ruby
44
cache: bundler
5-
bundler_args: --without system_tests
6-
before_install: rm Gemfile.lock || true
5+
bundler_args: --without system_tests development
6+
before_install:
7+
- bundle -v
8+
- rm Gemfile.lock || true
9+
- gem update --system
10+
- gem update bundler
11+
- gem --version
12+
- bundle -v
713
script:
814
- 'bundle exec rake $CHECK'
915
matrix:
1016
fast_finish: true
1117
include:
12-
- rvm: 1.9.3
18+
- rvm: jruby-19mode
1319
env: PUPPET_VERSION="~> 3.0" STRICT_VARIABLES="yes" CHECK=test
14-
- rvm: 2.1.8
20+
- rvm: jruby-19mode
21+
env: PUPPET_VERSION="~> 4.0" STRICT_VARIABLES="yes" CHECK=test
22+
- rvm: 2.1
1523
env: PUPPET_VERSION="~> 3.0" STRICT_VARIABLES="yes" CHECK=test
16-
- rvm: 1.9.3
17-
env: PUPPET_VERSION="~> 3.0" STRICT_VARIABLES="yes" CHECK=test FUTURE_PARSER=yes
18-
- rvm: 2.1.8
19-
env: PUPPET_VERSION="~> 3.0" STRICT_VARIABLES="yes" CHECK=test FUTURE_PARSER=yes
20-
- rvm: 2.1.8
24+
- rvm: 2.1
2125
env: PUPPET_VERSION="~> 4.0" STRICT_VARIABLES="yes" CHECK=test
22-
- rvm: 2.2.4
26+
- rvm: 2.2
2327
env: PUPPET_VERSION="~> 4.0" STRICT_VARIABLES="yes" CHECK=test
24-
- rvm: 2.2.4
28+
- rvm: 2.3.0
2529
env: PUPPET_VERSION="~> 4.0" STRICT_VARIABLES="yes" CHECK=rubocop
2630
- rvm: 2.3.0
2731
env: PUPPET_VERSION="~> 4.0" STRICT_VARIABLES="yes" CHECK=test
@@ -40,5 +44,4 @@ deploy:
4044
# all_branches is required to use tags
4145
all_branches: true
4246
# Only publish if our main Ruby target builds
43-
rvm: 1.9.3
44-
condition: "$FUTURE_PARSER = yes"
47+
rvm: 2.2

.yardopts

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
--markup markdown

Gemfile

+8-9
Original file line numberDiff line numberDiff line change
@@ -11,24 +11,23 @@ def location_for(place, fake_version = nil)
1111
end
1212

1313
group :test do
14-
gem 'rake', :require => false
14+
gem 'puppetlabs_spec_helper', :require => false
1515
gem 'rspec-puppet', :require => false, :git => 'https://github.com/rodjek/rspec-puppet.git'
16-
gem 'puppet-lint', :require => false, :git => 'https://github.com/rodjek/puppet-lint.git'
17-
gem 'metadata-json-lint', :require => false
1816
gem 'rspec-puppet-facts', :require => false
19-
gem 'rspec', :require => false
20-
gem 'puppet-blacksmith', :require => false, :git => 'https://github.com/voxpupuli/puppet-blacksmith.git'
21-
gem 'voxpupuli-release', :require => false, :git => 'https://github.com/voxpupuli/voxpupuli-release-gem.git'
22-
gem 'rubocop', '~> 0.38', :require => false
2317
gem 'rspec-puppet-utils', :require => false
24-
gem 'puppetlabs_spec_helper', :require => false
18+
gem 'puppet-lint', :require => false, :git => 'https://github.com/rodjek/puppet-lint.git'
2519
gem 'puppet-lint-absolute_classname-check', :require => false
2620
gem 'puppet-lint-leading_zero-check', :require => false
2721
gem 'puppet-lint-trailing_comma-check', :require => false
2822
gem 'puppet-lint-version_comparison-check', :require => false
2923
gem 'puppet-lint-classes_and_types_beginning_with_digits-check', :require => false
3024
gem 'puppet-lint-unquoted_string-check', :require => false
3125
gem 'puppet-lint-variable_contains_upcase', :require => false
26+
gem 'metadata-json-lint', :require => false
27+
gem 'puppet-blacksmith', :require => false, :git => 'https://github.com/voxpupuli/puppet-blacksmith.git'
28+
gem 'voxpupuli-release', :require => false, :git => 'https://github.com/voxpupuli/voxpupuli-release-gem.git'
29+
gem 'puppet-strings', :require => false, :git => 'https://github.com/puppetlabs/puppetlabs-strings.git'
30+
gem 'rubocop-rspec', '~> 1.4', :require => false
3231
end
3332

3433
group :development do
@@ -58,7 +57,7 @@ else
5857
gem 'facter', :require => false, :groups => [:test]
5958
end
6059

61-
ENV['PUPPET_VERSION'].nil? ? puppetversion = '~> 3.0' : puppetversion = ENV['PUPPET_VERSION'].to_s
60+
ENV['PUPPET_VERSION'].nil? ? puppetversion = '~> 4.0' : puppetversion = ENV['PUPPET_VERSION'].to_s
6261
gem 'puppet', puppetversion, :require => false, :groups => [:test]
6362

6463
# vim:ft=ruby

Rakefile

+7-5
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,13 @@
11
require 'puppetlabs_spec_helper/rake_tasks'
2-
require 'puppet-lint/tasks/puppet-lint'
3-
require 'puppet-syntax/tasks/puppet-syntax'
4-
require 'metadata-json-lint/rake_task'
52
require 'puppet_blacksmith/rake_tasks'
63
require 'voxpupuli/release/rake_tasks'
74
require 'rubocop/rake_task'
5+
require 'puppet-strings/rake_tasks'
86

9-
RuboCop::RakeTask.new
7+
RuboCop::RakeTask.new(:rubocop) do |task|
8+
# These make the rubocop experience maybe slightly less terrible
9+
task.options = ['-D', '-S', '-E']
10+
end
1011

1112
PuppetLint.configuration.log_format = '%{path}:%{linenumber}:%{check}:%{KIND}:%{message}'
1213
PuppetLint.configuration.fail_on_warnings = true
@@ -19,6 +20,7 @@ PuppetLint.configuration.send('disable_single_quote_string_with_variables')
1920
exclude_paths = %w(
2021
pkg/**/*
2122
vendor/**/*
23+
.vendor/**/*
2224
spec/**/*
2325
)
2426
PuppetLint.configuration.ignore_paths = exclude_paths
@@ -29,7 +31,7 @@ RSpec::Core::RakeTask.new(:acceptance) do |t|
2931
t.pattern = 'spec/acceptance'
3032
end
3133

32-
desc 'Run metadata_lint, lint, syntax, and spec tests.'
34+
desc 'Run tests metadata_lint, lint, syntax, spec'
3335
task test: [
3436
:metadata_lint,
3537
:lint,

metadata.json

+7-8
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
{
44
"operatingsystem": "RedHat",
55
"operatingsystemrelease": [
6-
"4",
76
"5",
87
"6",
98
"7"
@@ -12,7 +11,6 @@
1211
{
1312
"operatingsystem": "CentOS",
1413
"operatingsystemrelease": [
15-
"4",
1614
"5",
1715
"6",
1816
"7"
@@ -21,7 +19,6 @@
2119
{
2220
"operatingsystem": "OracleLinux",
2321
"operatingsystemrelease": [
24-
"4",
2522
"5",
2623
"6",
2724
"7"
@@ -30,7 +27,6 @@
3027
{
3128
"operatingsystem": "Scientific",
3229
"operatingsystemrelease": [
33-
"4",
3430
"5",
3531
"6",
3632
"7"
@@ -46,14 +42,16 @@
4642
"operatingsystem": "Debian",
4743
"operatingsystemrelease": [
4844
"6",
49-
"7"
45+
"7",
46+
"8"
5047
]
5148
},
5249
{
5350
"operatingsystem": "Ubuntu",
5451
"operatingsystemrelease": [
55-
"10.04",
56-
"12.04"
52+
"12.04",
53+
"14.04",
54+
"16.04"
5755
]
5856
},
5957
{
@@ -73,7 +71,8 @@
7371
"Server 2012",
7472
"Server 2012 R2",
7573
"7",
76-
"8"
74+
"8",
75+
"10"
7776
]
7877
},
7978
{

spec/acceptance/nodesets/centos-59-x64.yml

-10
This file was deleted.

spec/acceptance/nodesets/centos-64-x64-pe.yml

-12
This file was deleted.

spec/acceptance/nodesets/centos-65-x64.yml

-10
This file was deleted.

spec/defines/staging_extract_spec.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,7 @@
135135
let(:title) { 'sample.deb' }
136136
let(:params) { { target: '/opt' } }
137137

138-
it 'should fail' do
138+
it 'fails' do
139139
should compile.and_raise_error(/The .deb filetype is only supported on Debian family systems./)
140140
end
141141
end

spec/unit/puppet/parser/functions/scope_defaults_spec.rb

+6-6
Original file line numberDiff line numberDiff line change
@@ -4,26 +4,26 @@
44
describe 'the scope_defaults function' do
55
let(:scope) { PuppetlabsSpec::PuppetInternals.scope }
66

7-
it 'should exist' do
7+
it 'exists' do
88
Puppet::Parser::Functions.function('scope_defaults').should == 'function_scope_defaults'
99
end
1010

11-
it 'should raise a ParseError if there is less than 2 arguments' do
11+
it 'raises a ParseError if there is less than 2 arguments' do
1212
expect { scope.function_scope_defaults([]) }
1313
.to raise_error(Puppet::ParseError)
1414
end
1515

16-
it 'should raise a ParseError if there is more than 2 arguments' do
16+
it 'raises a ParseError if there is more than 2 arguments' do
1717
expect { scope.function_scope_defaults(%w(exec path error)) }
1818
.to raise_error(Puppet::ParseError)
1919
end
2020

21-
it 'should return false for invalid resource' do
21+
it 'returns false for invalid resource' do
2222
result = scope.function_scope_defaults(%w(foo path))
2323
result.should(eq(false))
2424
end
2525

26-
it 'should return false for resource without default attributes' do
26+
it 'returns false for resource without default attributes' do
2727
if scope.respond_to? :define_settings
2828
scope.define_settings('Exec', Puppet::Parser::Resource::Param.new(name: :path, value: '/bin'))
2929
else
@@ -33,7 +33,7 @@
3333
result.should(eq(false))
3434
end
3535

36-
it 'should return true for resource with default attributes' do
36+
it 'returns true for resource with default attributes' do
3737
if scope.respond_to? :define_settings
3838
scope.define_settings('Exec', Puppet::Parser::Resource::Param.new(name: :path, value: '/bin'))
3939
else

spec/unit/puppet/parser/functions/staging_parse_spec.rb

+10-10
Original file line numberDiff line numberDiff line change
@@ -4,47 +4,47 @@
44
describe 'the staging parser function' do
55
let(:scope) { PuppetlabsSpec::PuppetInternals.scope }
66

7-
it 'should exist' do
7+
it 'exists' do
88
Puppet::Parser::Functions.function('staging_parse').should == 'function_staging_parse'
99
end
1010

11-
it 'should raise a ParseError if there is less than 1 arguments' do
11+
it 'raises a ParseError if there is less than 1 arguments' do
1212
-> { scope.function_staging_parse([]) }.should(raise_error(Puppet::ParseError))
1313
end
1414

15-
it 'should raise a ParseError if there is more than 3 arguments' do
15+
it 'raises a ParseError if there is more than 3 arguments' do
1616
-> { scope.function_staging_parse(['/etc', 'filename', '.zip', 'error']) }.should(raise_error(Puppet::ParseError))
1717
end
1818

19-
it 'should raise a ParseError if there is an invalid info request' do
19+
it 'raises a ParseError if there is an invalid info request' do
2020
-> { scope.function_staging_parse(['/etc', 'sheep', '.zip']) }.should(raise_error(Puppet::ParseError))
2121
end
2222

23-
it "should raise a ParseError if 'source' doesn't have a URI path component" do
23+
it "raises a ParseError if 'source' doesn't have a URI path component" do
2424
-> { scope.function_staging_parse(['uri:without-path']) }.should(raise_error(Puppet::ParseError, /has no URI 'path' component/))
2525
end
2626

27-
it 'should return the filename by default' do
27+
it 'returns the filename by default' do
2828
result = scope.function_staging_parse(['/etc/puppet/sample.tar.gz'])
2929
result.should(eq('sample.tar.gz'))
3030
end
3131

32-
it 'should return the file basename' do
32+
it 'returns the file basename' do
3333
result = scope.function_staging_parse(['/etc/puppet/sample.tar.gz', 'basename'])
3434
result.should(eq('sample.tar'))
3535
end
3636

37-
it 'should return the file basename with custom extensions' do
37+
it 'returns the file basename with custom extensions' do
3838
result = scope.function_staging_parse(['/etc/puppet/sample.tar.gz', 'basename', '.tar.gz'])
3939
result.should(eq('sample'))
4040
end
4141

42-
it 'should return the file extname' do
42+
it 'returns the file extname' do
4343
result = scope.function_staging_parse(['/etc/puppet/sample.tar.gz', 'extname'])
4444
result.should(eq('.gz'))
4545
end
4646

47-
it 'should return the file parent' do
47+
it 'returns the file parent' do
4848
result = scope.function_staging_parse(['/etc/puppet/sample.tar.gz', 'parent'])
4949
result.should(eq('/etc/puppet'))
5050
end

0 commit comments

Comments
 (0)