Skip to content

Commit e0400dd

Browse files
committed
Merge pull request #121 from ferventcoder/maint/master/modsync-changes
(MODULES-2207) Modulesync
2 parents bb8f571 + 7d93a4b commit e0400dd

File tree

6 files changed

+233
-43
lines changed

6 files changed

+233
-43
lines changed

.gitignore

Lines changed: 16 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,17 @@
1-
*.iml
2-
.idea
3-
coverage
4-
spec/log
1+
pkg/
52
Gemfile.lock
6-
.bundle
7-
spec/fixtures
3+
Gemfile.local
4+
vendor/
5+
spec/fixtures/
6+
log/
7+
junit/
8+
.vagrant/
9+
.bundle/
10+
coverage/
11+
.idea/
12+
.metadata
13+
*.iml
14+
.*.sw[op]
15+
.DS_Store
16+
.rspec
17+

.project

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<projectDescription>
3+
<name>puppetlabs-sqlserver</name>
4+
<comment></comment>
5+
<projects>
6+
</projects>
7+
<buildSpec>
8+
<buildCommand>
9+
<name>com.puppetlabs.geppetto.pp.dsl.ui.modulefileBuilder</name>
10+
<arguments>
11+
</arguments>
12+
</buildCommand>
13+
<buildCommand>
14+
<name>org.eclipse.xtext.ui.shared.xtextBuilder</name>
15+
<arguments>
16+
</arguments>
17+
</buildCommand>
18+
</buildSpec>
19+
<natures>
20+
<nature>com.puppetlabs.geppetto.pp.dsl.ui.puppetNature</nature>
21+
<nature>org.eclipse.xtext.ui.shared.xtextNature</nature>
22+
</natures>
23+
</projectDescription>

.sync.yml

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
---
2+
.travis.yml:
3+
script: "\"bundle exec rake validate && bundle exec rake lint && bundle exec rake spec SPEC_OPTS='--color --format documentation'\""
4+
extras:
5+
- rvm: 1.9.3
6+
env: PUPPET_GEM_VERSION="3.7.0"
7+
- rvm: 2.0.0
8+
env: PUPPET_GEM_VERSION="3.7.0"
9+
CONTRIBUTING.md:
10+
unmanaged: true
11+
Gemfile:
12+
supports_windows: true
13+
required:
14+
':development':
15+
- gem: rake
16+
- gem: rspec
17+
version: '~>2.14.1'
18+
- gem: puppet-lint
19+
- gem: puppetlabs_spec_helper
20+
- gem: puppet_facts
21+
- gem: mocha
22+
version: '~>0.10.5'
23+
- gem: simplecov
24+
- gem: yard
25+
':system_tests':
26+
- gem: beaker-rspec
27+
- gem: beaker
28+
- gem: beaker-puppet_install_helper
29+
Rakefile:
30+
unmanaged: true
31+
spec/spec_helper.rb:
32+
unmanaged: true
33+
appveyor.yml:
34+
matrix_extras:
35+
- PUPPET_GEM_VERSION: 3.7.0
36+
RUBY_VER: 193
37+
- PUPPET_GEM_VERSION: 3.7.0
38+
RUBY_VER: 200-x64

.travis.yml

Lines changed: 18 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,25 @@
11
---
22
sudo: false
33
language: ruby
4-
bundler_args: --without development
5-
script: "bundle exec rake spec SPEC_OPTS='--format documentation'"
6-
rvm:
7-
- 1.9.3
8-
- 2.0.0
9-
- 2.1.5
10-
env:
11-
matrix:
12-
- PUPPET_GEM_VERSION="~> 3.7.1"
4+
bundler_args: --without system_tests
5+
script: "bundle exec rake validate && bundle exec rake lint && bundle exec rake spec SPEC_OPTS='--color --format documentation'"
136
matrix:
147
fast_finish: true
8+
include:
9+
- rvm: 1.9.3
10+
env: PUPPET_GEM_VERSION="~> 3.0"
11+
- rvm: 2.0.0
12+
env: PUPPET_GEM_VERSION="~> 3.0"
13+
- rvm: 2.1.5
14+
env: PUPPET_GEM_VERSION="~> 4.0"
15+
- rvm: 2.0.0
16+
env: PUPPET_GEM_VERSION="~> 3.0" FUTURE_PARSER="yes"
17+
- rvm: 1.9.3
18+
env: PUPPET_GEM_VERSION="3.7.0"
19+
- rvm: 2.0.0
20+
env: PUPPET_GEM_VERSION="3.7.0"
21+
allow_failures:
22+
- rvm: 2.1.5
23+
env: PUPPET_GEM_VERSION="~> 4.0"
1524
notifications:
1625
email: false

