This repository has been archived by the owner on Jun 5, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 93
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #79 from cyberious/modules_4221
MODULES-4221 - Allow boolean values to be passed
- Loading branch information
Showing
6 changed files
with
126 additions
and
59 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,31 +1,29 @@ | ||
#This file is generated by ModuleSync, do not edit. | ||
--- | ||
sudo: false | ||
language: ruby | ||
|
||
bundler_args: '--without development system_tests' | ||
|
||
cache: bundler | ||
script: "bundle exec rake validate lint spec" | ||
#Inserting below due to the following issue: https://github.com/travis-ci/travis-ci/issues/3531#issuecomment-88311203 | ||
before_install: | ||
- 'gem update --system' | ||
- 'gem update bundler' | ||
|
||
script: "SPEC_OPTS='--format documentation' bundle exec rake validate lint spec" | ||
|
||
- gem update bundler | ||
matrix: | ||
fast_finish: true | ||
include: | ||
- rvm: 1.8.7 | ||
env: PUPPET_GEM_VERSION="~> 3.0" FACTER_GEM_VERSION="~> 1.0" | ||
- rvm: 1.8.7 | ||
env: PUPPET_GEM_VERSION="~> 3.0" FACTER_GEM_VERSION="~> 2.0" | ||
- rvm: 1.9.3 | ||
env: PUPPET_GEM_VERSION="~> 3.0" FACTER_GEM_VERSION="~> 1.0" | ||
- rvm: 1.9.3 | ||
env: PUPPET_GEM_VERSION="~> 3.0" FACTER_GEM_VERSION="~> 2.0" | ||
- rvm: 2.0.0 | ||
env: PUPPET_GEM_VERSION="~> 3.0" FACTER_GEM_VERSION="~> 1.0" | ||
- rvm: 2.0.0 | ||
env: PUPPET_GEM_VERSION="~> 3.0" FACTER_GEM_VERSION="~> 2.0" | ||
- rvm: 2.3.1 | ||
env: PUPPET_GEM_VERSION="~> 4" FACTER_GEM_VERSION="~> 2.0" | ||
|
||
bundler_args: --without system_tests | ||
env: PUPPET_GEM_VERSION="~> 4.0" | ||
- rvm: 2.1.9 | ||
bundler_args: --without system_tests | ||
env: PUPPET_GEM_VERSION="~> 4.0" | ||
- rvm: 2.1.5 | ||
bundler_args: --without system_tests | ||
env: PUPPET_GEM_VERSION="~> 3.0" FUTURE_PARSER="yes" | ||
- rvm: 2.1.5 | ||
bundler_args: --without system_tests | ||
env: PUPPET_GEM_VERSION="~> 3.0" | ||
- rvm: 1.9.3 | ||
bundler_args: --without system_tests | ||
env: PUPPET_GEM_VERSION="~> 3.0" | ||
notifications: | ||
email: false |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,53 +1,86 @@ | ||
#This file is generated by ModuleSync, do not edit. | ||
|
||
source ENV['GEM_SOURCE'] || "https://rubygems.org" | ||
|
||
def location_for(place, fake_version = nil) | ||
if place =~ /^(git:[^#]*)#(.*)/ | ||
# Determines what type of gem is requested based on place_or_version. | ||
def gem_type(place_or_version) | ||
if place_or_version =~ /^git:/ | ||
:git | ||
elsif place_or_version =~ /^file:/ | ||
:file | ||
else | ||
:gem | ||
end | ||
end | ||
|
||
# Find a location or specific version for a gem. place_or_version can be a | ||
# version, which is most often used. It can also be git, which is specified as | ||
# `git://somewhere.git#branch`. You can also use a file source location, which | ||
# is specified as `file://some/location/on/disk`. | ||
def location_for(place_or_version, fake_version = nil) | ||
if place_or_version =~ /^(git[:@][^#]*)#(.*)/ | ||
[fake_version, { :git => $1, :branch => $2, :require => false }].compact | ||
elsif place =~ /^file:\/\/(.*)/ | ||
elsif place_or_version =~ /^file:\/\/(.*)/ | ||
['>= 0', { :path => File.expand_path($1), :require => false }] | ||
else | ||
[place, { :require => false }] | ||
[place_or_version, { :require => false }] | ||
end | ||
end | ||
|
||
is_ruby18 = RUBY_VERSION.start_with? '1.8' | ||
# Used for gem conditionals | ||
supports_windows = false | ||
|
||
group :development, :test do | ||
gem 'rake', :require => false | ||
if is_ruby18 | ||
gem 'rspec', "~> 3.1.0", :require => false | ||
end | ||
gem 'rspec-puppet', :require => false | ||
gem 'puppetlabs_spec_helper', :require => false | ||
gem 'puppet-lint', :require => false | ||
gem 'pry', :require => false | ||
gem 'simplecov', :require => false | ||
gem 'metadata-json-lint', :require => false | ||
group :development do | ||
gem 'puppet-lint', :require => false | ||
gem 'metadata-json-lint', :require => false, :platforms => 'ruby' | ||
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, :platforms => 'ruby' | ||
gem 'mocha', '< 1.2.0', :require => false | ||
gem 'simplecov', :require => false, :platforms => 'ruby' | ||
gem 'parallel_tests', '< 2.10.0', :require => false if Gem::Version.new(RUBY_VERSION.dup) < Gem::Version.new('2.0.0') | ||
gem 'parallel_tests', :require => false if Gem::Version.new(RUBY_VERSION.dup) >= Gem::Version.new('2.0.0') | ||
gem 'rubocop', '0.41.2', :require => false if Gem::Version.new(RUBY_VERSION.dup) < Gem::Version.new('2.0.0') | ||
gem 'rubocop', :require => false if Gem::Version.new(RUBY_VERSION.dup) >= Gem::Version.new('2.0.0') | ||
gem 'rubocop-rspec', '~> 1.6', :require => false if Gem::Version.new(RUBY_VERSION.dup) >= Gem::Version.new('2.3.0') | ||
gem 'pry', :require => false | ||
gem 'json_pure', '<= 2.0.1', :require => false if Gem::Version.new(RUBY_VERSION.dup) < Gem::Version.new('2.0.0') | ||
gem 'fast_gettext', '1.1.0', :require => false if Gem::Version.new(RUBY_VERSION.dup) < Gem::Version.new('2.1.0') | ||
end | ||
|
||
beaker_version = ENV['BEAKER_VERSION'] | ||
group :system_tests do | ||
gem 'serverspec', :require => false | ||
if beaker_version | ||
gem 'beaker', *location_for(beaker_version) | ||
else | ||
gem 'beaker', :require => false | ||
end | ||
gem 'beaker-rspec', :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.dup) >= Gem::Version.new('2.3.0') and ! supports_windows | ||
gem 'beaker', *location_for(ENV['BEAKER_VERSION'] || '< 3') if Gem::Version.new(RUBY_VERSION.dup) < Gem::Version.new('2.3.0') and ! supports_windows | ||
gem 'beaker-pe', :require => false if Gem::Version.new(RUBY_VERSION.dup) >= 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']) | ||
gem 'beaker-abs', *location_for(ENV['BEAKER_ABS_VERSION'] || '~> 0.1') | ||
end | ||
|
||
facter_version = ENV['FACTER_GEM_VERSION'] | ||
if facter_version | ||
gem 'facter', *location_for(facter_version) | ||
else | ||
gem 'facter', :require => false | ||
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. | ||
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'] | ||
|
||
|
||
# Evaluate Gemfile.local if it exists | ||
if File.exists? "#{__FILE__}.local" | ||
eval(File.read("#{__FILE__}.local"), binding) | ||
end | ||
|
||
puppet_version = ENV['PUPPET_GEM_VERSION'] | ||
if puppet_version | ||
gem 'puppet', *location_for(puppet_version) | ||
else | ||
gem 'puppet', :require => false | ||
# Evaluate ~/.gemfile if it exists | ||
if File.exists?(File.join(Dir.home, '.gemfile')) | ||
eval(File.read(File.join(Dir.home, '.gemfile')), binding) | ||
end | ||
|
||
# vim:ft=ruby |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters