From d3c9f1772507b22f131a7655341033f0c669556a Mon Sep 17 00:00:00 2001 From: Tim Meusel Date: Sun, 11 May 2025 16:52:58 +0200 Subject: [PATCH 1/4] CI: Run on PRs and merges --- .github/workflows/ruby.yml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ruby.yml b/.github/workflows/ruby.yml index 85433d7b..bc733a25 100644 --- a/.github/workflows/ruby.yml +++ b/.github/workflows/ruby.yml @@ -1,6 +1,10 @@ name: Ruby -on: [push] +on: + pull_request: {} + push: + branches: + - main jobs: build: From 7049ca85eae5625c41bc461389a35f55a7ac0b03 Mon Sep 17 00:00:00 2001 From: Tim Meusel Date: Sun, 11 May 2025 16:56:48 +0200 Subject: [PATCH 2/4] Replace deprecated github action --- .github/workflows/ruby.yml | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/.github/workflows/ruby.yml b/.github/workflows/ruby.yml index bc733a25..d45cf72e 100644 --- a/.github/workflows/ruby.yml +++ b/.github/workflows/ruby.yml @@ -12,16 +12,17 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - ruby: [ '2.5.x', '2.7.x' ] + ruby: + - 2.5 + - 2.7 steps: - uses: actions/checkout@master - 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: | From c136b61357dcefae92ad41f782311de00c59d4d7 Mon Sep 17 00:00:00 2001 From: Tim Meusel Date: Sun, 11 May 2025 17:08:05 +0200 Subject: [PATCH 3/4] replace legacy git:// URIs with https scheme --- README.md | 8 ++++---- spec/fixtures/configs/components/test_file.json | 2 +- .../configs/components/test_file_not_tagged.json | 2 +- spec/lib/packaging/util/git_spec.rb | 4 ++-- spec/lib/packaging/util/git_tag_spec.rb | 10 +++++----- 5 files changed, 13 insertions(+), 13 deletions(-) diff --git a/README.md b/README.md index 6578e17f..a2b58001 100644 --- a/README.md +++ b/README.md @@ -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 diff --git a/spec/fixtures/configs/components/test_file.json b/spec/fixtures/configs/components/test_file.json index 581f346c..640351f9 100644 --- a/spec/fixtures/configs/components/test_file.json +++ b/spec/fixtures/configs/components/test_file.json @@ -1 +1 @@ -{"url": "git://github.com/puppetlabs/leatherman.git", "ref": "refs/tags/0.6.2"} \ No newline at end of file +{"url": "https://github.com/puppetlabs/leatherman.git", "ref": "refs/tags/0.6.2"} \ No newline at end of file diff --git a/spec/fixtures/configs/components/test_file_not_tagged.json b/spec/fixtures/configs/components/test_file_not_tagged.json index 938fc01f..f83fce37 100644 --- a/spec/fixtures/configs/components/test_file_not_tagged.json +++ b/spec/fixtures/configs/components/test_file_not_tagged.json @@ -1 +1 @@ -{"url": "git://github.com/puppetlabs/leatherman.git", "ref": "4eef05389ebf418b62af17406c7f9f13fa51f975"} \ No newline at end of file +{"url": "https://github.com/puppetlabs/leatherman.git", "ref": "4eef05389ebf418b62af17406c7f9f13fa51f975"} \ No newline at end of file diff --git a/spec/lib/packaging/util/git_spec.rb b/spec/lib/packaging/util/git_spec.rb index f97a7844..5427806b 100644 --- a/spec/lib/packaging/util/git_spec.rb +++ b/spec/lib/packaging/util/git_spec.rb @@ -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 diff --git a/spec/lib/packaging/util/git_tag_spec.rb b/spec/lib/packaging/util/git_tag_spec.rb index 73ed1f21..4c555bf6 100644 --- a/spec/lib/packaging/util/git_tag_spec.rb +++ b/spec/lib/packaging/util/git_tag_spec.rb @@ -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 From c479d7fb4946afb8e03a7d7dba3cda5f30456c03 Mon Sep 17 00:00:00 2001 From: Tim Meusel Date: Tue, 13 May 2025 14:28:41 +0200 Subject: [PATCH 4/4] Update .github/workflows/ruby.yml Co-authored-by: Ewoud Kohl van Wijngaarden --- .github/workflows/ruby.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ruby.yml b/.github/workflows/ruby.yml index d45cf72e..03a4347a 100644 --- a/.github/workflows/ruby.yml +++ b/.github/workflows/ruby.yml @@ -16,7 +16,7 @@ jobs: - 2.5 - 2.7 steps: - - uses: actions/checkout@master + - uses: actions/checkout@v4 - name: Set up Ruby uses: ruby/setup-ruby@v1 with: