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
17 changes: 11 additions & 6 deletions .github/workflows/ruby.yml
Original file line number Diff line number Diff line change
@@ -1,23 +1,28 @@
name: Ruby

on: [push]
on:
pull_request: {}
push:
branches:
- main

jobs:
build:

runs-on: ubuntu-latest
strategy:
matrix:
ruby: [ '2.5.x', '2.7.x' ]
ruby:
- 2.5
- 2.7
steps:
- uses: actions/checkout@master
- uses: actions/checkout@v4
- name: Set up Ruby
uses: actions/setup-ruby@v1
uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby }}
bundler-cache: true
- run: |
gem install bundler
bundle install --jobs 4 --retry 3
bundle exec rspec spec --color --format documentation --order random
- name: Rubocop
run: |
Expand Down
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -433,18 +433,18 @@ build_doc: false
build_msi:
puppet_for_the_win:
ref: 'origin/master'
repo: 'git://github.com/puppetlabs/puppet_for_the_win.git'
repo: 'https://github.com/puppetlabs/puppet_for_the_win.git'
facter:
ref: 'refs/tags/2.1.0'
repo: 'git://github.com/puppetlabs/facter.git'
repo: 'https://github.com/puppetlabs/facter.git'
hiera:
ref: 'refs/tags/1.3.4'
repo: 'git://github.com/puppetlabs/hiera.git'
repo: 'https://github.com/puppetlabs/hiera.git'
sys:
ref:
x86: 'origin/1.9.3-x86'
x64: 'origin/2.0.0-x64'
repo: 'git://github.com/puppetlabs/puppet-win32-ruby.git'
repo: 'https://github.com/puppetlabs/puppet-win32-ruby.git'
# Whether to present the Solaris 11 IPS packaging tasks
# This requires suitable IPS packaging artifacts in the project in ext/ips
build_ips: false
Expand Down
2 changes: 1 addition & 1 deletion spec/fixtures/configs/components/test_file.json
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"url": "git://github.com/puppetlabs/leatherman.git", "ref": "refs/tags/0.6.2"}
{"url": "https://github.com/puppetlabs/leatherman.git", "ref": "refs/tags/0.6.2"}
2 changes: 1 addition & 1 deletion spec/fixtures/configs/components/test_file_not_tagged.json
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"url": "git://github.com/puppetlabs/leatherman.git", "ref": "4eef05389ebf418b62af17406c7f9f13fa51f975"}
{"url": "https://github.com/puppetlabs/leatherman.git", "ref": "4eef05389ebf418b62af17406c7f9f13fa51f975"}
4 changes: 2 additions & 2 deletions spec/lib/packaging/util/git_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -153,11 +153,11 @@

context '#remote_tagged?' do
it 'reports Yes on tagged component' do
expect(Pkg::Util::Git.remote_tagged?('git://github.com/puppetlabs/leatherman.git', 'refs/tags/0.6.2')).to be(true)
expect(Pkg::Util::Git.remote_tagged?('https://github.com/puppetlabs/leatherman.git', 'refs/tags/0.6.2')).to be(true)
end

it 'reports No on non-tagged component' do
expect(Pkg::Util::Git.remote_tagged?('git://github.com/puppetlabs/leatherman.git', '4eef05389ebf418b62af17406c7f9f13fa51f975')).to be(false)
expect(Pkg::Util::Git.remote_tagged?('https://github.com/puppetlabs/leatherman.git', '4eef05389ebf418b62af17406c7f9f13fa51f975')).to be(false)
end
end
end
10 changes: 5 additions & 5 deletions spec/lib/packaging/util/git_tag_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,32 +4,32 @@
describe "Pkg::Util::Git_tag" do
context "parse_ref!" do
it "fails for a ref that doesn't exist'" do
expect { Pkg::Util::Git_tag.new("git://github.com/puppetlabs/leatherman.git", "garbagegarbage") }.to raise_error(RuntimeError, /ERROR : Not a ref or sha!/)
expect { Pkg::Util::Git_tag.new("https://github.com/puppetlabs/leatherman.git", "garbagegarbage") }.to raise_error(RuntimeError, /ERROR : Not a ref or sha!/)
end
end

context "sha?" do
it "sets ref type as a sha when passed a sha" do
git_tag = Pkg::Util::Git_tag.new("git://github.com/puppetlabs/leatherman.git", "4eef05389ebf418b62af17406c7f9f13fa51f975")
git_tag = Pkg::Util::Git_tag.new("https://github.com/puppetlabs/leatherman.git", "4eef05389ebf418b62af17406c7f9f13fa51f975")
expect(git_tag.sha?).to eq(true)
end
end

context "branch?" do
it "sets ref type as a branch when passed a branch" do
git_tag = Pkg::Util::Git_tag.new("git://github.com/puppetlabs/leatherman.git", "main")
git_tag = Pkg::Util::Git_tag.new("https://github.com/puppetlabs/leatherman.git", "main")
expect(git_tag.branch?).to eq(true)
end
end

context "tag?" do
it "sets ref type as a tag when passed a tag" do
git_tag = Pkg::Util::Git_tag.new("git://github.com/puppetlabs/leatherman.git", "tags/0.6.2")
git_tag = Pkg::Util::Git_tag.new("https://github.com/puppetlabs/leatherman.git", "tags/0.6.2")
expect(git_tag.tag?).to eq(true)
end

it "sets ref type as a tag when passed a fully qualified tag" do
git_tag = Pkg::Util::Git_tag.new("git://github.com/puppetlabs/leatherman.git", "refs/tags/0.6.2")
git_tag = Pkg::Util::Git_tag.new("https://github.com/puppetlabs/leatherman.git", "refs/tags/0.6.2")
expect(git_tag.tag?).to eq(true)
end
end
Expand Down