Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions .sync.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
CONTRIBUTING.md:
unmanaged: true
Gemfile:
supports_windows: true
optional:
':development':
- gem: yard
Expand All @@ -29,4 +28,4 @@ NOTICE:
unmanaged: true
MAINTAINERS.md:
maintainers:
- "Puppet Windows Team `windows |at| puppet |dot| com`"
- "Puppet Windows Team `windows |at| puppet |dot| com`"
72 changes: 42 additions & 30 deletions Gemfile
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
#This file is generated by ModuleSync, do not edit.

source ENV['GEM_SOURCE'] || "https://rubygems.org"

# Determines what type of gem is requested based on place_or_version.
Expand Down Expand Up @@ -25,6 +27,9 @@ def location_for(place_or_version, fake_version = nil)
end
end

# Used for gem conditionals
supports_windows = true

# The following gems are not included by default as they require DevKit on Windows.
# You should probably include them in a Gemfile.local or a ~/.gemfile
#gem 'pry' #this may already be included in the gemfile
Expand All @@ -36,62 +41,66 @@ end
#end

group :development do
gem 'rake', :require => false
gem 'rspec', '~>3.0', :require => false
gem 'puppet-lint', :require => false
gem 'puppetlabs_spec_helper', '~>0.10.3', :require => false
gem 'puppet_facts', :require => false
gem 'mocha', '~>0.10.5', :require => false
gem 'pry', :require => false
gem 'yard', :require => false
gem 'puppet-lint', :require => false
gem 'metadata-json-lint', :require => false
gem 'puppet_facts', :require => false
gem 'puppet-blacksmith', '>= 3.4.0', :require => false, :platforms => 'ruby'
gem 'puppetlabs_spec_helper', '>= 1.2.1', :require => false
gem 'rspec-puppet', '>= 2.3.2', :require => false
gem 'rspec-puppet-facts', :require => false
gem 'mocha', '< 1.2.0', :require => false
gem 'simplecov', :require => false
gem 'parallel_tests', '< 2.10.0', :require => false if Gem::Version.new(RUBY_VERSION) < Gem::Version.new('2.0.0')
gem 'parallel_tests', :require => false if Gem::Version.new(RUBY_VERSION) >= Gem::Version.new('2.0.0')
gem 'rubocop', '0.41.2', :require => false if Gem::Version.new(RUBY_VERSION) < Gem::Version.new('2.0.0')
gem 'rubocop', :require => false if Gem::Version.new(RUBY_VERSION) >= Gem::Version.new('2.0.0')
gem 'rubocop-rspec', '~> 1.6', :require => false if Gem::Version.new(RUBY_VERSION) >= Gem::Version.new('2.3.0')
gem 'pry', :require => false
gem 'json_pure', '<= 2.0.1', :require => false if Gem::Version.new(RUBY_VERSION) < Gem::Version.new('2.0.0')
gem 'yard', :require => false
end

group :system_tests do
gem 'beaker-rspec', *location_for(ENV['BEAKER_RSPEC_VERSION'] || '~> 5.1')
gem 'beaker', *location_for(ENV['BEAKER_VERSION'] || '~> 2.20')
gem 'beaker-puppet_install_helper', :require => false
gem 'beaker', *location_for(ENV['BEAKER_VERSION'] || '~> 2.20') if supports_windows
gem 'beaker', *location_for(ENV['BEAKER_VERSION']) if Gem::Version.new(RUBY_VERSION) >= Gem::Version.new('2.3.0') and ! supports_windows
gem 'beaker', *location_for(ENV['BEAKER_VERSION'] || '< 3') if Gem::Version.new(RUBY_VERSION) < Gem::Version.new('2.3.0') and ! supports_windows
gem 'beaker-pe', :require => false if Gem::Version.new(RUBY_VERSION) >= Gem::Version.new('2.3.0')
gem 'beaker-rspec', *location_for(ENV['BEAKER_RSPEC_VERSION'] || '>= 3.4') if ! supports_windows
gem 'beaker-rspec', *location_for(ENV['BEAKER_RSPEC_VERSION'] || '~> 5.1') if supports_windows
gem 'beaker-puppet_install_helper', :require => false
gem 'master_manipulator', :require => false
gem 'beaker-hostgenerator', *location_for(ENV['BEAKER_HOSTGENERATOR_VERSION'])
end

# The recommendation is for PROJECT_GEM_VERSION, although there are older ways
# of referencing these. Add them all for compatibility reasons. We'll remove
# later when no issues are known. We'll prefer them in the right order.
puppetversion = ENV['PUPPET_GEM_VERSION'] || ENV['GEM_PUPPET_VERSION'] || ENV['PUPPET_LOCATION'] || '>= 0'
gem 'puppet', *location_for(puppetversion)

# json_pure 2.0.2 added a requirement on ruby >= 2. We pin to json_pure 2.0.1
# if using ruby 1.x
gem 'json_pure', '<=2.0.1', :require => false if RUBY_VERSION =~ /^1\./
gem 'puppet', *location_for(ENV['PUPPET_GEM_VERSION'])

# Only explicitly specify Facter/Hiera if a version has been specified.
# Otherwise it can lead to strange bundler behavior. If you are seeing weird
# gem resolution behavior, try setting `DEBUG_RESOLVER` environment variable
# to `1` and then run bundle install.
facterversion = ENV['FACTER_GEM_VERSION'] || ENV['GEM_FACTER_VERSION'] || ENV['FACTER_LOCATION']
gem "facter", *location_for(facterversion) if facterversion
hieraversion = ENV['HIERA_GEM_VERSION'] || ENV['GEM_HIERA_VERSION'] || ENV['HIERA_LOCATION']
gem "hiera", *location_for(hieraversion) if hieraversion
gem 'facter', *location_for(ENV['FACTER_GEM_VERSION']) if ENV['FACTER_GEM_VERSION']
gem 'hiera', *location_for(ENV['HIERA_GEM_VERSION']) if ENV['HIERA_GEM_VERSION']

# For Windows dependencies, these could be required based on the version of
# Puppet you are requiring. Anything greater than v3.5.0 is going to have
# Windows-specific dependencies dictated by the gem itself. The other scenario
# is when you are faking out Puppet to use a local file path / git path.
explicitly_require_windows_gems = false
puppet_gem_location = gem_type(puppetversion)
puppet_gem_location = gem_type(ENV['PUPPET_GEM_VERSION'])
# This is not a perfect answer to the version check
if puppet_gem_location != :gem || puppetversion < '3.5.0'
if puppet_gem_location != :gem || (Gem::Version.correct?(ENV['PUPPET_GEM_VERSION']) && Gem::Requirement.new('< 3.5.0').satisfied_by?(Gem::Version.new(ENV['PUPPET_GEM_VERSION'])))
if Gem::Platform.local.os == 'mingw32'
explicitly_require_windows_gems = true
end

if puppet_gem_location == :gem
# If facterversion hasn't been specified and we are
# looking for a Puppet Gem version less than 3.5.0, we
# need to ensure we get a good Facter for specs.
gem "facter",">= 1.6.11","<= 1.7.5",:require => false unless facterversion
gem "facter",">= 1.6.11","<= 1.7.5",:require => false unless ENV['FACTER_GEM_VERSION']
# If hieraversion hasn't been specified and we are
# looking for a Puppet Gem version less than 3.5.0, we
# need to ensure we get a good Hiera for specs.
gem "hiera",">= 1.0.0","<= 1.3.0",:require => false unless hieraversion
gem "hiera",">= 1.0.0","<= 1.3.0",:require => false unless ENV['HIERA_GEM_VERSION']
end
end

Expand All @@ -117,14 +126,17 @@ if explicitly_require_windows_gems
gem "win32-dir", "~> 0.3","<= 0.4.9", :require => false
gem "win32console", "1.3.2", :require => false if RUBY_VERSION =~ /^1\./

# sys-admin was removed in Puppet 3.7.0+, and doesn't compile
# under Ruby 2.3 - so restrict it to Ruby 1.x
gem "sys-admin", "1.5.6", :require => false if RUBY_VERSION =~ /^1\./

# Puppet less than 3.7.0 requires these.
# Puppet 3.5.0+ will control the actual requirements.
# These are listed in formats that work with all versions of
# Puppet from 3.0.0 to 3.6.x. After that, these were no longer used.
# We do not want to allow newer versions than what came out after
# 3.6.x to be used as they constitute some risk in breaking older
# functionality. So we set these to exact versions.
gem "sys-admin", "1.5.6", :require => false
gem "win32-api", "1.4.8", :require => false
gem "win32-taskscheduler", "0.2.2", :require => false
gem "windows-api", "0.4.3", :require => false
Expand Down
2 changes: 1 addition & 1 deletion metadata.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"version": "1.1.3",
"author": "Puppet Inc",
"summary": "The `sqlserver` module installs and manages MS SQL Server 2012 and 2014 on Windows systems.",
"license": "PuppetLabs-Enterprise",
"license": "proprietary",
"source": "https://tickets.puppet.com/browse/MODULES/component/12400",
"project_page": "https://tickets.puppet.com/browse/MODULES/component/12400",
"issues_url": "https://tickets.puppet.com/browse/MODULES/component/12400",
Expand Down
2 changes: 1 addition & 1 deletion spec/defines/database_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
it_behaves_like 'validation error' do
let(:additional_params) { {
:filespec_filename => 'c:/test/test.mdf'} }
let(:raise_error_check) { 'filespec_name must not be null if specifying filespec_filename' }
let(:raise_error_check) { /(input needs to be a String|filespec_name must not be null if specifying filespec_filename)/ }
end
describe 'filespec_name can not be more than 128 characters' do
it_behaves_like 'validation error' do
Expand Down