Skip to content

Commit db8c1fb

Browse files
authored
Merge pull request #712 from puppetlabs/hunner_msync
(MODULES-4098) Sync the rest of the files
2 parents 5aa8419 + 1229d5a commit db8c1fb

14 files changed

+148
-50
lines changed

.gitignore

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,27 @@
11
#This file is generated by ModuleSync, do not edit.
22
pkg/
33
Gemfile.lock
4+
Gemfile.local
45
vendor/
56
spec/fixtures/manifests/
67
spec/fixtures/modules/
8+
log/
9+
junit/
710
.vagrant/
811
.bundle/
912
coverage/
1013
log/
1114
.idea/
15+
.metadata
1216
*.iml
17+
.*.sw[op]
18+
.yardoc
19+
.yardwarns
20+
.DS_Store
21+
tmp/
22+
vendor/
23+
doc/
24+
1325
!spec/fixtures/
1426
spec/fixtures/manifests/site.pp
1527
spec/fixtures/modules/*

.project

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22
<projectDescription>
3-
<name>stdlib</name>
3+
<name>puppetlabs-stdlib</name>
44
<comment></comment>
55
<projects>
66
</projects>
77
<buildSpec>
88
<buildCommand>
9-
<name>org.cloudsmith.geppetto.pp.dsl.ui.modulefileBuilder</name>
9+
<name>com.puppetlabs.geppetto.pp.dsl.ui.modulefileBuilder</name>
1010
<arguments>
1111
</arguments>
1212
</buildCommand>
@@ -17,7 +17,7 @@
1717
</buildCommand>
1818
</buildSpec>
1919
<natures>
20-
<nature>org.cloudsmith.geppetto.pp.dsl.ui.puppetNature</nature>
20+
<nature>com.puppetlabs.geppetto.pp.dsl.ui.puppetNature</nature>
2121
<nature>org.eclipse.xtext.ui.shared.xtextNature</nature>
2222
</natures>
2323
</projectDescription>

.sync.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
---
2+
NOTICE:
3+
unmanaged: true
24
.gitignore:
35
paths:
46
- '!spec/fixtures/'

CONTRIBUTING.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ Checklist (and a short version for the impatient)
4343

4444
- Make sure you have a [GitHub account](https://github.com/join)
4545

46-
- [Create a ticket](https://tickets.puppetlabs.com/secure/CreateIssue!default.jspa), or [watch the ticket](https://tickets.puppetlabs.com/browse/) you are patching for.
46+
- [Create a ticket](https://tickets.puppet.com/secure/CreateIssue!default.jspa), or [watch the ticket](https://tickets.puppet.com/browse/) you are patching for.
4747

4848
* Preferred method:
4949

@@ -215,4 +215,3 @@ Additional Resources
215215
* [General GitHub documentation](http://help.github.com/)
216216

217217
* [GitHub pull request documentation](http://help.github.com/send-pull-requests/)
218-

Gemfile

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -49,15 +49,13 @@ group :development do
4949
gem 'json_pure', '<= 2.0.1', :require => false if Gem::Version.new(RUBY_VERSION.dup) < Gem::Version.new('2.0.0')
5050
gem 'fast_gettext', '1.1.0', :require => false if Gem::Version.new(RUBY_VERSION.dup) < Gem::Version.new('2.1.0')
5151
gem 'fast_gettext', :require => false if Gem::Version.new(RUBY_VERSION.dup) >= Gem::Version.new('2.1.0')
52+
gem 'rainbow', '< 2.2.0', :require => false
5253
end
5354

5455
group :system_tests do
55-
gem 'beaker', *location_for(ENV['BEAKER_VERSION'] || '~> 2.20') if supports_windows
56-
gem 'beaker', *location_for(ENV['BEAKER_VERSION']) if Gem::Version.new(RUBY_VERSION.dup) >= Gem::Version.new('2.3.0') and ! supports_windows
57-
gem 'beaker', *location_for(ENV['BEAKER_VERSION'] || '< 3') if Gem::Version.new(RUBY_VERSION.dup) < Gem::Version.new('2.3.0') and ! supports_windows
58-
gem 'beaker-pe', :require => false if Gem::Version.new(RUBY_VERSION.dup) >= Gem::Version.new('2.3.0')
59-
gem 'beaker-rspec', *location_for(ENV['BEAKER_RSPEC_VERSION'] || '>= 3.4') if ! supports_windows
60-
gem 'beaker-rspec', *location_for(ENV['BEAKER_RSPEC_VERSION'] || '~> 5.1') if supports_windows
56+
gem 'beaker', *location_for(ENV['BEAKER_VERSION'] || '>= 3')
57+
gem 'beaker-pe', :require => false
58+
gem 'beaker-rspec', *location_for(ENV['BEAKER_RSPEC_VERSION'])
6159
gem 'beaker-puppet_install_helper', :require => false
6260
gem 'beaker-module_install_helper', :require => false
6361
gem 'master_manipulator', :require => false

MAINTAINERS.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
## Maintenance
2+
3+
Maintainers:
4+
- Puppet Forge Modules Team `forge-modules |at| puppet |dot| com`
5+
6+
Tickets: https://tickets.puppet.com/browse/MODULES. Make sure to set component to `stdlib`.

Rakefile

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,9 @@
1-
require 'puppet_blacksmith/rake_tasks'
2-
require 'puppet-lint/tasks/puppet-lint'
31
require 'puppetlabs_spec_helper/rake_tasks'
2+
require 'puppet-lint/tasks/puppet-lint'
3+
require 'puppet_blacksmith/rake_tasks' if Bundler.rubygems.find_name('puppet-blacksmith').any?
44

5+
PuppetLint.configuration.fail_on_warnings = true
56
PuppetLint.configuration.send('relative')
6-
PuppetLint.configuration.send('disable_documentation')
7-
PuppetLint.configuration.send('disable_single_quote_string_with_variables')
87

98
desc 'Generate pooler nodesets'
109
task :gen_nodeset do

appveyor.yml

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
version: 1.1.x.{build}
2+
skip_commits:
3+
message: /^\(?doc\)?.*/
4+
clone_depth: 10
5+
init:
6+
- SET
7+
- 'mkdir C:\ProgramData\PuppetLabs\code && exit 0'
8+
- 'mkdir C:\ProgramData\PuppetLabs\facter && exit 0'
9+
- 'mkdir C:\ProgramData\PuppetLabs\hiera && exit 0'
10+
- 'mkdir C:\ProgramData\PuppetLabs\puppet\var && exit 0'
11+
environment:
12+
matrix:
13+
- PUPPET_GEM_VERSION: ~> 4.0
14+
RUBY_VER: 21
15+
- PUPPET_GEM_VERSION: ~> 4.0
16+
RUBY_VER: 21-x64
17+
- PUPPET_GEM_VERSION: ~> 4.0
18+
RUBY_VER: 23
19+
- PUPPET_GEM_VERSION: ~> 4.0
20+
RUBY_VER: 23-x64
21+
- PUPPET_GEM_VERSION: 4.2.3
22+
RUBY_VER: 21-x64
23+
matrix:
24+
fast_finish: true
25+
install:
26+
- SET PATH=C:\Ruby%RUBY_VER%\bin;%PATH%
27+
- bundle install --jobs 4 --retry 2 --without system_tests
28+
- type Gemfile.lock
29+
build: off
30+
test_script:
31+
- bundle exec puppet -V
32+
- ruby -v
33+
- bundle exec rake spec SPEC_OPTS='--format documentation'
34+
notifications:
35+
- provider: Email
36+
to:
37+
38+
on_build_success: false
39+
on_build_failure: false
40+
on_build_status_changed: false

