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
6 changes: 6 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,12 @@ jobs:
matrix:
ruby_version:
- "3.2"
- "4.0"
include:
- ruby_version: '3.2'
puppet_gem_version: '~> 8.0' # puppet8'
- ruby_version: '4.0'
puppet_gem_version: '~> 9.0'
runs_on:
- "ubuntu-latest"
- "windows-latest"
Expand All @@ -40,9 +43,12 @@ jobs:
matrix:
ruby_version:
- "3.2"
- "4.0"
include:
- ruby_version: '3.2'
puppet_gem_version: 'https://github.com/puppetlabs/puppet' # puppet8'
- ruby_version: '4.0'
puppet_gem_version: '~> 9.0'
runs_on:
- "ubuntu-latest"
- "windows-latest"
Expand Down
6 changes: 6 additions & 0 deletions .github/workflows/nightly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,12 @@ jobs:
matrix:
ruby_version:
- "3.2"
- "4.0"
include:
- ruby_version: '3.2'
puppet_gem_version: 'https://github.com/puppetlabs/puppet' # puppet8'
- ruby_version: '4.0'
puppet_gem_version: '~> 9.0'
runs_on:
- "ubuntu-latest"
- "windows-latest"
Expand All @@ -32,9 +35,12 @@ jobs:
matrix:
ruby_version:
- "3.2"
- "4.0"
include:
- ruby_version: '3.2'
puppet_gem_version: 'https://github.com/puppetlabs/puppet' # puppet8'
- ruby_version: '4.0'
puppet_gem_version: '~> 9.0'
runs_on:
- "ubuntu-latest"
- "windows-latest"
Expand Down
18 changes: 14 additions & 4 deletions Gemfile
Original file line number Diff line number Diff line change
@@ -1,11 +1,18 @@
# frozen_string_literal: true

source 'https://rubygems.org'
# For puppetcore, set GEM_SOURCE_PUPPETCORE = 'https://rubygems-puppetcore.puppet.com'
gemsource_default = ENV['GEM_SOURCE'] || 'https://rubygems.org'
gemsource_puppetcore = if ENV['PUPPET_FORGE_TOKEN'].to_s.empty?
ENV['GEM_SOURCE_PUPPETCORE'] || gemsource_default
else
'https://rubygems-puppetcore.puppet.com'
end
source gemsource_default

# Specify your gem's dependencies in puppet-modulebuilder.gemspec
gemspec

def location_for(place_or_version, fake_version = nil)
def location_for(place_or_version, fake_version = nil, opts = {})
git_url_regex = /\A(?<url>(https?|git)[:@][^#]*)(#(?<branch>.*))?/
file_url_regex = %r{\Afile://(?<path>.*)}

Expand All @@ -14,12 +21,12 @@ def location_for(place_or_version, fake_version = nil)
elsif place_or_version && (file_url = place_or_version.match(file_url_regex))
['>= 0', { path: File.expand_path(file_url[:path]), require: false }]
else
[place_or_version, { require: false }]
[place_or_version, { require: false }.merge(opts)]
end
end

group :development do
gem 'puppet', *location_for(ENV['PUPPET_GEM_VERSION'])
gem 'puppet', *location_for(ENV.fetch('PUPPET_GEM_VERSION', nil), nil, { source: gemsource_puppetcore })

gem 'rake'
gem 'rspec', '~> 3.1'
Expand All @@ -29,6 +36,9 @@ group :development do

# Required for testing on Windows
gem 'ffi', platforms: [:x64_mingw]
# Ruby 4.0 unbundled win32ole from the standard library; puppet's Windows code still
# expects it to just be there.
gem 'win32ole', platforms: [:x64_mingw]
# puppet-modulebuilder supports minitar 0.x and 1.x
# puppet 8.10.0 can use `tar` (the linux CLI tool) *or* minitar 0.x
# on windows, puppet 8.10 defaults to minitar
Expand Down
Loading