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'
- 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: '~> 8.0'
- 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
17 changes: 13 additions & 4 deletions Gemfile
Original file line number Diff line number Diff line change
@@ -1,10 +1,17 @@
# frozen_string_literal: true

source ENV['GEM_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?
'https://rubygems-puppetcore.puppet.com'
else
ENV['GEM_SOURCE_PUPPETCORE'] || gemsource_default
end
source gemsource_default

gemspec

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

Expand All @@ -13,12 +20,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 'json_spec', '~> 1.1', '>= 1.1.5'

Expand Down Expand Up @@ -48,6 +55,8 @@ group :development do
end

group :acceptance do
# Source bolt from puppetcore too, since it's a transitive puppet_litmus dependency.
gem 'bolt', *location_for(ENV.fetch('BOLT_GEM_VERSION', nil), nil, { source: gemsource_puppetcore })
gem 'puppet_litmus'
gem 'net-ssh'
end
Loading