spec/functions/deprecation_spec.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
require 'spec_helper'
22

3-
if Puppet.version.to_f >= 4.0
3+
if Puppet.version.to_f >= 4.5
44
describe 'deprecation' do
55
before(:each) {
66
# this is to reset the strict variable to default
@@ -40,7 +40,7 @@
4040
Puppet.settings[:strict] = :warning
4141
}
4242
end
43-
else
43+
elsif Puppet.version.to_f < 4.0
4444
# Puppet version < 4 will use these tests.
4545
describe 'deprecation' do
4646
after(:all) do

spec/functions/load_module_metadata_spec.rb

Lines changed: 25 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -7,30 +7,43 @@
77

88
describe "when calling with valid arguments" do
99
before :each do
10-
if RSpec.configuration.puppet_future
11-
allow(File).to receive(:read).with(/\/stdlib\/metadata.json/, {:encoding=>"utf-8"}).and_return('{"name": "puppetlabs-stdlib"}')
12-
else
13-
allow(File).to receive(:read).with(/\/stdlib\/metadata.json/).and_return('{"name": "puppetlabs-stdlib"}')
14-
end
10+
allow(File).to receive(:read).with(/\/stdlib\/metadata.json/, {:encoding=>"utf-8"}).and_return('{"name": "puppetlabs-stdlib"}')
11+
allow(File).to receive(:read).with(/\/stdlib\/metadata.json/).and_return('{"name": "puppetlabs-stdlib"}')
1512
end
1613
it "should json parse the file" do
17-
allow(scope).to receive(:function_get_module_path).with(['science']).and_return('/path/to/module/')
18-
allow(File).to receive(:exists?).with('/path/to/module/metadata.json').and_return(true)
19-
allow(File).to receive(:read).with('/path/to/module/metadata.json').and_return('{"name": "spencer-science"}')
14+
if Puppet::Util::Platform.windows?
15+
allow(scope).to receive(:function_get_module_path).with(['science']).and_return('C:/path/to/module/')
16+
allow(File).to receive(:exists?).with('C:/path/to/module/metadata.json').and_return(true)
17+
allow(File).to receive(:read).with('C:/path/to/module/metadata.json').and_return('{"name": "spencer-science"}')
18+
else
19+
allow(scope).to receive(:function_get_module_path).with(['science']).and_return('/path/to/module/')
20+
allow(File).to receive(:exists?).with('/path/to/module/metadata.json').and_return(true)
21+
allow(File).to receive(:read).with('/path/to/module/metadata.json').and_return('{"name": "spencer-science"}')
22+
end
2023

2124
result = subject.call(['science'])
2225
expect(result['name']).to eq('spencer-science')
2326
end
2427

2528
it "should fail by default if there is no metadata.json" do
26-
allow(scope).to receive(:function_get_module_path).with(['science']).and_return('/path/to/module/')
27-
allow(File).to receive(:exists?).with('/path/to/module/metadata.json').and_return(false)
29+
if Puppet::Util::Platform.windows?
30+
allow(scope).to receive(:function_get_module_path).with(['science']).and_return('C:/path/to/module/')
31+
allow(File).to receive(:exists?).with('C:/path/to/module/metadata.json').and_return(false)
32+
else
33+
allow(scope).to receive(:function_get_module_path).with(['science']).and_return('/path/to/module/')
34+
allow(File).to receive(:exists?).with('/path/to/module/metadata.json').and_return(false)
35+
end
2836
expect {subject.call(['science'])}.to raise_error(Puppet::ParseError)
2937
end
3038

3139
it "should return nil if user allows empty metadata.json" do
32-
allow(scope).to receive(:function_get_module_path).with(['science']).and_return('/path/to/module/')
33-
allow(File).to receive(:exists?).with('/path/to/module/metadata.json').and_return(false)
40+
if Puppet::Util::Platform.windows?
41+
allow(scope).to receive(:function_get_module_path).with(['science']).and_return('C:/path/to/module/')
42+
allow(File).to receive(:exists?).with('C:/path/to/module/metadata.json').and_return(false)
43+
else
44+
allow(scope).to receive(:function_get_module_path).with(['science']).and_return('/path/to/module/')
45+
allow(File).to receive(:exists?).with('/path/to/module/metadata.json').and_return(false)
46+
end
3447
result = subject.call(['science', true])
3548
expect(result).to eq({})
3649
end

0 commit comments

Comments
 (0)