Gemfile

Lines changed: 95 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -1,50 +1,117 @@
1-
source ENV['GEM_SOURCE'] || 'https://rubygems.org'
1+
source ENV['GEM_SOURCE'] || "https://rubygems.org"
22

3-
def location_for(place, fake_version = nil)
4-
if place =~ /^(git:[^#]*)#(.*)/
3+
# Determines what type of gem is requested based on place_or_version.
4+
def gem_type(place_or_version)
5+
if place_or_version =~ /^git:/
6+
:git
7+
elsif place_or_version =~ /^file:/
8+
:file
9+
else
10+
:gem
11+
end
12+
end
13+
14+
# Find a location or specific version for a gem. place_or_version can be a
15+
# version, which is most often used. It can also be git, which is specified as
16+
# `git://somewhere.git#branch`. You can also use a file source location, which
17+
# is specified as `file://some/location/on/disk`.
18+
def location_for(place_or_version, fake_version = nil)
19+
if place_or_version =~ /^(git[:@][^#]*)#(.*)/
520
[fake_version, { :git => $1, :branch => $2, :require => false }].compact
6-
elsif place =~ /^file:\/\/(.*)/
21+
elsif place_or_version =~ /^file:\/\/(.*)/
722
['>= 0', { :path => File.expand_path($1), :require => false }]
823
else
9-
[place, { :require => false }]
24+
[place_or_version, { :require => false }]
1025
end
1126
end
1227

13-
group :development, :test do
14-
gem 'nokogiri'
15-
gem 'mime-types', '<2.0', :require => false
16-
gem 'rake', :require => false
17-
gem 'rspec-puppet', '~>2.0', :require => false
18-
gem 'puppetlabs_spec_helper', :require => false
19-
gem 'puppet-lint', :require => false
20-
gem 'simplecov', :require => false
21-
gem 'rspec', :require => false
22-
gem 'yard', :require => false
23-
gem 'pry', :require => false
28+
group :development do
29+
gem 'rake', :require => false
30+
gem 'rspec', '~>2.14.1', :require => false
31+
gem 'puppet-lint', :require => false
32+
gem 'puppetlabs_spec_helper', :require => false
33+
gem 'puppet_facts', :require => false
34+
gem 'mocha', '~>0.10.5', :require => false
35+
gem 'simplecov', :require => false
36+
gem 'yard', :require => false
2437
end
2538

26-
beaker_version = ENV['BEAKER_VERSION']
27-
beaker_rspec_version = ENV['BEAKER_RSPEC_VERSION']
2839
group :system_tests do
29-
if beaker_version
30-
gem 'beaker', *location_for(beaker_version)
31-
end
32-
if beaker_rspec_version
40+
if beaker_rspec_version = ENV['BEAKER_RSPEC_VERSION']
3341
gem 'beaker-rspec', *location_for(beaker_rspec_version)
3442
else
3543
gem 'beaker-rspec', :require => false
3644
end
37-
gem 'serverspec', :require => false
38-
gem 'beaker-puppet_install_helper', :require => false
45+
gem 'beaker', *location_for(ENV['BEAKER_VERSION'] || '~> 2.18')
46+
gem 'beaker-puppet_install_helper', :require => false
3947
end
4048

41-
if puppetversion = ENV['PUPPET_GEM_VERSION']
42-
gem 'puppet', puppetversion, :require => false
43-
else
44-
gem 'puppet', '~> 3.7', :require => false
49+
# The recommendation is for PROJECT_GEM_VERSION, although there are older ways
50+
# of referencing these. Add them all for compatibility reasons. We'll remove
51+
# later when no issues are known. We'll prefer them in the right order.
52+
puppetversion = ENV['PUPPET_GEM_VERSION'] || ENV['GEM_PUPPET_VERSION'] || ENV['PUPPET_LOCATION'] || '>= 0'
53+
gem 'puppet', *location_for(puppetversion)
54+
55+
# Only explicitly specify Facter/Hiera if a version has been specified.
56+
# Otherwise it can lead to strange bundler behavior. If you are seeing weird
57+
# gem resolution behavior, try setting `DEBUG_RESOLVER` environment variable
58+
# to `1` and then run bundle install.
59+
facterversion = ENV['FACTER_GEM_VERSION'] || ENV['GEM_FACTER_VERSION'] || ENV['FACTER_LOCATION']
60+
gem "facter", *location_for(facterversion) if facterversion
61+
hieraversion = ENV['HIERA_GEM_VERSION'] || ENV['GEM_HIERA_VERSION'] || ENV['HIERA_LOCATION']
62+
gem "hiera", *location_for(hieraversion) if hieraversion
63+
64+
# For Windows dependencies, these could be required based on the version of
65+
# Puppet you are requiring. Anything greater than v3.5.0 is going to have
66+
# Windows-specific dependencies dictated by the gem itself. The other scenario
67+
# is when you are faking out Puppet to use a local file path / git path.
68+
explicitly_require_windows_gems = false
69+
puppet_gem_location = gem_type(puppetversion)
70+
# This is not a perfect answer to the version check
71+
if puppet_gem_location != :gem || puppetversion < '3.5.0'
72+
if Gem::Platform.local.os == 'mingw32'
73+
explicitly_require_windows_gems = true
74+
end
75+
end
76+
77+
if explicitly_require_windows_gems
78+
# This also means Puppet Gem less than 3.5.0 - this has been tested back
79+
# to 3.0.0. Any further back is likely not supported.
80+
if puppet_gem_location == :gem
81+
gem "ffi", "1.9.0", :require => false
82+
gem "win32-eventlog", "0.5.3", :require => false
83+
gem "win32-process", "0.6.5", :require => false
84+
gem "win32-security", "~> 0.1.2", :require => false
85+
gem "win32-service", "0.7.2", :require => false
86+
gem "minitar", "0.5.4", :require => false
87+
else
88+
gem "ffi", "~> 1.9.0", :require => false
89+
gem "win32-eventlog", "~> 0.5", :require => false
90+
gem "win32-process", "~> 0.6", :require => false
91+
gem "win32-security", "~> 0.1", :require => false
92+
gem "win32-service", "~> 0.7", :require => false
93+
gem "minitar", "~> 0.5.4", :require => false
94+
end
95+
96+
gem "win32-dir", "~> 0.3", :require => false
97+
gem "win32console", "1.3.2", :require => false if RUBY_VERSION =~ /^1\./
98+
99+
# Puppet less than 3.7.0 requires these.
100+
# Puppet 3.5.0+ will control the actual requirements.
101+
# These are listed in formats that work with all versions of
102+
# Puppet from 3.0.0 to 3.6.x. After that, these were no longer used.
103+
# We do not want to allow newer versions than what came out after
104+
# 3.6.x to be used as they constitute some risk in breaking older
105+
# functionality. So we set these to exact versions.
106+
gem "sys-admin", "1.5.6", :require => false
107+
gem "win32-api", "1.4.8", :require => false
108+
gem "win32-taskscheduler", "0.2.2", :require => false
109+
gem "windows-api", "0.4.3", :require => false
110+
gem "windows-pr", "1.2.3", :require => false
45111
end
46112

47113
if File.exists? "#{__FILE__}.local"
48114
eval(File.read("#{__FILE__}.local"), binding)
49115
end
116+
50117
# vim:ft=ruby

appveyor.yml

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
version: 1.1.x.{build}
2+
skip_commits:
3+
message: /(^\(?doc\)?.*|.*[A|a]cceptance [T|t]est.*)/
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: ~> 3.0
14+
RUBY_VER: 193
15+
- PUPPET_GEM_VERSION: ~> 3.0
16+
RUBY_VER: 200-x64
17+
- PUPPET_GEM_VERSION: ~> 4.0
18+
RUBY_VER: 21
19+
- PUPPET_GEM_VERSION: ~> 4.0
20+
RUBY_VER: 21-x64
21+
- PUPPET_GEM_VERSION: 3.7.0
22+
RUBY_VER: 193
23+
- PUPPET_GEM_VERSION: 3.7.0
24+
RUBY_VER: 200-x64
25+
matrix:
26+
fast_finish: true
27+
install:
28+
- SET PATH=C:\Ruby%RUBY_VER%\bin;%PATH%
29+
- gem install bundler --quiet --no-ri --no-rdoc
30+
- bundle install --jobs 4 --retry 2 --without system_tests
31+
- type Gemfile.lock
32+
build: off
33+
test_script:
34+
- bundle exec puppet -V
35+
- ruby -v
36+
- bundle exec rake spec SPEC_OPTS='--format documentation'
37+
notifications:
38+
- provider: Email
39+
to:
40+
41+
on_build_success: false
42+
on_build_failure: false
43+
on_build_status_changed: false

0 commit comments

Comments
 (0)