diff --git a/ruby-4.0.yaml b/ruby-4.0.yaml new file mode 100644 index 00000000000..e97d36b99fe --- /dev/null +++ b/ruby-4.0.yaml @@ -0,0 +1,200 @@ +package: + name: ruby-4.0 + version: "4.0.0" + epoch: 0 + description: "the Ruby programming language" + copyright: + - license: Ruby + - license: BSD-2-Clause + dependencies: + provides: + - ruby=${{package.full-version}} + # These are bundled gems + - ruby${{vars.ruby-major-version}}-csv + - ruby${{vars.ruby-major-version}}-base64 + - ruby${{vars.ruby-major-version}}-drb + runtime: + - glibc + - gmp + - libgcc + - yaml + - zlib + +environment: + contents: + packages: + - autoconf + - build-base + - busybox + - ca-certificates-bundle + - coreutils + - expat-dev + - gcc-14-default + - gdbm-dev + - glibc-dev + - gmp-dev + - graphviz + - jemalloc-dev + - libffi-dev + - libxcrypt-dev + - linux-headers + - mpdecimal-dev + - ncurses-dev + - oniguruma-dev + - openssl-dev + - pkgconf + - readline-dev + - ruby-3.4 + - rust + - tk-dev + - yaml-dev + - zlib-dev + +vars: + prefix: /usr + +var-transforms: + - from: ${{package.version}} + match: (\d+\.\d+).* + replace: $1 + to: ruby-major-version + +pipeline: + - uses: git-checkout + with: + repository: https://github.com/ruby/ruby + tag: v${{package.version}} + expected-commit: 553f1675f3a9cece340b90f374a4245dccac2272 + + - uses: patch + with: + patches: remove-already-provided-gems-from-gems_bundled_gems.patch + + - name: Generate and Configure + runs: | + ./autogen.sh + ./configure \ + --host=${{host.triplet.gnu}} \ + --build=${{host.triplet.gnu}} \ + --target=${{host.triplet.gnu}} \ + --prefix=${{vars.prefix}} \ + --enable-shared \ + --disable-rpath \ + --sysconfdir=/etc \ + --enable-mkmf-verbose \ + --enable-yjit \ + --with-jemalloc + + - uses: autoconf/make + + # Update and Extract bundled gems + - uses: autoconf/make + with: + opts: update-gems extract-gems + + # Build documentation + - uses: autoconf/make + with: + opts: rdoc capi + + - uses: autoconf/make-install + + - runs: | + # Ignore the patch version of ruby since ruby will install under the + # version of the latest standard library. Should produce the string 4.0.* + RUBYWILD="${{vars.ruby-major-version}}.*" + + RUBYDIR=${{targets.destdir}}${{vars.prefix}}/lib/ruby/$RUBYWILD + rm -rf ${RUBYDIR}/bundler + rm -f ${RUBYDIR}/bundler.rb + + GEMDIR=${{targets.destdir}}${{vars.prefix}}/lib/ruby/gems/$RUBYWILD + rm -rf ${GEMDIR}/gems/bundler-* + rm -f ${GEMDIR}/specifications/default/bundler-*.gemspec + + rm -f ${{targets.destdir}}/usr/bin/bundle \ + ${{targets.destdir}}/usr/bin/bundler + + - runs: | + find ${{targets.destdir}} -name 'mkmf.log' -exec rm {} \; + +subpackages: + - name: "ruby-${{vars.ruby-major-version}}-doc" + description: "ruby documentation" + pipeline: + - uses: split/manpages + - runs: | + mkdir -p "${{targets.subpkgdir}}"/usr/share + mv "${{targets.destdir}}"/usr/share/doc "${{targets.subpkgdir}}"/usr/share/ + mv "${{targets.destdir}}"/usr/share/ri "${{targets.subpkgdir}}"/usr/share/ + test: + pipeline: + - uses: test/docs + + - name: "ruby-${{vars.ruby-major-version}}-dev" + description: "ruby development headers" + dependencies: + runtime: + - jemalloc-dev + pipeline: + - uses: split/dev + test: + pipeline: + - uses: test/pkgconf + - uses: test/tw/ldd-check + +update: + enabled: true + version-transform: + - match: "_" + replace: . + github: + identifier: ruby/ruby + strip-prefix: v + use-tag: true + tag-filter-prefix: v4_0_ + +test: + environment: + contents: + packages: + - ruby${{vars.ruby-major-version}}-bundler + pipeline: + - name: Test binaries + runs: | + ruby --version | grep ${{package.version}} + + cat <> /tmp/hello.rb + puts("Hello Wolfi!") + EOF + + ruby /tmp/hello.rb + - name: Validate HTTPS support + runs: | + bundle init + OUTPUT=$(bundle doctor --ssl 2>&1) + echo "$OUTPUT" + if echo "$OUTPUT" | grep -i "failed"; then + exit 1 + fi + - uses: test/tw/ver-check + with: + bins: | + erb + gem + irb + racc + rake + rdbg + rdoc + ri + - uses: test/tw/help-check + with: + bins: | + gem + irb + rake + rdbg + rdoc + ri + ruby diff --git a/ruby-4.0/remove-already-provided-gems-from-gems_bundled_gems.patch b/ruby-4.0/remove-already-provided-gems-from-gems_bundled_gems.patch new file mode 100644 index 00000000000..adaa723e7b7 --- /dev/null +++ b/ruby-4.0/remove-already-provided-gems-from-gems_bundled_gems.patch @@ -0,0 +1,26 @@ +From ada5fb811e09dfe78f3f8bcdf265b94d1dced97c Mon Sep 17 00:00:00 2001 +From: Batuhan Apaydin +Date: Fri, 16 May 2025 20:03:12 +0300 +Subject: [PATCH] Remove modules from bundled gems list to avoid unnecessary + duplication. + +Signed-off-by: Batuhan Apaydin +--- + gems/bundled_gems | 2 -- + 1 file changed, 2 deletions(-) + +diff --git a/gems/bundled_gems b/gems/bundled_gems +index a5286d5..d4f50fa 100644 +--- a/gems/bundled_gems ++++ b/gems/bundled_gems +@@ -10,10 +10,8 @@ minitest 6.0.0 https://github.com/minitest/minitest + power_assert 3.0.1 https://github.com/ruby/power_assert + rake 13.3.1 https://github.com/ruby/rake + test-unit 3.7.5 https://github.com/test-unit/test-unit +-rexml 3.4.4 https://github.com/ruby/rexml + rss 0.3.2 https://github.com/ruby/rss + net-ftp 0.3.9 https://github.com/ruby/net-ftp +-net-imap 0.6.2 https://github.com/ruby/net-imap + net-pop 0.1.2 https://github.com/ruby/net-pop + net-smtp 0.5.1 https://github.com/ruby/net-smtp + matrix 0.4.3 https://github.com/ruby/matrix diff --git a/ruby4.0-activemodel.yaml b/ruby4.0-activemodel.yaml new file mode 100644 index 00000000000..bab55989487 --- /dev/null +++ b/ruby4.0-activemodel.yaml @@ -0,0 +1,74 @@ +package: + name: ruby4.0-activemodel + version: "8.1.1" # !!! Update activesupport at the same time + epoch: 0 + description: A toolkit for building modeling frameworks like Active Record. Rich support for attributes, callbacks, validations, serialization, internationalization, and testing. + copyright: + - license: MIT + dependencies: + runtime: + - ruby${{vars.rubyMM}}-activesupport + +environment: + contents: + packages: + - build-base + - busybox + - ca-certificates-bundle + - git + - ruby-${{vars.rubyMM}} + - ruby-${{vars.rubyMM}}-dev + +pipeline: + - uses: git-checkout + with: + repository: https://github.com/rails/rails + tag: v${{package.version}} + expected-commit: 90a1eaa1b30ba1f2d524e197460e549c03cf5698 + + - uses: ruby/build + with: + gem: ${{vars.gem}} + dir: activemodel + + - uses: ruby/install + with: + gem: ${{vars.gem}} + version: ${{package.version}} + dir: activemodel + + - uses: ruby/clean + +vars: + gem: activemodel + +test: + pipeline: + - name: Validate import + runs: ruby -e "require 'active_model'" + - name: Basic example + runs: | + cat > example.rb < example.rb < "sqlite3", + :database => ":memory:" + ) + + ActiveRecord::Schema.define do + create_table :tests do |table| + table.column :name, :string + table.column :foo, :string + end + end + + class Test < ActiveRecord::Base + end + + # Test record creation / reading + test_thing = Test.new(name: "Linky", foo: "bar") + id = test_thing.save + + test_thing = Test.find(id) + raise 'ActiveRecord#new failed' unless test_thing.name == "Linky" + + # Test record updating + test_thing.foo = "baz" + id = test_thing.save + + test_thing = Test.find(id) + raise 'ActiveRecord#exec_update failed' unless test_thing.foo == "baz" + + # Test record deletion + test_thing.destroy + + begin + test_thing = Test.find(id) + rescue ActiveRecord::RecordNotFound + test_thing = nil + end + + raise 'ActiveRecord#destroy failed' unless test_thing.nil? + + puts 'ActiveRecord tests passed.' + EOF + + ruby example.rb + +update: + enabled: true + github: + identifier: rails/rails + strip-prefix: v + +var-transforms: + - from: ${{package.name}} + match: ^ruby(\d\.\d+)-.* + replace: $1 + to: rubyMM diff --git a/ruby4.0-activesupport.yaml b/ruby4.0-activesupport.yaml new file mode 100644 index 00000000000..7dd8f29ada8 --- /dev/null +++ b/ruby4.0-activesupport.yaml @@ -0,0 +1,113 @@ +package: + name: ruby4.0-activesupport + version: "8.1.1" # !!! Update activesupport at the same time + epoch: 0 + description: A toolkit of support libraries and Ruby core extensions extracted from the Rails framework. Rich support for multibyte strings, internationalization, time zones, and testing. + copyright: + - license: MIT + dependencies: + runtime: + - ruby${{vars.rubyMM}}-concurrent-ruby + - ruby${{vars.rubyMM}}-connection_pool + - ruby${{vars.rubyMM}}-i18n + - ruby${{vars.rubyMM}}-securerandom + - ruby${{vars.rubyMM}}-tzinfo + - ruby${{vars.rubyMM}}-uri + +environment: + contents: + packages: + - build-base + - busybox + - ca-certificates-bundle + - git + - ruby-${{vars.rubyMM}} + - ruby-${{vars.rubyMM}}-dev + +pipeline: + - uses: git-checkout + with: + repository: https://github.com/rails/rails + tag: v${{package.version}} + expected-commit: 90a1eaa1b30ba1f2d524e197460e549c03cf5698 + + - uses: ruby/build + with: + gem: ${{vars.gem}} + dir: activesupport + + - uses: ruby/install + with: + gem: ${{vars.gem}} + version: ${{package.version}} + dir: activesupport + + - uses: ruby/clean + +vars: + gem: activesupport + +update: + enabled: true + github: + identifier: rails/rails + strip-prefix: v + +test: + pipeline: + - name: Basic require test + runs: | + ruby -e "require 'active_support'" + - name: Test core extensions + runs: | + ruby < /tmp/test.rb + require 'addressable/uri' + uri = Addressable::URI.parse("https://edu.chainguard.dev/open-source/wolfi/overview/") + uri.scheme + uri.host + uri.path + uri.normalize + EOF + ruby /tmp/test.rb + +update: + enabled: true + github: + identifier: sporkmonger/addressable + strip-prefix: addressable- + use-tag: true + +var-transforms: + - from: ${{package.name}} + match: ^ruby(\d\.\d+)-.* + replace: $1 + to: rubyMM diff --git a/ruby4.0-aes_key_wrap.yaml b/ruby4.0-aes_key_wrap.yaml new file mode 100644 index 00000000000..6de43b5f91f --- /dev/null +++ b/ruby4.0-aes_key_wrap.yaml @@ -0,0 +1,83 @@ +package: + name: ruby4.0-aes_key_wrap + version: 1.1.0 + epoch: 0 + description: A Ruby implementation of AES Key Wrap, a.k.a RFC 3394, a.k.a NIST Key Wrap. + copyright: + - license: MIT + +environment: + contents: + packages: + - build-base + - busybox + - ca-certificates-bundle + - git + - ruby-${{vars.rubyMM}} + - ruby-${{vars.rubyMM}}-dev + +pipeline: + - uses: git-checkout + with: + expected-commit: 7749c8d6dbc80a1544aea5d0da09b0380cbd9e57 + repository: https://github.com/tomdalling/aes_key_wrap + tag: v${{package.version}} + + - uses: ruby/unlock-spec + + - uses: ruby/build + with: + gem: ${{vars.gem}} + + - uses: ruby/install + with: + gem: ${{vars.gem}} + version: ${{package.version}} + + - uses: ruby/clean + +test: + environment: + contents: + packages: + - ruby-${{vars.rubyMM}} + pipeline: + - runs: | + ruby <<-EOF + require 'aes_key_wrap' + require 'test/unit' + include Test::Unit::Assertions + + # Define KEK, plaintext key, and IV as per documentation + plaintext_key = ['00112233445566778899AABBCCDDEEFF'].pack('H*') # 16-byte binary string + kek = ['000102030405060708090A0B0C0D0E0F'].pack('H*') # 16-byte binary string + iv = ['DEADBEEFC0FFEEEE'].pack("H*") # 8-byte binary string + + # Test wrapping with IV + wrapped_key = AESKeyWrap.wrap(plaintext_key, kek, iv) + assert wrapped_key && wrapped_key.bytesize > 0, "Wrapped key should not be empty" + puts "Wrap test passed" + + # Test unwrapping with IV + unwrapped_key = AESKeyWrap.unwrap(wrapped_key, kek, iv) + assert_equal plaintext_key, unwrapped_key, "Unwrapped key should match the original plaintext key" + puts "Unwrap test passed" + + puts "Basic wrap/unwrap test with explicit IV passed" + EOF + +vars: + gem: aes_key_wrap + +update: + enabled: true + github: + identifier: tomdalling/aes_key_wrap + strip-prefix: v + use-tag: true + +var-transforms: + - from: ${{package.name}} + match: ^ruby(\d\.\d+)-.* + replace: $1 + to: rubyMM diff --git a/ruby4.0-async-http.yaml b/ruby4.0-async-http.yaml new file mode 100644 index 00000000000..0fe522e6bd1 --- /dev/null +++ b/ruby4.0-async-http.yaml @@ -0,0 +1,132 @@ +package: + name: ruby4.0-async-http + version: "0.92.1" + epoch: 0 + description: A HTTP client and server library. + copyright: + - license: MIT + dependencies: + runtime: + - ruby${{vars.rubyMM}}-async + - ruby${{vars.rubyMM}}-async-io + - ruby${{vars.rubyMM}}-async-pool + - ruby${{vars.rubyMM}}-protocol-http + - ruby${{vars.rubyMM}}-protocol-http1 + - ruby${{vars.rubyMM}}-protocol-http2 + - ruby${{vars.rubyMM}}-protocol-url + - ruby${{vars.rubyMM}}-traces + - ruby-${{vars.rubyMM}} + +environment: + contents: + packages: + - build-base + - busybox + - ca-certificates-bundle + - git + - ruby-${{vars.rubyMM}} + - ruby-${{vars.rubyMM}}-dev + +vars: + gem: async-http + +pipeline: + - uses: git-checkout + with: + expected-commit: af3806b3326e4b28867deb0450572976503ce3e3 + repository: https://github.com/socketry/async-http + tag: v${{package.version}} + + - uses: ruby/build + with: + gem: ${{vars.gem}} + + - uses: ruby/install + with: + gem: ${{vars.gem}} + version: ${{package.version}} + + - uses: ruby/clean + +test: + environment: + contents: + packages: + - ruby-${{vars.rubyMM}} + - ruby${{vars.rubyMM}}-io-endpoint + - ruby${{vars.rubyMM}}-io-stream + pipeline: + - runs: | + ruby <<-EOF + require 'async' + require 'async/http/server' + require 'async/http/client' + require 'async/http/endpoint' + require 'protocol/http/response' + require 'test/unit' + include Test::Unit::Assertions + + # Define the HTTP server endpoint + server_endpoint = Async::HTTP::Endpoint.parse("http://127.0.0.1:9292") + + # Define the server app that responds to GET requests only + app = proc do |request| + case request.method + when "GET" + Protocol::HTTP::Response[200, {}, ["Hello, World!"]] + else + Protocol::HTTP::Response[405, {}, ["Method Not Allowed"]] + end + end + + # Run the server and client tasks within a timeout block + Async::Reactor.run do |task| + begin + # Server task: Start the server with the endpoint + server = Async::HTTP::Server.new(app, server_endpoint) + + # Run server in a child task + server_task = task.async do + server.run + end + + # Delay to ensure server is ready + task.sleep(0.5) + + # Client task: Perform a single GET request + client_task = task.async do + client = Async::HTTP::Client.new(server_endpoint) + + # Test GET request + response = client.get("/") + assert_equal 200, response.status, "Expected 200 OK for GET request" + assert_equal "Hello, World!", response.read, "Expected 'Hello, World!' in response body for GET request" + puts "GET request test passed" + + client.close + end + + # Wait for the client task to finish, then stop the server + client_task.wait + server_task.stop + rescue => e + puts "Error encountered: #{e.class} - #{e.message}" + puts e.backtrace + end + end + + puts "Minimal async-http test completed." + EOF + +update: + enabled: true + github: + identifier: socketry/async-http + strip-prefix: v + use-tag: true + +var-transforms: + - from: ${{package.name}} + match: ^ruby(\d\.\d+)-.* + replace: $1 + to: rubyMM diff --git a/ruby4.0-async-io.yaml b/ruby4.0-async-io.yaml new file mode 100644 index 00000000000..256fecead27 --- /dev/null +++ b/ruby4.0-async-io.yaml @@ -0,0 +1,104 @@ +package: + name: ruby4.0-async-io + version: 1.43.2 + epoch: 0 + description: Provides support for asynchonous TCP, UDP, UNIX and SSL sockets. + copyright: + - license: MIT + dependencies: + runtime: + - ruby${{vars.rubyMM}}-async + - ruby-${{vars.rubyMM}} + +environment: + contents: + packages: + - build-base + - busybox + - ca-certificates-bundle + - git + - ruby-${{vars.rubyMM}} + - ruby-${{vars.rubyMM}}-dev + +vars: + gem: async-io + +pipeline: + - uses: git-checkout + with: + expected-commit: 268c0b564e9904ad49a4d8d1435279003721c297 + repository: https://github.com/socketry/async-io + tag: v${{package.version}} + + - uses: ruby/build + with: + gem: ${{vars.gem}} + + - uses: ruby/install + with: + gem: ${{vars.gem}} + version: ${{package.version}} + + - uses: ruby/clean + +test: + environment: + contents: + packages: + - ruby-${{vars.rubyMM}} + - ruby${{vars.rubyMM}}-async + pipeline: + - runs: | + ruby <<-EOF + require 'async' + require 'async/io' + require 'test/unit' + include Test::Unit::Assertions + + class TestAsyncIO < Test::Unit::TestCase + def test_basic_tcp_connection + host = "127.0.0.1" + port = 9090 + + Async do |task| + # Server task: responds with a message + server_task = task.async do + server = Async::IO::TCPServer.new(host, port) + client = server.accept + client.write("Hello, Async!") + client.close + server.close + end + + # Allow server to start + task.sleep(0.1) + + # Client task: connects and reads message + client_task = task.async do + client = Async::IO::TCPSocket.new(host, port) + message = client.read + assert_equal "Hello, Async!", message, "Expected message from server" + client.close + end + + client_task.wait + server_task.stop + end + + puts "Basic TCP connection test passed." + end + end + EOF + +update: + enabled: true + github: + identifier: socketry/async-io + strip-prefix: v + use-tag: true + +var-transforms: + - from: ${{package.name}} + match: ^ruby(\d\.\d+)-.* + replace: $1 + to: rubyMM diff --git a/ruby4.0-async-pool.yaml b/ruby4.0-async-pool.yaml new file mode 100644 index 00000000000..d65570bbd18 --- /dev/null +++ b/ruby4.0-async-pool.yaml @@ -0,0 +1,91 @@ +package: + name: ruby4.0-async-pool + version: "0.11.1" + epoch: 0 + description: A singleplex and multiplex resource pool for implementing robust clients. + copyright: + - license: MIT + dependencies: + runtime: + - ruby${{vars.rubyMM}}-async + - ruby${{vars.rubyMM}}-metrics + - ruby${{vars.rubyMM}}-traces + - ruby-${{vars.rubyMM}} + +environment: + contents: + packages: + - build-base + - busybox + - ca-certificates-bundle + - git + - ruby-${{vars.rubyMM}} + - ruby-${{vars.rubyMM}}-dev + +vars: + gem: async-pool + +pipeline: + - uses: git-checkout + with: + expected-commit: 42f214235c8978985be0d92549d9ef9a0b2f32f7 + repository: https://github.com/socketry/async-pool + tag: v${{package.version}} + + - runs: sed -i '/signing_key/d' ${{vars.gem}}.gemspec + + - uses: ruby/build + with: + gem: ${{vars.gem}} + + - uses: ruby/install + with: + gem: ${{vars.gem}} + version: ${{package.version}} + + - uses: ruby/clean + +update: + enabled: true + github: + identifier: socketry/async-pool + strip-prefix: v + use-tag: true + +test: + environment: + contents: + packages: + - ruby-${{vars.rubyMM}} + - ruby${{vars.rubyMM}}-async + pipeline: + - runs: | + ruby <<-EOF + require 'async' + require 'async/pool' + require 'test/unit' + include Test::Unit::Assertions + + class TestAsyncPool < Test::Unit::TestCase + def test_pool_limit + Async do + pool = Async::Pool::Controller.new(limit: 2) + tasks = [] + + 3.times do + tasks << pool.async { sleep(0.1) } # Simulate task work + end + + # Ensure only 2 tasks run concurrently + assert tasks.count { |task| task.running? } <= 2, "Expected limit of 2 concurrent tasks" + puts "Pool limit test passed." + end + end + end + EOF + +var-transforms: + - from: ${{package.name}} + match: ^ruby(\d\.\d+)-.* + replace: $1 + to: rubyMM diff --git a/ruby4.0-async.yaml b/ruby4.0-async.yaml new file mode 100644 index 00000000000..0ef4f26092b --- /dev/null +++ b/ruby4.0-async.yaml @@ -0,0 +1,83 @@ +package: + name: ruby4.0-async + version: 2.21.1 + epoch: 0 + description: A concurrency framework for Ruby. + copyright: + - license: MIT + dependencies: + runtime: + - ruby${{vars.rubyMM}}-console + - ruby${{vars.rubyMM}}-io-event + - ruby${{vars.rubyMM}}-timers + - ruby-${{vars.rubyMM}} + +environment: + contents: + packages: + - build-base + - busybox + - ca-certificates-bundle + - git + - ruby-${{vars.rubyMM}} + - ruby-${{vars.rubyMM}}-dev + +vars: + gem: async + +pipeline: + - uses: git-checkout + with: + expected-commit: 367745ddf9494698327971b7f843f01a053a3662 + repository: https://github.com/socketry/async + tag: v${{package.version}} + + - uses: ruby/build + with: + gem: ${{vars.gem}} + + - uses: ruby/install + with: + gem: ${{vars.gem}} + version: ${{package.version}} + + - uses: ruby/clean + +test: + environment: + contents: + packages: + - ruby-${{vars.rubyMM}} + pipeline: + - runs: | + ruby <<-EOF + require 'async' + require 'test/unit' + include Test::Unit::Assertions + + class TestAsync < Test::Unit::TestCase + def test_async_execution + result = nil + Async { result = "done" } + assert_equal "done", result, "Async task should complete" + end + + def test_async_sleep + start_time = Time.now + Async { Async::Task.current.sleep(0.1) } + assert Time.now - start_time < 0.2, "Async sleep should not block" + end + end + EOF + +update: + enabled: true + github: + identifier: socketry/async + strip-prefix: v + +var-transforms: + - from: ${{package.name}} + match: ^ruby(\d\.\d+)-.* + replace: $1 + to: rubyMM diff --git a/ruby4.0-attr_required.yaml b/ruby4.0-attr_required.yaml new file mode 100644 index 00000000000..c15ef25fe9a --- /dev/null +++ b/ruby4.0-attr_required.yaml @@ -0,0 +1,77 @@ +package: + name: ruby4.0-attr_required + version: 1.0.2 + epoch: 0 + description: attr_required and attr_optional + copyright: + - license: MIT + +environment: + contents: + packages: + - build-base + - busybox + - ca-certificates-bundle + - git + - ruby-${{vars.rubyMM}} + - ruby-${{vars.rubyMM}}-dev + +pipeline: + - uses: git-checkout + with: + repository: https://github.com/nov/attr_required + tag: v${{package.version}} + expected-commit: a48a5f1f83bffff24a58b96c30b8a5cf15c56d8f + + - uses: ruby/build + with: + gem: ${{vars.gem}} + + - uses: ruby/install + with: + gem: ${{vars.gem}} + version: ${{package.version}} + + - uses: ruby/clean + +vars: + gem: attr_required + +test: + environment: + contents: + packages: + - ruby-${{vars.rubyMM}} + pipeline: + - runs: | + ruby <<-EOF + require 'attr_required' + require 'test/unit' + + class SimpleAttrTest < Test::Unit::TestCase + class TestClass + include AttrRequired + attr_required :name + end + + def test_required_attribute + obj = TestClass.new + obj.name = "Alice" + assert_equal "Alice", obj.name + puts "attr_required test passed." + end + end + EOF + +update: + enabled: true + github: + identifier: nov/attr_required + strip-prefix: v + use-tag: true + +var-transforms: + - from: ${{package.name}} + match: ^ruby(\d\.\d+)-.* + replace: $1 + to: rubyMM diff --git a/ruby4.0-aws-eventstream.yaml b/ruby4.0-aws-eventstream.yaml new file mode 100644 index 00000000000..11b148ed5e5 --- /dev/null +++ b/ruby4.0-aws-eventstream.yaml @@ -0,0 +1,85 @@ +#nolint:valid-pipeline-git-checkout-tag +package: + name: ruby4.0-aws-eventstream + version: 1.3.0 + epoch: 0 + description: Amazon Web Services event stream library. Decodes and encodes binary stream under `vnd.amazon.event-stream` content-type + copyright: + - license: Apache-2.0 + +environment: + contents: + packages: + - build-base + - busybox + - ca-certificates-bundle + - git + - ruby-${{vars.rubyMM}} + - ruby-${{vars.rubyMM}}-dev + +pipeline: + - uses: git-checkout + with: + expected-commit: 86cccb96ed7a0ee71cd33847151b4219d30b1571 + repository: https://github.com/aws/aws-sdk-ruby + branch: version-3 + depth: -1 + + - uses: ruby/build + with: + gem: ${{vars.gem}} + dir: gems/${{vars.gem}} + + - uses: ruby/install + with: + gem: ${{vars.gem}} + version: ${{package.version}} + dir: gems/${{vars.gem}} + + - uses: ruby/clean + +vars: + gem: aws-eventstream + +test: + environment: + contents: + packages: + - ruby-${{vars.rubyMM}} + pipeline: + - runs: | + ruby <<-EOF + require 'aws-eventstream' + require 'test/unit' + require 'stringio' + include Test::Unit::Assertions + + # Create and test a simple message + message = Aws::EventStream::Message.new( + headers: {'event-type' => Aws::EventStream::HeaderValue.new(value: 'test', type: 'string')}, + payload: StringIO.new("test_data") + ) + + encoded = Aws::EventStream::Encoder.new.encode(message) + + messages = [] + decoder = Aws::EventStream::Decoder.new + decoder.decode(StringIO.new(encoded)) do |decoded_msg| + messages << decoded_msg + end + + assert_equal "test_data", messages.first.payload.read + puts "All tests passed!" + EOF + +update: + enabled: false + manual: true # the library we fetch uses a different version then the package version + github: + identifier: aws/aws-sdk-ruby + +var-transforms: + - from: ${{package.name}} + match: ^ruby(\d\.\d+)-.* + replace: $1 + to: rubyMM diff --git a/ruby4.0-aws-partitions.yaml b/ruby4.0-aws-partitions.yaml new file mode 100644 index 00000000000..38a5786c5c5 --- /dev/null +++ b/ruby4.0-aws-partitions.yaml @@ -0,0 +1,94 @@ +#nolint:valid-pipeline-git-checkout-tag +package: + name: ruby4.0-aws-partitions + version: 1.996.0 + epoch: 0 + description: Provides interfaces to enumerate AWS partitions, regions, and services. + copyright: + - license: Apache-2.0 + +environment: + contents: + packages: + - build-base + - busybox + - ca-certificates-bundle + - git + - ruby-${{vars.rubyMM}} + - ruby-${{vars.rubyMM}}-dev + +pipeline: + - uses: git-checkout + with: + expected-commit: 86cccb96ed7a0ee71cd33847151b4219d30b1571 + repository: https://github.com/aws/aws-sdk-ruby + branch: version-3 + depth: -1 + + - uses: ruby/build + with: + gem: ${{vars.gem}} + dir: gems/${{vars.gem}} + + - uses: ruby/install + with: + gem: ${{vars.gem}} + version: ${{package.version}} + dir: gems/${{vars.gem}} + + - uses: ruby/clean + +vars: + gem: aws-partitions + +test: + environment: + contents: + packages: + - ruby-${{vars.rubyMM}} + pipeline: + - runs: | + ruby <<-EOF + require 'aws-partitions' + require 'test/unit' + include Test::Unit::Assertions + + # Test partition listing and default aws partition + partitions = Aws::Partitions.partitions + assert partitions.any? + assert_equal 'aws', partitions.first.name + puts "Partition listing test passed" + + # Test region enumeration for aws partition + aws_partition = Aws::Partitions.partitions.find { |p| p.name == 'aws' } + regions = aws_partition.regions + assert regions.any? + assert regions.any? { |r| r.name == 'us-east-1' } + puts "Region enumeration test passed" + + # Test service IDs + service_ids = Aws::Partitions.service_ids + assert service_ids.include?('S3') || service_ids.include?('s3') + assert service_ids.include?('EC2') || service_ids.include?('ec2') + puts "Service ID test passed" + + # Test partition regions + aws_regions = aws_partition.regions.map(&:name) + assert aws_regions.include?('us-east-1'), "AWS partition should include us-east-1" + assert aws_regions.include?('us-west-2'), "AWS partition should include us-west-2" + puts "Partition regions test passed" + + puts "All tests passed!" + EOF + +update: + enabled: false + manual: true # the library we fetch uses a different version then the package version + github: + identifier: aws/aws-sdk-ruby + +var-transforms: + - from: ${{package.name}} + match: ^ruby(\d\.\d+)-.* + replace: $1 + to: rubyMM diff --git a/ruby4.0-aws-sdk-cloudwatchlogs.yaml b/ruby4.0-aws-sdk-cloudwatchlogs.yaml new file mode 100644 index 00000000000..48b2a442de4 --- /dev/null +++ b/ruby4.0-aws-sdk-cloudwatchlogs.yaml @@ -0,0 +1,93 @@ +#nolint:valid-pipeline-git-checkout-tag +package: + name: ruby4.0-aws-sdk-cloudwatchlogs + version: 1.98.0 + epoch: 0 + description: Official AWS Ruby gem for Amazon CloudWatch Logs. This gem is part of the AWS SDK for Ruby. + copyright: + - license: Apache-2.0 + dependencies: + runtime: + - ruby${{vars.rubyMM}}-aws-sdk-core + - ruby${{vars.rubyMM}}-aws-sigv4 + +environment: + contents: + packages: + - build-base + - busybox + - ca-certificates-bundle + - git + - ruby-${{vars.rubyMM}} + - ruby-${{vars.rubyMM}}-dev + +pipeline: + - uses: git-checkout + with: + expected-commit: 86cccb96ed7a0ee71cd33847151b4219d30b1571 + repository: https://github.com/aws/aws-sdk-ruby + branch: version-3 + depth: -1 + + - uses: ruby/build + with: + gem: ${{vars.gem}} + dir: gems/${{vars.gem}} + + - uses: ruby/install + with: + gem: ${{vars.gem}} + version: ${{package.version}} + dir: gems/${{vars.gem}} + +vars: + gem: aws-sdk-cloudwatchlogs + +test: + environment: + contents: + packages: + - ruby-${{vars.rubyMM}} + pipeline: + - runs: | + ruby <<-EOF + require 'aws-sdk-cloudwatchlogs' + require 'test/unit' + include Test::Unit::Assertions + + # Test client initialization with stubs + client = Aws::CloudWatchLogs::Client.new( + region: 'us-west-2', + stub_responses: true + ) + assert_kind_of Aws::CloudWatchLogs::Client, client + puts "Client initialization test passed" + + # Test describe_log_groups API + client.stub_responses(:describe_log_groups, { + log_groups: [ + { + log_group_name: "test-group", + retention_in_days: 7 + } + ] + }) + + resp = client.describe_log_groups + assert_equal "test-group", resp.log_groups[0].log_group_name + puts "API call test passed" + + puts "All tests passed!" + EOF + +update: + enabled: false + manual: true # the library we fetch uses a different version then the package version + github: + identifier: aws/aws-sdk-ruby + +var-transforms: + - from: ${{package.name}} + match: ^ruby(\d\.\d+)-.* + replace: $1 + to: rubyMM diff --git a/ruby4.0-aws-sdk-core.yaml b/ruby4.0-aws-sdk-core.yaml new file mode 100644 index 00000000000..98bc1e37f1b --- /dev/null +++ b/ruby4.0-aws-sdk-core.yaml @@ -0,0 +1,95 @@ +#nolint:valid-pipeline-git-checkout-tag +package: + name: ruby4.0-aws-sdk-core + version: 3.211.0 + epoch: 0 + description: Provides API clients for AWS. This gem is part of the official AWS SDK for Ruby. + copyright: + - license: Apache-2.0 + dependencies: + runtime: + - ruby${{vars.rubyMM}}-aws-eventstream + - ruby${{vars.rubyMM}}-aws-partitions + - ruby${{vars.rubyMM}}-aws-sigv4 + - ruby${{vars.rubyMM}}-jmespath + +environment: + contents: + packages: + - build-base + - busybox + - ca-certificates-bundle + - git + - ruby-${{vars.rubyMM}} + - ruby-${{vars.rubyMM}}-dev + +pipeline: + - uses: git-checkout + with: + expected-commit: 86cccb96ed7a0ee71cd33847151b4219d30b1571 + repository: https://github.com/aws/aws-sdk-ruby + branch: version-3 + depth: -1 + + - uses: ruby/build + with: + gem: ${{vars.gem}} + dir: gems/${{vars.gem}} + + - uses: ruby/install + with: + gem: ${{vars.gem}} + version: ${{package.version}} + dir: gems/${{vars.gem}} + + - uses: ruby/clean + +vars: + gem: aws-sdk-core + +test: + environment: + contents: + packages: + - ruby-${{vars.rubyMM}} + pipeline: + - runs: | + ruby <<-EOF + require 'aws-sdk-core' + require 'test/unit' + include Test::Unit::Assertions + + # Test credentials + creds = Aws::Credentials.new('access_key', 'secret_key') + assert_equal 'access_key', creds.access_key_id + assert_equal 'secret_key', creds.secret_access_key + puts "Credentials test passed" + + # Test global configuration + Aws.config.update( + region: 'us-west-2', + credentials: creds + ) + assert_equal 'us-west-2', Aws.config[:region] + puts "Configuration test passed" + + # Test presence of core modules + assert defined?(Aws::Errors) + assert defined?(Aws::PageableResponse) + assert defined?(Aws::Structure) + puts "Core modules test passed" + + puts "All tests passed!" + EOF + +update: + enabled: false + manual: true # the library we fetch uses a different version then the package version + github: + identifier: aws/aws-sdk-ruby + +var-transforms: + - from: ${{package.name}} + match: ^ruby(\d\.\d+)-.* + replace: $1 + to: rubyMM diff --git a/ruby4.0-aws-sdk-kms.yaml b/ruby4.0-aws-sdk-kms.yaml new file mode 100644 index 00000000000..44351cf93b8 --- /dev/null +++ b/ruby4.0-aws-sdk-kms.yaml @@ -0,0 +1,96 @@ +#nolint:valid-pipeline-git-checkout-tag +package: + name: ruby4.0-aws-sdk-kms + version: 1.95.0 + epoch: 0 + description: Official AWS Ruby gem for AWS Key Management Service (KMS). This gem is part of the AWS SDK for Ruby. + copyright: + - license: Apache-2.0 + dependencies: + runtime: + - ruby${{vars.rubyMM}}-aws-sdk-core + - ruby${{vars.rubyMM}}-aws-sigv4 + +environment: + contents: + packages: + - build-base + - busybox + - ca-certificates-bundle + - git + - ruby-${{vars.rubyMM}} + - ruby-${{vars.rubyMM}}-dev + +pipeline: + - uses: git-checkout + with: + expected-commit: 86cccb96ed7a0ee71cd33847151b4219d30b1571 + repository: https://github.com/aws/aws-sdk-ruby + branch: version-3 + depth: -1 + + - uses: ruby/build + with: + gem: ${{vars.gem}} + dir: gems/${{vars.gem}} + + - uses: ruby/install + with: + gem: ${{vars.gem}} + version: ${{package.version}} + dir: gems/${{vars.gem}} + + - uses: ruby/clean + +vars: + gem: aws-sdk-kms + +test: + environment: + contents: + packages: + - ruby-${{vars.rubyMM}} + - ruby${{vars.rubyMM}}-aws-sdk-core + - ruby${{vars.rubyMM}}-aws-sigv4 + pipeline: + - runs: | + ruby <<-EOF + require 'aws-sdk-kms' + require 'test/unit' + include Test::Unit::Assertions + + class TestAWSKMSSDK < Test::Unit::TestCase + def setup + # Mocking AWS KMS client + @kms = Aws::KMS::Client.new(stub_responses: true) + end + + def test_encrypt_decrypt + # Mock encrypt and decrypt responses + @kms.stub_responses(:encrypt, { ciphertext_blob: "mocked_ciphertext" }) + @kms.stub_responses(:decrypt, { plaintext: "decrypted_data" }) + + # Encrypt mock data + encrypt_resp = @kms.encrypt(key_id: "mocked-key-id", plaintext: "test_data") + assert_equal "mocked_ciphertext", encrypt_resp.ciphertext_blob, "Encryption failed" + + # Decrypt mock data + decrypt_resp = @kms.decrypt(ciphertext_blob: encrypt_resp.ciphertext_blob) + assert_equal "decrypted_data", decrypt_resp.plaintext, "Decryption failed" + + puts "KMS encrypt/decrypt test passed!" + end + end + EOF + +update: + enabled: false + manual: true # the library we fetch uses a different version then the package version + github: + identifier: aws/aws-sdk-ruby + +var-transforms: + - from: ${{package.name}} + match: ^ruby(\d\.\d+)-.* + replace: $1 + to: rubyMM diff --git a/ruby4.0-aws-sdk-s3.yaml b/ruby4.0-aws-sdk-s3.yaml new file mode 100644 index 00000000000..72f212552f7 --- /dev/null +++ b/ruby4.0-aws-sdk-s3.yaml @@ -0,0 +1,91 @@ +#nolint:valid-pipeline-git-checkout-tag +package: + name: ruby4.0-aws-sdk-s3 + version: 1.169.0 + epoch: 0 + description: Official AWS Ruby gem for Amazon Simple Storage Service (Amazon S3). This gem is part of the AWS SDK for Ruby. + copyright: + - license: Apache-2.0 + dependencies: + runtime: + - ruby${{vars.rubyMM}}-aws-sdk-core + - ruby${{vars.rubyMM}}-aws-sdk-kms + - ruby${{vars.rubyMM}}-aws-sigv4 + +environment: + contents: + packages: + - build-base + - busybox + - ca-certificates-bundle + - git + - ruby-${{vars.rubyMM}} + - ruby-${{vars.rubyMM}}-dev + - zlib-dev + +pipeline: + - uses: git-checkout + with: + expected-commit: 86cccb96ed7a0ee71cd33847151b4219d30b1571 + repository: https://github.com/aws/aws-sdk-ruby + branch: version-3 + depth: -1 + + - uses: ruby/build + with: + gem: ${{vars.gem}} + dir: gems/${{vars.gem}} + + - uses: ruby/install + with: + gem: ${{vars.gem}} + version: ${{package.version}} + dir: gems/${{vars.gem}} + + - uses: ruby/clean + +vars: + gem: aws-sdk-s3 + +test: + environment: + contents: + packages: + - ruby-${{vars.rubyMM}} + - ruby${{vars.rubyMM}}-rexml + pipeline: + - runs: | + ruby <<-EOF + require 'aws-sdk-s3' + require 'test/unit' + include Test::Unit::Assertions + + class TestAWSS3SDK < Test::Unit::TestCase + def test_put_object + # Create a stubbed S3 client + s3 = Aws::S3::Client.new(stub_responses: true) + + # Mock the put_object response + s3.stub_responses(:put_object, {}) + + # Perform the operation + response = s3.put_object(bucket: "test-bucket", key: "test-key", body: "test-content") + + # Assert the response + assert response.successful?, "Put object operation failed" + puts "Basic put object test passed!" + end + end + EOF + +update: + enabled: false + manual: true # the library we fetch uses a different version then the package version + github: + identifier: aws/aws-sdk-ruby + +var-transforms: + - from: ${{package.name}} + match: ^ruby(\d\.\d+)-.* + replace: $1 + to: rubyMM diff --git a/ruby4.0-aws-sdk-sqs.yaml b/ruby4.0-aws-sdk-sqs.yaml new file mode 100644 index 00000000000..f423583f624 --- /dev/null +++ b/ruby4.0-aws-sdk-sqs.yaml @@ -0,0 +1,88 @@ +#nolint:valid-pipeline-git-checkout-tag +package: + name: ruby4.0-aws-sdk-sqs + version: 1.87.0 + epoch: 0 + description: Official AWS Ruby gem for Amazon Simple Queue Service (Amazon SQS). This gem is part of the AWS SDK for Ruby. + copyright: + - license: Apache-2.0 + dependencies: + runtime: + - ruby${{vars.rubyMM}}-aws-sdk-core + - ruby${{vars.rubyMM}}-aws-sigv4 + +environment: + contents: + packages: + - build-base + - busybox + - ca-certificates-bundle + - git + - ruby-${{vars.rubyMM}} + - ruby-${{vars.rubyMM}}-dev + +pipeline: + - uses: git-checkout + with: + expected-commit: 86cccb96ed7a0ee71cd33847151b4219d30b1571 + repository: https://github.com/aws/aws-sdk-ruby + branch: version-3 + depth: -1 + + - uses: ruby/build + with: + gem: ${{vars.gem}} + dir: gems/${{vars.gem}} + + - uses: ruby/install + with: + gem: ${{vars.gem}} + version: ${{package.version}} + dir: gems/${{vars.gem}} + + - uses: ruby/clean + +vars: + gem: aws-sdk-sqs + +test: + environment: + contents: + packages: + - ruby-${{vars.rubyMM}} + pipeline: + - runs: | + ruby <<-EOF + require 'aws-sdk-sqs' + require 'test/unit' + include Test::Unit::Assertions + + class TestAWSSQSSDK < Test::Unit::TestCase + def test_send_message + # Create a stubbed SQS client + sqs = Aws::SQS::Client.new(stub_responses: true) + + # Mock the send_message response + sqs.stub_responses(:send_message, message_id: "12345") + + # Perform the operation + response = sqs.send_message(queue_url: "https://sqs.us-east-1.amazonaws.com/123456789012/test-queue", message_body: "Hello, SQS!") + + # Assert the response + assert_equal "12345", response.message_id, "Message ID does not match" + puts "Basic send message test passed!" + end + end + EOF + +update: + enabled: false + manual: true # the library we fetch uses a different version then the package version + github: + identifier: aws/aws-sdk-ruby + +var-transforms: + - from: ${{package.name}} + match: ^ruby(\d\.\d+)-.* + replace: $1 + to: rubyMM diff --git a/ruby4.0-aws-sigv4.yaml b/ruby4.0-aws-sigv4.yaml new file mode 100644 index 00000000000..00356817154 --- /dev/null +++ b/ruby4.0-aws-sigv4.yaml @@ -0,0 +1,99 @@ +#nolint:valid-pipeline-git-checkout-tag +package: + name: ruby4.0-aws-sigv4 + version: 1.10.1 + epoch: 0 + description: Amazon Web Services Signature Version 4 signing library. Generates sigv4 signature for HTTP requests. + copyright: + - license: Apache-2.0 + dependencies: + runtime: + - ruby${{vars.rubyMM}}-aws-eventstream + +environment: + contents: + packages: + - build-base + - busybox + - ca-certificates-bundle + - git + - ruby-${{vars.rubyMM}} + - ruby-${{vars.rubyMM}}-dev + - zlib-dev + +pipeline: + - uses: git-checkout + with: + expected-commit: 86cccb96ed7a0ee71cd33847151b4219d30b1571 + repository: https://github.com/aws/aws-sdk-ruby + branch: version-3 + depth: -1 + + - uses: ruby/build + with: + gem: ${{vars.gem}} + dir: gems/${{vars.gem}} + + - uses: ruby/install + with: + gem: ${{vars.gem}} + version: ${{package.version}} + dir: gems/${{vars.gem}} + + - uses: ruby/clean + +vars: + gem: aws-sigv4 + +test: + environment: + contents: + packages: + - ruby-${{vars.rubyMM}} + pipeline: + - runs: | + ruby <<-EOF + require 'aws-sigv4' + require 'test/unit' + include Test::Unit::Assertions + + # Test basic signer creation + signer = Aws::Sigv4::Signer.new( + service: 'service', + region: 'us-east-1', + access_key_id: 'akid', + secret_access_key: 'secret' + ) + assert_kind_of Aws::Sigv4::Signer, signer + puts "Signer creation test passed" + + # Test basic signature generation + signature = signer.sign_request( + http_method: 'GET', + url: 'https://service.us-east-1.amazonaws.com', + headers: { + 'host' => 'service.us-east-1.amazonaws.com' + } + ) + assert_kind_of String, signature.string_to_sign + puts "Signature string generation test passed" + + # Test canonical request generation + assert signature.canonical_request.include?('GET') + assert signature.canonical_request.include?('host:service.us-east-1.amazonaws.com') + puts "Canonical request test passed" + + puts "All tests passed!" + EOF + +update: + enabled: false + manual: true # the library we fetch uses a different version then the package version + github: + identifier: aws/aws-sdk-ruby + +var-transforms: + - from: ${{package.name}} + match: ^ruby(\d\.\d+)-.* + replace: $1 + to: rubyMM diff --git a/ruby4.0-bindata.yaml b/ruby4.0-bindata.yaml new file mode 100644 index 00000000000..d30936a4429 --- /dev/null +++ b/ruby4.0-bindata.yaml @@ -0,0 +1,90 @@ +package: + name: ruby4.0-bindata + version: "2.5.1" + epoch: 0 + description: BinData is a declarative way to read and write binary file formats. + copyright: + - license: BSD-2-Clause + +environment: + contents: + packages: + - build-base + - busybox + - ca-certificates-bundle + - git + - ruby-${{vars.rubyMM}} + - ruby-${{vars.rubyMM}}-dev + +pipeline: + - uses: git-checkout + with: + repository: https://github.com/dmendel/bindata + tag: v${{package.version}} + expected-commit: 2e0d88d95343a19dd7ad2bd3114d3dcb4178ba9f + + - uses: ruby/build + with: + gem: ${{vars.gem}} + + - uses: ruby/install + with: + gem: ${{vars.gem}} + version: ${{package.version}} + + - uses: ruby/clean + +vars: + gem: bindata + +test: + environment: + contents: + packages: + - ruby-${{vars.rubyMM}} + pipeline: + - runs: | + ruby <<-EOF + require 'bindata' + require 'test/unit' + include Test::Unit::Assertions + + class TestBinData < Test::Unit::TestCase + def test_uint16_read + # Create a binary string + data = "\x01\x02".b + + # Read the binary data as an unsigned 16-bit integer + uint16 = BinData::Uint16be.read(data) + + # Verify the value + assert_equal 258, uint16, "Expected the value to be 258 for binary \\x01\\x02" + puts "BinData Uint16 read test passed!" + end + + def test_uint16_write + # Create a BinData Uint16 object + uint16 = BinData::Uint16be.new(258) + + # Write it to a binary string + binary = uint16.to_binary_s + + # Verify the binary output + assert_equal "\x01\x02".b, binary, "Expected binary output to match \\x01\\x02" + puts "BinData Uint16 write test passed!" + end + end + EOF + +update: + enabled: true + github: + identifier: dmendel/bindata + strip-prefix: v + use-tag: true + +var-transforms: + - from: ${{package.name}} + match: ^ruby(\d\.\d+)-.* + replace: $1 + to: rubyMM diff --git a/ruby4.0-bouncy-castle-java.yaml b/ruby4.0-bouncy-castle-java.yaml new file mode 100644 index 00000000000..ea1592e08f9 --- /dev/null +++ b/ruby4.0-bouncy-castle-java.yaml @@ -0,0 +1,62 @@ +# Generated from http://github.com/jruby/jruby/tree/master/gems/bouncy-castle-java/ +package: + name: ruby4.0-bouncy-castle-java + version: 1.5.0146.1 + epoch: 0 + description: Gem redistribution of "Legion of the Bouncy Castle Java cryptography APIs" jars at http://www.bouncycastle.org/java.html + copyright: + - license: MIT + +environment: + contents: + packages: + - build-base + - busybox + - ca-certificates-bundle + - curl + - git + - ruby-${{vars.rubyMM}} + - ruby-${{vars.rubyMM}}-dev + environment: + # https://mvnrepository.com/artifact/org.bouncycastle/bcprov-jdk18on + BCPROV_VERSION: 1.78 + +pipeline: + - uses: git-checkout + with: + repository: https://github.com/nahi/bouncy-castle-java + tag: ${{package.version}} + expected-commit: 401f0077cac504c62c449b860366f23393345c35 + + - runs: | + # Bouncycastle does not actively maintain on GitHub so we need + # to download the newer versions of dependencies from Maven + cd lib + rm bcprov-jdk15-146.jar + curl -sLO https://repo1.maven.org/maven2/org/bouncycastle/bcprov-jdk18on/${BCPROV_VERSION}/bcprov-jdk18on-${BCPROV_VERSION}.jar + + - uses: ruby/build + with: + gem: ${{vars.gem}} + + - uses: ruby/install + with: + gem: ${{vars.gem}} + version: ${{package.version}} + + - uses: ruby/clean + +vars: + gem: bouncy-castle-java + +update: + enabled: true + github: + identifier: nahi/bouncy-castle-java + use-tag: true + +var-transforms: + - from: ${{package.name}} + match: ^ruby(\d\.\d+)-.* + replace: $1 + to: rubyMM diff --git a/ruby4.0-bouncy-castle-java/bouncy-castle-java.gemspec b/ruby4.0-bouncy-castle-java/bouncy-castle-java.gemspec new file mode 100644 index 00000000000..e2f988d3ddc --- /dev/null +++ b/ruby4.0-bouncy-castle-java/bouncy-castle-java.gemspec @@ -0,0 +1,27 @@ +# bouncy-castle-java.gemspec +Gem::Specification.new do |s| + s.name = 'bouncy-castle-java' + s.version = '1.5.0146.1' + s.author = 'Hiroshi Nakamura' + s.email = 'nahi@ruby-lang.org' + s.homepage = 'http://github.com/nahi/bouncy-castle-java/' + s.summary = 'Gem redistribution of Bouncy Castle jars' + s.description = 'Gem redistribution of "Legion of the Bouncy Castle Java cryptography APIs" jars at http://www.bouncycastle.org/java.html' + s.files = ['README', 'LICENSE.html'] + Dir.glob('lib/**/*') + s.platform = Gem::Platform::RUBY + s.require_path = 'lib' + + s.add_runtime_dependency 'rubygems', '~> 3.0' + # Add any other runtime dependencies here + + s.requirements << 'RubyGems version >= 3.0' + + s.add_development_dependency 'rake', '~> 13.0' + + s.metadata = { + 'source_code_uri' => 'http://github.com/nahi/bouncy-castle-java/', + 'bug_tracker_uri' => 'http://github.com/nahi/bouncy-castle-java/issues' + } + + s.license = 'MIT' # Adjust the license as needed +end diff --git a/ruby4.0-builder.yaml b/ruby4.0-builder.yaml new file mode 100644 index 00000000000..865253916f3 --- /dev/null +++ b/ruby4.0-builder.yaml @@ -0,0 +1,65 @@ +package: + name: ruby4.0-builder + version: 3.3.0 + epoch: 0 + description: Provides a simple way to create XML markup and data structures. + copyright: + - license: MIT + dependencies: + runtime: + - ruby-${{vars.rubyMM}} + +environment: + contents: + packages: + - ruby-${{vars.rubyMM}} + - ruby-${{vars.rubyMM}}-dev + +vars: + gem: builder + +pipeline: + - uses: git-checkout + with: + expected-commit: 789896b306e36a5fe166388413b16e9323260601 + repository: https://github.com/rails/builder + tag: v${{package.version}} + + - pipeline: + - uses: ruby/build + with: + gem: ${{vars.gem}} + - uses: ruby/install + with: + gem: ${{vars.gem}} + version: ${{package.version}} + - uses: ruby/clean + +update: + enabled: true + github: + identifier: rails/builder + strip-prefix: v + tag-filter: v + use-tag: true + +test: + pipeline: + - name: Test basic import + runs: ruby -e "require 'builder'" + - name: Basic test + runs: | + cat > test_example.rb <Linky<\/name>867-5309<\/phone><\/person>" + +var-transforms: + - from: ${{package.name}} + match: ^ruby(\d\.\d+)-.* + replace: $1 + to: rubyMM diff --git a/ruby4.0-bundler.yaml b/ruby4.0-bundler.yaml new file mode 100644 index 00000000000..2de81e4f751 --- /dev/null +++ b/ruby4.0-bundler.yaml @@ -0,0 +1,91 @@ +package: + name: ruby4.0-bundler + version: "4.0.3" + epoch: 0 + description: "Manage an application's gem dependencies" + copyright: + - license: MIT + dependencies: + runtime: + - ruby-${{vars.rubyMM}} + +environment: + contents: + packages: + - bash + - build-base + - busybox + - ca-certificates-bundle + - ruby-${{vars.rubyMM}} + - ruby-${{vars.rubyMM}}-dev + +vars: + gem: bundler + +pipeline: + - uses: git-checkout + with: + expected-commit: 28c66ecc1e6c283156eba82504ef6e7168665813 + repository: https://github.com/rubygems/rubygems + tag: bundler-v${{package.version}} + + - working-directory: ${{vars.gem}} + pipeline: + - uses: ruby/build + with: + gem: ${{vars.gem}} + - uses: ruby/install + with: + gem: ${{vars.gem}} + version: ${{package.version}} + - uses: ruby/clean + - name: build-docs-clean + runs: | + export INSTALL_DIR=${{targets.destdir}}/$(ruby -e 'puts Gem.default_dir') + for n in 1 5; do + mkdir -p "${{targets.destdir}}"/usr/share/man/man$n + mv "$INSTALL_DIR"/gems/bundler-${{package.version}}/lib/bundler/man/*.$n "${{targets.destdir}}"/usr/share/man/man$n/ + done + + rm -rf "$INSTALL_DIR"/cache \ + "$INSTALL_DIR"/build_info \ + "$INSTALL_DIR"/doc \ + "$INSTALL_DIR"/gems/bundler-${{package.version}}/man \ + "$INSTALL_DIR"/gems/bundler-${{package.version}}/*.md + +subpackages: + - name: "${{package.name}}-doc" + description: "ruby-bundler documentation" + pipeline: + - uses: split/manpages + test: + pipeline: + - uses: test/docs + +update: + enabled: true + github: + identifier: rubygems/rubygems + strip-prefix: bundler-v + tag-filter: bundler-v + +test: + pipeline: + # AUTOGENERATED + - runs: | + bundle --version + bundler --version + bundle --help + bundler --help + - runs: | + echo "source 'https://rubygems.org'" > Gemfile + echo "gem 'rake'" >> Gemfile + bundle install + bundle list + echo "Bundler test passed!" + +var-transforms: + - from: ${{package.name}} + match: ^ruby(\d\.\d+)-.* + replace: $1 + to: rubyMM diff --git a/ruby4.0-charlock_holmes.yaml b/ruby4.0-charlock_holmes.yaml new file mode 100644 index 00000000000..cc68639867d --- /dev/null +++ b/ruby4.0-charlock_holmes.yaml @@ -0,0 +1,88 @@ +# Generated from https://github.com/brianmario/charlock_holmes +package: + name: ruby4.0-charlock_holmes + version: 0.7.9 + epoch: 0 + description: charlock_holmes provides binary and text detection as well as text transcoding using libicu + copyright: + - license: MIT + +environment: + contents: + packages: + - build-base + - busybox + - ca-certificates-bundle + - git + - icu-dev + - ruby-${{vars.rubyMM}} + - ruby-${{vars.rubyMM}}-dev + - zlib-dev + +pipeline: + - uses: git-checkout + with: + expected-commit: c8d07d3e96a786b39056caf309e3cb24f8f59770 + repository: https://github.com/brianmario/charlock_holmes + tag: v${{package.version}} + + - runs: | + # Unset std, as new ICU requires default stdc++ of 17 or higher + sed -i '/std=c++11/d' ext/charlock_holmes/extconf.rb + + - uses: ruby/build + with: + gem: ${{vars.gem}} + + - uses: ruby/install + with: + gem: ${{vars.gem}} + version: ${{package.version}} + + - uses: ruby/clean + +vars: + gem: charlock_holmes + +test: + pipeline: + - runs: | + ruby -e "require 'charlock_holmes'; puts 'Charlock Holmes library loaded successfully!'" + - runs: | + ruby <<-EOF + # encoding: utf-8 + require 'charlock_holmes' + + # Test basic detection capabilities + detector = CharlockHolmes::EncodingDetector.new + + # Test single detection + result = detector.detect("Hello, World!") + raise "Detection failed" unless result.is_a?(Hash) && + result[:type] == :text && + result[:encoding] && + result[:confidence] + puts "Single detection test passed" + + # Test multiple detection + results = detector.detect_all("testing") + raise "Multiple detection failed" unless results.is_a?(Array) && + results.all? { |r| r[:encoding] && r[:confidence] } + puts "Multiple detection test passed" + + puts "All tests passed!" + EOF + - uses: test/tw/ldd-check + +update: + enabled: true + github: + identifier: brianmario/charlock_holmes + strip-prefix: v + use-tag: true + +var-transforms: + - from: ${{package.name}} + match: ^ruby(\d\.\d+)-.* + replace: $1 + to: rubyMM diff --git a/ruby4.0-chronic_duration.yaml b/ruby4.0-chronic_duration.yaml new file mode 100644 index 00000000000..738d7151ab7 --- /dev/null +++ b/ruby4.0-chronic_duration.yaml @@ -0,0 +1,97 @@ +# Generated from https://github.com/hpoydar/chronic_duration +package: + name: ruby4.0-chronic_duration + version: 0.10.6 + epoch: 0 + description: A simple Ruby natural language parser for elapsed time. (For example, 4 hours and 30 minutes, 6 minutes 4 seconds, 3 days, etc.) Returns all results in seconds. Will return an integer unless you get tricky and need a float. (4 minutes and 13.47 seconds, for example.) The reverse can also be performed via the output method. + copyright: + - license: MIT + dependencies: + runtime: + - ruby${{vars.rubyMM}}-numerizer + +environment: + contents: + packages: + - build-base + - busybox + - ca-certificates-bundle + - git + - ruby-${{vars.rubyMM}} + - ruby-${{vars.rubyMM}}-dev + +pipeline: + - uses: git-checkout + with: + repository: https://github.com/hpoydar/chronic_duration + tag: v${{package.version}} + expected-commit: 55f992d6715a0920fefb5c4051e9eff40f948a21 + + # Upstream pin to an eol version of `numerizer` as a runtime dependency. This + # results in runtime failures when we attempt to use our (newer) version. + # This patch removes upstream pinning to a particular version at runtime. + # + # There hasn't been any updates for quite some time upstream, so there doesn't + # look to be any other reason for the pinning. + - uses: patch + with: + patches: numerizer-dependency.patch + + - uses: ruby/build + with: + gem: ${{vars.gem}} + + - uses: ruby/install + with: + gem: ${{vars.gem}} + version: ${{package.version}} + + - uses: ruby/clean + +vars: + gem: chronic_duration + +test: + pipeline: + - runs: | + ruby -e "require 'chronic_duration'; puts 'ChronicDuration loaded successfully!'" + - runs: | + ruby <<-EOF + require 'chronic_duration' + + # Test case 1: Parsing a simple duration + result = ChronicDuration.parse('4 hours and 30 minutes') + if result != 16200 + raise 'Assertion failed: Expected 16200, got ' + result.to_s + end + puts 'Test case 1 passed: Simple duration parsing' + + # Test case 2: Parsing a duration with seconds + result = ChronicDuration.parse('3 minutes and 20 seconds') + if result != 200 + raise 'Assertion failed: Expected 200, got ' + result.to_s + end + puts 'Test case 2 passed: Duration with seconds parsing' + + # Test case 3: Invalid input + result = ChronicDuration.parse('invalid input') + if result != nil + raise 'Assertion failed: Expected nil for invalid input, got ' + result.to_s + end + puts 'Test case 3 passed: Handling invalid input' + + puts 'All test cases passed!' + EOF + +update: + enabled: true + github: + identifier: hpoydar/chronic_duration + strip-prefix: v + use-tag: true + +var-transforms: + - from: ${{package.name}} + match: ^ruby(\d\.\d+)-.* + replace: $1 + to: rubyMM diff --git a/ruby4.0-chronic_duration/numerizer-dependency.patch b/ruby4.0-chronic_duration/numerizer-dependency.patch new file mode 100644 index 00000000000..d70cb7ccfaa --- /dev/null +++ b/ruby4.0-chronic_duration/numerizer-dependency.patch @@ -0,0 +1,13 @@ +diff --git a/chronic_duration.gemspec b/chronic_duration.gemspec +index c94711a..abd5fcc 100644 +--- a/chronic_duration.gemspec ++++ b/chronic_duration.gemspec +@@ -19,7 +19,7 @@ Gem::Specification.new do |gem| + gem.test_files = gem.files.grep(%r{^(test|spec|features)/}) + gem.require_paths = ["lib"] + +- gem.add_runtime_dependency "numerizer", "~> 0.1.1" ++ gem.add_runtime_dependency "numerizer" + + gem.add_development_dependency "rake", "~> 10.0.3" + gem.add_development_dependency "rspec", "~> 2.12.0" diff --git a/ruby4.0-clamp.yaml b/ruby4.0-clamp.yaml new file mode 100644 index 00000000000..5976ea29997 --- /dev/null +++ b/ruby4.0-clamp.yaml @@ -0,0 +1,80 @@ +# Generated from https://github.com/mdub/clamp +package: + name: ruby4.0-clamp + version: "1.3.3" + epoch: 0 + description: Clamp provides an object-model for command-line utilities. + copyright: + - license: MIT + +environment: + contents: + packages: + - build-base + - busybox + - ca-certificates-bundle + - git + - ruby-${{vars.rubyMM}} + - ruby-${{vars.rubyMM}}-dev + +pipeline: + - uses: git-checkout + with: + repository: https://github.com/mdub/clamp + tag: v${{package.version}} + expected-commit: e4ff8ef82391b4f625a8033e40b98333182f4548 + + - uses: ruby/build + with: + gem: ${{vars.gem}} + + - uses: ruby/install + with: + gem: ${{vars.gem}} + version: ${{package.version}} + + - uses: ruby/clean + +vars: + gem: clamp + +test: + environment: + contents: + packages: + - ruby-${{vars.rubyMM}} + pipeline: + - runs: | + ruby -e "require 'clamp'; puts 'Clamp library loaded successfully!'" + - runs: | + ruby <<-EOF + require 'clamp' + + # Define a simple command for testing + class HelloCommand < Clamp::Command + parameter "NAME", "The name of the person to greet" + def execute + puts "Hello, \#{name}!" + end + end + + # Run the command with the required parameter + begin + HelloCommand.run(["Alice"]) + rescue SystemExit + end + puts "Clamp functionality verified!" + EOF + +update: + enabled: true + github: + identifier: mdub/clamp + strip-prefix: v + use-tag: true + +var-transforms: + - from: ${{package.name}} + match: ^ruby(\d\.\d+)-.* + replace: $1 + to: rubyMM diff --git a/ruby4.0-coderay.yaml b/ruby4.0-coderay.yaml new file mode 100644 index 00000000000..ebb0d0b265a --- /dev/null +++ b/ruby4.0-coderay.yaml @@ -0,0 +1,97 @@ +# Generated from http://github.com/rubychan/coderay +package: + name: ruby4.0-coderay + version: 1.1.3 + epoch: 0 + description: Fast and easy syntax highlighting for selected languages, written in Ruby. Comes with RedCloth integration and LOC counter. + copyright: + - license: MIT + +environment: + contents: + packages: + - build-base + - busybox + - ca-certificates-bundle + - git + - ruby-${{vars.rubyMM}} + - ruby-${{vars.rubyMM}}-dev + environment: + RELEASE: true + +pipeline: + - uses: git-checkout + with: + repository: https://github.com/rubychan/coderay + tag: v${{package.version}} + expected-commit: d30855fe96e33fed39bd5aa7ba6879ba62306860 + + - uses: ruby/build + with: + gem: ${{vars.gem}} + + - uses: ruby/install + with: + gem: ${{vars.gem}} + version: ${{package.version}} + + - uses: ruby/clean + +vars: + gem: coderay + +update: + enabled: true + github: + identifier: rubychan/coderay + strip-prefix: v + use-tag: true + +test: + pipeline: + # AUTOGENERATED + - runs: | + coderay --version + coderay --help + - runs: | + ruby <<-EOF + require 'coderay' + + # Highlight a simple Ruby code snippet + begin + ruby_code = "def hello; puts 'Hello, world!'; end" + highlighted = CodeRay.scan(ruby_code, :ruby).terminal + if highlighted.include?('def') && highlighted.include?('hello') + puts "Ruby code highlighting succeeded." + else + raise "Ruby code highlighting failed!" + end + rescue => e + puts e.message + raise e + end + EOF + - runs: | + ruby <<-EOF + require 'coderay' + + # Highlight a simple HTML snippet + begin + html_code = "Hello, world!" + highlighted_html = CodeRay.scan(html_code, :html).terminal + if highlighted_html.include?('') && highlighted_html.include?('body') + puts "HTML highlighting succeeded." + else + raise "HTML code highlighting failed!" + end + rescue => e + puts e.message + raise e + end + EOF + +var-transforms: + - from: ${{package.name}} + match: ^ruby(\d\.\d+)-.* + replace: $1 + to: rubyMM diff --git a/ruby4.0-concurrent-ruby.yaml b/ruby4.0-concurrent-ruby.yaml new file mode 100644 index 00000000000..a23bbb51b38 --- /dev/null +++ b/ruby4.0-concurrent-ruby.yaml @@ -0,0 +1,126 @@ +package: + name: ruby4.0-concurrent-ruby + version: "1.3.6" + epoch: 0 + description: Modern concurrency tools including agents, futures, promises, thread pools, actors, supervisors, and more. Inspired by Erlang, Clojure, Go, JavaScript, actors, and classic concurrency patterns. + copyright: + - license: MIT + dependencies: + runtime: + - ruby-${{vars.rubyMM}} + +environment: + contents: + packages: + - build-base + - busybox + - ca-certificates-bundle + - git + - jruby-9.4 + - openjdk-11-default-jdk + - ruby${{vars.rubyMM}}-bundler + - ruby-${{vars.rubyMM}} + - ruby-${{vars.rubyMM}}-dev + environment: + JRUBY_HOME: /usr/share/jruby/ + +vars: + gem: concurrent-ruby + +pipeline: + # This package makes use of `git ls-files` in it's gemspec so the git repo + # must be checked out in order for the gem to build with all files. + - uses: git-checkout + with: + expected-commit: dba776697b17b564f5cd9c6f2597adbc9b698724 + repository: https://github.com/ruby-concurrency/concurrent-ruby.git + tag: v${{package.version}} + + - runs: | + bundle install + bundle exec rake compile + bundle exec rake package + + - uses: ruby/install + with: + dir: ./pkg + gem: ${{vars.gem}} + version: ${{package.version}} + + - uses: ruby/clean + +subpackages: + - name: ${{package.name}}-ext + description: Concurrent ruby C extensions + pipeline: + - uses: ruby/install + with: + dir: ./pkg + gem: ${{vars.gem}}-ext + version: ${{package.version}} + - uses: ruby/clean + test: + pipeline: + - uses: test/tw/ldd-check + + - name: ${{package.name}}-edge + description: Concurrent ruby edge functionality + pipeline: + # This is ugly but concurrent-ruby publishes an edge gem at a different + # version than the main gem and melange does not support setting cross + # pipeline variables + - runs: | + EDGE_VERSION=$(ruby -e "require './lib/concurrent-ruby-edge/concurrent/edge/version'; puts Concurrent::EDGE_VERSION") + TARGET_DIR_BIN="${{targets.contextdir}}/usr/bin" + TARGET_DIR_INSTALL="${{targets.contextdir}}$(ruby -e 'puts Gem.default_dir')/" + + mkdir -p "${TARGET_DIR_BIN}" + mkdir -p "${TARGET_DIR_INSTALL}" + + GEM="./pkg/${{vars.gem}}-edge-${EDGE_VERSION}.gem" + gem install ${GEM} \ + --install-dir ${TARGET_DIR_INSTALL} \ + --bindir ${TARGET_DIR_BIN} \ + --version ${EDGE_VERSION} \ + --ignore-dependencies \ + --no-document \ + --verbose \ + --local + - uses: ruby/clean + +test: + environment: + environment: + HOME: /tmp/test + contents: + packages: + - ruby${{vars.rubyMM}}-bundler + # Install the subpackages for testing + - ruby${{vars.rubyMM}}-concurrent-ruby-ext + - ruby${{vars.rubyMM}}-concurrent-ruby-edge + pipeline: + - runs: mkdir -p $HOME + - uses: git-checkout + with: + expected-commit: 33abefb6823a07699f4b8665abba9297ef5d2ccd + repository: https://github.com/ruby-concurrency/concurrent-ruby.git + tag: v${{package.version}} + - runs: | + export JRUBY_HOME=/usr/share/jruby/ + bundle install + + export NO_PATH=true + bundle exec rake spec:ci + +update: + enabled: true + github: + identifier: ruby-concurrency/concurrent-ruby + strip-prefix: v + tag-filter-prefix: v + +var-transforms: + - from: ${{package.name}} + match: ^ruby(\d\.\d+)-.* + replace: $1 + to: rubyMM diff --git a/ruby4.0-connection_pool.yaml b/ruby4.0-connection_pool.yaml new file mode 100644 index 00000000000..6f92681058b --- /dev/null +++ b/ruby4.0-connection_pool.yaml @@ -0,0 +1,81 @@ +package: + name: ruby4.0-connection_pool + version: "3.0.2" + epoch: 0 + description: Generic connection pool for Ruby + copyright: + - license: MIT + +environment: + contents: + packages: + - build-base + - busybox + - ca-certificates-bundle + - git + - ruby-${{vars.rubyMM}} + - ruby-${{vars.rubyMM}}-dev + +pipeline: + - uses: git-checkout + with: + expected-commit: 78bc41e2a9fffbdd7242736233aeedfb64953dd8 + repository: https://github.com/mperham/connection_pool + tag: v${{package.version}} + + - uses: ruby/build + with: + gem: ${{vars.gem}} + + - uses: ruby/install + with: + gem: ${{vars.gem}} + version: ${{package.version}} + + - uses: ruby/clean + +vars: + gem: connection_pool + +test: + pipeline: + # Validate that the gem is installed correctly + - runs: | + ruby -e "require 'connection_pool'; puts 'ConnectionPool loaded successfully!'" + # Test basic functionality of ConnectionPool + - runs: | + ruby <<-EOF + require 'connection_pool' + + # Create a pool of simple objects + pool = ConnectionPool.new(size: 5, timeout: 5) { "ConnectionObject" } + + # Fetch a connection and validate + connection = pool.with { |conn| conn } + raise "Unexpected connection value: \#{connection}" unless connection == "ConnectionObject" + + # Ensure the pool returns objects within expected behavior + results = [] + 5.times do + pool.with { |conn| results << conn } + end + + if results.uniq.size != 1 || results.first != "ConnectionObject" + raise "Pool did not manage connections correctly!" + end + + puts "ConnectionPool functionality verified!" + EOF + +update: + enabled: true + github: + identifier: mperham/connection_pool + strip-prefix: v + use-tag: true + +var-transforms: + - from: ${{package.name}} + match: ^ruby(\d\.\d+)-.* + replace: $1 + to: rubyMM diff --git a/ruby4.0-console.yaml b/ruby4.0-console.yaml new file mode 100644 index 00000000000..9fa66259153 --- /dev/null +++ b/ruby4.0-console.yaml @@ -0,0 +1,76 @@ +package: + name: ruby4.0-console + version: "1.34.2" + epoch: 0 + description: Beautiful logging for Ruby. + copyright: + - license: MIT + dependencies: + runtime: + - ruby${{vars.rubyMM}}-fiber-annotation + - ruby${{vars.rubyMM}}-fiber-local + - ruby${{vars.rubyMM}}-fiber-storage + - ruby${{vars.rubyMM}}-json + - ruby-${{vars.rubyMM}} + +environment: + contents: + packages: + - build-base + - busybox + - ca-certificates-bundle + - git + - ruby-${{vars.rubyMM}} + - ruby-${{vars.rubyMM}}-dev + +vars: + gem: console + +pipeline: + - uses: git-checkout + with: + expected-commit: e43ac72a20a78832dd606f06cefbd65806b910f5 + repository: https://github.com/socketry/console + tag: v${{package.version}} + + - uses: ruby/build + with: + gem: ${{vars.gem}} + + - uses: ruby/install + with: + gem: ${{vars.gem}} + version: ${{package.version}} + + - uses: ruby/clean + +test: + pipeline: + - runs: | + ruby -e "require 'console'; puts 'Console library loaded successfully!'" + - runs: | + ruby <<-EOF + require 'console' + + # Create a logger instance + logger = Console.logger + + # Log a single message + logger.info "Test log message" + + # Verify it doesn't raise errors + puts "Console basic logging verified!" + EOF + +update: + enabled: true + github: + identifier: socketry/console + strip-prefix: v + use-tag: true + +var-transforms: + - from: ${{package.name}} + match: ^ruby(\d\.\d+)-.* + replace: $1 + to: rubyMM diff --git a/ruby4.0-cool.io.yaml b/ruby4.0-cool.io.yaml new file mode 100644 index 00000000000..e07a87f2e75 --- /dev/null +++ b/ruby4.0-cool.io.yaml @@ -0,0 +1,93 @@ +package: + name: ruby4.0-cool.io + version: "1.9.1" + epoch: 0 + description: Cool.io provides a high performance event framework for Ruby which uses the libev C library + copyright: + - license: MIT + dependencies: + runtime: + - ruby-${{vars.rubyMM}} + +environment: + contents: + packages: + - build-base + - busybox + - ca-certificates-bundle + - git + - ruby-${{vars.rubyMM}} + - ruby-${{vars.rubyMM}}-dev + +vars: + gem: cool.io + +pipeline: + # This package makes use of `git ls-files` in it's gemspec so the git repo + # must be checked out in order for the gem to build with all files. + - uses: git-checkout + with: + destination: ${{vars.gem}} + expected-commit: 73638c5c0aac39309019d468a790e30e522dc6c4 + repository: https://github.com/tarcieri/cool.io.git + tag: v${{package.version}} + + - working-directory: ${{vars.gem}} + pipeline: + - uses: ruby/build + with: + gem: ${{vars.gem}} + - uses: ruby/install + with: + gem: ${{vars.gem}} + version: ${{package.version}} + - uses: ruby/clean + +test: + pipeline: + - runs: | + ruby -e "require 'cool.io'; puts 'Cool.io library loaded successfully!'" + # Test event loop creation and basic functionality + - runs: | + ruby <<-EOF + require 'cool.io' + + # Create an event loop + loop = Cool.io::Loop.new + raise "Event loop creation failed!" unless loop + + # Verify event loop works without exceptions + puts "Cool.io event loop created successfully!" + EOF + # Test adding a timer to the event loop + - runs: | + ruby <<-EOF + require 'cool.io' + + # Create an event loop + loop = Cool.io::Loop.new + + # Add a timer to the loop + timer = Cool.io::TimerWatcher.new(1, 0) { puts "Timer fired!" } + loop.attach(timer) + + # Run the loop for 1 second + loop.run_once + + # Verify timer functionality + puts "Cool.io timer executed successfully!" + EOF + - uses: test/tw/ldd-check + +update: + enabled: true + github: + identifier: tarcieri/cool.io + strip-prefix: v + use-tag: true + +var-transforms: + - from: ${{package.name}} + match: ^ruby(\d\.\d+)-.* + replace: $1 + to: rubyMM diff --git a/ruby4.0-date.yaml b/ruby4.0-date.yaml new file mode 100644 index 00000000000..a5e85cc95e3 --- /dev/null +++ b/ruby4.0-date.yaml @@ -0,0 +1,91 @@ +package: + name: ruby4.0-date + version: "3.5.1" + epoch: 0 + description: A subclass of Object includes Comparable module for handling dates. + copyright: + - license: Ruby + - license: BSD-2-Clause + +environment: + contents: + packages: + - build-base + - busybox + - ca-certificates-bundle + - git + - ruby-${{vars.rubyMM}} + - ruby-${{vars.rubyMM}}-dev + +pipeline: + - uses: git-checkout + with: + expected-commit: 2b5442d85a97859a680eb4be20c6e1a28f3af282 + repository: https://github.com/ruby/date + tag: v${{package.version}} + + - uses: ruby/build + with: + gem: ${{vars.gem}} + + - uses: ruby/install + with: + gem: ${{vars.gem}} + version: ${{package.version}} + + - uses: ruby/clean + +vars: + gem: date + +test: + pipeline: + - runs: ruby -e "require 'date'; puts 'Date library loaded successfully!'" + # Test Date functionality + - runs: | + ruby <<-EOF + require 'date' + + # Create a specific date + date = Date.new(2024, 11, 21) + raise "Date creation failed!" unless date.year == 2024 && date.month == 11 && date.day == 21 + + # Parse a date string + parsed_date = Date.parse("2024-11-21") + raise "Date parsing failed!" unless parsed_date == date + + # Calculate date difference + today = Date.today + future = today + 10 + raise "Date calculation failed!" unless (future - today) == 10 + + puts "Date library functionality verified successfully!" + EOF + # Test DateTime functionality + - runs: | + ruby <<-EOF + require 'date' + + # Create a specific datetime + datetime = DateTime.new(2024, 11, 21, 14, 30, 0) + raise "DateTime creation failed!" unless datetime.hour == 14 && datetime.minute == 30 + + # Parse a datetime string + parsed_datetime = DateTime.parse("2024-11-21T14:30:00") + raise "DateTime parsing failed!" unless parsed_datetime == datetime + + puts "DateTime library functionality verified successfully!" + EOF + - uses: test/tw/ldd-check + +update: + enabled: true + github: + identifier: ruby/date + strip-prefix: v + +var-transforms: + - from: ${{package.name}} + match: ^ruby(\d\.\d+)-.* + replace: $1 + to: rubyMM diff --git a/ruby4.0-deep_merge.yaml b/ruby4.0-deep_merge.yaml new file mode 100644 index 00000000000..f6c894bd88c --- /dev/null +++ b/ruby4.0-deep_merge.yaml @@ -0,0 +1,69 @@ +# Generated from https://github.com/danielsdeleo/deep_merge +package: + name: ruby4.0-deep_merge + version: 1.2.2 + epoch: 0 + description: Recursively merge hashes. + copyright: + - license: MIT + +environment: + contents: + packages: + - build-base + - busybox + - ca-certificates-bundle + - git + - ruby-${{vars.rubyMM}} + - ruby-${{vars.rubyMM}}-dev + +pipeline: + - uses: git-checkout + with: + repository: https://github.com/danielsdeleo/deep_merge + tag: ${{package.version}} + expected-commit: aab0f7fed5c1e22226efec5d4adaa3e95d198b83 + + - uses: ruby/build + with: + gem: ${{vars.gem}} + + - uses: ruby/install + with: + gem: ${{vars.gem}} + version: ${{package.version}} + + - uses: ruby/clean + +vars: + gem: deep_merge + +test: + pipeline: + - runs: ruby -e "require 'deep_merge'; puts 'DeepMerge library loaded successfully!'" + - runs: | + ruby <<-EOF + require 'deep_merge' + + # Test merging two hashes + hash1 = { a: 1, b: { c: 2 } } + hash2 = { b: { d: 3 }, e: 4 } + result = hash1.deep_merge(hash2) + + # Validate the result + raise "Merge failed!" unless result[:a] == 1 && result[:b][:c] == 2 && result[:b][:d] == 3 && result[:e] == 4 + + puts "DeepMerge functionality verified successfully!" + EOF + +update: + enabled: true + github: + identifier: danielsdeleo/deep_merge + use-tag: true + +var-transforms: + - from: ${{package.name}} + match: ^ruby(\d\.\d+)-.* + replace: $1 + to: rubyMM diff --git a/ruby4.0-diff-lcs.yaml b/ruby4.0-diff-lcs.yaml new file mode 100644 index 00000000000..6778144f51e --- /dev/null +++ b/ruby4.0-diff-lcs.yaml @@ -0,0 +1,62 @@ +# Generated from https://github.com/halostatue/diff-lcs +package: + name: ruby4.0-diff-lcs + version: "1.6.2" + epoch: 0 + description: Diff::LCS computes the difference between two Enumerable sequences using the + copyright: + - license: MIT + - license: Artistic-2.0 + - license: GPL-2.0-or-later + +environment: + contents: + packages: + - build-base + - busybox + - ca-certificates-bundle + - git + - ruby-${{vars.rubyMM}} + - ruby-${{vars.rubyMM}}-dev + +pipeline: + - uses: fetch + with: + expected-sha256: 605f34c4c1dba3901763315a3a98e6cd32ec02f2c2704b964643691019784b35 + uri: https://github.com/halostatue/diff-lcs/archive/refs/tags/v${{package.version}}.tar.gz + + - uses: ruby/build + with: + gem: ${{vars.gem}} + + - uses: ruby/install + with: + gem: ${{vars.gem}} + version: ${{package.version}} + + - uses: ruby/clean + +vars: + gem: diff-lcs + +update: + enabled: true + github: + identifier: halostatue/diff-lcs + use-tag: true + strip-prefix: v + ignore-regex-patterns: + - .*debug.* + - .*test.* + +test: + pipeline: + - runs: | + ldiff --version + ldiff --help + +var-transforms: + - from: ${{package.name}} + match: ^ruby(\d\.\d+)-.* + replace: $1 + to: rubyMM diff --git a/ruby4.0-domain_name.yaml b/ruby4.0-domain_name.yaml new file mode 100644 index 00000000000..ce5b410b5d2 --- /dev/null +++ b/ruby4.0-domain_name.yaml @@ -0,0 +1,96 @@ +# Generated from https://github.com/knu/ruby-domain_name +package: + name: ruby4.0-domain_name + version: 0.6.20240107 + epoch: 0 + description: This is a Domain Name manipulation library for Ruby. + copyright: + - license: BSD-2-Clause + - license: BSD-3-Clause + - license: MPL-2.0 + dependencies: + runtime: + - ruby-${{vars.rubyMM}} + +environment: + contents: + packages: + - build-base + - busybox + - ca-certificates-bundle + - git + - ruby-${{vars.rubyMM}} + - ruby-${{vars.rubyMM}}-dev + +pipeline: + - uses: git-checkout + with: + repository: https://github.com/knu/ruby-domain_name.git + tag: v${{package.version}} + expected-commit: e955d9533e792b3293c560277c15515bfeeb65c9 + + - uses: ruby/build + with: + gem: ${{vars.gem}} + + - uses: ruby/install + with: + gem: ${{vars.gem}} + version: ${{package.version}} + + - uses: ruby/clean + +vars: + gem: domain_name + +test: + pipeline: + - runs: ruby -e "require 'domain_name'; puts 'DomainName library loaded successfully!'" + - runs: | + ruby <<-EOF + require 'domain_name' + + # Test creating and validating a domain name + domain = DomainName.new("example.com") + puts "Parsed domain: \#{domain}" + raise "Domain parsing failed!" unless domain.to_s == "example.com" + + # Test domain with subdomains + subdomain = DomainName.new("sub.example.com") + puts "Parsed subdomain: \#{subdomain}" + raise "Subdomain parsing failed!" unless subdomain.to_s == "sub.example.com" + + # Test invalid domain handling (if validation exists) + invalid_domain = DomainName.new("invalid_domain") + if invalid_domain.to_s == "invalid_domain" + puts "Warning: Domain validation may not be enforced!" + else + raise "Unexpected behavior for invalid domain!" + end + + # Test equality of domain names + domain1 = DomainName.new("example.com") + domain2 = DomainName.new("example.com") + puts "Domain equality verified for \#{domain1} and \#{domain2}" + raise "Domain equality test failed!" unless domain1 == domain2 + + # Test canonicalization + canonical_domain = DomainName.new("EXAMPLE.com").to_s + puts "Canonicalized domain: \#{canonical_domain}" + raise "Canonicalization failed!" unless canonical_domain == "example.com" + + puts "DomainName functionality fully verified!" + EOF + +update: + enabled: true + github: + identifier: knu/ruby-domain_name + strip-prefix: v + use-tag: true + +var-transforms: + - from: ${{package.name}} + match: ^ruby(\d\.\d+)-.* + replace: $1 + to: rubyMM diff --git a/ruby4.0-dotenv.yaml b/ruby4.0-dotenv.yaml new file mode 100644 index 00000000000..8f0551bfc58 --- /dev/null +++ b/ruby4.0-dotenv.yaml @@ -0,0 +1,74 @@ +# Generated from https://github.com/bkeepers/dotenv +package: + name: ruby4.0-dotenv + version: "3.2.0" + epoch: 0 + description: Loads environment variables from `.env`. + copyright: + - license: MIT + +environment: + contents: + packages: + - build-base + - busybox + - ca-certificates-bundle + - git + - ruby-${{vars.rubyMM}} + - ruby-${{vars.rubyMM}}-dev + +pipeline: + - uses: git-checkout + with: + repository: https://github.com/bkeepers/dotenv.git + tag: v${{package.version}} + expected-commit: 34156bf400cd67387fa6ed9f146778f6a2f5f743 + + - uses: ruby/build + with: + gem: ${{vars.gem}} + + - uses: ruby/install + with: + gem: ${{vars.gem}} + version: ${{package.version}} + + - uses: ruby/clean + +update: + enabled: true + github: + identifier: bkeepers/dotenv + strip-prefix: v + use-tag: true + tag-filter: v + ignore-regex-patterns: + - ^\.[0-9].* + - .*\.debug.* + +vars: + gem: dotenv + +test: + pipeline: + - uses: test/tw/gem-check + with: + require: | + dotenv + dotenv/autorestore + dotenv/cli + dotenv/diff + dotenv/environment + dotenv/load + dotenv/missing_keys + dotenv/parser + dotenv/template + dotenv/version + dotenv/substitutions/command + dotenv/substitutions/variable + +var-transforms: + - from: ${{package.name}} + match: ^ruby(\d\.\d+)-.* + replace: $1 + to: rubyMM diff --git a/ruby4.0-elastic-transport.yaml b/ruby4.0-elastic-transport.yaml new file mode 100644 index 00000000000..dd5d27e1c9f --- /dev/null +++ b/ruby4.0-elastic-transport.yaml @@ -0,0 +1,86 @@ +package: + name: ruby4.0-elastic-transport + version: "8.4.1" + epoch: 0 + description: | + Low level Ruby client for Elastic. See the `elasticsearch` or `elastic-enterprise-search` gems for full integration. + copyright: + - license: Apache-2.0 + dependencies: + runtime: + - ruby${{vars.rubyMM}}-faraday + - ruby${{vars.rubyMM}}-multi_json + +environment: + contents: + packages: + - build-base + - busybox + - ca-certificates-bundle + - git + - ruby-${{vars.rubyMM}} + - ruby-${{vars.rubyMM}}-dev + +pipeline: + - uses: git-checkout + with: + repository: https://github.com/elastic/elastic-transport-ruby.git + tag: v${{package.version}} + expected-commit: 38c6fa883549d4a88316711749d1f0730f40ec35 + + - uses: ruby/build + with: + gem: ${{vars.gem}} + + - uses: ruby/install + with: + gem: ${{vars.gem}} + version: ${{package.version}} + + - uses: ruby/clean + +vars: + gem: elastic-transport + +test: + environment: + contents: + packages: + - ruby${{vars.rubyMM}}-net-http + pipeline: + - runs: ruby -e "require 'elastic/transport'; puts 'Elastic Transport library loaded successfully!'" + - runs: | + ruby <<-EOF + require 'elastic/transport' + + # Initialize a client + client = Elastic::Transport::Client.new(hosts: [{ host: 'localhost', port: 9200 }]) + + # Verify client setup + raise "Client initialization failed!" unless client + puts "Elastic Transport client initialized successfully!" + + # Perform a mock request (no server interaction expected) + begin + client.perform_request('GET', '/') + rescue => e + puts "Expected error (no server running): \#{e.class}: \#{e.message}" + else + raise "Request should have failed as no server is running!" + end + + puts "Elastic Transport functionality verified!" + EOF + +update: + enabled: true + github: + identifier: elastic/elastic-transport-ruby + strip-prefix: v + use-tag: true + +var-transforms: + - from: ${{package.name}} + match: ^ruby(\d\.\d+)-.* + replace: $1 + to: rubyMM diff --git a/ruby4.0-elasticsearch-api.yaml b/ruby4.0-elasticsearch-api.yaml new file mode 100644 index 00000000000..ca599a0d62a --- /dev/null +++ b/ruby4.0-elasticsearch-api.yaml @@ -0,0 +1,83 @@ +package: + name: ruby4.0-elasticsearch-api + version: "9.2.0" + epoch: 0 + description: | + Ruby API for Elasticsearch. See the `elasticsearch` gem for full integration. + copyright: + - license: Apache-2.0 + dependencies: + runtime: + - ruby${{vars.rubyMM}}-multi_json + +environment: + contents: + packages: + - build-base + - busybox + - ca-certificates-bundle + - git + - ruby-${{vars.rubyMM}} + - ruby-${{vars.rubyMM}}-dev + +vars: + gem: elasticsearch-api + +pipeline: + - uses: git-checkout + with: + repository: https://github.com/elastic/elasticsearch-ruby.git + tag: v${{package.version}} + expected-commit: 0165ee829df9508a880594872a0ee66b5945f847 + + - working-directory: ${{vars.gem}} + pipeline: + - uses: ruby/build + with: + gem: ${{vars.gem}} + - uses: ruby/install + with: + gem: ${{vars.gem}} + version: ${{package.version}} + - uses: ruby/clean + +test: + pipeline: + - runs: ruby -e "require 'elasticsearch/api'; puts 'Elasticsearch API library loaded successfully!'" + - runs: | + ruby <<-EOF + require 'elasticsearch/api' + + # Check if the module Elasticsearch::API exists + unless defined?(Elasticsearch::API) + raise 'Elasticsearch::API module is not defined!' + end + + # Mocking a client with basic method inclusion for testing + class MockClient + include Elasticsearch::API + end + + client = MockClient.new + + # Verify that a basic API method exists + unless client.respond_to?(:info) + raise 'The client does not respond to the `info` method!' + end + + puts 'Elasticsearch API library basic functionality verified!' + EOF + +update: + enabled: true + github: + identifier: elastic/elasticsearch-ruby + strip-prefix: v + use-tag: true + tag-filter: v + +var-transforms: + - from: ${{package.name}} + match: ^ruby(\d\.\d+)-.* + replace: $1 + to: rubyMM diff --git a/ruby4.0-elasticsearch.yaml b/ruby4.0-elasticsearch.yaml new file mode 100644 index 00000000000..65b7b0a77b8 --- /dev/null +++ b/ruby4.0-elasticsearch.yaml @@ -0,0 +1,89 @@ +package: + name: ruby4.0-elasticsearch + version: "9.2.0" + epoch: 0 + description: | + Ruby integrations for Elasticsearch (client, API, etc.) + copyright: + - license: Apache-2.0 + dependencies: + runtime: + - ruby${{vars.rubyMM}}-elastic-transport + - ruby${{vars.rubyMM}}-elasticsearch-api + +environment: + contents: + packages: + - build-base + - busybox + - ca-certificates-bundle + - git + - ruby-${{vars.rubyMM}} + - ruby-${{vars.rubyMM}}-dev + +pipeline: + - uses: git-checkout + with: + repository: https://github.com/elastic/elasticsearch-ruby.git + tag: v${{package.version}} + expected-commit: 0165ee829df9508a880594872a0ee66b5945f847 + + - working-directory: ${{vars.gem}} + pipeline: + - uses: ruby/build + with: + gem: ${{vars.gem}} + - uses: ruby/install + with: + gem: ${{vars.gem}} + version: ${{package.version}} + - uses: ruby/clean + +vars: + gem: elasticsearch + +update: + enabled: true + github: + identifier: elastic/elasticsearch-ruby + strip-prefix: v + use-tag: true + +test: + environment: + contents: + packages: + - ruby${{vars.rubyMM}}-net-http + pipeline: + # AUTOGENERATED + - runs: | + elastic_ruby_console --version + elastic_ruby_console --help + # Test the Elasticsearch client library + - runs: ruby -e "require 'elasticsearch'; puts 'Elasticsearch library loaded successfully!'" + - runs: | + ruby <<-EOF + require 'elasticsearch' + require 'minitest/mock' + + # Mock the Elasticsearch client + client = Elasticsearch::Client.new(log: true) + mock_response = { "cluster_name" => "mock_cluster", "version" => { "number" => "8.0.0" } } + + client.stub :info, mock_response do + response = client.info + + # Validate the response + unless response["cluster_name"] == "mock_cluster" && response["version"]["number"] == "8.0.0" + raise "Mocked Elasticsearch response validation failed: \#{response.inspect}" + end + + puts "Mocked Elasticsearch client functionality verified successfully!" + end + EOF + +var-transforms: + - from: ${{package.name}} + match: ^ruby(\d\.\d+)-.* + replace: $1 + to: rubyMM diff --git a/ruby4.0-email_validator.yaml b/ruby4.0-email_validator.yaml new file mode 100644 index 00000000000..fd75187705d --- /dev/null +++ b/ruby4.0-email_validator.yaml @@ -0,0 +1,55 @@ +package: + name: ruby4.0-email_validator + version: 2.2.4 + epoch: 0 + description: An email validator for Rails. + dependencies: + runtime: + - ruby${{vars.rubyMM}}-activemodel + - ruby${{vars.rubyMM}}-mail + copyright: + - license: MIT + +environment: + contents: + packages: + - build-base + - busybox + - ca-certificates-bundle + - git + - ruby-${{vars.rubyMM}} + - ruby-${{vars.rubyMM}}-dev + +pipeline: + - uses: git-checkout + with: + repository: https://github.com/K-and-R/email_validator + tag: v${{package.version}} + expected-commit: 95c6ad81c800ba9759492880b22f21b601c6294b + + - uses: ruby/build + with: + gem: ${{vars.gem}} + + - uses: ruby/install + with: + gem: ${{vars.gem}} + version: ${{package.version}} + + - uses: ruby/clean + +vars: + gem: email_validator + +update: + enabled: true + github: + identifier: K-and-R/email_validator + strip-prefix: v + use-tag: true + +var-transforms: + - from: ${{package.name}} + match: ^ruby(\d\.\d+)-.* + replace: $1 + to: rubyMM diff --git a/ruby4.0-erubi.yaml b/ruby4.0-erubi.yaml new file mode 100644 index 00000000000..21e712e69cc --- /dev/null +++ b/ruby4.0-erubi.yaml @@ -0,0 +1,101 @@ +package: + name: ruby4.0-erubi + version: 1.13.1 + epoch: 0 + description: Provides a simple way to create XML markup and data structures. + copyright: + - license: MIT + dependencies: + runtime: + - ruby-${{vars.rubyMM}} + +environment: + contents: + packages: + - ruby-${{vars.rubyMM}} + - ruby-${{vars.rubyMM}}-dev + +vars: + gem: erubi + +pipeline: + - uses: git-checkout + with: + expected-commit: f1a0fb5bfb2a2604c0cf850d3c960bfc458421b6 + repository: https://github.com/jeremyevans/erubi + tag: ${{package.version}} + + - pipeline: + - uses: ruby/build + with: + gem: ${{vars.gem}} + - uses: ruby/install + with: + gem: ${{vars.gem}} + version: ${{package.version}} + - uses: ruby/clean + +update: + enabled: true + github: + identifier: jeremyevans/erubi + use-tag: true + +test: + pipeline: + - name: Test basic import + runs: ruby -e "require 'erubi'" + - name: Test retrieving source from a .erb file + runs: | + cat > test.erb < + EOF + + cat > test.rb < test.rb <#{@_buf.capture(&block)}" + end + + puts eval(Erubi::CaptureBlockEngine.new(<<-END, bufvar: '@_buf', trim: false).src) + before<%= form do %>inside<% end %>after + END + EOT + + ruby test.rb | grep -E 'before.*
.*inside.*
.*after' + - name: Test Erubi::CaptureEndEngine + runs: | + cat > test.rb <" + yield + @_buf << "" + @_buf + end + + puts eval(Erubi::CaptureEndEngine.new(<<-END, bufvar: '@_buf').src) + before<%|= form do %>inside<%| end %>after + END + EOT + + ruby test.rb | grep -E 'before.*
.*inside.*
.*after' + +var-transforms: + - from: ${{package.name}} + match: ^ruby(\d\.\d+)-.* + replace: $1 + to: rubyMM diff --git a/ruby4.0-excon.yaml b/ruby4.0-excon.yaml new file mode 100644 index 00000000000..772bbacf5d3 --- /dev/null +++ b/ruby4.0-excon.yaml @@ -0,0 +1,64 @@ +# Generated from https://github.com/excon/excon +package: + name: ruby4.0-excon + version: "1.3.2" + epoch: 0 + description: EXtended http(s) CONnections + copyright: + - license: MIT + +environment: + contents: + packages: + - build-base + - busybox + - ca-certificates-bundle + - git + - ruby-${{vars.rubyMM}} + - ruby-${{vars.rubyMM}}-dev + +pipeline: + - uses: git-checkout + with: + repository: https://github.com/excon/excon + expected-commit: e94efe6637d9d99a66e8a39b52c0131c706432b7 + tag: v${{package.version}} + + - uses: ruby/build + with: + gem: ${{vars.gem}} + + - uses: ruby/install + with: + gem: ${{vars.gem}} + version: ${{package.version}} + + - uses: ruby/clean + +vars: + gem: excon + +test: + pipeline: + - runs: ruby -e "require 'excon'" + - name: HTTP GET + runs: | + cat < /tmp/test.rb + require 'excon' + response = Excon.get("https://edu.chainguard.dev/open-source/wolfi/overview/") + print response.status + EOF + ruby /tmp/test.rb + +update: + enabled: true + github: + identifier: excon/excon + strip-prefix: v + use-tag: true + +var-transforms: + - from: ${{package.name}} + match: ^ruby(\d\.\d+)-.* + replace: $1 + to: rubyMM diff --git a/ruby4.0-faraday-excon.yaml b/ruby4.0-faraday-excon.yaml new file mode 100644 index 00000000000..69cbca68697 --- /dev/null +++ b/ruby4.0-faraday-excon.yaml @@ -0,0 +1,80 @@ +# Generated from https://github.com/lostisland/faraday-excon +package: + name: ruby4.0-faraday-excon + version: 2.1.0 + epoch: 0 + description: Faraday adapter for Excon + copyright: + - license: MIT + dependencies: + runtime: + - ruby${{vars.rubyMM}}-excon + - ruby${{vars.rubyMM}}-faraday + +environment: + contents: + packages: + - build-base + - busybox + - ca-certificates-bundle + - git + - ruby-${{vars.rubyMM}} + - ruby-${{vars.rubyMM}}-dev + +pipeline: + - uses: git-checkout + with: + repository: https://github.com/lostisland/faraday-excon.git + tag: v${{package.version}} + expected-commit: 30ef3a0f91c69d7bec36c5b6287dfce515c06ee1 + + - uses: ruby/build + with: + gem: ${{vars.gem}} + + - uses: ruby/install + with: + gem: ${{vars.gem}} + version: ${{package.version}} + + - uses: ruby/clean + +vars: + gem: faraday-excon + +test: + environment: + contents: + packages: + - ruby${{vars.rubyMM}}-net-http + pipeline: + - runs: ruby -e "require 'faraday/excon'; puts 'Faraday Excon adapter loaded successfully!'" + - runs: | + ruby <<-EOF + require 'faraday' + require 'faraday/excon' + + # Test the Faraday connection with Excon adapter + begin + conn = Faraday.new(url: 'https://example.com') do |f| + f.adapter :excon + end + + response = conn.get('/') + puts "Faraday connection with Excon adapter configured successfully! Response status: \#{response.status}" + rescue StandardError => e + raise "Test failed with error: \#{e.message}" + end + EOF + +update: + enabled: true + github: + identifier: lostisland/faraday-excon + strip-prefix: v + +var-transforms: + - from: ${{package.name}} + match: ^ruby(\d\.\d+)-.* + replace: $1 + to: rubyMM diff --git a/ruby4.0-faraday-follow_redirects.yaml b/ruby4.0-faraday-follow_redirects.yaml new file mode 100644 index 00000000000..d74377585fe --- /dev/null +++ b/ruby4.0-faraday-follow_redirects.yaml @@ -0,0 +1,85 @@ +package: + name: ruby4.0-faraday-follow_redirects + version: "0.4.0" + epoch: 0 + description: | + Faraday 2.x compatible extraction of FaradayMiddleware::FollowRedirects. + copyright: + - license: MIT + dependencies: + runtime: + - ruby${{vars.rubyMM}}-faraday + +environment: + contents: + packages: + - build-base + - busybox + - ca-certificates-bundle + - git + - ruby-${{vars.rubyMM}} + - ruby-${{vars.rubyMM}}-dev + +pipeline: + - uses: git-checkout + with: + expected-commit: e7f653a6eac37f7ab763ca25f836436535b38b8d + repository: https://github.com/tisba/faraday-follow-redirects + tag: v${{package.version}} + + - uses: ruby/build + with: + gem: ${{vars.gem}} + + - uses: ruby/install + with: + gem: ${{vars.gem}} + version: ${{package.version}} + + - uses: ruby/clean + +vars: + gem: faraday-follow_redirects + +test: + environment: + contents: + packages: + - ruby${{vars.rubyMM}}-net-http + pipeline: + - runs: ruby -e "require 'faraday/follow_redirects'; puts 'Faraday Follow Redirects middleware loaded successfully!'" + - runs: | + ruby <<-EOF + require 'faraday' + require 'faraday/follow_redirects' + + # Test the Faraday connection with the Follow Redirects middleware + begin + conn = Faraday.new(url: 'http://httpbingo.org/redirect/1') do |f| + f.use Faraday::FollowRedirects::Middleware + f.adapter Faraday.default_adapter + end + + response = conn.get + if response.status == 200 + puts "Faraday connection with Follow Redirects middleware configured successfully! Final status: \#{response.status}" + else + raise "Unexpected response status: \#{response.status}" + end + rescue StandardError => e + raise "Test failed with error: \#{e.message}" + end + EOF + +update: + enabled: true + github: + identifier: tisba/faraday-follow-redirects + strip-prefix: v + use-tag: true + +var-transforms: + - from: ${{package.name}} + match: ^ruby(\d\.\d+)-.* + replace: $1 + to: rubyMM diff --git a/ruby4.0-faraday-net_http.yaml b/ruby4.0-faraday-net_http.yaml new file mode 100644 index 00000000000..c7188cfddf1 --- /dev/null +++ b/ruby4.0-faraday-net_http.yaml @@ -0,0 +1,76 @@ +package: + name: ruby4.0-faraday-net_http + version: "3.4.2" + epoch: 0 + description: Faraday adapter for Net::HTTP + copyright: + - license: MIT + dependencies: + runtime: + - ruby${{vars.rubyMM}}-net-http + +environment: + contents: + packages: + - build-base + - busybox + - ca-certificates-bundle + - git + - ruby-${{vars.rubyMM}} + - ruby-${{vars.rubyMM}}-dev + +pipeline: + - uses: git-checkout + with: + expected-commit: 821a73a0f1fb2fd109b3ef58312b6ee10b4f2944 + repository: https://github.com/lostisland/faraday-net_http + tag: v${{package.version}} + + - uses: ruby/build + with: + gem: ${{vars.gem}} + + - uses: ruby/install + with: + gem: ${{vars.gem}} + version: ${{package.version}} + + - uses: ruby/clean + +vars: + gem: faraday-net_http + +test: + environment: + contents: + packages: + - ruby${{vars.rubyMM}}-faraday + pipeline: + # Users do not import this package directly, see the following for a deeper + # explanation: https://github.com/lostisland/faraday-net_http/issues/25 + - name: Basic usage + runs: | + cat < /tmp/test.rb + require 'faraday' + + Faraday.default_adapter = :net_http + conn = Faraday.new(url: 'https://edu.chainguard.dev/open-source/wolfi/overview/') do |f| + f.adapter :net_http + end + + response = conn.get('/') + print response.status + EOF + ruby /tmp/test.rb + +update: + enabled: true + github: + identifier: lostisland/faraday-net_http + strip-prefix: v + +var-transforms: + - from: ${{package.name}} + match: ^ruby(\d\.\d+)-.* + replace: $1 + to: rubyMM diff --git a/ruby4.0-faraday.yaml b/ruby4.0-faraday.yaml new file mode 100644 index 00000000000..1266d898498 --- /dev/null +++ b/ruby4.0-faraday.yaml @@ -0,0 +1,105 @@ +package: + name: ruby4.0-faraday + version: "2.14.0" + epoch: 0 + description: HTTP/REST API client library. + copyright: + - license: MIT + dependencies: + runtime: + - ruby${{vars.rubyMM}}-faraday-net_http + - ruby${{vars.rubyMM}}-ruby2_keywords + +environment: + contents: + packages: + - build-base + - busybox + - ca-certificates-bundle + - git + - ruby-${{vars.rubyMM}} + - ruby-${{vars.rubyMM}}-dev + +pipeline: + - uses: git-checkout + with: + expected-commit: 3201a42957d37efc968ee8834ba9b50ed5dde54a + repository: https://github.com/lostisland/faraday + tag: v${{package.version}} + + - uses: ruby/build + with: + gem: ${{vars.gem}} + + - uses: ruby/install + with: + gem: ${{vars.gem}} + version: ${{package.version}} + + - uses: ruby/clean + +vars: + gem: faraday + +test: + environment: + contents: + packages: + - ruby${{vars.rubyMM}}-faraday-net_http + - ruby${{vars.rubyMM}}-net-http + pipeline: + - name: Verify library import + runs: ruby -e "require 'faraday'" + - name: Basic usage + runs: | + cat < /tmp/basic_usage_test.rb + require 'faraday' + response = Faraday.get("https://edu.chainguard.dev/open-source/wolfi/overview/") + if response.status == 200 + puts "Basic usage test passed! Status: \#{response.status}" + else + raise "Basic usage test failed. Unexpected status: \#{response.status}" + end + EOF + ruby /tmp/basic_usage_test.rb + - name: Functional test with middleware + runs: | + cat < /tmp/functional_test_middleware.rb + require 'faraday' + require 'json' + + # Configure Faraday connection with a middleware + conn = Faraday.new(url: "https://httpbin.org") do |f| + f.request :url_encoded + f.adapter :net_http + end + + # Perform a POST request with some data + response = conn.post("/post") do |req| + req.headers['Content-Type'] = 'application/json' + req.body = { test_key: 'test_value' }.to_json + end + + # Parse the JSON response + parsed_body = JSON.parse(response.body) + + # Validate the response + if response.status == 200 && parsed_body["json"]["test_key"] == "test_value" + puts "Functional middleware test passed!" + else + raise "Functional middleware test failed." + end + EOF + ruby /tmp/functional_test_middleware.rb + +update: + enabled: true + github: + identifier: lostisland/faraday + strip-prefix: v + +var-transforms: + - from: ${{package.name}} + match: ^ruby(\d\.\d+)-.* + replace: $1 + to: rubyMM diff --git a/ruby4.0-faraday_middleware-aws-sigv4.yaml b/ruby4.0-faraday_middleware-aws-sigv4.yaml new file mode 100644 index 00000000000..1d0ae9fc6c7 --- /dev/null +++ b/ruby4.0-faraday_middleware-aws-sigv4.yaml @@ -0,0 +1,83 @@ +package: + name: ruby4.0-faraday_middleware-aws-sigv4 + version: 1.0.1 + epoch: 0 + description: Faraday middleware for AWS Signature Version 4 using aws-sigv4. + copyright: + - license: MIT + dependencies: + runtime: + - ruby${{vars.rubyMM}}-aws-sigv4 + - ruby${{vars.rubyMM}}-faraday + +environment: + contents: + packages: + - build-base + - busybox + - ca-certificates-bundle + - git + - ruby-${{vars.rubyMM}} + - ruby-${{vars.rubyMM}}-dev + +pipeline: + - uses: git-checkout + with: + expected-commit: 8637e57de564df2b163bc459119dcae5b9b222de + repository: https://github.com/winebarrel/faraday_middleware-aws-sigv4 + tag: v${{package.version}} + + - uses: ruby/build + with: + gem: ${{vars.gem}} + + - uses: ruby/install + with: + gem: ${{vars.gem}} + version: ${{package.version}} + + - uses: ruby/clean + +vars: + gem: faraday_middleware-aws-sigv4 + +update: + enabled: true + github: + identifier: winebarrel/faraday_middleware-aws-sigv4 + strip-prefix: v + use-tag: true + +test: + environment: + contents: + packages: + - ruby${{vars.rubyMM}}-net-http + pipeline: + - runs: ruby -e "require 'faraday_middleware/aws_sigv4'; puts 'faraday_middleware/aws_sigv4 loaded successfully!'" + - runs: | + ruby <<-EOF + require 'faraday' + require 'faraday_middleware/aws_sigv4' + + # Test the middleware by configuring a Faraday connection + begin + conn = Faraday.new(url: 'https://example.com') do |f| + f.request :aws_sigv4, + service: 's3', + region: 'us-east-1', + access_key_id: 'fake_access_key', + secret_access_key: 'fake_secret_key' + end + + puts "Faraday connection configured successfully with AWS SigV4 middleware!" + rescue StandardError => e + raise "Test failed with error: #{e.message}" + end + EOF + +var-transforms: + - from: ${{package.name}} + match: ^ruby(\d\.\d+)-.* + replace: $1 + to: rubyMM diff --git a/ruby4.0-ffi-compiler.yaml b/ruby4.0-ffi-compiler.yaml new file mode 100644 index 00000000000..b9e03bf1ddc --- /dev/null +++ b/ruby4.0-ffi-compiler.yaml @@ -0,0 +1,64 @@ +package: + name: ruby4.0-ffi-compiler + version: 1.3.2 + epoch: 0 + description: Ruby FFI Rakefile generator + copyright: + - license: Apache-2.0 + dependencies: + runtime: + - ruby${{vars.rubyMM}}-ffi + +environment: + contents: + packages: + - build-base + - busybox + - ca-certificates-bundle + - git + - ruby-${{vars.rubyMM}} + - ruby-${{vars.rubyMM}}-dev + +pipeline: + - uses: git-checkout + with: + repository: https://github.com/ffi/ffi-compiler + tag: ${{package.version}} + expected-commit: 1bd1547f721c17e976505f09dadf0a189f062eaa + + - uses: ruby/build + with: + gem: ${{vars.gem}} + + - uses: ruby/install + with: + gem: ${{vars.gem}} + version: ${{package.version}} + + - uses: ruby/clean + +vars: + gem: ffi-compiler + +test: + pipeline: + - runs: | + cat < test.rb + require 'ffi' + require 'ffi-compiler/loader' + EOF + ruby test.rb + +update: + enabled: true + github: + identifier: ffi/ffi-compiler + use-tag: true + ignore-regex-patterns: + - 2.0.0 + +var-transforms: + - from: ${{package.name}} + match: ^ruby(\d\.\d+)-.* + replace: $1 + to: rubyMM diff --git a/ruby4.0-ffi.yaml b/ruby4.0-ffi.yaml new file mode 100644 index 00000000000..6ee10dd717c --- /dev/null +++ b/ruby4.0-ffi.yaml @@ -0,0 +1,66 @@ +package: + name: ruby4.0-ffi + version: "1.17.2" + epoch: 0 + description: Ruby FFI + copyright: + - license: BSD-3-Clause AND MIT + +environment: + contents: + packages: + - autoconf + - automake + - build-base + - busybox + - ca-certificates-bundle + - libffi-dev + - libtool + - ruby${{vars.rubyMM}}-bundler + - ruby-${{vars.rubyMM}}-dev + +vars: + gem: ffi + +pipeline: + - uses: git-checkout + with: + expected-commit: f514862ec78b4b386741330691b3808ff27ada68 + repository: https://github.com/ffi/ffi.git + tag: v${{package.version}} + + - runs: | + git submodule update --init --recursive + # The generated files are required to package the gem + cd ext/ffi_c/libffi/ && autoreconf -i + + - uses: ruby/build + with: + gem: ${{vars.gem}} + + - uses: ruby/install + with: + gem: ${{vars.gem}} + version: ${{package.version}} + opts: -- --enable-system-libffi + + - uses: ruby/clean + +test: + pipeline: + - runs: | + ruby -e "require 'ffi'" + - uses: test/tw/ldd-check + +update: + enabled: true + github: + identifier: ffi/ffi + strip-prefix: v + use-tag: true + +var-transforms: + - from: ${{package.name}} + match: ^ruby(\d\.\d+)-.* + replace: $1 + to: rubyMM diff --git a/ruby4.0-fiber-annotation.yaml b/ruby4.0-fiber-annotation.yaml new file mode 100644 index 00000000000..edd5e00323c --- /dev/null +++ b/ruby4.0-fiber-annotation.yaml @@ -0,0 +1,114 @@ +package: + name: ruby4.0-fiber-annotation + version: 0.2.0 + epoch: 0 + description: A mechanism for annotating fibers. + copyright: + - license: MIT + +environment: + contents: + packages: + - build-base + - busybox + - ca-certificates-bundle + - git + - ruby-${{vars.rubyMM}} + - ruby-${{vars.rubyMM}}-dev + +pipeline: + - uses: git-checkout + with: + repository: https://github.com/ioquatix/fiber-annotation.git + tag: v${{package.version}} + expected-commit: 6e6ffb3d37dad74577e08e9800790f236b3302b2 + + - runs: | + sed -i '/signing_key/d' ${{vars.gem}}.gemspec + + - uses: ruby/build + with: + gem: ${{vars.gem}} + + - uses: ruby/install + with: + gem: ${{vars.gem}} + version: ${{package.version}} + + - uses: ruby/clean + +vars: + gem: fiber-annotation + +test: + pipeline: + - runs: ruby -e "require 'fiber/annotation'" + - name: Simple test + runs: | + gem install rspec + cat < /tmp/test.rb + require 'fiber/annotation' + require 'rspec' + require 'rspec/expectations' + include RSpec::Matchers + + describe Fiber do + context 'with .new' do + it "should be able to annotate a fiber" do + fiber = Fiber.new(annotation: "foo") do + expect(Fiber.current.annotation).to be == "foo" + end + + expect(fiber.annotation).to be == "foo" + expect(Fiber.current.annotation).to be == nil + end + end + + context 'with .annotate' do + it "should annotate the current fiber" do + Fiber.annotate("foo") + expect(Fiber.current.annotation).to be == "foo" + end + + it "should annotate the current fiber with a block" do + Fiber.annotate("foo") do + expect(Fiber.current.annotation).to be == "foo" + end + end + + it "should annotate the current fiber with a block and restore the previous annotation" do + Fiber.annotate("foo") do + Fiber.annotate("bar") do + expect(Fiber.current.annotation).to be == "bar" + end + expect(Fiber.current.annotation).to be == "foo" + end + end + + it "should annotate the current fiber with a block and restore the previous annotation even if an exception is raised" do + Fiber.annotate("foo") do + expect do + Fiber.annotate("bar") do + raise "baz" + end + end.to raise_exception(RuntimeError) + expect(Fiber.current.annotation).to be == "foo" + end + end + end + end + EOF + ruby /tmp/test.rb + +update: + enabled: true + github: + identifier: ioquatix/fiber-annotation + use-tag: true + strip-prefix: v + +var-transforms: + - from: ${{package.name}} + match: ^ruby(\d\.\d+)-.* + replace: $1 + to: rubyMM diff --git a/ruby4.0-fiber-local.yaml b/ruby4.0-fiber-local.yaml new file mode 100644 index 00000000000..aa6d6d35554 --- /dev/null +++ b/ruby4.0-fiber-local.yaml @@ -0,0 +1,67 @@ +package: + name: ruby4.0-fiber-local + version: 1.1.0 + epoch: 0 + description: Provides a class-level mixin to make fiber local state easy. + copyright: + - license: MIT + dependencies: + runtime: + - ruby${{vars.rubyMM}}-fiber-storage + - ruby-${{vars.rubyMM}} + +environment: + contents: + packages: + - build-base + - busybox + - ca-certificates-bundle + - git + - ruby-${{vars.rubyMM}} + - ruby-${{vars.rubyMM}}-dev + +vars: + gem: fiber-local + +pipeline: + - uses: git-checkout + with: + expected-commit: e2299f7a88c3336946e1c469cd086fd3350f5529 + repository: https://github.com/socketry/fiber-local + tag: v${{package.version}} + + - uses: ruby/build + with: + gem: ${{vars.gem}} + + - uses: ruby/install + with: + gem: ${{vars.gem}} + version: ${{package.version}} + + - uses: ruby/clean + + - uses: strip + +update: + enabled: true + github: + identifier: socketry/fiber-local + strip-prefix: v + use-tag: true + +test: + environment: + contents: + packages: + - ruby-${{vars.rubyMM}} + - ruby${{vars.rubyMM}}-bundler + pipeline: + - runs: | + gem list fiber-local + +var-transforms: + - from: ${{package.name}} + match: ^ruby(\d\.\d+)-.* + replace: $1 + to: rubyMM diff --git a/ruby4.0-fiber-storage.yaml b/ruby4.0-fiber-storage.yaml new file mode 100644 index 00000000000..de6173765fd --- /dev/null +++ b/ruby4.0-fiber-storage.yaml @@ -0,0 +1,135 @@ +package: + name: ruby4.0-fiber-storage + version: "1.0.1" + epoch: 0 + description: Provides a compatibility shim for fiber storage. + copyright: + - license: MIT + +environment: + contents: + packages: + - build-base + - busybox + - ca-certificates-bundle + - git + - ruby-${{vars.rubyMM}} + - ruby-${{vars.rubyMM}}-dev + +pipeline: + - uses: git-checkout + with: + repository: https://github.com/ioquatix/fiber-storage.git + tag: v${{package.version}} + expected-commit: 7071c47ded58b88bb1d202bac886d9d029aba23b + + - runs: sed -i '/signing_key/d' ${{vars.gem}}.gemspec + + - uses: ruby/build + with: + gem: ${{vars.gem}} + + - uses: ruby/install + with: + gem: ${{vars.gem}} + version: ${{package.version}} + + - uses: ruby/clean + +vars: + gem: fiber-storage + +test: + pipeline: + - runs: ruby -e "require 'fiber/storage'" + - name: Simple test + runs: | + gem install rspec + cat < /tmp/test.rb + require 'fiber/storage' + require 'rspec' + require 'rspec/expectations' + include RSpec::Matchers + + describe Fiber do + it "should be able to store data" do + Fiber.new(storage: {foo: :bar}) do + expect(Fiber[:foo]).to be == :bar + end.resume + end + + it "can inherit storage into child fibers" do + Fiber.new(storage: {foo: :bar}) do + Fiber.new do + expect(Fiber[:foo]).to be == :bar + end.resume + end.resume + end + + it "can override storage in child fibers" do + Fiber.new(storage: {foo: :bar}) do + Fiber.new(storage: {foo: :baz}) do + expect(Fiber[:foo]).to be == :baz + end.resume + end.resume + end + + it "can inherit storage by copy" do + storage = {foo: :bar} + + Fiber.new(storage: storage) do + Fiber.new(storage: true) do + expect(Fiber[:foo]).to be == :bar + Fiber[:foo] = :baz + end.resume + expect(Fiber[:foo]).to be == :bar + end.resume + end + + it "can assign to storage" do + Fiber.new do + Fiber.current.storage = {foo: :bar} + expect(Fiber[:foo]).to be == :bar + end.resume + end + + it "can set fiber storage" do + value = Fiber.new do + Fiber[:key] = :value + Fiber[:key] + end.resume + + expect(value).to be == :value + end + + it "can't use non-symbol keys" do + expect do + Fiber["key"] = :value + end.to raise_exception(TypeError) + end + + it "can use dynamic keys" do + key = :"#{self.object_id}.key" + value = Fiber.new do + Fiber[key] = :value + Fiber[key] + end.resume + + expect(value).to be == :value + end + end + EOF + ruby /tmp/test.rb + +update: + enabled: true + github: + identifier: ioquatix/fiber-storage + use-tag: true + strip-prefix: v + +var-transforms: + - from: ${{package.name}} + match: ^ruby(\d\.\d+)-.* + replace: $1 + to: rubyMM diff --git a/ruby4.0-filesize.yaml b/ruby4.0-filesize.yaml new file mode 100644 index 00000000000..ee6195be09e --- /dev/null +++ b/ruby4.0-filesize.yaml @@ -0,0 +1,94 @@ +# Generated from http://github.com/dominikh/filesize +package: + name: ruby4.0-filesize + version: 0.1.1 + epoch: 0 + description: filesize is a small class for handling filesizes with both the SI and binary prefixes, allowing conversion from any size to any other size. + copyright: + - license: MIT + +environment: + contents: + packages: + - build-base + - busybox + - ca-certificates-bundle + - git + - ruby-${{vars.rubyMM}} + - ruby-${{vars.rubyMM}}-dev + +pipeline: + - uses: git-checkout + with: + repository: https://github.com/dominikh/filesize + tag: v${{package.version}} + expected-commit: e401692c0dc4f9aa0e3ba316b243e7084ecb9472 + + - uses: patch + with: + patches: | + remove-has_rdoc-ruby4.0.patch + + - uses: ruby/build + with: + gem: ${{vars.gem}} + + - uses: ruby/install + with: + gem: ${{vars.gem}} + version: ${{package.version}} + + - uses: ruby/clean + +vars: + gem: filesize + +test: + environment: + contents: + packages: + - ruby-${{vars.rubyMM}} + pipeline: + - name: Verify gem installation + runs: | + gem list filesize + - name: Basic functionality test + runs: | + ruby -e ' + begin + require "filesize" + puts "Debug: Loading Filesize class..." + + # Create size object directly with bytes + bytes = Filesize.new(1024) + puts "Debug: Created Filesize object: " + bytes.inspect + + # Convert to KiB (binary kilobytes) since that is the default + kib = bytes.to("KiB") + puts "Debug: Converted to KiB: " + kib.inspect + + size = kib.to_f + puts "Debug: Final float value: " + size.to_s + + # Should be exactly 1.0 since 1024 bytes = 1 KiB + if size == 1.0 + puts "Test passed: 1024 B = 1 KiB" + exit 0 + else + raise "Test failed: Expected 1.0 KiB, got " + size.to_s + end + rescue => e + puts "Test failed with error: " + e.class.to_s + ": " + e.message + puts e.backtrace + exit 1 + end ' + +update: + enabled: false + exclude-reason: unmaintained, latest tag cut in 2018 + +var-transforms: + - from: ${{package.name}} + match: ^ruby(\d\.\d+)-.* + replace: $1 + to: rubyMM diff --git a/ruby4.0-fluent-config-regexp-type.yaml b/ruby4.0-fluent-config-regexp-type.yaml new file mode 100644 index 00000000000..5547038c908 --- /dev/null +++ b/ruby4.0-fluent-config-regexp-type.yaml @@ -0,0 +1,79 @@ +package: + name: ruby4.0-fluent-config-regexp-type + version: 1.0.0 + epoch: 0 + description: Backport regex type for fluentd + copyright: + - license: Apache-2.0 + dependencies: + runtime: + - ruby${{vars.rubyMM}}-fluentd + +environment: + contents: + packages: + - build-base + - busybox + - ca-certificates-bundle + - git + - ruby-${{vars.rubyMM}} + - ruby-${{vars.rubyMM}}-dev + +vars: + gem: fluent-config-regexp-type + +pipeline: + - uses: git-checkout + with: + expected-commit: 0f68084a0110405bb45743449dfbef6fbde203e6 + repository: https://github.com/okkez/fluent-config-regexp-type + tag: v${{package.version}} + + - uses: ruby/unlock-spec + + - uses: ruby/build + with: + gem: ${{vars.gem}} + + - uses: ruby/install + with: + gem: ${{vars.gem}} + version: ${{package.version}} + + - uses: ruby/clean + +test: + pipeline: + - runs: | + ruby -e ' + require "fluent/config/regexp_type" + + # Test timestamp pattern + regex = Fluent::Config::REGEXP_TYPE.call("/^\\d{4}-\\d{2}-\\d{2}/") + + # Should match + raise "Valid date (2024-11-23) failed to match" unless regex.match?("2024-11-23") + + # Should not match any of these + ["11-23-2024", "11-2-2024", "11-23-202", "202-11-23"].each do |invalid_date| + if regex.match?(invalid_date) + raise "Incorrectly matched #{invalid_date} which should not match pattern ^\\d{4}-\\d{2}-\\d{2}" + end + end + + puts "All tests passed!" + puts "Pattern matches yyyy-mm-dd format only" + ' + +update: + enabled: true + github: + identifier: okkez/fluent-config-regexp-type + strip-prefix: v + use-tag: true + +var-transforms: + - from: ${{package.name}} + match: ^ruby(\d\.\d+)-.* + replace: $1 + to: rubyMM diff --git a/ruby4.0-fluentd-1.17.yaml b/ruby4.0-fluentd-1.17.yaml new file mode 100644 index 00000000000..799ad801231 --- /dev/null +++ b/ruby4.0-fluentd-1.17.yaml @@ -0,0 +1,258 @@ +package: + # fluentd supported versions: https://github.com/fluent/fluentd/blob/master/SECURITY.md + name: ruby4.0-fluentd-1.17 + version: 1.17.1 + epoch: 0 + description: Fluentd is an open source data collector designed to scale and simplify log management. It can collect, process and ship many kinds of data in near real-time. + copyright: + - license: Apache-2.0 + dependencies: + runtime: + - merged-bin + - ruby${{vars.rubyMM}}-base64 + - ruby${{vars.rubyMM}}-bundler + - ruby${{vars.rubyMM}}-cool.io + - ruby${{vars.rubyMM}}-csv + - ruby${{vars.rubyMM}}-drb + - ruby${{vars.rubyMM}}-http_parser.rb + - ruby${{vars.rubyMM}}-msgpack + - ruby${{vars.rubyMM}}-serverengine + - ruby${{vars.rubyMM}}-sigdump + - ruby${{vars.rubyMM}}-strptime + - ruby${{vars.rubyMM}}-tzinfo + - ruby${{vars.rubyMM}}-tzinfo-data + - ruby${{vars.rubyMM}}-webrick + - ruby${{vars.rubyMM}}-yajl-ruby + - ruby-${{vars.rubyMM}} + - wolfi-baselayout + provides: + - ruby${{vars.rubyMM}}-fluentd=${{package.full-version}} + +environment: + contents: + packages: + - build-base + - busybox + - ca-certificates-bundle + - ruby-${{vars.rubyMM}} + - ruby-${{vars.rubyMM}}-dev + +vars: + gem: fluentd + +pipeline: + # This package makes use of `git ls-files` in its gemspec so the git repo + # must be checked out in order for the gem to build with all files. + - uses: git-checkout + with: + destination: ${{vars.gem}} + expected-commit: 78a7972bfe6b421f08472701f04f00515ed24bee + repository: https://github.com/fluent/fluentd.git + tag: v${{package.version}} + + - working-directory: ${{vars.gem}} + pipeline: + - uses: ruby/build + with: + gem: ${{vars.gem}} + - uses: ruby/install + with: + gem: ${{vars.gem}} + version: ${{package.version}} + + - uses: ruby/clean + + - runs: | + GEM_DIR=${{targets.destdir}}$(ruby -e 'puts Gem.default_dir')/gems/${{vars.gem}}-${{package.version}} + rm -rf ${GEM_DIR}/test \ + ${GEM_DIR}/docs \ + ${GEM_DIR}/*.md \ + ${GEM_DIR}/.github + +subpackages: + - name: ${{package.name}}-logging-operator-compat + description: Entrypoint used by the logging operator image + dependencies: + runtime: + - busybox + - merged-bin + - wolfi-baselayout + pipeline: + - runs: | + git clone https://github.com/kube-logging/fluentd-images.git --depth 1 + cd fluentd-images + cd v${{vars.major-minor-version}}-* + install -Dm755 ./entrypoint.sh "${{targets.subpkgdir}}/usr/bin/entrypoint.sh" + install -Dm755 ./healthy.sh "${{targets.subpkgdir}}/usr/bin/healthy.sh" + install -Dm644 ./fluent.conf "${{targets.subpkgdir}}/fluentd/etc/fluent.conf" + + - name: ${{package.name}}-iamguarded-compat + description: Compatibility package for iamguarded variant of fluentd + dependencies: + runtime: + - bash + - coreutils + - findutils + - gawk + - grep + - posix-libc-utils + - procps + - sed + - ruby${{vars.rubyMM}}-rest-client + - ruby${{vars.rubyMM}}-jsonpath + - ruby${{vars.rubyMM}}-jmespath + - ruby${{vars.rubyMM}}-elasticsearch + provides: + - ruby${{vars.rubyMM}}-fluentd-iamguarded-compat=${{package.full-version}} + pipeline: + - uses: iamguarded/build-compat + with: + package: fluentd + version: ${{vars.major-version}} + - runs: | + mkdir -p /opt/iamguarded/fluentd/bin + + # binaries to symlink that provide + for bin in \ + bundle bundler \ + fluent-binlog-reader fluent-ca-generate fluent-cap-ctl fluent-cat fluent-ctl fluent-debug fluent-gem fluent-plugin-config-format fluent-plugin-generate \ + fluentd rake \ + restclient jsonpath jmespath.rb elastic_ruby_console \ + ; do + ln -s /usr/bin/$bin /opt/iamguarded/fluentd/bin/$bin + done + + cp fluentd/LICENSE /opt/iamguarded/licenses/LICENSE + - uses: iamguarded/finalize-compat + with: + package: fluentd + version: ${{vars.major-version}} + test: + environment: + contents: + packages: + - ${{package.name}} + pipeline: + - uses: iamguarded/test-compat + with: + package: fluentd + version: ${{vars.major-version}} + - runs: | + run-script --version + run-script --help + + for bin in \ + bundle bundler \ + fluent-binlog-reader fluent-ca-generate fluent-cap-ctl fluent-cat fluent-ctl fluent-debug fluent-gem fluent-plugin-config-format fluent-plugin-generate \ + fluentd rake \ + restclient jsonpath jmespath.rb elastic_ruby_console \ + ; do + stat -L /opt/iamguarded/fluentd/bin/$bin + done + +update: + enabled: true + github: + identifier: fluent/fluentd + strip-prefix: v + tag-filter: v1.17. + +test: + pipeline: + # Keep existing daemon test + - name: Daemon test + uses: test/daemon-check-output + with: + start: /usr/bin/fluentd + setup: | + mkdir -p /etc/fluent/ + touch /etc/fluent/fluent.conf + expected_output: fluentd worker is now running + # Keep command line tests + - name: Command line tests + runs: | + fluent-binlog-reader --version + fluent-ca-generate --version + fluent-ca-generate --help + fluent-cat --version + fluent-cat --help + fluent-ctl --version + fluent-ctl --help + fluent-debug --help + fluent-gem --version + fluent-gem --help + fluent-plugin-config-format --version + fluent-plugin-config-format --help + fluent-plugin-generate --version + fluent-plugin-generate --help + fluentd --version + fluentd --help + - name: Basic IO test + runs: | + # Create minimal config + cat > test.conf < + log_level debug + + + + @type forward + port 24224 + + + + @type file + path /tmp/fluentd_test + append true + + flush_mode immediate + + + EOF + + # Start fluentd with logs + fluentd -c test.conf -d /tmp/fluentd.pid --log /tmp/fluentd.log + + # Wait for start + sleep 5 + + # Send test message with specific content + echo '{"message":"test_message_content"}' | fluent-cat test.tag + + # Wait for processing + sleep 5 + + # Check output files and content + if ls /tmp/fluentd_test.*.log > /dev/null 2>&1; then + OUTPUT=$(cat /tmp/fluentd_test.*.log) + echo "Output file contents: $OUTPUT" + + if echo "$OUTPUT" | grep -q "test_message_content"; then + echo "Test passed: Message content verified" + else + echo "Test failed: Expected message content not found" + exit 1 + fi + else + echo "Test failed: No output file" + echo "Fluentd logs:" + cat /tmp/fluentd.log + exit 1 + fi + + # Cleanup + kill $(cat /tmp/fluentd.pid) + +var-transforms: + - from: ${{package.name}} + match: ^ruby(\d\.\d+)-.* + replace: $1 + to: rubyMM + - from: ${{package.version}} + match: ^(\d+)\.\d+\.\d+$ + replace: "$1" + to: major-version + - from: ${{package.version}} + match: ^(\d+\.\d+).* + replace: $1 + to: major-minor-version diff --git a/ruby4.0-fluentd-kubernetes-daemonset-1.19.yaml b/ruby4.0-fluentd-kubernetes-daemonset-1.19.yaml new file mode 100644 index 00000000000..29e583c2b84 --- /dev/null +++ b/ruby4.0-fluentd-kubernetes-daemonset-1.19.yaml @@ -0,0 +1,145 @@ +package: + # fluentd supported versions: https://github.com/fluent/fluentd/blob/master/SECURITY.md + # The kubernetes daemonset trails fluentd releases by a bit + name: ruby4.0-fluentd-kubernetes-daemonset-1.19 + version: "1.19.1.1.0" + epoch: 0 + description: Fluentd ${{vars.fluentdMM}} daemonset for Kubernetes + copyright: + - license: Apache-2.0 + +environment: + contents: + packages: + - autoconf + - automake + - bash + - build-base + - busybox + - ca-certificates-bundle + - libtool + - m4 + - ruby${{vars.rubyMM}}-bundler + - ruby-${{vars.rubyMM}}-dev + - snappy-dev + +var-transforms: + - from: ${{package.name}} + match: .*-(\d+\.\d+) + replace: $1 + to: fluentdMM + - from: ${{package.name}} + match: ^ruby(\d\.\d+)-.* + replace: $1 + to: rubyMM + - from: ${{package.version}} + match: ^(\d+\.\d+\.\d+)\.(\d+\.\d+) + replace: $1-$2 + to: mangled-package-version + +data: + - name: plugins + items: + kinesis: + +pipeline: + - uses: git-checkout + with: + expected-commit: b7eebe4d7fe8118c0929febe67314e11146356fe + repository: https://github.com/fluent/fluentd-kubernetes-daemonset.git + tag: v${{vars.mangled-package-version}} + +subpackages: + - range: plugins + name: ${{package.name}}-${{range.key}} + description: Fluentd kubernetes daemonset for ${{range.key}} + options: + no-depends: true + no-provides: true + dependencies: + runtime: + - ca-certificates + - ruby-${{vars.rubyMM}} + - tini + - libsystemd + - libsystemd-shared + - libudev + - libcurl-openssl4 + - libffi + - systemd + pipeline: + - working-directory: ./docker-image/v${{vars.fluentdMM}}/debian-${{range.key}} + runs: | + # Mitigates CVE-2024-49761, CVE-2024-39908, CVE-2024-41946, CVE-2024-41123, CVE-2024-43398 + sed -i 's/rexml (3\.2\.9)/rexml (3.4.2)/' Gemfile.lock + + # Install bundle + mkdir -p ${{targets.contextdir}}/fluentd/vendor/bundle + bundle config silence_root_warning true + bundle config set path ${{targets.contextdir}}/fluentd/vendor/bundle + bundle config set clean 'true' + bundle config set deployment 'true' + # --retry doesn't seem to help with network issues, completely rerun the command + if ! bundle install --gemfile ./Gemfile --jobs $(nproc); then + bundle install --gemfile ./Gemfile --jobs $(nproc) + fi + bundle config unset path + + # Copy gemfile + mkdir -p ${{targets.contextdir}}/fluentd + cp ./Gemfile ${{targets.contextdir}}/fluentd/Gemfile + + # Copy configuration + mkdir -p ${{targets.contextdir}}/fluentd/etc + cp -r ./conf/* ${{targets.contextdir}}/fluentd/etc + touch ${{targets.contextdir}}/fluentd/etc/disable.conf + + # Create log directory + mkdir -p ${{targets.contextdir}}/fluentd/log + + # Copy plugins + mkdir -p ${{targets.contextdir}}/fluentd/plugins + cp -r ./plugins/* ${{targets.contextdir}}/fluentd/plugins + + # Copy entrypoint + cp entrypoint.sh ${{targets.contextdir}}/fluentd/entrypoint.sh + test: + environment: + environment: + FLUENTD_CONF: "fluent.conf" + FLUENTD_DISABLE_BUNDLER_INJECTION: 1 + KUBERNETES_SERVICE_HOST: "127.0.0.1" + KUBERNETES_SERVICE_PORT: 32764 + pipeline: + - uses: test/tw/ldd-check + - uses: test/kwok/cluster + # Just make sure the config is okay, kwok doesn't get us very far + - uses: test/daemon-check-output + with: + start: | + sh -c " + export GEM_PATH="/fluentd/vendor/bundle/ruby/$(basename $(gem env home))" + export GEM_HOME="/fluentd/vendor/bundle/ruby/$(basename $(gem env home))" + /fluentd/vendor/bundle/ruby/$(basename $(gem env home))/bin/fluentd -c /fluentd/etc/${FLUENTD_CONF} -p /fluentd/plugins --gemfile /fluentd/Gemfile --help + /fluentd/vendor/bundle/ruby/$(basename $(gem env home))/bin/fluentd -c /fluentd/etc/${FLUENTD_CONF} -p /fluentd/plugins --gemfile /fluentd/Gemfile --version + " + timeout: 10 + expected_output: "Usage: fluentd" + +update: + enabled: true + version-transform: + - match: '_' + replace: '.' + - match: '-' + replace: '.' + github: + identifier: fluent/fluentd-kubernetes-daemonset + strip-prefix: v + tag-filter: v1.19. + use-tag: true + +# Based on package contents inspection, it was found that this origin package is empty apart from its own SBOM and this test was added to confirm it is empty and will fail if the package is no longer empty (contains more than an SBOM) +test: + pipeline: + - uses: test/emptypackage diff --git a/ruby4.0-gems.yaml b/ruby4.0-gems.yaml new file mode 100644 index 00000000000..4c113618305 --- /dev/null +++ b/ruby4.0-gems.yaml @@ -0,0 +1,80 @@ +# Generated from https://github.com/rubygems/gems +package: + name: ruby4.0-gems + version: 1.3.0 + epoch: 0 + description: Ruby wrapper for the RubyGems.org API + copyright: + - license: MIT + +environment: + contents: + packages: + - build-base + - busybox + - ca-certificates-bundle + - git + - ruby-${{vars.rubyMM}} + - ruby-${{vars.rubyMM}}-dev + +pipeline: + - uses: git-checkout + with: + expected-commit: 4106516c2530187f56e951d264d23e26559b91ab + repository: https://github.com/rubygems/gems + tag: v${{package.version}} + + - uses: ruby/build + with: + gem: ${{vars.gem}} + + - uses: ruby/install + with: + gem: ${{vars.gem}} + version: ${{package.version}} + + - uses: ruby/clean + +vars: + gem: gems + +test: + pipeline: + - name: Verify library import + runs: ruby -e "require 'gems'" + - name: Basic usage + runs: | + cat < /tmp/test.rb + require 'gems' + print Gems.info 'rails' + EOF + ruby /tmp/test.rb + - name: Basic functionality test + runs: | + ruby -e ' + require "gems" + require "json" + + # Test search functionality + result = Gems.search("rake") + raise "Search failed" unless result.is_a?(Array) && !result.empty? + + # Test version info + versions = Gems.versions("rake") + raise "Version lookup failed" unless versions.is_a?(Array) && !versions.empty? + + puts "Tests passed - got valid responses for search and versions" + ' + +update: + enabled: true + github: + identifier: rubygems/gems + strip-prefix: v + use-tag: true + +var-transforms: + - from: ${{package.name}} + match: ^ruby(\d\.\d+)-.* + replace: $1 + to: rubyMM diff --git a/ruby4.0-hashie.yaml b/ruby4.0-hashie.yaml new file mode 100644 index 00000000000..69faa078624 --- /dev/null +++ b/ruby4.0-hashie.yaml @@ -0,0 +1,88 @@ +# Generated from https://github.com/hashie/hashie +package: + name: ruby4.0-hashie + version: "5.1.0" + epoch: 0 + description: Hashie is a collection of classes and mixins that make hashes more powerful. + copyright: + - license: MIT + +environment: + contents: + packages: + - build-base + - busybox + - ca-certificates-bundle + - git + - ruby-${{vars.rubyMM}} + - ruby-${{vars.rubyMM}}-dev + +pipeline: + - uses: git-checkout + with: + expected-commit: ce222626968829c865731d474fdcec46bda2c779 + repository: https://github.com/hashie/hashie + tag: v${{package.version}} + + - uses: ruby/build + with: + gem: ${{vars.gem}} + + - uses: ruby/install + with: + gem: ${{vars.gem}} + version: ${{package.version}} + + - uses: ruby/clean + +vars: + gem: hashie + +test: + pipeline: + - name: Verify library import + runs: ruby -e "require 'hashie'" + - name: Basic functionality test + runs: | + ruby -e ' + require "hashie" + + # Test Mash functionality + mash = Hashie::Mash.new + mash.name = "Test" + mash.info = { lang: "Ruby" } + + raise "Basic assignment failed" unless mash.name == "Test" + raise "Nested hash failed" unless mash.info.lang == "Ruby" + + # Test indifferent access + mash[:test_key] = "value" + raise "Indifferent access failed" unless mash["test_key"] == "value" && mash.test_key == "value" + + # Test key deletion + mash.delete(:test_key) + raise "Delete failed" if mash.key?(:test_key) + + # Test default values + mash.default = "not found" + raise "Default value failed" unless mash.missing == "not found" + + # Test merge + other = Hashie::Mash.new(a: 1, b: 2) + merged = mash.merge(other) + raise "Merge failed" unless merged.a == 1 && merged.info.lang == "Ruby" + + puts "All tests passed!" + ' + +update: + enabled: true + github: + identifier: hashie/hashie + strip-prefix: v + +var-transforms: + - from: ${{package.name}} + match: ^ruby(\d\.\d+)-.* + replace: $1 + to: rubyMM diff --git a/ruby4.0-http-accept.yaml b/ruby4.0-http-accept.yaml new file mode 100644 index 00000000000..0a7611ea37a --- /dev/null +++ b/ruby4.0-http-accept.yaml @@ -0,0 +1,82 @@ +# Generated from https://github.com/ioquatix/http-accept +package: + name: ruby4.0-http-accept + version: 2.2.1 + epoch: 0 + description: Parse Accept and Accept-Language HTTP headers. + copyright: + - license: MIT + dependencies: + runtime: + - ruby-${{vars.rubyMM}} + +environment: + contents: + packages: + - build-base + - busybox + - ca-certificates-bundle + - git + - ruby-${{vars.rubyMM}} + - ruby-${{vars.rubyMM}}-dev + +pipeline: + - uses: git-checkout + with: + repository: https://github.com/socketry/http-accept.git + tag: v${{package.version}} + expected-commit: fb4fabbf2e95e097147c3580fe061638fc7bcb3f + + - runs: | + sed -i '/signing_key/d' http-accept.gemspec + + - uses: ruby/build + with: + gem: ${{vars.gem}} + + - uses: ruby/install + with: + gem: ${{vars.gem}} + version: ${{package.version}} + + - uses: ruby/clean + +vars: + gem: http-accept + +test: + pipeline: + - runs: ruby -e "require 'http/accept'" + - name: Simple test + runs: | + gem install rspec + cat < /tmp/test.rb + require 'http/accept' + + require 'rspec/expectations' + include RSpec::Matchers + + media_types = HTTP::Accept::MediaTypes.parse("text/html;q=0.5, application/json; version=1") + expect(media_types[0].mime_type).to be == "application/json" + expect(media_types[0].parameters).to be == {'version' => '1'} + expect(media_types[1].mime_type).to be == "text/html" + expect(media_types[1].parameters).to be == {'q' => '0.5'} + + languages = HTTP::Accept::Languages.parse("da, en-gb;q=0.8, en;q=0.7") + expect(languages[0].locale).to be == "da" + expect(languages[1].locale).to be == "en-gb" + expect(languages[2].locale).to be == "en" + EOF + ruby /tmp/test.rb + +update: + enabled: true + github: + identifier: socketry/http-accept + strip-prefix: v + +var-transforms: + - from: ${{package.name}} + match: ^ruby(\d\.\d+)-.* + replace: $1 + to: rubyMM diff --git a/ruby4.0-http-cookie.yaml b/ruby4.0-http-cookie.yaml new file mode 100644 index 00000000000..645644984d7 --- /dev/null +++ b/ruby4.0-http-cookie.yaml @@ -0,0 +1,95 @@ +# Generated from https://github.com/sparklemotion/http-cookie +package: + name: ruby4.0-http-cookie + version: "1.1.0" + epoch: 0 + description: HTTP::Cookie is a Ruby library to handle HTTP Cookies based on RFC 6265. It has with security, standards compliance and compatibility in mind, to behave just the same as today's major web browsers. It has builtin support for the legacy cookies.txt and the latest cookies.sqlite formats of Mozilla Firefox, and its modular API makes it easy to add support for a new backend store. + copyright: + - license: MIT + dependencies: + runtime: + - ruby${{vars.rubyMM}}-domain_name + - ruby-${{vars.rubyMM}} + +environment: + contents: + packages: + - build-base + - busybox + - ca-certificates-bundle + - git + - ruby-${{vars.rubyMM}} + - ruby-${{vars.rubyMM}}-dev + +pipeline: + - uses: git-checkout + with: + repository: https://github.com/sparklemotion/http-cookie.git + tag: v${{package.version}} + expected-commit: e5b73f3b0a3331a6591a928c1ad49dbe3aed4065 + + - uses: ruby/build + with: + gem: ${{vars.gem}} + + - uses: ruby/install + with: + gem: ${{vars.gem}} + version: ${{package.version}} + + - uses: ruby/clean + +vars: + gem: http-cookie + +test: + pipeline: + - runs: ruby -e "require 'http/cookie'" + - name: Simple test + runs: | + cat < /tmp/test.rb + require 'http/cookie' + + # Smoke test for http-cookie + def smoke_test_http_cookie + begin + # Create a cookie jar + jar = HTTP::CookieJar.new + + # Set a cookie + cookie = HTTP::Cookie.new( + name: 'test_cookie', + value: 'test_value', + domain: 'example.com', + path: '/' + ) + jar.add(cookie) + + # Retrieve the cookie + retrieved_cookie = jar.cookies('http://example.com').find { |c| c.name == 'test_cookie' } + + # Validate the cookie + if retrieved_cookie && retrieved_cookie.value == 'test_value' + puts "Smoke test passed: Cookie set and retrieved successfully." + else + puts "Smoke test failed: Cookie retrieval mismatch." + end + rescue => e + puts "Smoke test failed: Exception occurred - #{e.message}" + end + end + smoke_test_http_cookie + EOF + ruby /tmp/test.rb + +update: + enabled: true + github: + identifier: sparklemotion/http-cookie + strip-prefix: v + +var-transforms: + - from: ${{package.name}} + match: ^ruby(\d\.\d+)-.* + replace: $1 + to: rubyMM diff --git a/ruby4.0-http-form_data.yaml b/ruby4.0-http-form_data.yaml new file mode 100644 index 00000000000..67cf6ae8d81 --- /dev/null +++ b/ruby4.0-http-form_data.yaml @@ -0,0 +1,69 @@ +package: + name: ruby4.0-http-form_data + version: 2.3.0 + epoch: 0 + description: Utility-belt to build form data request bodies. + copyright: + - license: MIT + +environment: + contents: + packages: + - build-base + - busybox + - ca-certificates-bundle + - git + - ruby-${{vars.rubyMM}} + - ruby-${{vars.rubyMM}}-dev + +vars: + gem: http-form_data + +pipeline: + - uses: git-checkout + with: + repository: https://github.com/httprb/form_data + tag: v${{package.version}} + expected-commit: f2c7c13882f7a3f6afd5a6beb075223237647ff5 + + - uses: ruby/build + with: + gem: ${{vars.gem}} + + - uses: ruby/install + with: + gem: ${{vars.gem}} + version: ${{package.version}} + + - uses: ruby/clean + +test: + pipeline: + - runs: ruby -e "require 'http/form_data'" + - name: Parse URI + runs: | + touch null.txt + cat < /tmp/test.rb + require 'http/form_data' + form_data = HTTP::FormData.create({ + :username => "Wolfi", + :avatar_file => HTTP::FormData::File.new("null.txt") + }) + raise 'Form data creation failed' unless form_data.is_a?(HTTP::FormData::Multipart) + raise 'Unexpected content type' unless form_data.content_type.start_with?('multipart/form-data') + puts 'All tests passed!' + EOF + ruby /tmp/test.rb + +update: + enabled: true + github: + identifier: httprb/form_data + strip-prefix: v + use-tag: true + +var-transforms: + - from: ${{package.name}} + match: ^ruby(\d\.\d+)-.* + replace: $1 + to: rubyMM diff --git a/ruby4.0-http.yaml b/ruby4.0-http.yaml new file mode 100644 index 00000000000..d81bec06aea --- /dev/null +++ b/ruby4.0-http.yaml @@ -0,0 +1,86 @@ +package: + name: ruby4.0-http + version: "5.3.1" + epoch: 0 + description: An easy-to-use client library for making requests from Ruby. It uses a simple method chaining system for building requests, similar to Python's Requests. + copyright: + - license: MIT + dependencies: + runtime: + - ruby${{vars.rubyMM}}-addressable + - ruby${{vars.rubyMM}}-base64 + - ruby${{vars.rubyMM}}-http-cookie + - ruby${{vars.rubyMM}}-http-form_data + - ruby${{vars.rubyMM}}-llhttp + +environment: + contents: + packages: + - build-base + - busybox + - ca-certificates-bundle + - git + - ruby-${{vars.rubyMM}} + - ruby-${{vars.rubyMM}}-dev + +pipeline: + - uses: git-checkout + with: + repository: https://github.com/httprb/http + tag: v${{package.version}} + expected-commit: 36a8d72a7e8704750edb203f79516b2fca8dba0d + + - uses: ruby/build + with: + gem: ${{vars.gem}} + + - uses: ruby/install + with: + gem: ${{vars.gem}} + version: ${{package.version}} + + - uses: ruby/clean + +vars: + gem: http + +test: + pipeline: + - runs: ruby -e "require 'http'" + - name: Basic HTTP request parsing + runs: | + cat < /tmp/test.rb + require "http" + HTTP.get("https://github.com").to_s + EOF + ruby /tmp/test.rb + - name: Functional test with POST request + runs: | + cat < /tmp/functional_test.rb + require "http" + + # Perform a POST request to httpbin.org + response = HTTP.post("https://httpbin.org/post", json: { key: "value" }) + + # Validate the response + raise "Unexpected status code" unless response.status == 200 + + body = response.parse(:json) + raise "Unexpected response body" unless body["json"]["key"] == "value" + + puts "Functional test passed!" + EOF + ruby /tmp/functional_test.rb + +update: + enabled: true + github: + identifier: httprb/http + strip-prefix: v + use-tag: true + +var-transforms: + - from: ${{package.name}} + match: ^ruby(\d\.\d+)-.* + replace: $1 + to: rubyMM diff --git a/ruby4.0-http_parser.rb.yaml b/ruby4.0-http_parser.rb.yaml new file mode 100644 index 00000000000..3c7fc33f9ae --- /dev/null +++ b/ruby4.0-http_parser.rb.yaml @@ -0,0 +1,119 @@ +package: + name: ruby4.0-http_parser.rb + version: "0.8.1" + epoch: 0 + description: Ruby bindings to https://github.com/joyent/http-parser and https://github.com/http-parser/http-parser.java + copyright: + - license: MIT + dependencies: + runtime: + - ruby-${{vars.rubyMM}} + +environment: + contents: + packages: + - build-base + - busybox + - ca-certificates-bundle + - git + - ruby-${{vars.rubyMM}} + - ruby-${{vars.rubyMM}}-dev + +vars: + gem: http_parser.rb + +pipeline: + # This package makes use of `git ls-files` in it's gemspec so the git repo + # must be checked out in order for the gem to build with all files. + # + # This package also makes use of git submodules which requires the git repo + - uses: git-checkout + with: + destination: ${{vars.gem}} + expected-commit: 944979d33c63a4dccafd4b2dca1dcca9f7608fb9 + repository: https://github.com/tmm1/http_parser.rb.git + tag: v${{package.version}} + + - working-directory: ${{vars.gem}} + pipeline: + - runs: |- + git submodule init ext/ + git submodule update ext/ + - uses: ruby/build + with: + gem: ${{vars.gem}} + - uses: ruby/install + with: + gem: ${{vars.gem}} + version: ${{package.version}} + - uses: ruby/clean + +test: + environment: + contents: + packages: + - ruby-${{vars.rubyMM}} + pipeline: + - name: Verify gem installation + runs: gem list http_parser.rb + - name: Basic import test + runs: | + ruby <<-EOF + begin + require 'http/parser' + puts "Basic import test passed! HTTP::Parser loaded successfully." + rescue LoadError => e + puts "Basic import test failed: #{e.message}" + exit 1 + end + EOF + - name: Expanded functionality test + runs: | + ruby <<-EOF + require 'http/parser' + + # Create a basic HTTP parser and parse a simple request + begin + parser = HTTP::Parser.new + parsed_headers = {} + + # Define callbacks for parsing events + parser.on_headers_complete = proc do |headers| + parsed_headers.merge!(headers) + puts "Headers parsed successfully!" + end + parser.on_message_complete = proc { puts "Message parsed successfully!" } + + # Feed the parser with a simple HTTP request + request = "GET /path/to/resource HTTP/1.1\r\n" \ + "Host: example.com\r\n" \ + "User-Agent: TestAgent\r\n\r\n" + parser << request + + # Validate parsing results + raise "Unexpected HTTP method" unless parser.http_method == "GET" + raise "Unexpected request URL" unless parser.request_url == "/path/to/resource" + raise "Unexpected HTTP version" unless parser.http_version == [1, 1] + raise "Unexpected Host header" unless parsed_headers["Host"] == "example.com" + raise "Unexpected User-Agent header" unless parsed_headers["User-Agent"] == "TestAgent" + + puts "Expanded functionality test passed with valid results!" + rescue => e + puts "Test failed: #{e.message}" + exit 1 + end + EOF + - uses: test/tw/ldd-check + +update: + enabled: true + github: + identifier: tmm1/http_parser.rb + strip-prefix: v + use-tag: true + +var-transforms: + - from: ${{package.name}} + match: ^ruby(\d\.\d+)-.* + replace: $1 + to: rubyMM diff --git a/ruby4.0-i18n.yaml b/ruby4.0-i18n.yaml new file mode 100644 index 00000000000..b1321e8775c --- /dev/null +++ b/ruby4.0-i18n.yaml @@ -0,0 +1,71 @@ +package: + name: ruby4.0-i18n + version: "1.14.8" + epoch: 0 + description: New wave Internationalization support for Ruby. + copyright: + - license: MIT + dependencies: + runtime: + - ruby${{vars.rubyMM}}-concurrent-ruby + +environment: + contents: + packages: + - build-base + - busybox + - ca-certificates-bundle + - git + - ruby-${{vars.rubyMM}} + - ruby-${{vars.rubyMM}}-dev + +pipeline: + - uses: git-checkout + with: + expected-commit: f2fb6a5766dee835082eb74ee83f52e0a6479573 + repository: https://github.com/ruby-i18n/i18n + tag: v${{package.version}} + + - uses: ruby/build + with: + gem: ${{vars.gem}} + + - uses: ruby/install + with: + gem: ${{vars.gem}} + version: ${{package.version}} + + - uses: ruby/clean + +vars: + gem: i18n + +test: + pipeline: + - runs: ruby -e "require 'i18n'" + - name: Basic translation test + runs: | + ruby <<-EOF + require 'i18n' + + # Create a translation directly in memory + I18n.backend.store_translations(:en, hello: "Hello, %{name}!") + + # Test translation + greeting = I18n.t('hello', name: 'World') + raise "Translation test failed!" unless greeting == "Hello, World!" + + puts "Basic translation test passed!" + EOF + +update: + enabled: true + github: + identifier: ruby-i18n/i18n + strip-prefix: v + +var-transforms: + - from: ${{package.name}} + match: ^ruby(\d\.\d+)-.* + replace: $1 + to: rubyMM diff --git a/ruby4.0-io-console.yaml b/ruby4.0-io-console.yaml new file mode 100644 index 00000000000..cb02cc7f5f6 --- /dev/null +++ b/ruby4.0-io-console.yaml @@ -0,0 +1,91 @@ +# Generated from https://github.com/ruby/io-console +package: + name: ruby4.0-io-console + version: "0.8.2" + epoch: 0 + description: add console capabilities to IO instances. + copyright: + - license: Ruby + - license: BSD-2-Clause + dependencies: + runtime: + - ruby-${{vars.rubyMM}} + +environment: + contents: + packages: + - build-base + - busybox + - ca-certificates-bundle + - git + - ruby-${{vars.rubyMM}} + - ruby-${{vars.rubyMM}}-dev + +pipeline: + - uses: git-checkout + with: + repository: https://github.com/ruby/io-console.git + tag: v${{package.version}} + expected-commit: fbc7e1f31f1fc2cf21baf96a845bfdbc88e47f95 + + - uses: ruby/build + with: + gem: ${{vars.gem}} + + - uses: ruby/install + with: + gem: ${{vars.gem}} + version: ${{package.version}} + + - uses: ruby/clean + +vars: + gem: io-console + +test: + pipeline: + - name: Verify gem installation + runs: | + gem list io-console + - name: Test core functionality + runs: | + ruby -e ' + begin + require "io/console" + + # Test basic require works + puts "Loaded io/console successfully" + + # Test core methods + [:tty?, :winsize, :winsize=].each do |method| + unless IO.instance_methods.include?(method) + raise "Missing IO method: #{method}" + end + end + + # Test STDIN responds to console methods + unless STDIN.respond_to?(:tty?) + raise "STDIN missing tty? method" + end + + puts "Core functionality verified" + exit 0 + rescue => e + puts "Test failed: #{e.class}: #{e.message}" + puts e.backtrace + exit 1 + end + ' + - uses: test/tw/ldd-check + +update: + enabled: true + github: + identifier: ruby/io-console + strip-prefix: v + +var-transforms: + - from: ${{package.name}} + match: ^ruby(\d\.\d+)-.* + replace: $1 + to: rubyMM diff --git a/ruby4.0-io-endpoint.yaml b/ruby4.0-io-endpoint.yaml new file mode 100644 index 00000000000..a88dbb04973 --- /dev/null +++ b/ruby4.0-io-endpoint.yaml @@ -0,0 +1,105 @@ +package: + name: ruby4.0-io-endpoint + version: "0.16.0" + epoch: 0 + description: A Ruby gem providing endpoint abstractions for network clients and servers. + copyright: + - license: MIT + dependencies: + runtime: + - ruby-${{vars.rubyMM}} + +environment: + contents: + packages: + - build-base + - busybox + - ca-certificates-bundle + - git + - ruby-${{vars.rubyMM}} + - ruby-${{vars.rubyMM}}-dev + +pipeline: + - uses: git-checkout + with: + expected-commit: 7ceb15458a63156581aee44bdd84d4a951de74c4 + repository: https://github.com/socketry/io-endpoint + tag: v${{package.version}} + + - uses: ruby/build + with: + gem: ${{vars.gem}} + + - uses: ruby/install + with: + gem: ${{vars.gem}} + version: ${{package.version}} + + - uses: ruby/clean + +vars: + gem: io-endpoint + +test: + environment: + contents: + packages: + - ruby-${{vars.rubyMM}} + - ruby${{vars.rubyMM}}-async + - ruby${{vars.rubyMM}}-async-io + - ruby${{vars.rubyMM}}-io-stream + pipeline: + - runs: | + ruby <<-EOF + require 'io/endpoint' + require 'async' + require 'async/io' + require 'test/unit' + include Test::Unit::Assertions + class TestIOEndpoint < Test::Unit::TestCase + def test_tcp_endpoint + host = "127.0.0.1" + port = 9292 + # Define a simple TCP endpoint + server_endpoint = Async::IO::Endpoint.tcp(host, port) + # Start Async reactor + Async do |task| + # Server task: listens and responds to connections + server_task = task.async do + server_endpoint.accept do |socket| + socket.write("Hello from TCP server!") + socket.close + end + end + # Delay to ensure server is ready + task.sleep(0.5) + # Client task: connects to the server and reads the response + client_task = task.async do + client_endpoint = Async::IO::Endpoint.tcp(host, port) + client_endpoint.connect do |socket| + message = socket.read + assert_equal "Hello from TCP server!", message, "Expected server greeting message" + puts "Client received correct message" + end + end + # Wait for client task to finish and stop server + client_task.wait + server_task.stop + end + puts "TCP endpoint test passed." + end + end + EOF + +update: + enabled: true + github: + identifier: socketry/io-endpoint + strip-prefix: v + use-tag: true + +var-transforms: + - from: ${{package.name}} + match: ^ruby(\d\.\d+)-.* + replace: $1 + to: rubyMM diff --git a/ruby4.0-io-event.yaml b/ruby4.0-io-event.yaml new file mode 100644 index 00000000000..097ce5612be --- /dev/null +++ b/ruby4.0-io-event.yaml @@ -0,0 +1,85 @@ +package: + name: ruby4.0-io-event + version: 1.7.1 + epoch: 0 + description: An event loop. + copyright: + - license: MIT + dependencies: + runtime: + - ruby-${{vars.ruby-version}} + +var-transforms: + - from: ${{package.name}} + match: ruby(\d+\.\d+)-.*$ + replace: $1 + to: ruby-version + - from: ${{package.name}} + match: ^ruby(\d\.\d+)-.* + replace: $1 + to: rubyMM + +environment: + contents: + packages: + - build-base + - busybox + - ca-certificates-bundle + - git + - ruby-${{vars.ruby-version}} + - ruby-${{vars.ruby-version}}-dev + +vars: + gem: io-event + +pipeline: + - uses: git-checkout + with: + expected-commit: 50f15b40eac9f534a6e1c7d210255efeed356396 + repository: https://github.com/socketry/io-event + tag: v${{package.version}} + + - uses: ruby/build + with: + gem: ${{vars.gem}} + + - uses: ruby/install + with: + gem: ${{vars.gem}} + version: ${{package.version}} + + - uses: ruby/clean + +update: + enabled: true + github: + identifier: socketry/io-event + strip-prefix: v + +test: + environment: + contents: + packages: + - ruby-${{vars.ruby-version}} + pipeline: + - name: Verify Gem Installation + runs: | + # Check that the gem is installed + gem list | grep 'io-event' + if [ $? -ne 0 ]; then + echo "Test failed: io-event gem is not installed." + exit 1 + else + echo "Test passed: io-event gem is installed." + fi + - name: Test Requiring the Gem + runs: | + # Try to require the gem in Ruby + ruby -e "require 'io/event'; puts 'io-event gem loaded successfully'" + if [ $? -ne 0 ]; then + echo "Test failed: Unable to require io-event gem." + exit 1 + else + echo "Test passed: io-event gem can be required." + fi + - uses: test/tw/ldd-check diff --git a/ruby4.0-io-stream.yaml b/ruby4.0-io-stream.yaml new file mode 100644 index 00000000000..3caf867a90d --- /dev/null +++ b/ruby4.0-io-stream.yaml @@ -0,0 +1,92 @@ +package: + name: ruby4.0-io-stream + version: "0.11.1" + epoch: 0 + description: A Ruby gem providing stream abstractions for input and output. + copyright: + - license: MIT + dependencies: + runtime: + - ruby-${{vars.rubyMM}} + +environment: + contents: + packages: + - build-base + - busybox + - ca-certificates-bundle + - git + - ruby-${{vars.rubyMM}} + - ruby-${{vars.rubyMM}}-dev + +pipeline: + - uses: git-checkout + with: + expected-commit: f5ecf0ad7a7fba2ef9954778f62e0fe8d3abdfe8 + repository: https://github.com/socketry/io-stream + tag: v${{package.version}} + + - uses: ruby/build + with: + gem: ${{vars.gem}} + + - uses: ruby/install + with: + gem: ${{vars.gem}} + version: ${{package.version}} + + - uses: ruby/clean + +vars: + gem: io-stream + +test: + environment: + contents: + packages: + - ruby-${{vars.rubyMM}} + pipeline: + - runs: | + ruby <<-EOF + require 'io/stream' + require 'stringio' + require 'test/unit' + include Test::Unit::Assertions + class TestIOStream < Test::Unit::TestCase + def test_write_and_read + # Create a StringIO object and wrap it in IO::Stream + buffer = StringIO.new + stream = IO::Stream::Buffered.new(buffer) + # Write to the stream + stream.write("Hello, Stream!") + stream.flush # Ensure data is written to the buffer + # Reset buffer for reading and read back the data + buffer.rewind + message = buffer.read + # Assert that the message matches what was written + assert_equal "Hello, Stream!", message, "Expected written message to be read back from stream" + puts "Basic write and read test passed." + end + def test_close + buffer = StringIO.new + stream = IO::Stream::Buffered.new(buffer) + # Close the stream and assert it's closed + stream.close + assert stream.closed?, "Expected stream to be closed" + puts "Stream close test passed." + end + end + EOF + +update: + enabled: true + github: + identifier: socketry/io-stream + strip-prefix: v + use-tag: true + +var-transforms: + - from: ${{package.name}} + match: ^ruby(\d\.\d+)-.* + replace: $1 + to: rubyMM diff --git a/ruby4.0-jar-dependencies.yaml b/ruby4.0-jar-dependencies.yaml new file mode 100644 index 00000000000..770c4498e45 --- /dev/null +++ b/ruby4.0-jar-dependencies.yaml @@ -0,0 +1,81 @@ +# Generated from https://github.com/mkristian/jar-dependencies +package: + name: ruby4.0-jar-dependencies + version: "0.5.5" + epoch: 0 + description: manage jar dependencies for gems and keep track which jar was already loaded using maven artifact coordinates. it warns on version conflicts and loads only ONE jar assuming the first one is compatible to the second one otherwise your project needs to lock down the right version by providing a Jars.lock file. + copyright: + - license: MIT + +environment: + contents: + packages: + - build-base + - busybox + - ca-certificates-bundle + - git + - ruby-${{vars.rubyMM}} + - ruby-${{vars.rubyMM}}-dev + +pipeline: + - uses: git-checkout + with: + expected-commit: b964003d619cc7cb0d7aa3b5fa2d8aeae180edf8 + repository: https://github.com/mkristian/jar-dependencies + tag: v${{package.version}} + + - uses: ruby/build + with: + gem: ${{vars.gem}} + + - uses: ruby/install + with: + gem: ${{vars.gem}} + version: ${{package.version}} + + - uses: ruby/clean + +vars: + gem: jar-dependencies + +update: + enabled: true + github: + identifier: mkristian/jar-dependencies + use-tag: true + strip-prefix: v + +test: + pipeline: + # AUTOGENERATED + - runs: | + lock_jars --help + - name: Verify gem import + runs: ruby -e "require 'jar_dependencies'; puts 'jar_dependencies loaded successfully!'" + - name: Test basic functionality + runs: | + ruby -e ' + begin + require "jar_dependencies" + + # Test module definition + raise "Missing Jars module" unless defined?(Jars) + + # Test basic methods exist + [:require_jar, :setup, :lock].each do |method| + raise "Missing method: Jars.#{method}" unless Jars.respond_to?(method) + end + + puts "Basic jar-dependencies functionality verified" + exit 0 + rescue => e + puts "Test failed: #{e.message}" + exit 1 + end + ' + +var-transforms: + - from: ${{package.name}} + match: ^ruby(\d\.\d+)-.* + replace: $1 + to: rubyMM diff --git a/ruby4.0-jmespath.yaml b/ruby4.0-jmespath.yaml new file mode 100644 index 00000000000..b1ccf6ce82c --- /dev/null +++ b/ruby4.0-jmespath.yaml @@ -0,0 +1,76 @@ +package: + name: ruby4.0-jmespath + version: 1.6.2 + epoch: 0 + description: Implements JMESPath for Ruby + copyright: + - license: Apache-2.0 + +environment: + contents: + packages: + - build-base + - busybox + - ca-certificates-bundle + - git + - ruby-${{vars.rubyMM}} + - ruby-${{vars.rubyMM}}-dev + +pipeline: + - uses: git-checkout + with: + expected-commit: 8336859844c3ebf053cf9498dcf5f494ee805750 + repository: https://github.com/jmespath/jmespath.rb + tag: v${{package.version}} + + - uses: ruby/build + with: + gem: ${{vars.gem}} + + - uses: ruby/install + with: + gem: ${{vars.gem}} + version: ${{package.version}} + + - uses: ruby/clean + +vars: + gem: jmespath + +test: + pipeline: + - name: Verify gem import + runs: ruby -e "require 'jmespath'; puts 'jmespath loaded successfully!'" + - name: Basic JMESPath evaluation + runs: | + ruby <<-EOF + require 'jmespath' + + # Basic JMESPath expression test + data = { + "foo" => { + "bar" => "value" + } + } + expression = "foo.bar" + result = JMESPath.search(expression, data) + + # Validate the result + if result == "value" + puts "Basic JMESPath evaluation successful!" + else + raise "Expected 'value' but got '\#{result}'" + end + EOF + +update: + enabled: true + github: + identifier: jmespath/jmespath.rb + strip-prefix: v + +var-transforms: + - from: ${{package.name}} + match: ^ruby(\d\.\d+)-.* + replace: $1 + to: rubyMM diff --git a/ruby4.0-jrjackson.yaml b/ruby4.0-jrjackson.yaml new file mode 100644 index 00000000000..af1dcb8a1e0 --- /dev/null +++ b/ruby4.0-jrjackson.yaml @@ -0,0 +1,78 @@ +package: + name: ruby4.0-jrjackson + version: 0.4.20 + epoch: 0 + description: A mostly native JRuby wrapper for the java jackson json processor jar + copyright: + - license: Apache-2.0 + +environment: + contents: + packages: + - build-base + - jruby-9.4 + - jruby-9.4-default-ruby + - openjdk-8-default-jdk # build with JDK 8 since this is the declared version in the upstream Mavenfile + environment: + JAVA_HOME: /usr/lib/jvm/java-1.8-openjdk + +pipeline: + - uses: git-checkout + with: + expected-commit: 8379708e06579d9b76cd3567aed0493e6a60b89b + repository: https://github.com/guyboertje/jrjackson + tag: v${{package.version}} + + - runs: | + bundle install + rake + rake test + + - runs: | + jruby -S gem build ${{vars.gem}}.gemspec + + - uses: ruby/install + with: + # Output file name has `java` suffix. + gem-file: ${{vars.gem}}-${{package.version}}-java.gem + version: ${{package.version}} + + - uses: ruby/clean + +vars: + gem: jrjackson + +update: + enabled: true + github: + identifier: guyboertje/jrjackson + strip-prefix: v + use-tag: true + +test: + environment: + contents: + packages: + - jruby-9.4 + - openjdk-8-default-jvm + pipeline: + - runs: | + cat < /tmp/test.rb + require 'jrjackson' + + obj = {:key1 => "value1"} + puts obj + + result = JrJackson::Json.dump(obj) + puts result + + puts JrJackson::Json.parse(result) + EOF + + jruby /tmp/test.rb + +var-transforms: + - from: ${{package.name}} + match: ^ruby(\d\.\d+)-.* + replace: $1 + to: rubyMM diff --git a/ruby4.0-json-jwt.yaml b/ruby4.0-json-jwt.yaml new file mode 100644 index 00000000000..a8c3c15aec9 --- /dev/null +++ b/ruby4.0-json-jwt.yaml @@ -0,0 +1,65 @@ +package: + name: ruby4.0-json-jwt + version: "1.17.0" + epoch: 0 + description: JSON Web Token and its family (JSON Web Signature, JSON Web Encryption and JSON Web Key) in Ruby + copyright: + - license: MIT + dependencies: + runtime: + - ruby${{vars.rubyMM}}-activesupport + - ruby${{vars.rubyMM}}-aes_key_wrap + - ruby${{vars.rubyMM}}-bindata + - ruby${{vars.rubyMM}}-faraday + - ruby${{vars.rubyMM}}-faraday-follow_redirects + +environment: + contents: + packages: + - build-base + - busybox + - ca-certificates-bundle + - git + - ruby-${{vars.rubyMM}} + - ruby-${{vars.rubyMM}}-dev + +pipeline: + - uses: git-checkout + with: + expected-commit: 543d928e7ad314312a0c81e7fa3c048ce70baa42 + repository: https://github.com/nov/json-jwt + tag: v${{package.version}} + + - uses: ruby/unlock-spec + + - uses: ruby/build + with: + gem: ${{vars.gem}} + + - uses: ruby/install + with: + gem: ${{vars.gem}} + version: ${{package.version}} + + - uses: ruby/clean + +vars: + gem: json-jwt + +update: + enabled: true + github: + identifier: nov/json-jwt + strip-prefix: v + # This project doesn't consistently use GitHub releases. + use-tag: true + +var-transforms: + - from: ${{package.name}} + match: ^ruby(\d\.\d+)-.* + replace: $1 + to: rubyMM + +test: + pipeline: + - uses: test/tw/gem-check diff --git a/ruby4.0-json.yaml b/ruby4.0-json.yaml new file mode 100644 index 00000000000..72e8be442e6 --- /dev/null +++ b/ruby4.0-json.yaml @@ -0,0 +1,61 @@ +# Generated from https://github.com/flori/json +package: + name: ruby4.0-json + version: "2.18.0" + epoch: 0 + description: This is a JSON implementation as a Ruby extension in C. + copyright: + - license: Ruby + +environment: + contents: + packages: + - build-base + - busybox + - ca-certificates-bundle + - git + - ruby-${{vars.rubyMM}} + - ruby-${{vars.rubyMM}}-dev + +pipeline: + - uses: git-checkout + with: + repository: https://github.com/flori/json + tag: v${{package.version}} + expected-commit: 1cdd2122d537d93b32d554dd013f607148291ba4 + + - runs: | + # Upstream sometimes forgets to update the version in their version.rb file after a release. + sed -i "s/\(VERSION = '\)[^']*/\1${{package.version}}/" lib/json/version.rb + + - uses: ruby/build + with: + gem: ${{vars.gem}} + + - uses: ruby/install + with: + gem: ${{vars.gem}} + version: ${{package.version}} + + - uses: ruby/clean + +vars: + gem: json + +test: + pipeline: + - runs: ruby -e "require 'json'" + - uses: test/tw/ldd-check + +update: + enabled: true + github: + identifier: flori/json + strip-prefix: v + use-tag: true + +var-transforms: + - from: ${{package.name}} + match: ^ruby(\d\.\d+)-.* + replace: $1 + to: rubyMM diff --git a/ruby4.0-jsonpath.yaml b/ruby4.0-jsonpath.yaml new file mode 100644 index 00000000000..ed22ff91454 --- /dev/null +++ b/ruby4.0-jsonpath.yaml @@ -0,0 +1,80 @@ +package: + name: ruby4.0-jsonpath + version: 1.1.5 + epoch: 0 + description: Ruby implementation of http://goessner.net/articles/JsonPath/. + copyright: + - license: MIT + dependencies: + runtime: + - ruby${{vars.rubyMM}}-multi_json + +environment: + contents: + packages: + - build-base + - busybox + - ca-certificates-bundle + - git + - ruby-${{vars.rubyMM}} + - ruby-${{vars.rubyMM}}-dev + +pipeline: + - uses: git-checkout + with: + repository: https://github.com/joshbuddy/jsonpath + tag: v${{package.version}} + expected-commit: 725f1873a164955a129e70cd92417414f89efe26 + + - uses: ruby/build + with: + gem: ${{vars.gem}} + + - uses: ruby/install + with: + gem: ${{vars.gem}} + version: ${{package.version}} + + - uses: ruby/clean + +vars: + gem: jsonpath + +test: + pipeline: + - runs: ruby -e "require 'jsonpath'" + - name: Simple test + runs: | + cat < /tmp/test.rb + require 'jsonpath' + json = <<-HERE_DOC + {"store": + {"bicycle": + {"price":19.95, "color":"red"}, + "book":[ + {"price":8.95, "category":"reference", "title":"Sayings of the Century", "author":"Nigel Rees"}, + {"price":12.99, "category":"fiction", "title":"Sword of Honour", "author":"Evelyn Waugh"}, + {"price":8.99, "category":"fiction", "isbn":"0-553-21311-3", "title":"Moby Dick", "author":"Herman Melville","color":"blue"}, + {"price":22.99, "category":"fiction", "isbn":"0-395-19395-8", "title":"The Lord of the Rings", "author":"Tolkien"} + ] + } + } + HERE_DOC + path = JsonPath.new('$..price') + path.on(json) + EOF + ruby /tmp/test.rb + +update: + enabled: true + git: + strip-prefix: v + ignore-regex-patterns: + - 0.8.6 + - 7.0.1 + +var-transforms: + - from: ${{package.name}} + match: ^ruby(\d\.\d+)-.* + replace: $1 + to: rubyMM diff --git a/ruby4.0-jwt.yaml b/ruby4.0-jwt.yaml new file mode 100644 index 00000000000..e1f674b4f0e --- /dev/null +++ b/ruby4.0-jwt.yaml @@ -0,0 +1,55 @@ +# Generated from https://github.com/jwt/ruby-jwt +package: + name: ruby4.0-jwt + version: "3.1.2" + epoch: 0 + description: A pure ruby implementation of the RFC 7519 OAuth JSON Web Token (JWT) standard. + copyright: + - license: MIT + +environment: + contents: + packages: + - build-base + - busybox + - ca-certificates-bundle + - git + - ruby-${{vars.rubyMM}} + - ruby-${{vars.rubyMM}}-dev + +pipeline: + - uses: git-checkout + with: + expected-commit: bbe7ae3786568b041f03f50cb2e48d2b964a4eb4 + repository: https://github.com/jwt/ruby-jwt + tag: v${{package.version}} + + - uses: ruby/build + with: + gem: ruby-${{vars.gem}} + + - uses: ruby/install + with: + gem: ${{vars.gem}} + version: ${{package.version}} + + - uses: ruby/clean + +vars: + gem: jwt + +update: + enabled: true + github: + identifier: jwt/ruby-jwt + strip-prefix: v + +var-transforms: + - from: ${{package.name}} + match: ^ruby(\d\.\d+)-.* + replace: $1 + to: rubyMM + +test: + pipeline: + - uses: test/tw/gem-check diff --git a/ruby4.0-kubeclient.yaml b/ruby4.0-kubeclient.yaml new file mode 100644 index 00000000000..9af69e9a2a3 --- /dev/null +++ b/ruby4.0-kubeclient.yaml @@ -0,0 +1,74 @@ +package: + name: ruby4.0-kubeclient + version: "4.13.0" + epoch: 0 + description: An efficient, thread safe LRU cache. + copyright: + - license: MIT + dependencies: + runtime: + - ruby${{vars.rubyMM}}-faraday + - ruby${{vars.rubyMM}}-faraday-follow_redirects + - ruby${{vars.rubyMM}}-http + - ruby${{vars.rubyMM}}-jsonpath + - ruby${{vars.rubyMM}}-recursive-open-struct + - ruby${{vars.rubyMM}}-rest-client + +environment: + contents: + packages: + - build-base + - busybox + - ca-certificates-bundle + - ruby-${{vars.rubyMM}} + - ruby-${{vars.rubyMM}}-dev + +pipeline: + - uses: git-checkout + with: + repository: https://github.com/ManageIQ/kubeclient + tag: v${{package.version}} + expected-commit: c6e29f9ce9bff133099da01e239dfbdd9710d95a + + - uses: patch + with: + patches: bump-recursive-open-struct.patch + + - uses: ruby/build + with: + gem: ${{vars.gem}} + + - uses: ruby/install + with: + gem: ${{vars.gem}} + version: ${{package.version}} + + - uses: ruby/clean + +vars: + gem: kubeclient + +test: + pipeline: + - runs: | + ruby -e "require 'kubeclient'" + - name: Simple test + runs: | + cat < /tmp/test.rb + require 'kubeclient' + Kubeclient::Client.new('http://localhost:8080/api', 'v1') + EOF + ruby /tmp/test.rb + +update: + enabled: true + github: + identifier: ManageIQ/kubeclient + strip-prefix: v + use-tag: true + +var-transforms: + - from: ${{package.name}} + match: ^ruby(\d\.\d+)-.* + replace: $1 + to: rubyMM diff --git a/ruby4.0-kubeclient/bump-recursive-open-struct.patch b/ruby4.0-kubeclient/bump-recursive-open-struct.patch new file mode 100644 index 00000000000..dddd4b6efe0 --- /dev/null +++ b/ruby4.0-kubeclient/bump-recursive-open-struct.patch @@ -0,0 +1,35 @@ +From 0eb594296597e45011d8e4090244597f76d06d53 Mon Sep 17 00:00:00 2001 +From: Scott Moser +Date: Fri, 25 Oct 2024 12:55:29 -0400 +Subject: [PATCH] Try bumping recursive-open-struct + +recursive-open-struct moved forward to 1.3 on 2024-10-03 and then +immediately forward to 2.0 which does include this entry in changelog: + + * BREAKING: Restore #72, which is an API-breaking change because it changes + what data is serialized with marshalling. + +I proposed https://github.com/ManageIQ/kubeclient/pull/640 upstream +to see if it is plausible to do this versus adding +ruby3.2-recursive-open-struct-1.3 . + +--- + kubeclient.gemspec | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/kubeclient.gemspec b/kubeclient.gemspec +index 4df0014..f1b9911 100644 +--- a/kubeclient.gemspec ++++ b/kubeclient.gemspec +@@ -37,6 +37,6 @@ Gem::Specification.new do |spec| + + spec.add_dependency 'jsonpath', '~> 1.0' + spec.add_dependency 'rest-client', '~> 2.0' +- spec.add_dependency 'recursive-open-struct', '~> 1.1', '>= 1.1.1' ++ spec.add_dependency 'recursive-open-struct', '> 1.1.1', '< 3.0' + spec.add_dependency 'http', '>= 3.0', '< 6.0' + end + +-- +2.47.0 + diff --git a/ruby4.0-licensee.yaml b/ruby4.0-licensee.yaml new file mode 100644 index 00000000000..18a9e7017f4 --- /dev/null +++ b/ruby4.0-licensee.yaml @@ -0,0 +1,69 @@ +package: + name: ruby4.0-licensee + version: "9.18.0" + epoch: 0 + description: A Ruby Gem to detect under what license a project is distributed. + copyright: + - license: MIT + dependencies: + runtime: + - ruby${{vars.rubyMM}}-dotenv + - ruby${{vars.rubyMM}}-octokit + - ruby${{vars.rubyMM}}-reverse_markdown + - ruby${{vars.rubyMM}}-rugged + - ruby${{vars.rubyMM}}-thor + - ruby-${{vars.rubyMM}} + +vars: + gem: licensee + +environment: + contents: + packages: + - build-base + - ruby-${{vars.rubyMM}}-dev + +pipeline: + - uses: git-checkout + with: + repository: https://github.com/licensee/licensee.git + tag: v${{package.version}} + expected-commit: 336495543ee8756eb512a6b4ec6ad763cf890701 + + - uses: ruby/build + with: + gem: ${{vars.gem}} + + - uses: ruby/install + with: + gem: ${{vars.gem}} + version: ${{package.version}} + + - uses: ruby/clean + +update: + enabled: true + github: + identifier: licensee/licensee + strip-prefix: v + use-tag: true + tag-filter: v + +var-transforms: + - from: ${{package.name}} + match: ^ruby(\d\.\d+)-.* + replace: $1 + to: rubyMM + +test: + environment: + contents: + packages: + - jq + pipeline: + - name: Check if command runs + runs: | + licensee --help + - name: Check if a simple license is detected + runs: | + test "$(licensee detect --json ./test-data | jq -r '.licenses[0].spdx_id')" = "MIT" diff --git a/ruby4.0-licensee/test-data/LICENSE.md b/ruby4.0-licensee/test-data/LICENSE.md new file mode 100644 index 00000000000..33c4694b622 --- /dev/null +++ b/ruby4.0-licensee/test-data/LICENSE.md @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2014-2021 Ben Balter and Licensee contributors + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/ruby4.0-llhttp.yaml b/ruby4.0-llhttp.yaml new file mode 100644 index 00000000000..b2fce685e12 --- /dev/null +++ b/ruby4.0-llhttp.yaml @@ -0,0 +1,167 @@ +package: + name: ruby4.0-llhttp + version: 2025.03.11 + # NOTE: There are also environment variables in this melange which may have to be bumped between upgrades. + epoch: 0 + description: Ruby bindings for llhttp. + copyright: + - license: MIT + dependencies: + runtime: + - ruby${{vars.rubyMM}}-llhttp-ffi + - ruby${{vars.rubyMM}}-llhttp-mri + +environment: + contents: + packages: + - build-base + - busybox + - ca-certificates-bundle + - curl # required for tests + - grep + - ruby${{vars.rubyMM}}-bundler + - ruby${{vars.rubyMM}}-rake-compiler + - ruby${{vars.rubyMM}}-rspec + - ruby-${{vars.rubyMM}} + - ruby-${{vars.rubyMM}}-dev + environment: + # TODO: Melange pipeline does not support evaluating expressions in the `uses/with`. + # We also cannot pass environment variables between steps. So, until we + # figure out a better way, set a hardcoded version here. + LLHTTP_FFI_VERSION: 0.5.1 + LLHTTP_MRI_VERSION: 0.6.1 + +# The original release tag is in the format: 2023-03-29. We need to convert +# back into that format before performing a git clone. +var-transforms: + - from: ${{package.version}} + match: \. + replace: '-' + to: mangled-package-version + - from: ${{package.name}} + match: ^ruby(\d\.\d+)-.* + replace: $1 + to: rubyMM + +vars: + gem-ffi: llhttp-ffi + gem-mri: llhttp + +pipeline: + - uses: git-checkout + with: + expected-commit: 04f91e5acbd4014b5e6ac87c17cb3fd783b789fc + repository: https://github.com/bryanp/llhttp.git + tag: ${{vars.mangled-package-version}} + +subpackages: + - name: ${{package.name}}-mri + description: Ruby bindings for llhttp. + pipeline: + - working-directory: mri + pipeline: + - runs: | + # Install some missing builddeps deps + bundle install + rake compile + rake test + - uses: ruby/build + with: + gem: ${{vars.gem-mri}} + - name: Sanity check, compare ACTUAL_LLHTTP_VERSION with LLHTTP_VERSION + runs: | + export ACTUAL_LLHTTP_VERSION=$(grep -oP 'VERSION = "\K[0-9]+\.[0-9]+\.[0-9]+' lib/llhttp/version.rb) + if [ "${ACTUAL_LLHTTP_VERSION}" != "${LLHTTP_MRI_VERSION}" ]; then + echo "Expected version: ${LLHTTP_MRI_VERSION}, but got: ${ACTUAL_LLHTTP_VERSION}. Please update the version in the environment section." + exit 1 + fi + mv ${{vars.gem-mri}}-*.gem ${{vars.gem-mri}}.gem + - uses: ruby/install + with: + gem-file: ${{vars.gem-mri}}.gem + version: ${LLHTTP_MRI_VERSION} + - uses: ruby/clean + test: + pipeline: + - uses: test/tw/ldd-check + + - name: ${{package.name}}-ffi + description: Ruby FFI bindings for llhttp. + dependencies: + runtime: + - ruby${{vars.rubyMM}}-ffi + - ruby${{vars.rubyMM}}-ffi-compiler + pipeline: + - working-directory: ffi + pipeline: + - runs: | + bundle install + rake compile + rake test + - uses: ruby/build + with: + gem: ${{vars.gem-ffi}} + - name: Sanity check, compare ACTUAL_LLHTTP_VERSION with LLHTTP_VERSION + runs: | + export ACTUAL_LLHTTP_VERSION=$(grep -oP 'VERSION = "\K[0-9]+\.[0-9]+\.[0-9]+' lib/llhttp/version.rb) + if [ "${ACTUAL_LLHTTP_VERSION}" != "${LLHTTP_FFI_VERSION}" ]; then + echo "Expected version: ${LLHTTP_FFI_VERSION}, but got: ${ACTUAL_LLHTTP_VERSION}. Please update the version in the environment section." + exit 1 + fi + mv ${{vars.gem-ffi}}-*.gem ${{vars.gem-ffi}}.gem + - uses: ruby/install + with: + gem-file: ${{vars.gem-ffi}}.gem + version: ${LLHTTP_FFI_VERSION} + - uses: ruby/clean + test: + pipeline: + - uses: test/tw/ldd-check + +update: + enabled: true + # The original release tag is in the format: 2023-03-29, but that is not a + # valid apk package version, so we need to convert it to 2023.03.29. + version-transform: + - match: \- + replace: . + github: + identifier: bryanp/llhttp + +test: + environment: + contents: + packages: + - ruby-${{vars.rubyMM}} + pipeline: + - name: Import dependencies + runs: | + ruby -e "require 'ffi'" + ruby -e "require 'llhttp'" + - name: Basic HTTP request parsing + runs: | + cat < /tmp/test.rb + require "llhttp" + # Define a delegate class for handling callbacks: + # + class Delegate < LLHttp::Delegate + def on_message_begin + puts 'Request Parsed' + end + end + + delegate = Delegate.new + + # Create a parser: + # + parser = LLHttp::Parser.new(delegate) + + # Parse a request: + # + parser << "GET / HTTP/1.1\r\n\r\n" + + # Reset the parser for the next request: + # + parser.finish + EOF + ruby /tmp/test.rb | grep -qi 'Request Parsed' diff --git a/ruby4.0-lru_redux.yaml b/ruby4.0-lru_redux.yaml new file mode 100644 index 00000000000..55458cfa000 --- /dev/null +++ b/ruby4.0-lru_redux.yaml @@ -0,0 +1,114 @@ +package: + name: ruby4.0-lru_redux + version: 1.1.0 + epoch: 0 + description: An efficient, thread safe LRU cache. + copyright: + - license: MIT + +environment: + contents: + packages: + - build-base + - busybox + - ca-certificates-bundle + - ruby-${{vars.rubyMM}} + - ruby-${{vars.rubyMM}}-dev + +pipeline: + - uses: git-checkout + with: + repository: https://github.com/SamSaffron/lru_redux.git + tag: v${{package.version}} + expected-commit: 47e0c92f494390955ee828e11a357cf682f1ce9f + + - uses: ruby/build + with: + gem: ${{vars.gem}} + + - uses: ruby/install + with: + gem: ${{vars.gem}} + version: ${{package.version}} + + - uses: ruby/clean + +vars: + gem: lru_redux + +update: + enabled: true + github: + identifier: SamSaffron/lru_redux + strip-prefix: v + use-tag: true + +var-transforms: + - from: ${{package.name}} + match: ^ruby(\d\.\d+)-.* + replace: $1 + to: rubyMM + +test: + pipeline: + - name: Verify library import + runs: ruby -e "require 'lru_redux'" + - name: Basic functionality test (adapted from project README) + runs: | + ruby -e ' + require "lru_redux" + + # non thread safe + cache = LruRedux::Cache.new(100) + cache[:a] = "1" + cache[:b] = "2" + + raise "Access failed" unless cache.to_a == [[:b, "2"], [:a, "1"]] + + # note the order matters here, last accessed is first + cache[:a] # a pushed to front + # "1" + raise "Access failed" unless cache.to_a == [[:a, "1"], [:b, "2"]] + + cache.delete(:a) + raise "Delete failed" unless cache.to_a == [[:b, "2"]] + + cache.max_size = 200 # cache now stores 200 items + cache.clear # cache has no items + + cache.getset(:a) { 1 } + raise "Getset failed" unless cache.to_a == [[:a, 1]] + + # already set so don"t call block + cache.getset(:a) { 99 } + raise "Getset unexpectedly updated" unless cache.to_a == [[:a, 1]] + ' + - name: Basic threadsafe functionality test (adapted from project README) + runs: | + ruby -e ' + require "lru_redux" + + cache = LruRedux::ThreadSafeCache.new(100) + cache[:a] = "1" + cache[:b] = "2" + + raise "Access failed" unless cache.to_a == [[:b, "2"], [:a, "1"]] + + # note the order matters here, last accessed is first + cache[:a] # a pushed to front + # "1" + raise "Access failed" unless cache.to_a == [[:a, "1"], [:b, "2"]] + + cache.delete(:a) + raise "Delete failed" unless cache.to_a == [[:b, "2"]] + + cache.max_size = 200 # cache now stores 200 items + cache.clear # cache has no items + + cache.getset(:a) { 1 } + raise "Getset failed" unless cache.to_a == [[:a, 1]] + + # already set so don"t call block + cache.getset(:a) { 99 } + raise "Getset unexpectedly updated" unless cache.to_a == [[:a, 1]] + ' diff --git a/ruby4.0-mail.yaml b/ruby4.0-mail.yaml new file mode 100644 index 00000000000..7016219a065 --- /dev/null +++ b/ruby4.0-mail.yaml @@ -0,0 +1,58 @@ +package: + name: ruby4.0-mail + version: "2.9.0" + epoch: 0 + description: A really Ruby Mail handler. + copyright: + - license: MIT + dependencies: + runtime: + - ruby${{vars.rubyMM}}-mini_mime + - ruby${{vars.rubyMM}}-net-imap + +environment: + contents: + packages: + - build-base + - busybox + - ca-certificates-bundle + - git + - ruby-${{vars.rubyMM}} + - ruby-${{vars.rubyMM}}-dev + +pipeline: + - uses: git-checkout + with: + repository: https://github.com/mikel/mail + tag: ${{package.version}} + expected-commit: 490fe219712829ce763fd46eea7fbd3d4eaa102d + + - uses: ruby/build + with: + gem: ${{vars.gem}} + + - uses: ruby/install + with: + gem: ${{vars.gem}} + version: ${{package.version}} + + - uses: ruby/clean + +vars: + gem: mail + +update: + enabled: true + github: + identifier: mikel/mail + use-tag: true + +var-transforms: + - from: ${{package.name}} + match: ^ruby(\d\.\d+)-.* + replace: $1 + to: rubyMM + +test: + pipeline: + - uses: test/tw/gem-check diff --git a/ruby4.0-manticore.yaml b/ruby4.0-manticore.yaml new file mode 100644 index 00000000000..ab9786a0746 --- /dev/null +++ b/ruby4.0-manticore.yaml @@ -0,0 +1,69 @@ +# Generated from https://github.com/cheald/manticore +package: + name: ruby4.0-manticore + version: "0.9.2" + epoch: 0 + description: Manticore is an HTTP client built on the Apache HttpCore components + copyright: + - license: MIT + dependencies: + runtime: + - ruby${{vars.rubyMM}}-openssl_pkcs8_pure + +environment: + contents: + packages: + - build-base + - busybox + - ca-certificates-bundle + - git + - ruby-${{vars.rubyMM}} + - ruby-${{vars.rubyMM}}-dev + +pipeline: + - uses: git-checkout + with: + repository: https://github.com/cheald/manticore + tag: v${{package.version}} + expected-commit: aa692fb77eec2a7aad7362d0ca5d87b8fb36fd5d + + - runs: | + sed -i 's/exists?/exist?/g' manticore.gemspec + + - uses: ruby/build + with: + gem: ${{vars.gem}} + + - uses: ruby/install + with: + # Output file name has `java` suffix. + gem-file: ${{vars.gem}}-${{package.version}}-java.gem + version: ${{package.version}} + + - uses: ruby/clean + +vars: + gem: manticore + +update: + enabled: true + github: + identifier: cheald/manticore + strip-prefix: v + use-tag: true + +var-transforms: + - from: ${{package.name}} + match: ^ruby(\d\.\d+)-.* + replace: $1 + to: rubyMM + +test: + pipeline: + - uses: test/tw/gem-check + with: + require: | + manticore/cookie + manticore/facade + manticore/version + manticore/client/proxies diff --git a/ruby4.0-method_source.yaml b/ruby4.0-method_source.yaml new file mode 100644 index 00000000000..394a52bdd3c --- /dev/null +++ b/ruby4.0-method_source.yaml @@ -0,0 +1,56 @@ +# Generated from https://github.com/banister/method_source +package: + name: ruby4.0-method_source + version: 1.1.0 + epoch: 0 + description: retrieve the sourcecode for a method + copyright: + - license: MIT + +environment: + contents: + packages: + - build-base + - busybox + - ca-certificates-bundle + - git + - ruby-${{vars.rubyMM}} + - ruby-${{vars.rubyMM}}-dev + +pipeline: + - uses: git-checkout + with: + expected-commit: eef98af83806572d503c8bc624de0efdc0dffc28 + repository: https://github.com/banister/method_source + tag: v${{package.version}} + + - uses: ruby/build + with: + gem: ${{vars.gem}} + + - uses: ruby/install + with: + gem: ${{vars.gem}} + version: ${{package.version}} + + - uses: ruby/clean + +vars: + gem: method_source + +update: + enabled: true + github: + identifier: banister/method_source + strip-prefix: v + use-tag: true + +var-transforms: + - from: ${{package.name}} + match: ^ruby(\d\.\d+)-.* + replace: $1 + to: rubyMM + +test: + pipeline: + - uses: test/tw/gem-check diff --git a/ruby4.0-metrics.yaml b/ruby4.0-metrics.yaml new file mode 100644 index 00000000000..cddf462cabc --- /dev/null +++ b/ruby4.0-metrics.yaml @@ -0,0 +1,63 @@ +package: + name: ruby4.0-metrics + version: "0.15.0" + epoch: 0 + description: Application metrics and instrumentation. + copyright: + - license: MIT + dependencies: + runtime: + - ruby${{vars.rubyMM}}-console + - ruby-${{vars.rubyMM}} + +environment: + contents: + packages: + - build-base + - busybox + - ca-certificates-bundle + - git + - ruby${{vars.rubyMM}}-bundler + - ruby-${{vars.rubyMM}} + - ruby-${{vars.rubyMM}}-dev + +pipeline: + - uses: git-checkout + with: + expected-commit: 2883b0a592df32eb23fa18d78a4db574da14d2e6 + repository: https://github.com/socketry/metrics + tag: v${{package.version}} + + - runs: sed -i '/signing_key/d' ${{vars.gem}}.gemspec + + - uses: ruby/build + with: + gem: ${{vars.gem}} + + - uses: ruby/install + with: + gem: ${{vars.gem}} + version: ${{package.version}} + + - uses: ruby/clean + +vars: + gem: metrics + +update: + enabled: true + github: + identifier: socketry/metrics + strip-prefix: v + use-tag: true + +test: + pipeline: + - runs: | + ruby -e "require 'metrics'" + +var-transforms: + - from: ${{package.name}} + match: ^ruby(\d\.\d+)-.* + replace: $1 + to: rubyMM diff --git a/ruby4.0-mime-types-data.yaml b/ruby4.0-mime-types-data.yaml new file mode 100644 index 00000000000..d009ad22310 --- /dev/null +++ b/ruby4.0-mime-types-data.yaml @@ -0,0 +1,56 @@ +package: + name: ruby4.0-mime-types-data + version: "3.2025.0924" + epoch: 0 + description: MIME Type registry data + copyright: + - license: MIT + +environment: + contents: + packages: + - build-base + - busybox + - ca-certificates-bundle + - git + - ruby-${{vars.rubyMM}} + - ruby-${{vars.rubyMM}}-dev + +pipeline: + - uses: git-checkout + with: + repository: https://github.com/mime-types/mime-types-data.git + tag: v${{package.version}} + expected-commit: 85ac1a531d68d453658222cd85587865a316198b + + - uses: ruby/build + with: + gem: ${{vars.gem}} + + - uses: ruby/install + with: + gem: ${{vars.gem}} + version: ${{package.version}} + + - uses: ruby/clean + +vars: + gem: mime-types-data + +test: + pipeline: + - runs: | + ruby -e "require 'mime-types-data'" + +update: + enabled: true + github: + identifier: mime-types/mime-types-data + strip-prefix: v + use-tag: true + +var-transforms: + - from: ${{package.name}} + match: ^ruby(\d\.\d+)-.* + replace: $1 + to: rubyMM diff --git a/ruby4.0-mime-types.yaml b/ruby4.0-mime-types.yaml new file mode 100644 index 00000000000..ae0d4f04dd8 --- /dev/null +++ b/ruby4.0-mime-types.yaml @@ -0,0 +1,125 @@ +package: + name: ruby4.0-mime-types + version: "3.7.0" + epoch: 0 + description: Ruby MIME type registry library + copyright: + - license: MIT + dependencies: + runtime: + - ruby${{vars.rubyMM}}-mime-types-data + +environment: + contents: + packages: + - build-base + - busybox + - ca-certificates-bundle + - git + - ruby-${{vars.rubyMM}} + - ruby-${{vars.rubyMM}}-dev + +pipeline: + - uses: git-checkout + with: + repository: https://github.com/mime-types/ruby-mime-types.git + tag: v${{package.version}} + expected-commit: afa0fd687188969b6102dcb9b176c490dfed94f6 + + - runs: | + # Upstream missed updating the gemspec for 3.6.2 + sed -i 's/3.6.1/3.6.2/' mime-types.gemspec + + - uses: ruby/build + with: + gem: ${{vars.gem}} + + - uses: ruby/install + with: + gem: ${{vars.gem}} + version: ${{package.version}} + + - uses: ruby/clean + +vars: + gem: mime-types + +test: + pipeline: + - runs: | + ruby -e "require 'mime/types'" + - name: Simple test + runs: | + cat < /tmp/test.rb + require 'mime/types' + + plaintext = MIME::Types['text/plain'] # => [ text/plain ] + text = plaintext.first + puts text.media_type # => 'text' + puts text.sub_type # => 'plain' + + puts text.extensions.join(' ') # => 'txt asc c cc h hh cpp hpp dat hlp' + puts text.preferred_extension # => 'txt' + puts text.friendly # => 'Text Document' + puts text.i18n_key # => 'text.plain' + + puts text.encoding # => quoted-printable + puts text.default_encoding # => quoted-printable + puts text.binary? # => false + puts text.ascii? # => true + puts text.obsolete? # => false + puts text.registered? # => true + puts text.provisional? # => false + puts text.complete? # => true + + puts text # => 'text/plain' + + puts text == 'text/plain' # => true + puts 'text/plain' == text # => true + puts text == 'text/x-plain' # => false + puts 'text/x-plain' == text # => false + + puts MIME::Type.simplified('x-appl/x-zip') # => 'x-appl/x-zip' + puts MIME::Type.i18n_key('x-appl/x-zip') # => 'x-appl.x-zip' + + puts text.like?('text/x-plain') # => true + puts text.like?(MIME::Type.new('x-text/x-plain')) # => true + + puts text.xrefs.inspect # => { "rfc" => [ "rfc2046", "rfc3676", "rfc5147" ] } + puts text.xref_urls # => [ "http://www.iana.org/go/rfc2046", + # "http://www.iana.org/go/rfc3676", + # "http://www.iana.org/go/rfc5147" ] + + xtext = MIME::Type.new('x-text/x-plain') + puts xtext.media_type # => 'text' + puts xtext.raw_media_type # => 'x-text' + puts xtext.sub_type # => 'plain' + puts xtext.raw_sub_type # => 'x-plain' + puts xtext.complete? # => false + + puts MIME::Types.any? { |type| type.content_type == 'text/plain' } # => true + puts MIME::Types.all?(&:registered?) # => false + + # Various string representations of MIME types + qcelp = MIME::Types['audio/QCELP'].first # => audio/QCELP + puts qcelp.content_type # => 'audio/QCELP' + puts qcelp.simplified # => 'audio/qcelp' + + xwingz = MIME::Types['application/x-Wingz'].first # => application/x-Wingz + puts xwingz.content_type # => 'application/x-Wingz' + puts xwingz.simplified # => 'application/x-wingz' + EOF + ruby /tmp/test.rb + +update: + enabled: true + github: + identifier: mime-types/ruby-mime-types + strip-prefix: v + use-tag: true + +var-transforms: + - from: ${{package.name}} + match: ^ruby(\d\.\d+)-.* + replace: $1 + to: rubyMM diff --git a/ruby4.0-mini_mime.yaml b/ruby4.0-mini_mime.yaml new file mode 100644 index 00000000000..35ce25764e0 --- /dev/null +++ b/ruby4.0-mini_mime.yaml @@ -0,0 +1,55 @@ +package: + name: ruby4.0-mini_mime + version: 1.1.5 + epoch: 0 + description: A lightweight mime type lookup toy + copyright: + - license: MIT + +environment: + contents: + packages: + - build-base + - busybox + - ca-certificates-bundle + - git + - ruby-${{vars.rubyMM}} + - ruby-${{vars.rubyMM}}-dev + +pipeline: + - uses: git-checkout + with: + expected-commit: ad29352bf7b8fa547ea3058f2e97f3e8496f034a + repository: https://github.com/discourse/mini_mime + tag: v${{package.version}} + + - uses: ruby/build + with: + gem: ${{vars.gem}} + + - uses: ruby/install + with: + gem: ${{vars.gem}} + version: ${{package.version}} + + - uses: ruby/clean + +vars: + gem: mini_mime + +update: + enabled: true + github: + identifier: discourse/mini_mime + strip-prefix: v + use-tag: true + +var-transforms: + - from: ${{package.name}} + match: ^ruby(\d\.\d+)-.* + replace: $1 + to: rubyMM + +test: + pipeline: + - uses: test/tw/gem-check diff --git a/ruby4.0-mini_portile2.yaml b/ruby4.0-mini_portile2.yaml new file mode 100644 index 00000000000..88d98b0649d --- /dev/null +++ b/ruby4.0-mini_portile2.yaml @@ -0,0 +1,96 @@ +package: + name: ruby4.0-mini_portile2 + version: "2.8.9" + epoch: 0 + description: Simple autoconf and cmake builder for developers + copyright: + - license: MIT + dependencies: + runtime: + - build-base + - cmake + - ruby-${{vars.rubyMM}} + +environment: + contents: + packages: + - ruby-${{vars.rubyMM}} + - ruby-${{vars.rubyMM}}-dev + +vars: + gem: mini_portile2 + +pipeline: + - uses: git-checkout + with: + repository: https://github.com/flavorjones/mini_portile + tag: v${{package.version}} + expected-commit: ef35d0b05d8ebf6975385c46f6c693466a4d4840 + + - uses: ruby/build + with: + gem: ${{vars.gem}} + + - uses: ruby/install + with: + gem: ${{vars.gem}} + version: ${{package.version}} + + - uses: ruby/clean + +test: + environment: + contents: + packages: + - build-base + - cmake + - gcc-14-default # libiconv 1.17 ftbfs w/ gcc 15 + pipeline: + - name: Validate import + runs: ruby -e "require 'mini_portile2'" + - name: Test example recipe from docs + runs: | + cat > test.rb < test.rb < "test", "value" => 123} + packed = data.to_msgpack + assert_equal data, MessagePack.unpack(packed) + puts "Hash serialization test passed" + # Test nested structure + nested = { + "array" => [1, 2, 3], + "hash" => {"a" => 1, "b" => 2}, + "mixed" => [{"x" => 1}, [1, 2], "test"] + } + packed = nested.to_msgpack + assert_equal nested, MessagePack.unpack(packed) + puts "Nested structure serialization test passed" + # Test packer/unpacker streaming API + packer = MessagePack::Packer.new + packer.write(1) + packer.write("string") + packer.write([1,2,3]) + data = packer.to_s + unpacker = MessagePack::Unpacker.new + unpacker.feed(data) + results = [] + unpacker.each {|obj| results << obj } + assert_equal [1, "string", [1,2,3]], results + puts "Streaming API test passed" + puts "All tests passed!" + EOF + - uses: test/tw/ldd-check + +update: + enabled: true + github: + identifier: msgpack/msgpack-ruby + strip-prefix: v + use-tag: true + tag-filter: v + +var-transforms: + - from: ${{package.name}} + match: ^ruby(\d\.\d+)-.* + replace: $1 + to: rubyMM diff --git a/ruby4.0-multi_json.yaml b/ruby4.0-multi_json.yaml new file mode 100644 index 00000000000..40e50cb9c14 --- /dev/null +++ b/ruby4.0-multi_json.yaml @@ -0,0 +1,55 @@ +package: + name: ruby4.0-multi_json + version: 1.15.0 + epoch: 0 + description: A common interface to multiple JSON libraries, including Oj, Yajl, the JSON gem (with C-extensions), the pure-Ruby JSON gem, NSJSONSerialization, gson.rb, JrJackson, and OkJson. + copyright: + - license: MIT + +environment: + contents: + packages: + - build-base + - busybox + - ca-certificates-bundle + - git + - ruby-${{vars.rubyMM}} + - ruby-${{vars.rubyMM}}-dev + +pipeline: + - uses: git-checkout + with: + repository: https://github.com/intridea/multi_json + tag: v${{package.version}} + expected-commit: 530a9813e32ca1fc08bc294fa1178796c3d1861a + + - uses: ruby/build + with: + gem: ${{vars.gem}} + + - uses: ruby/install + with: + gem: ${{vars.gem}} + version: ${{package.version}} + + - uses: ruby/clean + +vars: + gem: multi_json + +update: + enabled: true + github: + identifier: intridea/multi_json + strip-prefix: v + use-tag: true + +var-transforms: + - from: ${{package.name}} + match: ^ruby(\d\.\d+)-.* + replace: $1 + to: rubyMM + +test: + pipeline: + - uses: test/tw/gem-check diff --git a/ruby4.0-multi_xml.yaml b/ruby4.0-multi_xml.yaml new file mode 100644 index 00000000000..b5924efadcd --- /dev/null +++ b/ruby4.0-multi_xml.yaml @@ -0,0 +1,56 @@ +# Generated from https://github.com/sferik/multi_xml +package: + name: ruby4.0-multi_xml + version: "0.8.0" + epoch: 0 + description: Provides swappable XML backends utilizing LibXML, Nokogiri, Ox, or REXML. + copyright: + - license: MIT + +environment: + contents: + packages: + - build-base + - busybox + - ca-certificates-bundle + - git + - ruby-${{vars.rubyMM}} + - ruby-${{vars.rubyMM}}-dev + +pipeline: + - uses: git-checkout + with: + expected-commit: f1d0703da70e754af5a7260219665225427d4a66 + repository: https://github.com/sferik/multi_xml + tag: v${{package.version}} + + - uses: ruby/build + with: + gem: ${{vars.gem}} + + - uses: ruby/install + with: + gem: ${{vars.gem}} + version: ${{package.version}} + + - uses: ruby/clean + +vars: + gem: multi_xml + +update: + enabled: true + github: + identifier: sferik/multi_xml + strip-prefix: v + use-tag: true + +var-transforms: + - from: ${{package.name}} + match: ^ruby(\d\.\d+)-.* + replace: $1 + to: rubyMM + +test: + pipeline: + - uses: test/tw/gem-check diff --git a/ruby4.0-mustermann.yaml b/ruby4.0-mustermann.yaml new file mode 100644 index 00000000000..a978c86756d --- /dev/null +++ b/ruby4.0-mustermann.yaml @@ -0,0 +1,61 @@ +# Generated from https://github.com/sinatra/mustermann +package: + name: ruby4.0-mustermann + version: "3.0.4" + epoch: 0 + description: A library implementing patterns that behave like regular expressions. + copyright: + - license: MIT + +environment: + contents: + packages: + - build-base + - busybox + - ca-certificates-bundle + - git + - ruby-${{vars.rubyMM}} + - ruby-${{vars.rubyMM}}-dev + +pipeline: + - uses: git-checkout + with: + expected-commit: 2e2467847f64387db6f85afdeb506f885abb4d35 + tag: v${{package.version}} + repository: https://github.com/sinatra/mustermann + + - uses: ruby/build + with: + gem: ${{vars.gem}} + dir: mustermann + + - uses: ruby/install + with: + gem: ${{vars.gem}} + version: ${{package.version}} + dir: mustermann + + - uses: ruby/clean + +vars: + gem: mustermann + +test: + pipeline: + - uses: ruby/require + with: + module_name: ${{vars.gem}} + +update: + enabled: true + github: + identifier: sinatra/mustermann + strip-prefix: v + tag-filter-prefix: v + use-tag: true + +var-transforms: + - from: ${{package.name}} + match: ^ruby(\d\.\d+)-.* + replace: $1 + to: rubyMM diff --git a/ruby4.0-net-http-persistent.yaml b/ruby4.0-net-http-persistent.yaml new file mode 100644 index 00000000000..05aaaf93383 --- /dev/null +++ b/ruby4.0-net-http-persistent.yaml @@ -0,0 +1,62 @@ +package: + name: ruby4.0-net-http-persistent + version: "4.0.6" + epoch: 0 + description: Manages persistent connections using Net::HTTP including a thread pool for connecting to multiple hosts. + copyright: + - license: MIT + dependencies: + runtime: + - ruby${{vars.rubyMM}}-connection_pool + +environment: + contents: + packages: + - build-base + - busybox + - ca-certificates-bundle + - git + - glibc-locale-en + - ruby-${{vars.rubyMM}} + - ruby-${{vars.rubyMM}}-dev + environment: + LANG: en_US.UTF-8 + +pipeline: + - uses: git-checkout + with: + expected-commit: 234f3b2c6a0ed044e3c55e3de982257b4860ba0a + repository: https://github.com/drbrain/net-http-persistent + tag: v${{package.version}} + + - uses: ruby/build + with: + gem: ${{vars.gem}} + + - uses: ruby/install + with: + gem: ${{vars.gem}} + version: ${{package.version}} + + - uses: ruby/clean + +vars: + gem: net-http-persistent + +update: + enabled: true + git: + strip-prefix: v + +var-transforms: + - from: ${{package.name}} + match: ^ruby(\d\.\d+)-.* + replace: $1 + to: rubyMM + +test: + pipeline: + - uses: test/tw/gem-check + with: + require: | + net/http/persistent diff --git a/ruby4.0-net-http.yaml b/ruby4.0-net-http.yaml new file mode 100644 index 00000000000..9e74163786c --- /dev/null +++ b/ruby4.0-net-http.yaml @@ -0,0 +1,64 @@ +package: + name: ruby4.0-net-http + version: "0.9.1" + epoch: 0 + description: "A rich library which can be used to build HTTP user-agents for Ruby" + copyright: + - license: BSD-2-Clause OR Ruby + +environment: + contents: + packages: + - build-base + - busybox + - ca-certificates-bundle + - git + - ruby-${{vars.rubyMM}} + - ruby-${{vars.rubyMM}}-dev + +pipeline: + - uses: git-checkout + with: + repository: https://github.com/ruby/net-http + tag: v${{package.version}} + expected-commit: 8cee86e939f69bd0906864e7eb740bb471a205bd + + - uses: ruby/build + with: + gem: ${{vars.gem}} + + - uses: ruby/install + with: + gem: ${{vars.gem}} + version: ${{package.version}} + + - uses: ruby/clean + +vars: + gem: net-http + +test: + pipeline: + - name: Verify library import + runs: ruby -e "require 'net/http'" + - name: Basic usage + runs: | + cat < /tmp/test.rb + require "net/http" + uri = URI("https://edu.chainguard.dev/open-source/wolfi/overview/") + Net::HTTP.get(uri) + puts "OK" + EOF + ruby /tmp/test.rb + +update: + enabled: true + github: + identifier: ruby/net-http + strip-prefix: v + +var-transforms: + - from: ${{package.name}} + match: ^ruby(\d\.\d+)-.* + replace: $1 + to: rubyMM diff --git a/ruby4.0-net-imap.yaml b/ruby4.0-net-imap.yaml new file mode 100644 index 00000000000..cff31d26da6 --- /dev/null +++ b/ruby4.0-net-imap.yaml @@ -0,0 +1,81 @@ +package: + name: ruby4.0-net-imap + version: "0.6.2" + epoch: 0 + description: Ruby client api for Internet Message Access Protocol + copyright: + - license: Ruby + - license: BSD-2-Clause + dependencies: + runtime: + - ruby${{vars.rubyMM}}-date + - ruby${{vars.rubyMM}}-net-protocol + +environment: + contents: + packages: + - build-base + - busybox + - ca-certificates-bundle + - git + - ruby-${{vars.rubyMM}} + - ruby-${{vars.rubyMM}}-dev + +pipeline: + - uses: git-checkout + with: + expected-commit: 38622aa7bf4cb1c412ac246561161228f04d22ac + repository: https://github.com/ruby/net-imap + tag: v${{package.version}} + + - uses: ruby/build + with: + gem: ${{vars.gem}} + + - uses: ruby/install + with: + gem: ${{vars.gem}} + version: ${{package.version}} + + - uses: ruby/clean + +vars: + gem: net-imap + +update: + enabled: true + github: + identifier: ruby/net-imap + strip-prefix: v + use-tag: true + +var-transforms: + - from: ${{package.name}} + match: ^ruby(\d\.\d+)-.* + replace: $1 + to: rubyMM + +test: + environment: + contents: + packages: + - build-base + - ruby-${{vars.rubyMM}}-dev + - ruby${{vars.rubyMM}}-bundler + - ruby${{vars.rubyMM}}-json + - ruby${{vars.rubyMM}}-psych + - ruby${{vars.rubyMM}}-stringio + pipeline: + - runs: | + # Test that our installed package is importable + ruby -e "require 'net/imap'" + - uses: git-checkout + with: + expected-commit: bab9dfb161d473d7b379b6d0e060fef28791ccb9 + repository: https://github.com/ruby/net-imap + tag: v${{package.version}} + - runs: | + # Run upstream tests: against the repo's code not our installed + # package, but at least find out if we have incompatibilities + bundle install + bundle exec rake test diff --git a/ruby4.0-net-protocol.yaml b/ruby4.0-net-protocol.yaml new file mode 100644 index 00000000000..7b1974d9f41 --- /dev/null +++ b/ruby4.0-net-protocol.yaml @@ -0,0 +1,105 @@ +package: + name: ruby4.0-net-protocol + version: 0.2.2 + epoch: 0 + description: The abstract interface for net-* client. + copyright: + - license: Ruby + - license: BSD-2-Clause + dependencies: + runtime: + - ruby${{vars.rubyMM}}-timeout + +environment: + contents: + packages: + - build-base + - busybox + - ca-certificates-bundle + - git + - ruby-${{vars.rubyMM}} + - ruby-${{vars.rubyMM}}-dev + +pipeline: + - uses: git-checkout + with: + expected-commit: 2d3c4b43a837a616e5853f807cde63aaffbcd280 + repository: https://github.com/ruby/net-protocol + tag: v${{package.version}} + + - uses: ruby/build + with: + gem: ${{vars.gem}} + + - uses: ruby/install + with: + gem: ${{vars.gem}} + version: ${{package.version}} + + - uses: ruby/clean + +vars: + gem: net-protocol + +update: + enabled: true + github: + identifier: ruby/net-protocol + strip-prefix: v + +var-transforms: + - from: ${{package.name}} + match: ^ruby(\d\.\d+)-.* + replace: $1 + to: rubyMM + +test: + environment: + contents: + packages: + - ruby-${{vars.rubyMM}} + pipeline: + - uses: test/tw/gem-check + - name: Verify library loading and classes + runs: | + ruby <<-EOF + require 'net/protocol' + + # Verify basic classes and constants + expected_classes = [ + Net::Protocol, + Net::BufferedIO, + Net::WriteTimeout, + Net::ReadTimeout, + Net::ProtocolError + ] + + present_classes = expected_classes.select { |cls| Object.const_defined?(cls.to_s) } + + puts "Found #{present_classes.size}/#{expected_classes.size} expected classes:" + present_classes.each { |cls| puts "- #{cls}" } + + # Verify we can instantiate a Protocol object + proto = Net::Protocol.new + puts "Successfully created Net::Protocol instance" + + # Check class constants and methods + if Net::Protocol.const_defined?(:VERSION) + puts "VERSION: #{Net::Protocol::VERSION}" + end + + # Verify BufferedIO which is the main functional class in this gem + if Net::BufferedIO.method_defined?(:read_timeout) && + Net::BufferedIO.method_defined?(:read_timeout=) && + Net::BufferedIO.method_defined?(:write_timeout) && + Net::BufferedIO.method_defined?(:write_timeout=) + puts "BufferedIO timeout methods are properly defined" + else + puts "Expected timeout methods are missing from BufferedIO" + methods = Net::BufferedIO.instance_methods(false).sort + puts "Available methods: #{methods.join(', ')}" + exit 1 + end + + puts "All net/protocol class verification completed successfully" + EOF diff --git a/ruby4.0-netrc.yaml b/ruby4.0-netrc.yaml new file mode 100644 index 00000000000..5f3b26f678e --- /dev/null +++ b/ruby4.0-netrc.yaml @@ -0,0 +1,70 @@ +package: + name: ruby4.0-netrc + version: 0.11.0 + epoch: 0 + description: This library can read and update netrc files, preserving formatting including comments and whitespace. + copyright: + - license: MIT + +environment: + contents: + packages: + - build-base + - busybox + - ca-certificates-bundle + - git + - ruby-${{vars.rubyMM}} + - ruby-${{vars.rubyMM}}-dev + +pipeline: + - uses: git-checkout + with: + expected-commit: 6ce9be04800aae0df1b7d44ce195117485de8b6a + repository: https://github.com/heroku/netrc + tag: v${{package.version}} + + - uses: ruby/build + with: + gem: ${{vars.gem}} + + - uses: ruby/install + with: + gem: ${{vars.gem}} + version: ${{package.version}} + + - uses: ruby/clean + +vars: + gem: netrc + +test: + pipeline: + - runs: | + ruby -e "require 'netrc'" + - name: Simple test + runs: | + cat < /tmp/.netrc + machine example.com + login netrc + password test + EOF + chmod 0600 /tmp/.netrc + cat < /tmp/test.rb + require 'netrc' + n = Netrc.read("/tmp/.netrc") + user, pass = n["example.com"] + EOF + ruby /tmp/test.rb + +# heroku uses IP allow list for querying GitHub API +update: + enabled: true + git: + strip-prefix: v + tag-filter-prefix: v + +var-transforms: + - from: ${{package.name}} + match: ^ruby(\d\.\d+)-.* + replace: $1 + to: rubyMM diff --git a/ruby4.0-nio4r.yaml b/ruby4.0-nio4r.yaml new file mode 100644 index 00000000000..4ffbbc787e5 --- /dev/null +++ b/ruby4.0-nio4r.yaml @@ -0,0 +1,56 @@ +# Generated from https://github.com/socketry/nio4r/tree/v2.5.9 +package: + name: ruby4.0-nio4r + version: 2.7.1 + epoch: 0 + description: Cross-platform asynchronous I/O primitives for scalable network clients and servers. Inspired by the Java NIO API, but simplified for ease-of-use. + copyright: + - license: MIT + +environment: + contents: + packages: + - build-base + - busybox + - ca-certificates-bundle + - git + - ruby-${{vars.rubyMM}} + - ruby-${{vars.rubyMM}}-dev + +pipeline: + - uses: git-checkout + with: + expected-commit: d8179e72a63d763ba9a84cbfa7a3412e7f100985 + repository: https://github.com/socketry/nio4r + tag: v${{package.version}} + + - uses: ruby/build + with: + gem: ${{vars.gem}} + + - uses: ruby/install + with: + gem: ${{vars.gem}} + version: ${{package.version}} + + - uses: ruby/clean + +vars: + gem: nio4r + +update: + enabled: true + github: + identifier: socketry/nio4r + strip-prefix: v + +var-transforms: + - from: ${{package.name}} + match: ^ruby(\d\.\d+)-.* + replace: $1 + to: rubyMM + +test: + pipeline: + - uses: test/tw/gem-check + - uses: test/tw/ldd-check diff --git a/ruby4.0-nokogiri.yaml b/ruby4.0-nokogiri.yaml new file mode 100644 index 00000000000..2a7dfd93581 --- /dev/null +++ b/ruby4.0-nokogiri.yaml @@ -0,0 +1,97 @@ +# Generated from https://github.com/sparklemotion/nokogiri +package: + name: ruby4.0-nokogiri + version: "1.18.10" + epoch: 0 + description: | + Nokogiri makes it easy and painless to work with XML and HTML from Ruby. + copyright: + - license: MIT + dependencies: + runtime: + - ruby${{vars.rubyMM}}-mini_portile2 + +environment: + contents: + packages: + - build-base + - busybox + - ca-certificates-bundle + - git + - ruby${{vars.rubyMM}}-mini_portile2 + - ruby-${{vars.rubyMM}} + - ruby-${{vars.rubyMM}}-dev + # Upstream also does this in their CI. Otherwise we need to wait for mirrors. + environment: + NOKOGIRI_USE_CANONICAL_GNOME_SOURCE: t + +pipeline: + - uses: git-checkout + with: + repository: https://github.com/sparklemotion/nokogiri.git + tag: v${{package.version}} + expected-commit: 680374099b3570b97471f822acc978cc847fee46 + + - uses: ruby/build + with: + gem: ${{vars.gem}} + + - uses: ruby/install + with: + gem: ${{vars.gem}} + version: ${{package.version}} + + - uses: ruby/clean + +update: + enabled: true + github: + identifier: sparklemotion/nokogiri + strip-prefix: v + use-tag: true + tag-filter: v + +vars: + gem: nokogiri + +test: + pipeline: + - uses: test/tw/gem-check + with: + require: | + nokogiri + nokogiri/class_resolver + nokogiri/extension + nokogiri/gumbo + nokogiri/syntax_error + nokogiri/version + nokogiri/css/node + nokogiri/css/parser + nokogiri/css/selector_cache + nokogiri/css/syntax_error + nokogiri/css/tokenizer + nokogiri/decorators/slop + nokogiri/html4/element_description + nokogiri/html4/element_description_defaults + nokogiri/html4/entity_lookup + nokogiri/html4/sax/push_parser + nokogiri/version/constant + nokogiri/xml/notation + nokogiri/xml/parse_options + nokogiri/xml/pp + nokogiri/xml/schema + nokogiri/xml/searchable + nokogiri/xml/xpath_context + nokogiri/xml/pp/character_data + nokogiri/xml/pp/node + nokogiri/xml/sax/document + nokogiri/xml/sax/parser_context + nokogiri/xml/sax/push_parser + nokogiri/xslt/stylesheet + - uses: test/tw/ldd-check + +var-transforms: + - from: ${{package.name}} + match: ^ruby(\d\.\d+)-.* + replace: $1 + to: rubyMM diff --git a/ruby4.0-numerizer.yaml b/ruby4.0-numerizer.yaml new file mode 100644 index 00000000000..f8a1d186786 --- /dev/null +++ b/ruby4.0-numerizer.yaml @@ -0,0 +1,225 @@ +# Generated from http://github.com/jduff/numerizer +package: + name: ruby4.0-numerizer + version: 0.2.0 + epoch: 0 + description: Numerizer is a gem to help with parsing numbers in natural language from strings (ex forty two). It was extracted from the awesome Chronic gem http://github.com/evaryont/chronic. + copyright: + - license: MIT + +environment: + contents: + packages: + - build-base + - busybox + - ca-certificates-bundle + - git + - ruby-${{vars.rubyMM}} + - ruby-${{vars.rubyMM}}-dev + +pipeline: + - uses: git-checkout + with: + repository: https://github.com/jduff/numerizer + tag: v${{package.version}} + expected-commit: 83c0eedb5b49053b3e36434c3d640a8291587fd3 + + - uses: ruby/build + with: + gem: ${{vars.gem}} + + - uses: ruby/install + with: + gem: ${{vars.gem}} + version: ${{package.version}} + + - uses: ruby/clean + +vars: + gem: numerizer + +update: + enabled: true + github: + identifier: jduff/numerizer + strip-prefix: v + use-tag: true + +var-transforms: + - from: ${{package.name}} + match: ^ruby(\d\.\d+)-.* + replace: $1 + to: rubyMM + +test: + environment: + contents: + packages: + - ruby-${{vars.rubyMM}} + pipeline: + - uses: test/tw/gem-check + - name: Verify library loading + runs: | + ruby -e "require 'numerizer'; puts 'Successfully loaded numerizer gem'" + - name: Test number parsing functionality + runs: | + ruby <<-EOF + require 'numerizer' + + begin + # Test basic number words + tests = { + 'one' => '1', + 'two' => '2', + 'three' => '3', + 'four' => '4', + 'five' => '5', + 'six' => '6', + 'seven' => '7', + 'eight' => '8', + 'nine' => '9', + 'ten' => '10', + 'eleven' => '11', + 'twelve' => '12', + 'thirteen' => '13', + 'fourteen' => '14', + 'fifteen' => '15', + 'sixteen' => '16', + 'seventeen' => '17', + 'eighteen' => '18', + 'nineteen' => '19', + 'twenty' => '20' + } + + tests.each do |input, expected| + result = Numerizer.numerize(input) + raise "Basic test failed for '\#{input}': expected '\#{expected}', got '\#{result}'" unless result == expected + end + puts "Basic number word tests passed!" + + # Test tens + tests = { + 'twenty' => '20', + 'thirty' => '30', + 'forty' => '40', + 'fifty' => '50', + 'sixty' => '60', + 'seventy' => '70', + 'eighty' => '80', + 'ninety' => '90' + } + + tests.each do |input, expected| + result = Numerizer.numerize(input) + raise "Tens test failed for '\#{input}': expected '\#{expected}', got '\#{result}'" unless result == expected + end + puts "Tens number tests passed!" + + # Test compound numbers + tests = { + 'twenty-three' => '23', + 'thirty-seven' => '37', + 'forty-five' => '45', + 'fifty-nine' => '59', + 'seventy-six' => '76', + 'eighty-eight' => '88', + 'ninety-nine' => '99' + } + + tests.each do |input, expected| + result = Numerizer.numerize(input) + raise "Compound test failed for '\#{input}': expected '\#{expected}', got '\#{result}'" unless result == expected + end + puts "Compound number tests passed!" + + # Test larger numbers + tests = { + 'one hundred' => '100', + 'two hundred and five' => '205', + 'five hundred and sixty-seven' => '567', + 'one thousand' => '1000', + 'two thousand and one' => '2001', + 'five thousand three hundred and forty-two' => '5342', + 'one million' => '1000000', + 'two million five hundred thousand' => '2500000' + } + + tests.each do |input, expected| + result = Numerizer.numerize(input) + raise "Large number test failed for '\#{input}': expected '\#{expected}', got '\#{result}'" unless result == expected + end + puts "Large number tests passed!" + + # Test fractions + tests = { + 'a half' => '1/2', + 'one half' => '1/2', + 'a quarter' => '1/4', + 'one quarter' => '1/4', + 'three quarters' => '3/4', + 'two thirds' => '2/3', + 'five eighths' => '5/8' + } + + tests.each do |input, expected| + result = Numerizer.numerize(input) + raise "Fraction test failed for '\#{input}': expected '\#{expected}', got '\#{result}'" unless result == expected + end + puts "Fraction tests passed!" + + # Test mixed numbers + tests = { + 'one and a half' => '1.5', + 'two and a quarter' => '2.25', + 'three and three quarters' => '3.75' + } + + tests.each do |input, expected| + result = Numerizer.numerize(input) + raise "Mixed number test failed for '\#{input}': expected '\#{expected}', got '\#{result}'" unless result == expected + end + puts "Mixed number tests passed!" + + # Test numbers in context + tests = { + 'I have five apples' => 'I have 5 apples', + 'There are twenty-five people here' => 'There are 25 people here', + 'One hundred and twenty-five dolls in the shop' => '125 dolls in the shop' + } + + tests.each do |input, expected| + result = Numerizer.numerize(input) + raise "Context test failed for '\#{input}': expected '\#{expected}', got '\#{result}'" unless result == expected + end + puts "Numbers in context tests passed!" + + # Test bias parameter + begin + ambiguous_input = 'quarter' + fractional = Numerizer.numerize(ambiguous_input, bias: :fractional) + ordinal = Numerizer.numerize(ambiguous_input, bias: :ordinal) + + raise "Bias test failed for fractional" unless fractional == '1/4' + raise "Bias test failed for ordinal" unless ordinal == '4th' + puts "Bias parameter tests passed!" + rescue => e + puts "Bias parameter tests skipped: #{e.message}" + end + + # Test ignore parameter + begin + input = 'five horses and six sheep' + ignored = Numerizer.numerize(input, ignore: ['five']) + + raise "Ignore test failed" unless ignored == 'five horses and 6 sheep' + puts "Ignore parameter test passed!" + rescue => e + puts "Ignore parameter test skipped: #{e.message}" + end + + puts "All numerizer tests passed successfully!" + rescue => e + puts "Test failed: \#{e.message}" + exit 1 + end + EOF diff --git a/ruby4.0-oauth2.yaml b/ruby4.0-oauth2.yaml new file mode 100644 index 00000000000..d6f4753f868 --- /dev/null +++ b/ruby4.0-oauth2.yaml @@ -0,0 +1,104 @@ +package: + name: ruby4.0-oauth2 + version: "2.0.18" + epoch: 0 + description: A Ruby wrapper for the OAuth 2.0 protocol built with a similar style to the original OAuth spec. + copyright: + - license: MIT + dependencies: + runtime: + - ruby${{vars.rubyMM}}-faraday + - ruby${{vars.rubyMM}}-jwt + - ruby${{vars.rubyMM}}-multi_xml + - ruby${{vars.rubyMM}}-rack + - ruby${{vars.rubyMM}}-snaky_hash + - ruby${{vars.rubyMM}}-version_gem + +environment: + contents: + packages: + - build-base + - busybox + - ca-certificates-bundle + - git + - ruby-${{vars.rubyMM}} + - ruby-${{vars.rubyMM}}-dev + +pipeline: + - uses: git-checkout + with: + repository: https://gitlab.com/oauth-xx/oauth2 + tag: v${{package.version}} + expected-commit: b5753116121553d56937039dafc5ea472d9a99ed + + - uses: ruby/build + with: + gem: ${{vars.gem}} + + - uses: ruby/install + with: + gem: ${{vars.gem}} + version: ${{package.version}} + + - uses: ruby/clean + +vars: + gem: oauth2 + +test: + environment: + contents: + packages: + - ruby-${{vars.rubyMM}} + pipeline: + - name: Verify library loading + runs: | + ruby -e "require 'oauth2'; puts 'Successfully loaded OAuth2 library'" + - name: Verify class instantiation + runs: | + ruby <<-EOF + require 'oauth2' + + begin + # Test creating an OAuth2::Client + client = OAuth2::Client.new( + 'client_id', + 'client_secret', + site: 'https://example.org' + ) + + # Verify client was created successfully + raise "Client instantiation failed" unless client.is_a?(OAuth2::Client) + puts "Client instantiation successful" + + # Verify client ID and secret were set correctly + raise "Client ID not set correctly" unless client.id == 'client_id' + raise "Client secret not set correctly" unless client.secret == 'client_secret' + puts "Client ID and secret verified" + + # Verify site was set correctly + raise "Site not set correctly" unless client.site == 'https://example.org' + puts "Site URL verified" + + # Test creating an access token instance + token = OAuth2::AccessToken.new(client, 'sample_token') + raise "Token instantiation failed" unless token.is_a?(OAuth2::AccessToken) + puts "Token instantiation successful" + + puts "All OAuth2 tests passed successfully!" + rescue => e + puts "Test failed with error: #{e.message}" + exit 1 + end + EOF + +update: + enabled: true + git: + strip-prefix: v + +var-transforms: + - from: ${{package.name}} + match: ^ruby(\d\.\d+)-.* + replace: $1 + to: rubyMM diff --git a/ruby4.0-octokit.yaml b/ruby4.0-octokit.yaml new file mode 100644 index 00000000000..7347e6d835e --- /dev/null +++ b/ruby4.0-octokit.yaml @@ -0,0 +1,147 @@ +# Generated from https://github.com/octokit/octokit.rb +package: + name: ruby4.0-octokit + version: "10.0.0" + epoch: 0 + description: Simple wrapper for the GitHub API + copyright: + - license: MIT + dependencies: + runtime: + - ruby${{vars.rubyMM}}-faraday + - ruby${{vars.rubyMM}}-sawyer + +environment: + contents: + packages: + - build-base + - busybox + - ca-certificates-bundle + - git + - ruby-${{vars.rubyMM}} + - ruby-${{vars.rubyMM}}-dev + +pipeline: + - uses: git-checkout + with: + repository: https://github.com/octokit/octokit.rb.git + tag: v${{package.version}} + expected-commit: ea3413c3174571e87c83d358fc893cc7613091fa + cherry-picks: | + master/b2ac1e62cd5e9228db6c6e70e0871dd04a2f3915: Update octokit requirement from >= 4.20, < 10.0 to >= 4.20, < 11.0 + + - uses: ruby/build + with: + gem: ${{vars.gem}} + + - uses: ruby/install + with: + gem: ${{vars.gem}} + version: ${{package.version}} + + - uses: ruby/clean + +update: + enabled: true + github: + identifier: octokit/octokit.rb + strip-prefix: v + use-tag: true + tag-filter: v + +vars: + gem: octokit + +test: + pipeline: + - uses: test/tw/gem-check + with: + require: | + ext/sawyer/relation + octokit/arguments + octokit/client + octokit/configurable + octokit/connection + octokit/enterprise_admin_client + octokit/enterprise_management_console_client + octokit/error + octokit/gist + octokit/manage_ghes_client + octokit/organization + octokit/rate_limit + octokit/user + octokit/version + octokit/warnable + octokit/client/actions_artifacts + octokit/client/actions_secrets + octokit/client/actions_workflow_jobs + octokit/client/actions_workflow_runs + octokit/client/actions_workflows + octokit/client/apps + octokit/client/checks + octokit/client/code_scanning + octokit/client/codespaces_secrets + octokit/client/commit_branches + octokit/client/commit_comments + octokit/client/commit_pulls + octokit/client/commits + octokit/client/community_profile + octokit/client/contents + octokit/client/dependabot_secrets + octokit/client/deployments + octokit/client/downloads + octokit/client/emojis + octokit/client/environments + octokit/client/events + octokit/client/feeds + octokit/client/gists + octokit/client/gitignore + octokit/client/hooks + octokit/client/issues + octokit/client/labels + octokit/client/legacy_search + octokit/client/licenses + octokit/client/markdown + octokit/client/marketplace + octokit/client/meta + octokit/client/milestones + octokit/client/notifications + octokit/client/oauth_applications + octokit/client/objects + octokit/client/organizations + octokit/client/pages + octokit/client/projects + octokit/client/pull_requests + octokit/client/rate_limit + octokit/client/reactions + octokit/client/refs + octokit/client/releases + octokit/client/repositories + octokit/client/repository_invitations + octokit/client/reviews + octokit/client/say + octokit/client/search + octokit/client/service_status + octokit/client/source_import + octokit/client/stats + octokit/client/statuses + octokit/client/tokens + octokit/client/traffic + octokit/client/users + octokit/enterprise_admin_client/admin_stats + octokit/enterprise_admin_client/license + octokit/enterprise_admin_client/orgs + octokit/enterprise_admin_client/search_indexing + octokit/enterprise_admin_client/users + octokit/enterprise_management_console_client/management_console + octokit/manage_ghes_client/manage_ghes + octokit/middleware/follow_redirects + octokit/response/base_middleware + octokit/response/feed_parser + octokit/response/raise_error + +var-transforms: + - from: ${{package.name}} + match: ^ruby(\d\.\d+)-.* + replace: $1 + to: rubyMM diff --git a/ruby4.0-oj.yaml b/ruby4.0-oj.yaml new file mode 100644 index 00000000000..f01641799ce --- /dev/null +++ b/ruby4.0-oj.yaml @@ -0,0 +1,71 @@ +package: + name: ruby4.0-oj + version: "3.16.13" + epoch: 0 + description: The fastest JSON parser and object serializer. + copyright: + - license: MIT + dependencies: + runtime: + - ruby-${{vars.rubyMM}} + +environment: + contents: + packages: + - build-base + - busybox + - ca-certificates-bundle + - git + - ruby-${{vars.rubyMM}} + - ruby-${{vars.rubyMM}}-dev + +vars: + gem: oj + +pipeline: + - uses: git-checkout + with: + expected-commit: 63499b1838b9fe1304d56472c899522b0c49298c + repository: https://github.com/ohler55/oj + tag: v${{package.version}} + + - uses: ruby/build + with: + gem: ${{vars.gem}} + + - uses: ruby/install + with: + gem: ${{vars.gem}} + version: ${{package.version}} + + - uses: ruby/clean + +update: + enabled: true + github: + identifier: ohler55/oj + strip-prefix: v + use-tag: true + +var-transforms: + - from: ${{package.name}} + match: ^ruby(\d\.\d+)-.* + replace: $1 + to: rubyMM + +test: + pipeline: + - uses: test/tw/gem-check + with: + require: | + oj + oj/bag + oj/easy_hash + oj/error + oj/json + oj/mimic + oj/saj + oj/schandler + oj/state + oj/version + - uses: test/tw/ldd-check diff --git a/ruby4.0-openid_connect-1.1.8.yaml b/ruby4.0-openid_connect-1.1.8.yaml new file mode 100644 index 00000000000..4f1740b18ef --- /dev/null +++ b/ruby4.0-openid_connect-1.1.8.yaml @@ -0,0 +1,134 @@ +package: + name: ruby4.0-openid_connect-1.1.8 + version: 1.1.8 + epoch: 0 + description: OpenID Connect Server & Client Library + copyright: + - license: MIT + dependencies: + runtime: + - ruby${{vars.rubyMM}}-activemodel + - ruby${{vars.rubyMM}}-attr_required + - ruby${{vars.rubyMM}}-faraday + - ruby${{vars.rubyMM}}-faraday-follow_redirects + - ruby${{vars.rubyMM}}-json-jwt + - ruby${{vars.rubyMM}}-rack-oauth2 + - ruby${{vars.rubyMM}}-swd + - ruby${{vars.rubyMM}}-tzinfo + - ruby${{vars.rubyMM}}-validate_email + - ruby${{vars.rubyMM}}-validate_url + - ruby${{vars.rubyMM}}-webfinger + provides: + - ruby${{vars.rubyMM}}-openid_connect=${{package.full-version}} + +environment: + contents: + packages: + - build-base + - busybox + - ca-certificates-bundle + - git + - ruby-${{vars.rubyMM}} + - ruby-${{vars.rubyMM}}-dev + +pipeline: + - uses: git-checkout + with: + repository: https://github.com/nov/openid_connect + tag: v${{package.version}} + expected-commit: c3614e860e37e4ddd30b4ac91588b4326a129f98 + + - uses: ruby/build + with: + gem: ${{vars.gem}} + + - uses: ruby/install + with: + gem: ${{vars.gem}} + version: ${{package.version}} + + - uses: ruby/clean + +vars: + gem: openid_connect + +update: + enabled: false + exclude-reason: | + This is a pinned version of the OpenID Connect library. We do not want to update it. + +test: + environment: + contents: + packages: + - ruby-${{vars.rubyMM}} + - ruby${{vars.rubyMM}}-tzinfo-data + pipeline: + - name: Verify OpenID Connect library loading + runs: | + ruby -e "require 'openid_connect'; puts 'Successfully loaded OpenID Connect gem version ' + OpenIDConnect::VERSION" + - name: Test OpenID Connect functionality + runs: | + ruby <<-EOF + require 'openid_connect' + + begin + puts "Testing OpenID Connect functionality..." + + # Test Client class - core functionality of OpenID Connect + puts "Testing Client class..." + client = OpenIDConnect::Client.new( + identifier: 'client_id', + secret: 'client_secret', + redirect_uri: 'https://example.com/callback', + authorization_endpoint: 'https://provider.example.com/auth', + token_endpoint: 'https://provider.example.com/token', + userinfo_endpoint: 'https://provider.example.com/userinfo' + ) + + # Verify client configuration + unless client.identifier == 'client_id' && + client.secret == 'client_secret' && + client.redirect_uri == 'https://example.com/callback' + raise "Client configuration failed" + end + puts "Client configured successfully" + + # Generate an authorization URL - this is a key function of the OpenID Connect client + auth_url = client.authorization_uri( + response_type: :code, + scope: [:openid, :email, :profile], + state: 'random_state', + nonce: 'random_nonce' + ) + + # Verify URL contains expected parameters according to the OpenID Connect spec + %w(client_id redirect_uri response_type scope state nonce).each do |param| + unless auth_url.include?(param) + raise "Authorization URL missing parameter: \#{param}" + end + end + puts "Authorization URL generated successfully: \#{auth_url}" + + # Check available scopes - another important aspect of OpenID Connect + puts "Available scopes: \#{OpenIDConnect::ResponseObject::IdToken::ACCESSIBLE_ATTRIBUTES.join(', ')}" + + # Verify discovery endpoint class - used for OpenID Connect Discovery + unless defined?(OpenIDConnect::Discovery::Provider::Config) + raise "Missing Discovery Provider Config class" + end + puts "Discovery Provider Config class available" + + puts "All OpenID Connect tests passed successfully!" + rescue => e + puts "Test failed: \#{e.message}" + puts e.backtrace + exit 1 + end + EOF + +var-transforms: + - from: ${{package.name}} + match: ^ruby(\d\.\d+)-.* + replace: $1 + to: rubyMM diff --git a/ruby4.0-openid_connect.yaml b/ruby4.0-openid_connect.yaml new file mode 100644 index 00000000000..b279fb15244 --- /dev/null +++ b/ruby4.0-openid_connect.yaml @@ -0,0 +1,133 @@ +package: + name: ruby4.0-openid_connect + version: 2.3.0 + epoch: 0 + description: OpenID Connect Server & Client Library + copyright: + - license: MIT + dependencies: + runtime: + - ruby${{vars.rubyMM}}-activemodel + - ruby${{vars.rubyMM}}-attr_required + - ruby${{vars.rubyMM}}-email_validator + - ruby${{vars.rubyMM}}-faraday + - ruby${{vars.rubyMM}}-faraday-follow_redirects + - ruby${{vars.rubyMM}}-json-jwt + - ruby${{vars.rubyMM}}-rack-oauth2 + - ruby${{vars.rubyMM}}-swd + - ruby${{vars.rubyMM}}-tzinfo + - ruby${{vars.rubyMM}}-validate_url + - ruby${{vars.rubyMM}}-webfinger + +environment: + contents: + packages: + - build-base + - busybox + - ca-certificates-bundle + - git + - ruby-${{vars.rubyMM}} + - ruby-${{vars.rubyMM}}-dev + +pipeline: + - uses: git-checkout + with: + expected-commit: e1eb8ea962af43752b1aed2c1063a3e24f96c5bc + repository: https://github.com/nov/openid_connect + tag: v${{package.version}} + + - uses: ruby/build + with: + gem: ${{vars.gem}} + + - uses: ruby/install + with: + gem: ${{vars.gem}} + version: ${{package.version}} + + - uses: ruby/clean + +vars: + gem: openid_connect + +update: + enabled: true + github: + identifier: nov/openid_connect + strip-prefix: v + +var-transforms: + - from: ${{package.name}} + match: ^ruby(\d\.\d+)-.* + replace: $1 + to: rubyMM + +test: + environment: + contents: + packages: + - ruby-${{vars.rubyMM}} + - ruby${{vars.rubyMM}}-tzinfo-data + pipeline: + - name: Verify OpenID Connect library loading + runs: | + ruby -e "require 'openid_connect'; puts 'Successfully loaded OpenID Connect gem version ' + OpenIDConnect::VERSION" + - name: Test OpenID Connect functionality + runs: | + ruby <<-EOF + require 'openid_connect' + + begin + puts "Testing OpenID Connect functionality..." + + # Test Client class - core functionality of OpenID Connect + puts "Testing Client class..." + client = OpenIDConnect::Client.new( + identifier: 'client_id', + secret: 'client_secret', + redirect_uri: 'https://example.com/callback', + authorization_endpoint: 'https://provider.example.com/auth', + token_endpoint: 'https://provider.example.com/token', + userinfo_endpoint: 'https://provider.example.com/userinfo' + ) + + # Verify client configuration + unless client.identifier == 'client_id' && + client.secret == 'client_secret' && + client.redirect_uri == 'https://example.com/callback' + raise "Client configuration failed" + end + puts "Client configured successfully" + + # Generate an authorization URL - this is a key function of the OpenID Connect client + auth_url = client.authorization_uri( + response_type: :code, + scope: [:openid, :email, :profile], + state: 'random_state', + nonce: 'random_nonce' + ) + + # Verify URL contains expected parameters according to the OpenID Connect spec + %w(client_id redirect_uri response_type scope state nonce).each do |param| + unless auth_url.include?(param) + raise "Authorization URL missing parameter: \#{param}" + end + end + puts "Authorization URL generated successfully: \#{auth_url}" + + # Check available scopes - another important aspect of OpenID Connect + puts "Available scopes: \#{OpenIDConnect::ResponseObject::IdToken::ACCESSIBLE_ATTRIBUTES.join(', ')}" + + # Verify discovery endpoint class - used for OpenID Connect Discovery + unless defined?(OpenIDConnect::Discovery::Provider::Config) + raise "Missing Discovery Provider Config class" + end + puts "Discovery Provider Config class available" + + puts "All OpenID Connect tests passed successfully!" + rescue => e + puts "Test failed: \#{e.message}" + puts e.backtrace + exit 1 + end + EOF diff --git a/ruby4.0-openssl_pkcs8_pure.yaml b/ruby4.0-openssl_pkcs8_pure.yaml new file mode 100644 index 00000000000..e2fc45defa8 --- /dev/null +++ b/ruby4.0-openssl_pkcs8_pure.yaml @@ -0,0 +1,56 @@ +# Generated from http://github.com/cielavenir/openssl_pkcs8_pure +package: + name: ruby4.0-openssl_pkcs8_pure + version: 0.0.0.2 + epoch: 0 + description: OpenSSL::PKey::[DSA/RSA/EC]#to_pem_pkcs8 written in Ruby + copyright: + - license: BSD-2-Clause + +environment: + contents: + packages: + - build-base + - busybox + - ca-certificates-bundle + - git + - ruby-${{vars.rubyMM}} + - ruby-${{vars.rubyMM}}-dev + +pipeline: + - uses: git-checkout + with: + repository: https://github.com/cielavenir/openssl_pkcs8_pure + tag: v${{package.version}} + expected-commit: 380967a0e48f3029b80874fd5a3d21e0b33ce7f8 + + - uses: ruby/build + with: + gem: ${{vars.gem}} + + - uses: ruby/install + with: + gem: ${{vars.gem}} + version: ${{package.version}} + + - uses: ruby/clean + +vars: + gem: openssl_pkcs8_pure + +update: + enabled: true + github: + identifier: cielavenir/openssl_pkcs8_pure + strip-prefix: v + use-tag: true + +var-transforms: + - from: ${{package.name}} + match: ^ruby(\d\.\d+)-.* + replace: $1 + to: rubyMM + +test: + pipeline: + - uses: test/tw/gem-check diff --git a/ruby4.0-pg.yaml b/ruby4.0-pg.yaml new file mode 100644 index 00000000000..4285bdcfa74 --- /dev/null +++ b/ruby4.0-pg.yaml @@ -0,0 +1,70 @@ +# Generated from https://github.com/ged/ruby-pg +package: + name: ruby4.0-pg + version: "1.6.2" + epoch: 0 + description: Pg is the Ruby interface to the PostgreSQL RDBMS. It works with PostgreSQL 9.3 and later. + copyright: + - license: BSD-2-Clause + +environment: + contents: + packages: + - build-base + - busybox + - ca-certificates-bundle + - git + - libpq + - postgresql-dev + - ruby-${{vars.rubyMM}} + - ruby-${{vars.rubyMM}}-dev + +pipeline: + - uses: git-checkout + with: + expected-commit: c75ed8da19c356b52d83da2627295760780d3d36 + repository: https://github.com/ged/ruby-pg + tag: v${{package.version}} + + - uses: ruby/build + with: + gem: ${{vars.gem}} + + - uses: ruby/install + with: + gem: ${{vars.gem}} + version: ${{package.version}} + + - uses: ruby/clean + +vars: + gem: pg + +update: + enabled: true + github: + identifier: ged/ruby-pg + strip-prefix: v + use-tag: true + +test: + environment: + contents: + repositories: + - https://packages.wolfi.dev/os + keyring: + - https://packages.wolfi.dev/os/wolfi-signing.rsa.pub + packages: + - shadow + - ruby-${{vars.rubyMM}}-dev + pipeline: + - name: Check pg is install + runs: | + echo "Is pg installed?: $(gem list -i pg)" + - uses: test/tw/ldd-check + +var-transforms: + - from: ${{package.name}} + match: ^ruby(\d\.\d+)-.* + replace: $1 + to: rubyMM diff --git a/ruby4.0-polyglot.yaml b/ruby4.0-polyglot.yaml new file mode 100644 index 00000000000..5bbb9de2b56 --- /dev/null +++ b/ruby4.0-polyglot.yaml @@ -0,0 +1,56 @@ +# Generated from http://github.com/cjheath/polyglot +package: + name: ruby4.0-polyglot + version: 0.3.5 + epoch: 0 + description: Augment 'require' to load non-ruby file types + copyright: + - license: MIT + +environment: + contents: + packages: + - build-base + - busybox + - ca-certificates-bundle + - git + - ruby-${{vars.rubyMM}} + - ruby-${{vars.rubyMM}}-dev + +pipeline: + - uses: git-checkout + with: + expected-commit: 75f4d4d4521f8347a087e852ed81ec867d759854 + repository: https://github.com/cjheath/polyglot + tag: v${{package.version}} + + - uses: ruby/build + with: + gem: ${{vars.gem}} + + - uses: ruby/install + with: + gem: ${{vars.gem}} + version: ${{package.version}} + + - uses: ruby/clean + +vars: + gem: polyglot + +update: + enabled: true + github: + identifier: cjheath/polyglot + strip-prefix: v + use-tag: true + +var-transforms: + - from: ${{package.name}} + match: ^ruby(\d\.\d+)-.* + replace: $1 + to: rubyMM + +test: + pipeline: + - uses: test/tw/gem-check diff --git a/ruby4.0-polyglot/polyglot.gemspec b/ruby4.0-polyglot/polyglot.gemspec new file mode 100644 index 00000000000..d061eef005e --- /dev/null +++ b/ruby4.0-polyglot/polyglot.gemspec @@ -0,0 +1,21 @@ +# polyglot.gemspec +lib = File.expand_path('lib', __dir__) +$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib) +require 'polyglot/version' + +Gem::Specification.new do |spec| + spec.name = "polyglot" + spec.version = Polyglot::VERSION::STRING + spec.authors = ["Clifford Heath"] + spec.email = %w[clifford.heath@gmail.com] + spec.summary = %q{Augment 'require' to load non-Ruby file types} + spec.description = %q{The Polyglot library allows a Ruby module to register a loader +for the file type associated with a filename extension, and it +augments 'require' to find and load matching files.} + spec.homepage = "http://github.com/cjheath/polyglot" + spec.license = "MIT" + + spec.files = Dir["lib/**/*", "README.md", "LICENSE.txt"] + spec.require_paths = ["lib"] +end + diff --git a/ruby4.0-prometheus-client.yaml b/ruby4.0-prometheus-client.yaml new file mode 100644 index 00000000000..258d162c590 --- /dev/null +++ b/ruby4.0-prometheus-client.yaml @@ -0,0 +1,71 @@ +package: + name: ruby4.0-prometheus-client + version: "4.2.5" + epoch: 0 + description: A suite of instrumentation metric primitivesthat can be exposed through a web services interface. + copyright: + - license: Apache-2.0 + +environment: + contents: + packages: + - build-base + - busybox + - ca-certificates-bundle + - git + - ruby-${{vars.rubyMM}} + - ruby-${{vars.rubyMM}}-dev + +pipeline: + - uses: git-checkout + with: + expected-commit: 5c64546870ef306c34374a813c61188fcc1fa546 + repository: https://github.com/prometheus/client_ruby + tag: v${{package.version}} + + - uses: ruby/build + with: + gem: ${{vars.gem}} + + - uses: ruby/install + with: + gem: ${{vars.gem}} + version: ${{package.version}} + + - uses: ruby/clean + +vars: + gem: prometheus-client + +update: + enabled: true + github: + identifier: prometheus/client_ruby + strip-prefix: v + +var-transforms: + - from: ${{package.name}} + match: ^ruby(\d\.\d+)-.* + replace: $1 + to: rubyMM + +test: + environment: + contents: + packages: + - curl + - ruby${{vars.rubyMM}}-puma + - ruby${{vars.rubyMM}}-rackup + pipeline: + - uses: git-checkout + with: + expected-commit: 5c64546870ef306c34374a813c61188fcc1fa546 + repository: https://github.com/prometheus/client_ruby + tag: v${{package.version}} + - runs: | + cd examples/rack + rackup > /dev/null 2>&1 & + sleep 1 + # Put output into ~/debug.log to make figuring error out easier + curl http://127.0.0.1:9292/metrics | tee -a /home/build/debug.log | grep '# TYPE http_server_requests_total counter' > /dev/null + curl http://127.0.0.1:9292/metrics | tee -a /home/build/debug.log | grep 'http_server_requests_total{code="200",method="get",path="/metrics"} 1.0' > /dev/null diff --git a/ruby4.0-protocol-hpack.yaml b/ruby4.0-protocol-hpack.yaml new file mode 100644 index 00000000000..c1020cbd7d3 --- /dev/null +++ b/ruby4.0-protocol-hpack.yaml @@ -0,0 +1,76 @@ +package: + name: ruby4.0-protocol-hpack + version: 1.5.1 + epoch: 0 + description: A compressor and decompressor for HTTP 2.0 HPACK. + copyright: + - license: MIT + dependencies: + runtime: + - ruby-${{vars.rubyMM}} + +environment: + contents: + packages: + - build-base + - busybox + - ca-certificates-bundle + - git + - ruby-${{vars.rubyMM}} + - ruby-${{vars.rubyMM}}-dev + +vars: + gem: protocol-hpack + # NOTE: http-hpack is required for the gemspec name. It has since been + # updated to match the standard naming scheme, however it is not in this tag + gemspec: protocol-hpack + +pipeline: + # This package makes use of `git ls-files` in it's gemspec so the git repo + # must be checked out in order for the gem to build with all files. + - uses: git-checkout + with: + destination: ${{vars.gem}} + expected-commit: e572ccf0d291821915bc9d2d57425c7435b7483b + repository: https://github.com/socketry/http-hpack.git + tag: v${{package.version}} + + - working-directory: ${{vars.gem}} + pipeline: + - uses: ruby/build + with: + # NOTE: See vars.gemspec comment for details + gem: ${{vars.gemspec}} + - uses: ruby/install + with: + gem: ${{vars.gem}} + version: ${{package.version}} + - uses: ruby/clean + +update: + enabled: true + github: + identifier: socketry/http-hpack + strip-prefix: v + use-tag: true + +var-transforms: + - from: ${{package.name}} + match: ^ruby(\d\.\d+)-.* + replace: $1 + to: rubyMM + +test: + pipeline: + - uses: test/tw/gem-check + with: + require: | + protocol/hpack + protocol/hpack/compressor + protocol/hpack/context + protocol/hpack/decompressor + protocol/hpack/error + protocol/hpack/huffman + protocol/hpack/version + protocol/hpack/huffman/generator + protocol/hpack/huffman/machine diff --git a/ruby4.0-protocol-http.yaml b/ruby4.0-protocol-http.yaml new file mode 100644 index 00000000000..bdc578536a5 --- /dev/null +++ b/ruby4.0-protocol-http.yaml @@ -0,0 +1,71 @@ +package: + name: ruby4.0-protocol-http + version: "0.56.1" + epoch: 0 + description: Provides abstractions to handle HTTP protocols. + copyright: + - license: MIT + dependencies: + runtime: + - ruby-${{vars.rubyMM}} + +environment: + contents: + packages: + - build-base + - busybox + - ca-certificates-bundle + - git + - ruby-${{vars.rubyMM}} + - ruby-${{vars.rubyMM}}-dev + +vars: + gem: protocol-http + +pipeline: + - uses: git-checkout + with: + expected-commit: f4f463acfea110cb2f711ad5aceeb9d0b122529f + repository: https://github.com/socketry/protocol-http + tag: v${{package.version}} + + - uses: ruby/build + with: + gem: ${{vars.gem}} + + - uses: ruby/install + with: + gem: ${{vars.gem}} + version: ${{package.version}} + + - uses: ruby/clean + +update: + enabled: true + github: + identifier: socketry/protocol-http + strip-prefix: v + use-tag: true + +test: + pipeline: + - name: Check Gem Installation + runs: | + if gem list | grep -q "${{vars.gem}}"; then + echo "${{vars.gem}} gem installed successfully." + else + echo "${{vars.gem}} gem installation failed!" && exit 1 + fi + - name: Test Functionality + runs: | + ruby -r 'protocol/http' -e ' + request = Protocol::HTTP::Request.new(nil, nil, "GET", "/") + request.headers.add("content-type", "application/json") + puts "Content-Type Header: " + request.headers["content-type"] + ' || (echo "${{vars.gem}} test failed!" && exit 1) + +var-transforms: + - from: ${{package.name}} + match: ^ruby(\d\.\d+)-.* + replace: $1 + to: rubyMM diff --git a/ruby4.0-protocol-http1.yaml b/ruby4.0-protocol-http1.yaml new file mode 100644 index 00000000000..624d2ee3903 --- /dev/null +++ b/ruby4.0-protocol-http1.yaml @@ -0,0 +1,82 @@ +package: + name: ruby4.0-protocol-http1 + version: "0.35.2" + epoch: 0 + description: A low level implementation of the HTTP/1 protocol. + copyright: + - license: MIT + dependencies: + runtime: + - ruby${{vars.rubyMM}}-protocol-http + - ruby-${{vars.rubyMM}} + +environment: + contents: + packages: + - build-base + - busybox + - ca-certificates-bundle + - git + - ruby-${{vars.rubyMM}} + - ruby-${{vars.rubyMM}}-dev + +vars: + gem: protocol-http1 + +pipeline: + - uses: git-checkout + with: + expected-commit: 5b2149ccfd938f3e8d91a9b9f182e790fc5ae92b + repository: https://github.com/socketry/protocol-http1 + tag: v${{package.version}} + + - uses: ruby/build + with: + gem: ${{vars.gem}} + + - uses: ruby/install + with: + gem: ${{vars.gem}} + version: ${{package.version}} + + - uses: ruby/clean + +update: + enabled: true + github: + identifier: socketry/protocol-http1 + strip-prefix: v + use-tag: true + +test: + pipeline: + - runs: ruby -e "require 'protocol/http1'" + - name: Simple HTTP1 test + runs: | + cat < /tmp/test.rb + require 'protocol/http1' + require 'stringio' + + # Create a string that simulates a basic HTTP request + request = "GET / HTTP/1.1\r\nHost: example.com\r\n\r\n" + + # Open the string as if it were a stream + stream = StringIO.new(request) + + # Create an HTTP1 connection using the stream + connection = Protocol::HTTP1::Connection.new(stream) + + # Read and parse the request, returns an array of request components + request = connection.read_request + + # Extract and print the authority (host) from the request + authority = request[0] + puts authority # Expected: "example.com" + EOF + ruby /tmp/test.rb + +var-transforms: + - from: ${{package.name}} + match: ^ruby(\d\.\d+)-.* + replace: $1 + to: rubyMM diff --git a/ruby4.0-protocol-http2.yaml b/ruby4.0-protocol-http2.yaml new file mode 100644 index 00000000000..b2388ac8a9f --- /dev/null +++ b/ruby4.0-protocol-http2.yaml @@ -0,0 +1,87 @@ +package: + name: ruby4.0-protocol-http2 + version: "0.23.0" + epoch: 0 + description: A low level implementation of the HTTP/2 protocol. + copyright: + - license: MIT + dependencies: + runtime: + - ruby${{vars.rubyMM}}-protocol-hpack + - ruby${{vars.rubyMM}}-protocol-http + - ruby-${{vars.rubyMM}} + +environment: + contents: + packages: + - build-base + - busybox + - ca-certificates-bundle + - git + - ruby-${{vars.rubyMM}} + - ruby-${{vars.rubyMM}}-dev + +vars: + gem: protocol-http2 + +pipeline: + - uses: git-checkout + with: + expected-commit: 9f38daa9169561ab0b5c0083e284c5f7bc417a3f + repository: https://github.com/socketry/protocol-http2 + tag: v${{package.version}} + + - uses: ruby/build + with: + gem: ${{vars.gem}} + + - uses: ruby/install + with: + gem: ${{vars.gem}} + version: ${{package.version}} + + - uses: ruby/clean + +update: + enabled: true + github: + identifier: socketry/protocol-http2 + strip-prefix: v + use-tag: true + +var-transforms: + - from: ${{package.name}} + match: ^ruby(\d\.\d+)-.* + replace: $1 + to: rubyMM + +test: + environment: + contents: + packages: + - ruby${{vars.rubyMM}}-protocol-hpack + - ruby${{vars.rubyMM}}-protocol-http + pipeline: + - name: Basic require test + runs: | + ruby -e "require 'protocol/http2'; puts 'HTTP/2 protocol library loaded successfully!'" + - name: Test frame handling + runs: | + ruby <<-EOF + require 'protocol/http2' + require 'stringio' + + # Create a data frame with actual payload + payload = "Hello, HTTP/2" + frame = Protocol::HTTP2::DataFrame.new + frame.pack(payload) + + # Create buffer for writing + buffer = StringIO.new + frame.write(buffer) + + raise "Frame encoding failed" if buffer.string.empty? + raise "Invalid frame length" unless frame.length == payload.length + + puts "Frame handling test passed!" + EOF diff --git a/ruby4.0-protocol-url.yaml b/ruby4.0-protocol-url.yaml new file mode 100644 index 00000000000..c354a93a163 --- /dev/null +++ b/ruby4.0-protocol-url.yaml @@ -0,0 +1,86 @@ +package: + name: ruby4.0-protocol-url + version: 0.4.0 + epoch: 0 + description: Provides abstractions for working with URLs. + copyright: + - license: MIT + dependencies: + runtime: + - ruby-${{vars.rubyMM}} + +environment: + contents: + packages: + - build-base + - busybox + - ca-certificates-bundle + - git + - ruby-${{vars.rubyMM}} + - ruby-${{vars.rubyMM}}-dev + +vars: + gem: protocol-url + +pipeline: + - uses: git-checkout + with: + expected-commit: 623d8d9341a64bd7b894a92b0b624a56cd27e93b + repository: https://github.com/socketry/protocol-url + tag: v${{package.version}} + + - uses: ruby/build + with: + gem: ${{vars.gem}} + + - uses: ruby/install + with: + gem: ${{vars.gem}} + version: ${{package.version}} + + - uses: ruby/clean + +update: + enabled: true + github: + identifier: socketry/protocol-url + strip-prefix: v + use-tag: true + +test: + environment: + contents: + packages: + - ruby-${{vars.rubyMM}} + pipeline: + - uses: test/tw/gem-check + - name: Verify library loading + runs: | + ruby -e "require 'protocol/url'; puts 'Successfully loaded gem'" + - name: Test URL parsing and manipulation + runs: | + ruby <<-EOF + require 'protocol/url' + + # Test parsing an absolute URL using Protocol::URL[] + url = Protocol::URL["https://example.com/path?query=value#fragment"] + raise "Failed to parse URL" if url.nil? + raise "Expected Absolute URL" unless url.is_a?(Protocol::URL::Absolute) + + # Test parsing a relative URL + relative = Protocol::URL["/path/to/resource"] + raise "Failed to parse relative URL" if relative.nil? + raise "Expected Relative URL" unless relative.is_a?(Protocol::URL::Relative) + + # Test that nil is returned for nil input + result = Protocol::URL[nil] + raise "Expected nil for nil input" unless result.nil? + + puts "All tests passed!" + EOF + +var-transforms: + - from: ${{package.name}} + match: ^ruby(\d\.\d+)-.* + replace: $1 + to: rubyMM diff --git a/ruby4.0-pry.yaml b/ruby4.0-pry.yaml new file mode 100644 index 00000000000..8504eb4d423 --- /dev/null +++ b/ruby4.0-pry.yaml @@ -0,0 +1,63 @@ +# Generated from https://github.com/pry/pry +package: + name: ruby4.0-pry + version: 0.15.2 + epoch: 0 + description: A runtime developer console and IRB alternative with powerful introspection capabilities + copyright: + - license: MIT + dependencies: + runtime: + - ruby${{vars.rubyMM}}-coderay + - ruby${{vars.rubyMM}}-method_source + +environment: + contents: + packages: + - build-base + - busybox + - ca-certificates-bundle + - git + - ruby-${{vars.rubyMM}} + - ruby-${{vars.rubyMM}}-dev + +pipeline: + - uses: git-checkout + with: + expected-commit: 2c89b65855b1519947cdb4855e6814637397f8eb + repository: https://github.com/pry/pry + tag: v${{package.version}} + + - uses: ruby/build + with: + gem: ${{vars.gem}} + + - uses: ruby/install + with: + gem: ${{vars.gem}} + version: ${{package.version}} + + - uses: ruby/clean + +vars: + gem: pry + +update: + enabled: true + github: + identifier: pry/pry + strip-prefix: v + use-tag: true + +test: + pipeline: + # AUTOGENERATED + - runs: | + pry --version + pry --help + +var-transforms: + - from: ${{package.name}} + match: ^ruby(\d\.\d+)-.* + replace: $1 + to: rubyMM diff --git a/ruby4.0-psych.yaml b/ruby4.0-psych.yaml new file mode 100644 index 00000000000..c66d9b42266 --- /dev/null +++ b/ruby4.0-psych.yaml @@ -0,0 +1,61 @@ +# Generated from https://github.com/ruby/psych +package: + name: ruby4.0-psych + version: "5.3.1" + epoch: 0 + description: Psych is a YAML parser and emitter. + copyright: + - license: MIT + dependencies: + runtime: + - ruby${{vars.rubyMM}}-stringio + - ruby-${{vars.rubyMM}} + +environment: + contents: + packages: + - build-base + - busybox + - ca-certificates-bundle + - git + - ruby-${{vars.rubyMM}} + - ruby-${{vars.rubyMM}}-dev + - yaml-dev + +pipeline: + - uses: git-checkout + with: + repository: https://github.com/ruby/psych.git + tag: v${{package.version}} + expected-commit: 8345af9ffbac73aa53a9513efa222c5fa267cc48 + + - uses: ruby/build + with: + gem: ${{vars.gem}} + + - uses: ruby/install + with: + gem: ${{vars.gem}} + version: ${{package.version}} + + - uses: ruby/clean + +vars: + gem: psych + +test: + pipeline: + - runs: ruby -e "require 'psych'" + - uses: test/tw/ldd-check + +update: + enabled: true + github: + identifier: ruby/psych + strip-prefix: v + +var-transforms: + - from: ${{package.name}} + match: ^ruby(\d\.\d+)-.* + replace: $1 + to: rubyMM diff --git a/ruby4.0-public_suffix.yaml b/ruby4.0-public_suffix.yaml new file mode 100644 index 00000000000..f5c634bdc79 --- /dev/null +++ b/ruby4.0-public_suffix.yaml @@ -0,0 +1,58 @@ +package: + name: ruby4.0-public_suffix + version: "7.0.0" + epoch: 0 + description: PublicSuffix can parse and decompose a domain name into top level domain, domain and subdomains. + copyright: + - license: MIT + +environment: + contents: + packages: + - build-base + - busybox + - ca-certificates-bundle + - git + - ruby-${{vars.rubyMM}} + - ruby-${{vars.rubyMM}}-dev + +pipeline: + - uses: git-checkout + with: + repository: https://github.com/weppos/publicsuffix-ruby + tag: v${{package.version}} + expected-commit: af45298523be055dd86ec9d7bac1bb26621ddbb2 + + - uses: ruby/build + with: + gem: ${{vars.gem}} + + - uses: ruby/install + with: + gem: ${{vars.gem}} + version: ${{package.version}} + + - uses: ruby/clean + +vars: + gem: public_suffix + +update: + enabled: true + ignore-regex-patterns: + - thesis-naive + github: + identifier: weppos/publicsuffix-ruby + strip-prefix: v + use-tag: true + tag-filter: v + +var-transforms: + - from: ${{package.name}} + match: ^ruby(\d\.\d+)-.* + replace: $1 + to: rubyMM + +test: + pipeline: + - uses: test/tw/gem-check diff --git a/ruby4.0-puma.yaml b/ruby4.0-puma.yaml new file mode 100644 index 00000000000..0cc638d5edd --- /dev/null +++ b/ruby4.0-puma.yaml @@ -0,0 +1,67 @@ +# Generated from https://github.com/puma/puma +package: + name: ruby4.0-puma + version: "7.1.0" + epoch: 0 + description: Puma is a simple, fast, threaded, and highly parallel HTTP 1.1 server for Ruby/Rack applications. Puma is intended for use in both development and production environments. It's great for highly parallel Ruby implementations such as Rubinius and JRuby as well as as providing process worker support to support CRuby well. + copyright: + - license: BSD-3-Clause + dependencies: + runtime: + - ruby${{vars.rubyMM}}-nio4r + - ruby-${{vars.rubyMM}} + +environment: + contents: + packages: + - build-base + - busybox + - ca-certificates-bundle + - git + - openssl-dev + - ruby-${{vars.rubyMM}} + - ruby-${{vars.rubyMM}}-dev + +pipeline: + - uses: git-checkout + with: + expected-commit: fb2a0733e938c8786e033f22dc5bf66727dddb3a + repository: https://github.com/puma/puma + tag: v${{package.version}} + + - uses: ruby/build + with: + gem: ${{vars.gem}} + + - uses: ruby/install + with: + gem: ${{vars.gem}} + version: ${{package.version}} + + - uses: ruby/clean + +vars: + gem: puma + +update: + enabled: true + github: + identifier: puma/puma + strip-prefix: v + use-tag: true + +test: + pipeline: + # AUTOGENERATED + - runs: | + puma --version + pumactl --version + puma --help + pumactl --help + - uses: test/tw/ldd-check + +var-transforms: + - from: ${{package.name}} + match: ^ruby(\d\.\d+)-.* + replace: $1 + to: rubyMM diff --git a/ruby4.0-quantile.yaml b/ruby4.0-quantile.yaml new file mode 100644 index 00000000000..c8651a3afaa --- /dev/null +++ b/ruby4.0-quantile.yaml @@ -0,0 +1,61 @@ +# Generated from http://github.com/matttproud/ruby_quantile_estimation +package: + name: ruby4.0-quantile + version: 0.2.1 + epoch: 0 + description: Graham Cormode and S. Muthukrishnan's Effective Computation of Biased Quantiles over Data Streams in ICDE’05 + copyright: + - license: Apache-2.0 + +environment: + contents: + packages: + - build-base + - busybox + - ca-certificates-bundle + - git + - ruby-${{vars.rubyMM}} + - ruby-${{vars.rubyMM}}-dev + +pipeline: + - uses: fetch + with: + expected-sha256: a31b7ae352f41563b42ac5a8bcb67d182c1d1aff03da77cc9e99b7d9da79f371 + uri: https://github.com/matttproud/ruby_quantile_estimation/archive/refs/tags/v${{package.version}}.tar.gz + + - uses: ruby/build + with: + gem: ${{vars.gem}} + + - uses: ruby/install + with: + gem: ${{vars.gem}} + version: ${{package.version}} + + - uses: ruby/clean + +vars: + gem: quantile + +update: + enabled: true + github: + identifier: matttproud/ruby_quantile_estimation + strip-prefix: v + use-tag: true + +var-transforms: + - from: ${{package.name}} + match: ^ruby(\d\.\d+)-.* + replace: $1 + to: rubyMM + +test: + pipeline: + - uses: test/tw/gem-check + with: + require: | + quantile + quantile/estimator + quantile/quantile + quantile/version diff --git a/ruby4.0-rack-2.2.yaml b/ruby4.0-rack-2.2.yaml new file mode 100644 index 00000000000..f4e1ddf8f9c --- /dev/null +++ b/ruby4.0-rack-2.2.yaml @@ -0,0 +1,61 @@ +package: + name: ruby4.0-rack-2.2 + version: 2.2.8.1 + epoch: 0 + description: Rack provides a minimal, modular and adaptable interface for developing web applications in Ruby + copyright: + - license: MIT + dependencies: + provides: + - ruby${{vars.rubyMM}}-rack=${{package.full-version}} + +environment: + contents: + packages: + - build-base + - busybox + - ca-certificates-bundle + - git + - ruby-${{vars.rubyMM}} + - ruby-${{vars.rubyMM}}-dev + +pipeline: + - uses: git-checkout + with: + repository: https://github.com/rack/rack + tag: v${{package.version}} + expected-commit: e83001100ad9dd24e1744b13669dcb2736a13ebd + + - uses: ruby/build + with: + gem: ${{vars.gem}} + + - uses: ruby/install + with: + gem: ${{vars.gem}} + version: ${{package.version}} + + - uses: ruby/clean + +vars: + gem: rack + +update: + enabled: true + github: + identifier: rack/rack + strip-prefix: v + tag-filter: v2.2. + +test: + pipeline: + # AUTOGENERATED + - runs: | + rackup --version + rackup --help + +var-transforms: + - from: ${{package.name}} + match: ^ruby(\d\.\d+)-.* + replace: $1 + to: rubyMM diff --git a/ruby4.0-rack-oauth2.yaml b/ruby4.0-rack-oauth2.yaml new file mode 100644 index 00000000000..a9e6ae9aff8 --- /dev/null +++ b/ruby4.0-rack-oauth2.yaml @@ -0,0 +1,62 @@ +package: + name: ruby4.0-rack-oauth2 + version: "2.3.0" + epoch: 0 + description: OAuth 2.0 Server & Client Library. Both Bearer token type are supported. + copyright: + - license: MIT + dependencies: + runtime: + - ruby${{vars.rubyMM}}-activesupport + - ruby${{vars.rubyMM}}-attr_required + - ruby${{vars.rubyMM}}-faraday + - ruby${{vars.rubyMM}}-faraday-follow_redirects + - ruby${{vars.rubyMM}}-json-jwt + - ruby${{vars.rubyMM}}-rack + +environment: + contents: + packages: + - build-base + - busybox + - ca-certificates-bundle + - git + - ruby-${{vars.rubyMM}} + - ruby-${{vars.rubyMM}}-dev + +pipeline: + - uses: git-checkout + with: + repository: https://github.com/nov/rack-oauth2 + tag: v${{package.version}} + expected-commit: de0c89d07dda8113d692386c6a99c44a66155fc8 + + - uses: ruby/build + with: + gem: ${{vars.gem}} + + - uses: ruby/install + with: + gem: ${{vars.gem}} + version: ${{package.version}} + + - uses: ruby/clean + +vars: + gem: rack-oauth2 + +update: + enabled: true + github: + identifier: nov/rack-oauth2 + strip-prefix: v + +var-transforms: + - from: ${{package.name}} + match: ^ruby(\d\.\d+)-.* + replace: $1 + to: rubyMM + +test: + pipeline: + - uses: test/tw/gem-check diff --git a/ruby4.0-rack-protection.yaml b/ruby4.0-rack-protection.yaml new file mode 100644 index 00000000000..a9cb2dd492e --- /dev/null +++ b/ruby4.0-rack-protection.yaml @@ -0,0 +1,65 @@ +# Generated from https://github.com/sinatra/sinatra/tree/main/rack-protection +package: + name: ruby4.0-rack-protection + version: "4.2.1" + epoch: 0 + description: Protect against typical web attacks, works with all Rack apps, including Rails + copyright: + - license: MIT + dependencies: + runtime: + - ruby${{vars.rubyMM}}-rack + +environment: + contents: + packages: + - build-base + - busybox + - ca-certificates-bundle + - git + - ruby-${{vars.rubyMM}} + - ruby-${{vars.rubyMM}}-dev + +pipeline: + - uses: git-checkout + with: + expected-commit: 599a007a779dc9940e49f34e9077220f4c209f4b + repository: https://github.com/sinatra/sinatra + tag: v${{package.version}} + + - uses: ruby/unlock-spec + + - uses: ruby/build + with: + gem: ${{vars.gem}} + dir: rack-protection + + - uses: ruby/install + with: + gem: ${{vars.gem}} + version: ${{package.version}} + dir: rack-protection + + - uses: ruby/clean + +vars: + gem: rack-protection + +test: + pipeline: + - uses: ruby/require + with: + module_name: ${{vars.gem}} + +update: + enabled: true + github: + identifier: sinatra/sinatra + strip-prefix: v + use-tag: true + +var-transforms: + - from: ${{package.name}} + match: ^ruby(\d\.\d+)-.* + replace: $1 + to: rubyMM diff --git a/ruby4.0-rack-session.yaml b/ruby4.0-rack-session.yaml new file mode 100644 index 00000000000..620ed75a98d --- /dev/null +++ b/ruby4.0-rack-session.yaml @@ -0,0 +1,62 @@ +# Generated from https://github.com/rack/rack-session +package: + name: ruby4.0-rack-session + version: "2.1.1" + epoch: 0 + description: A session implementation for Rack. + copyright: + - license: MIT + dependencies: + runtime: + - ruby${{vars.rubyMM}}-base64 + - ruby${{vars.rubyMM}}-rack + +environment: + contents: + packages: + - build-base + - busybox + - ca-certificates-bundle + - git + - ruby-${{vars.rubyMM}} + - ruby-${{vars.rubyMM}}-dev + +pipeline: + - uses: git-checkout + with: + repository: https://github.com/rack/rack-session.git + expected-commit: 96663ece1596a3462704c30f98b85cd7e0337d6e + tag: v${{package.version}} + + - uses: ruby/build + with: + gem: ${{vars.gem}} + + - uses: ruby/install + with: + gem: ${{vars.gem}} + version: ${{package.version}} + + - uses: ruby/clean + +vars: + gem: rack-session + +test: + pipeline: + - uses: ruby/require + with: + module_name: rack/session + +update: + enabled: true + github: + identifier: rack/rack-session + strip-prefix: v + use-tag: true + +var-transforms: + - from: ${{package.name}} + match: ^ruby(\d\.\d+)-.* + replace: $1 + to: rubyMM diff --git a/ruby4.0-rack.yaml b/ruby4.0-rack.yaml new file mode 100644 index 00000000000..a007f859f9c --- /dev/null +++ b/ruby4.0-rack.yaml @@ -0,0 +1,74 @@ +package: + name: ruby4.0-rack + version: "3.2.4" + epoch: 0 + description: Rack provides a minimal, modular and adaptable interface for developing web applications in Ruby + copyright: + - license: MIT + +environment: + contents: + packages: + - build-base + - busybox + - ca-certificates-bundle + - git + - ruby-${{vars.rubyMM}} + - ruby-${{vars.rubyMM}}-dev + +pipeline: + - uses: git-checkout + with: + expected-commit: 4c24539777db8833d78f881680cd245878cfba31 + repository: https://github.com/rack/rack + tag: v${{package.version}} + + - uses: ruby/build + with: + gem: ${{vars.gem}} + + - uses: ruby/install + with: + gem: ${{vars.gem}} + version: ${{package.version}} + + - uses: ruby/clean + +vars: + gem: rack + +test: + environment: + contents: + packages: + - curl + - ruby${{vars.rubyMM}}-rackup + - ruby${{vars.rubyMM}}-puma + pipeline: + - uses: ruby/require + with: + module_name: ${{vars.gem}} + - runs: | + cat << EOF > config.ru + run do |env| + [200, {}, ["Hello World"]] + end + EOF + + rackup > /dev/null 2>&1 & + sleep 1 + + curl http://localhost:9292 | grep -q "Hello World" + +update: + enabled: true + git: + strip-prefix: v + ignore-regex-patterns: + - ^test$ + +var-transforms: + - from: ${{package.name}} + match: ^ruby(\d\.\d+)-.* + replace: $1 + to: rubyMM diff --git a/ruby4.0-rackup.yaml b/ruby4.0-rackup.yaml new file mode 100644 index 00000000000..505a9e90f8c --- /dev/null +++ b/ruby4.0-rackup.yaml @@ -0,0 +1,61 @@ +# Generated from https://github.com/rack/rackup.git +package: + name: ruby4.0-rackup + version: "2.3.1" + epoch: 0 + description: A general server command for Rack applications. + copyright: + - license: MIT + dependencies: + runtime: + - ruby${{vars.rubyMM}}-rack + +environment: + contents: + packages: + - build-base + - busybox + - ca-certificates-bundle + - git + - ruby-${{vars.rubyMM}} + - ruby-${{vars.rubyMM}}-dev + +pipeline: + - uses: git-checkout + with: + repository: https://github.com/rack/rackup.git + expected-commit: f3fa1d6ada90e9e7aa1f712488ddde87ea2a2075 + tag: v${{package.version}} + + - uses: ruby/build + with: + gem: ${{vars.gem}} + + - uses: ruby/install + with: + gem: ${{vars.gem}} + version: ${{package.version}} + + - uses: ruby/clean + +vars: + gem: rackup + +test: + pipeline: + - uses: ruby/require + with: + module_name: ${{vars.gem}} + +update: + enabled: true + github: + identifier: rack/rackup + strip-prefix: v + use-tag: true + +var-transforms: + - from: ${{package.name}} + match: ^ruby(\d\.\d+)-.* + replace: $1 + to: rubyMM diff --git a/ruby4.0-rails-8.1.yaml b/ruby4.0-rails-8.1.yaml new file mode 100644 index 00000000000..654d44a038a --- /dev/null +++ b/ruby4.0-rails-8.1.yaml @@ -0,0 +1,189 @@ +package: + name: ruby4.0-rails-8.1 + version: "8.1.1" + epoch: 0 + description: Rails is a web-application framework that includes everything needed to create database-backed web applications according to the Model-View-Controller (MVC) pattern. + copyright: + - license: MIT + dependencies: + provides: + - rails=${{package.full-version}} + - ruby${{vars.rubyMM}}-rails=${{package.full-version}} + runtime: + - gcc + - git + - glibc-dev + - make + - ruby${{vars.rubyMM}}-bundler + - ruby${{vars.rubyMM}}-net-imap + - ruby-${{vars.rubyMM}}-dev + - tzdata + +environment: + contents: + packages: + - gcc + - glibc-dev + - make + - ruby${{vars.rubyMM}}-net-imap + - ruby-${{vars.rubyMM}} + - ruby-${{vars.rubyMM}}-dev + - yaml-dev + +vars: + gem: rails + +pipeline: + - uses: git-checkout + with: + expected-commit: 90a1eaa1b30ba1f2d524e197460e549c03cf5698 + repository: https://github.com/rails/rails + tag: v${{package.version}} + + - uses: ruby/build + with: + gem: ${{vars.gem}} + + - name: Custom install + runs: | + mkdir -p ${{targets.contextdir}}/usr/bin + gem install ${{vars.gem}}-${{package.version}}.gem \ + --bindir /tmp/bin \ + --install-dir ${{targets.contextdir}}/usr/share/ruby/gems/${{vars.rubyMM}} \ + --no-document \ + --verbose \ + --version ${{package.version}} + + # These are the binaries that rails provides that don't overlap with those already provided by ruby + for bin in nokogiri rackup rails thor; do + mv /tmp/bin/$bin ${{targets.contextdir}}/usr/bin/ + done + + - uses: ruby/clean + +subpackages: + - name: ${{package.name}}-compat + pipeline: + - runs: | + # Ruby expects user-installed gems/binaries in /usr/local/bundle + mkdir -p ${{targets.contextdir}}/usr/share/ruby/gems/${{vars.rubyMM}}/bin + for bin in nokogiri rackup rails thor; do + ln -sf /usr/bin/$bin ${{targets.contextdir}}/usr/share/ruby/gems/${{vars.rubyMM}}/bin/$bin + done + + mkdir -p ${{targets.contextdir}}/usr/local + ln -sf /usr/share/ruby/gems/${{vars.rubyMM}} ${{targets.contextdir}}/usr/local/bundle + +test: + environment: + environment: + GEM_HOME: /usr/local/bundle + contents: + packages: + - ${{package.name}}-compat + - ruby${{vars.rubyMM}}-psych + - pkgconf + pipeline: + - name: Test installation + runs: rails --version + - name: Test symlinks + runs: | + $GEM_HOME/bin/rails --version | grep ${{package.version}} + + # New gems should go to $GEM_HOME which is linked to /usr/share/ruby/gems/... + gem install faraday # random gem not included in rails + gem install sidekiq + ls /usr/share/ruby/gems/${{vars.rubyMM}}/gems | grep faraday + - name: Test new app creation / run server + uses: test/daemon-check-output + with: + setup: rails new test-app + start: test-app/bin/rails server + expected_output: | + Booting Puma + Rails ${{package.version}} application starting in development + Puma starting in single mode + Listening on http://127.0.0.1:3000 + error_strings: | + "msg":"error" + "level":"error" + "panic" + "fatal" + failed + Error: + error: + denied + - name: Test basic rails commands + runs: | + rails new test-app + cd test-app + + # Test creating a database model + bin/rails generate model Product name:string + ls db/migrate | grep create_products.rb + ls app/models | grep product.rb + ls test/models | grep product_test.rb + ls test/fixtures | grep products.yml + + # Test a db migration + bin/rails db:migrate + + # Test creating a controller + bin/rails generate controller Products index + ls app/controllers | grep products_controller.rb + ls app/views/products | grep index.html.erb + ls test/controllers | grep products_controller_test.rb + ls app/helpers | grep products_helper.rb + + # Test running generated tests + bin/rails test + + # Test the rails console startup + bin/rails console + + # Test routes + bin/rails routes + + # Test creating authentication + bin/rails generate authentication + ls db/migrate | grep create_users.rb + ls db/migrate | grep create_sessions.rb + ls test/models | grep user_test.rb + ls test/fixtures | grep users.yml + + bin/rails db:migrate # should create the users and sessions tables + + # Test enabling caching in dev + bin/rails dev:cache | grep "caching enabled for development mode." + + # Test installing action text + bin/rails action_text:install + ls app/assets/stylesheets | grep actiontext.css + ls app/views/layouts/action_text/contents | grep content.html.erb + ls test/fixtures/action_text | grep rich_texts.yml + + # Test completing action text installation + bundle install + bin/rails db:migrate # should create the action text and active storage tables + + # Test built-in linter rubocop + bin/rubocop | grep "no offenses detected" + + # Test built-in security scanner brakeman + bin/brakeman | grep "No warnings found" + +update: + enabled: true + ignore-regex-patterns: + - 'rc\d+$' + github: + identifier: rails/rails + strip-prefix: v + tag-filter: v8.1. + use-tag: true + +var-transforms: + - from: ${{package.name}} + match: ^ruby(\d\.\d+)-.* + replace: $1 + to: rubyMM diff --git a/ruby4.0-rake-compiler.yaml b/ruby4.0-rake-compiler.yaml new file mode 100644 index 00000000000..a041991594b --- /dev/null +++ b/ruby4.0-rake-compiler.yaml @@ -0,0 +1,54 @@ +# Generated from https://github.com/luislavena/rake-compiler +package: + name: ruby4.0-rake-compiler + version: "1.3.1" + epoch: 0 + copyright: + - license: MIT + +environment: + contents: + packages: + - build-base + - busybox + - ca-certificates-bundle + - git + - ruby-${{vars.rubyMM}} + +pipeline: + - uses: fetch + with: + expected-sha256: ddbf2a5ee8b3427b6e7238ff0b50dc25921cdbdf907b92b02263c1764261c77c + uri: https://github.com/luislavena/rake-compiler/archive/refs/tags/v${{package.version}}.tar.gz + + - uses: ruby/build + with: + gem: ${{vars.gem}} + + - uses: ruby/install + with: + gem: ${{vars.gem}} + version: ${{package.version}} + + - uses: ruby/clean + +vars: + gem: rake-compiler + +test: + pipeline: + - runs: | + rake-compiler --version + rake-compiler --help + +update: + enabled: true + github: + identifier: luislavena/rake-compiler + strip-prefix: v + +var-transforms: + - from: ${{package.name}} + match: ^ruby(\d\.\d+)-.* + replace: $1 + to: rubyMM diff --git a/ruby4.0-recursive-open-struct.yaml b/ruby4.0-recursive-open-struct.yaml new file mode 100644 index 00000000000..538e077a7cb --- /dev/null +++ b/ruby4.0-recursive-open-struct.yaml @@ -0,0 +1,60 @@ +package: + name: ruby4.0-recursive-open-struct + version: "2.1.0" + epoch: 0 + description: OpenStruct subclass that returns nested hash attributes as RecursiveOpenStructs + copyright: + - license: MIT + +environment: + contents: + packages: + - busybox + - ca-certificates-bundle + - ruby-${{vars.rubyMM}} + - ruby-${{vars.rubyMM}}-dev + +vars: + gem: recursive-open-struct + +pipeline: + - uses: git-checkout + with: + expected-commit: cd0f855f123509d24f401992278b6c90c395acf5 + repository: https://github.com/aetherknight/recursive-open-struct + tag: v${{package.version}} + + - uses: ruby/build + with: + gem: ${{vars.gem}} + + - uses: ruby/install + with: + gem: ${{vars.gem}} + version: ${{package.version}} + + - uses: ruby/clean + +test: + pipeline: + - name: Simple test + runs: | + cat < /tmp/test.rb + require 'recursive-open-struct' + ros = RecursiveOpenStruct.new( { wha: { tagoo: 'siam' } } ) + ros.wha.tagoo + EOF + ruby /tmp/test.rb + +update: + enabled: true + github: + identifier: aetherknight/recursive-open-struct + strip-prefix: v + use-tag: true + +var-transforms: + - from: ${{package.name}} + match: ^ruby(\d\.\d+)-.* + replace: $1 + to: rubyMM diff --git a/ruby4.0-redis-client.yaml b/ruby4.0-redis-client.yaml new file mode 100644 index 00000000000..1c74a5f537b --- /dev/null +++ b/ruby4.0-redis-client.yaml @@ -0,0 +1,156 @@ +# Generated from https://github.com/redis-rb/redis-client +package: + name: ruby4.0-redis-client + version: "0.26.2" + epoch: 0 + description: Simple low-level client for Redis 6+ + copyright: + - license: MIT + dependencies: + runtime: + - ruby${{vars.rubyMM}}-connection_pool + +environment: + contents: + packages: + - build-base + - busybox + - ca-certificates-bundle + - git + - ruby-${{vars.rubyMM}} + - ruby-${{vars.rubyMM}}-dev + +pipeline: + - uses: git-checkout + with: + expected-commit: d51cf59ebe7c03b6e6f4d571392bc5ecfdadedd6 + repository: https://github.com/redis-rb/redis-client + tag: v${{package.version}} + + - uses: ruby/build + with: + gem: ${{vars.gem}} + + - uses: ruby/install + with: + gem: ${{vars.gem}} + version: ${{package.version}} + + - uses: ruby/clean + +vars: + gem: redis-client + +update: + enabled: true + github: + identifier: redis-rb/redis-client + strip-prefix: v + use-tag: true + +var-transforms: + - from: ${{package.name}} + match: ^ruby(\d\.\d+)-.* + replace: $1 + to: rubyMM + +test: + environment: + contents: + packages: + - ruby${{vars.rubyMM}}-connection_pool + pipeline: + - name: Basic require test + runs: ruby -e "require 'redis-client'; puts 'Redis client loaded successfully!'" + - name: Test configuration and url parsing + runs: | + ruby <<-EOF + require 'redis-client' + + # Test basic configuration + begin + config = RedisClient.config( + host: "localhost", + port: 6379, + connect_timeout: 0.5 + ) + puts "Basic configuration successful" + + # Verify config attributes + raise "Invalid host" unless config.host == "localhost" + raise "Invalid port" unless config.port == 6379 + raise "Invalid connect_timeout" unless config.connect_timeout == 0.5 + puts "Configuration attributes verified" + rescue => e + raise "Configuration test failed: #{e.message}" + end + + # Test URL parsing + begin + url_config = RedisClient.config(url: "redis://127.0.0.1:6380/1") + raise "Invalid host from URL" unless url_config.host == "127.0.0.1" + raise "Invalid port from URL" unless url_config.port == 6380 + raise "Invalid db from URL" unless url_config.db == 1 + puts "URL parsing successful" + rescue => e + raise "URL parsing test failed: #{e.message}" + end + + puts "Configuration tests passed!" + EOF + - name: Test connection pool integration + runs: | + ruby <<-EOF + require 'redis-client' + require 'connection_pool' + + begin + # Create a connection pool + pool = ConnectionPool.new(size: 2, timeout: 1) do + RedisClient.new( + host: "localhost", + port: 6379, + connect_timeout: 0.1, + reconnect_attempts: 0 + ) + end + + puts "Connection pool creation successful" + rescue => e + # Only fail if it's not a connection error + unless e.message.include?("connect") + raise "Connection pool test failed: #{e.message}" + end + puts "Expected connection error caught, pool creation verified" + end + + puts "Pool tests completed!" + EOF + - name: Test client interface + runs: | + ruby <<-EOF + require 'redis-client' + + begin + client = RedisClient.new( + host: "localhost", + port: 6379, + connect_timeout: 0.1 + ) + + # Verify basic interface methods + raise "Missing call method" unless client.respond_to?(:call) + raise "Missing call_once method" unless client.respond_to?(:call_once) + raise "Missing connect method" unless client.respond_to?(:connect) + + puts "Client interface verification successful" + rescue => e + if e.message.include?("connect") + puts "Expected connection error, interface verified" + else + raise "Client interface test failed: #{e.message}" + end + end + + puts "Interface tests passed!" + EOF diff --git a/ruby4.0-redis-namespace.yaml b/ruby4.0-redis-namespace.yaml new file mode 100644 index 00000000000..393e849a009 --- /dev/null +++ b/ruby4.0-redis-namespace.yaml @@ -0,0 +1,62 @@ +package: + name: ruby4.0-redis-namespace + version: 1.11.0 + epoch: 0 + description: Adds a Redis::Namespace class which can be used to namespace calls to Redis. This is useful when using a single instance of Redis with multiple, different applications. + copyright: + - license: MIT + dependencies: + runtime: + - ruby${{vars.rubyMM}}-redis + +environment: + contents: + packages: + - build-base + - busybox + - ca-certificates-bundle + - git + - ruby-${{vars.rubyMM}} + - ruby-${{vars.rubyMM}}-dev + +pipeline: + - uses: git-checkout + with: + expected-commit: 313909f8d39869e4329c821988f412eeb9e53541 + repository: https://github.com/resque/redis-namespace + tag: v${{package.version}} + + - uses: ruby/build + with: + gem: ${{vars.gem}} + + - uses: ruby/install + with: + gem: ${{vars.gem}} + version: ${{package.version}} + + - uses: ruby/clean + +vars: + gem: redis-namespace + +update: + enabled: true + github: + identifier: resque/redis-namespace + strip-prefix: v + +var-transforms: + - from: ${{package.name}} + match: ^ruby(\d\.\d+)-.* + replace: $1 + to: rubyMM + +test: + pipeline: + - uses: test/tw/gem-check + with: + require: | + redis-namespace + redis/namespace + redis/namespace/version diff --git a/ruby4.0-redis.yaml b/ruby4.0-redis.yaml new file mode 100644 index 00000000000..ebe872a49ac --- /dev/null +++ b/ruby4.0-redis.yaml @@ -0,0 +1,84 @@ +# Generated from https://github.com/redis/redis-rb/tree/v5.0.8 +package: + name: ruby4.0-redis + version: "5.4.1" + epoch: 0 + description: A Ruby client that tries to match Redis API one-to-one, while still providing an idiomatic interface. + copyright: + - license: MIT + dependencies: + runtime: + - ruby${{vars.rubyMM}}-redis-client + +environment: + contents: + packages: + - build-base + - busybox + - ca-certificates-bundle + - git + - ruby-${{vars.rubyMM}} + - ruby-${{vars.rubyMM}}-dev + +pipeline: + - uses: git-checkout + with: + expected-commit: 6784a3204be44d4ca7891a901295e4a4007a13a5 + repository: https://github.com/redis/redis-rb + tag: v${{package.version}} + + - uses: ruby/build + with: + gem: ${{vars.gem}} + + - uses: ruby/install + with: + gem: ${{vars.gem}} + version: ${{package.version}} + + - uses: ruby/clean + +vars: + gem: redis + +update: + enabled: true + github: + identifier: redis/redis-rb + strip-prefix: v + use-tag: true + +var-transforms: + - from: ${{package.name}} + match: ^ruby(\d\.\d+)-.* + replace: $1 + to: rubyMM + +test: + pipeline: + - uses: test/tw/gem-check + with: + require: | + redis + redis/commands + redis/distributed + redis/errors + redis/hash_ring + redis/subscribe + redis/version + redis/commands/bitmaps + redis/commands/cluster + redis/commands/connection + redis/commands/geo + redis/commands/hashes + redis/commands/hyper_log_log + redis/commands/keys + redis/commands/lists + redis/commands/pubsub + redis/commands/scripting + redis/commands/server + redis/commands/sets + redis/commands/sorted_sets + redis/commands/streams + redis/commands/strings + redis/commands/transactions diff --git a/ruby4.0-rest-client.yaml b/ruby4.0-rest-client.yaml new file mode 100644 index 00000000000..9f135bb7285 --- /dev/null +++ b/ruby4.0-rest-client.yaml @@ -0,0 +1,73 @@ +package: + name: ruby4.0-rest-client + version: 2.1.0 + epoch: 0 + description: Simple HTTP and REST client for Ruby, inspired by microframework syntax for specifying actions. + copyright: + - license: MIT + dependencies: + runtime: + - ruby${{vars.rubyMM}}-http-accept + - ruby${{vars.rubyMM}}-http-cookie + - ruby${{vars.rubyMM}}-mime-types + - ruby${{vars.rubyMM}}-netrc + +environment: + contents: + packages: + - build-base + - busybox + - ca-certificates-bundle + - git + - ruby-${{vars.rubyMM}} + - ruby-${{vars.rubyMM}}-dev + +vars: + gem: rest-client + +pipeline: + - uses: git-checkout + with: + expected-commit: cf3e5a115bcdb8f3344aeac0e45b44d67fac1a42 + repository: https://github.com/rest-client/rest-client + tag: v${{package.version}} + + - runs: | + # We build the latest version of http-accept, which is >= 2.2.1. + sed -i "s/add_dependency('http-accept', '>= 1.7.0', '< 2.0')/add_dependency('http-accept', '>= 1.7.0')/" ${{vars.gem}}.gemspec + + - uses: ruby/build + with: + gem: ${{vars.gem}} + + - uses: ruby/install + with: + gem: ${{vars.gem}} + version: ${{package.version}} + + - uses: ruby/clean + +test: + pipeline: + - runs: | + ruby -e "require 'rest-client'" + - name: Simple test + runs: | + cat < /tmp/test.rb + require 'rest-client' + RestClient.get 'http://example.com' + EOF + ruby /tmp/test.rb + +update: + enabled: true + github: + identifier: rest-client/rest-client + strip-prefix: v + use-tag: true + +var-transforms: + - from: ${{package.name}} + match: ^ruby(\d\.\d+)-.* + replace: $1 + to: rubyMM diff --git a/ruby4.0-reverse_markdown.yaml b/ruby4.0-reverse_markdown.yaml new file mode 100644 index 00000000000..b0e6df76bfa --- /dev/null +++ b/ruby4.0-reverse_markdown.yaml @@ -0,0 +1,69 @@ +# Generated from https://github.com/xijo/reverse_markdown +package: + name: ruby4.0-reverse_markdown + version: "3.0.1" + epoch: 0 + description: Map simple html back into markdown, e.g. if you want to import existing html data in your application. + copyright: + - license: WTFPL + dependencies: + runtime: + - ruby${{vars.rubyMM}}-nokogiri + +environment: + contents: + packages: + - build-base + - busybox + - ca-certificates-bundle + - git + - ruby-${{vars.rubyMM}} + - ruby-${{vars.rubyMM}}-dev + +pipeline: + - uses: git-checkout + with: + repository: https://github.com/xijo/reverse_markdown.git + tag: v${{package.version}} + expected-commit: 9f3fac6488645ff4ed225573105a08aa90a1b0ea + + - uses: ruby/build + with: + gem: ${{vars.gem}} + + - uses: ruby/install + with: + gem: ${{vars.gem}} + version: ${{package.version}} + + - uses: ruby/clean + +update: + enabled: true + github: + identifier: xijo/reverse_markdown + strip-prefix: v + use-tag: true + tag-filter: v + +vars: + gem: reverse_markdown + +test: + pipeline: + - uses: test/tw/gem-check + with: + require: | + reverse_markdown + reverse_markdown/cleaner + reverse_markdown/config + reverse_markdown/converters + reverse_markdown/errors + reverse_markdown/version + reverse_markdown/converters/base + +var-transforms: + - from: ${{package.name}} + match: ^ruby(\d\.\d+)-.* + replace: $1 + to: rubyMM diff --git a/ruby4.0-rexml.yaml b/ruby4.0-rexml.yaml new file mode 100644 index 00000000000..c90a04e55ff --- /dev/null +++ b/ruby4.0-rexml.yaml @@ -0,0 +1,109 @@ +package: + name: ruby4.0-rexml + version: "3.4.4" + epoch: 0 + description: An XML toolkit for Ruby + copyright: + - license: BSD-2-Clause + dependencies: + runtime: + - ruby-${{vars.rubyMM}} + +environment: + contents: + packages: + - build-base + - busybox + - ca-certificates-bundle + - git + - ruby-${{vars.rubyMM}} + - ruby-${{vars.rubyMM}}-dev + +vars: + gem: rexml + +pipeline: + - uses: git-checkout + with: + expected-commit: 4f32ea33bc3f71cced67487659beef58edcf6d56 + repository: https://github.com/ruby/rexml + tag: v${{package.version}} + + - uses: ruby/build + with: + gem: ${{vars.gem}} + + - uses: ruby/install + with: + gem: ${{vars.gem}} + version: ${{package.version}} + + - uses: ruby/clean + +update: + enabled: true + github: + identifier: ruby/rexml + strip-prefix: v + use-tag: true + +var-transforms: + - from: ${{package.name}} + match: ^ruby(\d\.\d+)-.* + replace: $1 + to: rubyMM + +test: + pipeline: + - uses: test/tw/gem-check + with: + require: | + rexml + rexml/attlistdecl + rexml/attribute + rexml/cdata + rexml/child + rexml/comment + rexml/doctype + rexml/document + rexml/element + rexml/encoding + rexml/entity + rexml/functions + rexml/instruction + rexml/namespace + rexml/node + rexml/output + rexml/parent + rexml/parseexception + rexml/quickpath + rexml/rexml + rexml/sax2listener + rexml/security + rexml/source + rexml/streamlistener + rexml/text + rexml/undefinednamespaceexception + rexml/xmltokens + rexml/xpath + rexml/xpath_parser + rexml/dtd/attlistdecl + rexml/dtd/dtd + rexml/dtd/elementdecl + rexml/dtd/entitydecl + rexml/dtd/notationdecl + rexml/formatters/default + rexml/formatters/pretty + rexml/formatters/transitive + rexml/light/node + rexml/parsers/baseparser + rexml/parsers/lightparser + rexml/parsers/pullparser + rexml/parsers/sax2parser + rexml/parsers/streamparser + rexml/parsers/treeparser + rexml/parsers/ultralightparser + rexml/parsers/xpathparser + rexml/validation/relaxng + rexml/validation/validation + rexml/validation/validationexception diff --git a/ruby4.0-rspec-core.yaml b/ruby4.0-rspec-core.yaml new file mode 100644 index 00000000000..39c44cc7fb0 --- /dev/null +++ b/ruby4.0-rspec-core.yaml @@ -0,0 +1,69 @@ +# Generated from https://github.com/rspec/rspec-core +package: + name: ruby4.0-rspec-core + version: 3.13.2 + epoch: 0 + description: BDD for Ruby. RSpec runner and example groups. + copyright: + - license: MIT + dependencies: + runtime: + - ruby${{vars.rubyMM}}-rspec-support + +environment: + contents: + packages: + - bash + - build-base + - busybox + - ca-certificates-bundle + - coreutils + - git + - ruby${{vars.rubyMM}}-bundler + - ruby-${{vars.rubyMM}} + - ruby-${{vars.rubyMM}}-dev + +pipeline: + - uses: git-checkout + with: + repository: https://github.com/rspec/rspec-core.git + expected-commit: 8f019adecf42f469861ed5ac912d55f7200cce81 + tag: v${{package.version}} + + - runs: | + # Require for the build Too many deps to consider vendoring + bundle install + rake spec || true + + - uses: ruby/build + with: + gem: ${{vars.gem}} + + - uses: ruby/install + with: + gem: ${{vars.gem}} + version: ${{package.version}} + opts: -n ${{targets.destdir}}/usr/bin + + - uses: ruby/clean + +vars: + gem: rspec-core + +test: + pipeline: + - runs: | + rspec --version + rspec --help + +update: + enabled: false + exclude-reason: "This repository was archived by the owner on Nov 30, 2024. It is now read-only. v3.13.2 is the latest version." + git: + strip-prefix: v + +var-transforms: + - from: ${{package.name}} + match: ^ruby(\d\.\d+)-.* + replace: $1 + to: rubyMM diff --git a/ruby4.0-rspec-expectations.yaml b/ruby4.0-rspec-expectations.yaml new file mode 100644 index 00000000000..e250c21147b --- /dev/null +++ b/ruby4.0-rspec-expectations.yaml @@ -0,0 +1,66 @@ +# Generated from https://github.com/rspec/rspec-expectations +package: + name: ruby4.0-rspec-expectations + version: 3.13.3 + epoch: 0 + description: rspec-expectations provides a simple, readable API to express expected outcomes of a code example. + copyright: + - license: MIT + dependencies: + runtime: + - ruby${{vars.rubyMM}}-diff-lcs + - ruby${{vars.rubyMM}}-rspec-support + +environment: + contents: + packages: + - build-base + - busybox + - ca-certificates-bundle + - git + - ruby-${{vars.rubyMM}} + - ruby-${{vars.rubyMM}}-dev + +pipeline: + - uses: git-checkout + with: + repository: https://github.com/rspec/rspec-expectations.git + expected-commit: 555979f5bae76e83a52f166dd7060daf504c6177 + tag: v${{package.version}} + + - uses: ruby/build + with: + gem: ${{vars.gem}} + + - uses: ruby/install + with: + gem: ${{vars.gem}} + version: ${{package.version}} + + - uses: ruby/clean + +vars: + gem: rspec-expectations + +update: + enabled: true + github: + identifier: rspec/rspec-expectations + strip-prefix: v + use-tag: true + +test: + environment: + contents: + packages: + - ruby-${{vars.rubyMM}} + pipeline: + - name: Verify library loading + runs: | + ruby -e "require 'rspec/expectations'; puts 'Successfully loaded RSpec Expectations'" + +var-transforms: + - from: ${{package.name}} + match: ^ruby(\d\.\d+)-.* + replace: $1 + to: rubyMM diff --git a/ruby4.0-rspec-mocks.yaml b/ruby4.0-rspec-mocks.yaml new file mode 100644 index 00000000000..1eabf3d7ab8 --- /dev/null +++ b/ruby4.0-rspec-mocks.yaml @@ -0,0 +1,66 @@ +# Generated from https://github.com/rspec/rspec-mocks +package: + name: ruby4.0-rspec-mocks + version: 3.13.2 + epoch: 0 + description: RSpec's 'test double' framework, with support for stubbing and mocking + copyright: + - license: MIT + dependencies: + runtime: + - ruby${{vars.rubyMM}}-diff-lcs + - ruby${{vars.rubyMM}}-rspec-support + +environment: + contents: + packages: + - build-base + - busybox + - ca-certificates-bundle + - git + - ruby-${{vars.rubyMM}} + - ruby-${{vars.rubyMM}}-dev + +pipeline: + - uses: git-checkout + with: + repository: https://github.com/rspec/rspec-mocks.git + tag: v${{package.version}} + expected-commit: 0d6a02313cd5b3cc6f58edcd8b1a8f019cb6a4a0 + + - uses: ruby/build + with: + gem: ${{vars.gem}} + + - uses: ruby/install + with: + gem: ${{vars.gem}} + version: ${{package.version}} + + - uses: ruby/clean + +vars: + gem: rspec-mocks + +update: + enabled: true + github: + identifier: rspec/rspec-mocks + strip-prefix: v + use-tag: true + +test: + environment: + contents: + packages: + - ruby-${{vars.rubyMM}} + pipeline: + - name: Verify library loading + runs: | + ruby -e "require 'rspec/mocks'; puts 'Successfully loaded RSpec Mocks'" + +var-transforms: + - from: ${{package.name}} + match: ^ruby(\d\.\d+)-.* + replace: $1 + to: rubyMM diff --git a/ruby4.0-rspec-support.yaml b/ruby4.0-rspec-support.yaml new file mode 100644 index 00000000000..e7b08c8fd8c --- /dev/null +++ b/ruby4.0-rspec-support.yaml @@ -0,0 +1,67 @@ +# Generated from https://github.com/rspec/rspec-support +package: + name: ruby4.0-rspec-support + version: 3.13.1 + epoch: 0 + description: Support utilities for RSpec gems + copyright: + - license: MIT + +environment: + contents: + packages: + - build-base + - busybox + - ca-certificates-bundle + - git + - ruby-${{vars.rubyMM}} + - ruby-${{vars.rubyMM}}-dev + +pipeline: + - uses: fetch + with: + expected-sha256: 3bc8bfa7a41ac4780b2570bd91afe1b4f304330de26d9497f90ba7122d342711 + uri: https://github.com/rspec/rspec-support/archive/refs/tags/v${{package.version}}.tar.gz + + - uses: git-checkout + with: + repository: https://github.com/rspec/rspec-support.git + tag: v${{package.version}} + expected-commit: 38e40fec3f2bda7074f76b1f9b4c96be613df6d1 + + - uses: ruby/build + with: + gem: ${{vars.gem}} + + - uses: ruby/install + with: + gem: ${{vars.gem}} + version: ${{package.version}} + + - uses: ruby/clean + +vars: + gem: rspec-support + +update: + enabled: true + github: + identifier: rspec/rspec-support + strip-prefix: v + use-tag: true + +test: + environment: + contents: + packages: + - ruby-${{vars.rubyMM}} + pipeline: + - name: Verify library loading + runs: | + ruby -e "require 'rspec/support'; puts 'Successfully loaded RSpec Support'" + +var-transforms: + - from: ${{package.name}} + match: ^ruby(\d\.\d+)-.* + replace: $1 + to: rubyMM diff --git a/ruby4.0-rspec.yaml b/ruby4.0-rspec.yaml new file mode 100644 index 00000000000..20f1fbc1373 --- /dev/null +++ b/ruby4.0-rspec.yaml @@ -0,0 +1,74 @@ +# Generated from https://github.com/rspec/rspec-metagem +package: + name: ruby4.0-rspec + version: 3.13.0 + epoch: 0 + description: BDD for Ruby + copyright: + - license: MIT + dependencies: + runtime: + - ruby${{vars.rubyMM}}-rspec-core + - ruby${{vars.rubyMM}}-rspec-expectations + - ruby${{vars.rubyMM}}-rspec-mocks + +environment: + contents: + packages: + - build-base + - busybox + - ca-certificates-bundle + - git + - ruby${{vars.rubyMM}}-bundler + - ruby${{vars.rubyMM}}-rspec-support + - ruby-${{vars.rubyMM}} + - ruby-${{vars.rubyMM}}-dev + +pipeline: + - uses: git-checkout + with: + repository: https://github.com/rspec/rspec-metagem.git + tag: v${{package.version}} + expected-commit: 317fc0b1be7194628e6105e28af9cf94a13008f9 + + - uses: ruby/build + with: + gem: ${{vars.gem}} + + - uses: ruby/install + with: + gem: ${{vars.gem}} + version: ${{package.version}} + opts: -n ${{targets.destdir}}/urs/bin + + - uses: ruby/clean + +vars: + gem: rspec + +update: + enabled: true + github: + identifier: rspec/rspec-metagem + strip-prefix: v + use-tag: true + +test: + environment: + contents: + packages: + - ruby-${{vars.rubyMM}} + pipeline: + - name: Verify library loading + runs: | + ruby -e "require 'rspec'; puts 'Successfully loaded RSpec'" + - name: Verify rspec command is functional + runs: | + rspec --version + rspec --help + +var-transforms: + - from: ${{package.name}} + match: ^ruby(\d\.\d+)-.* + replace: $1 + to: rubyMM diff --git a/ruby4.0-ruby2_keywords.yaml b/ruby4.0-ruby2_keywords.yaml new file mode 100644 index 00000000000..97072e2ce4d --- /dev/null +++ b/ruby4.0-ruby2_keywords.yaml @@ -0,0 +1,59 @@ +package: + name: ruby4.0-ruby2_keywords + version: 0.0.5 + epoch: 0 + description: Shim library for Module#ruby2_keywords + copyright: + - license: Ruby + - license: BSD-2-Clause + +environment: + contents: + packages: + - build-base + - busybox + - ca-certificates-bundle + - git + - ruby-${{vars.rubyMM}} + - ruby-${{vars.rubyMM}}-dev + +pipeline: + - uses: git-checkout + with: + repository: https://github.com/ruby/ruby2_keywords + tag: v${{package.version}} + expected-commit: 92ad9c5c3fff591b8383ada8b93c3da1279d24ad + + - uses: patch + with: + patches: changelog.patch + + - uses: ruby/build + with: + gem: ${{vars.gem}} + + - uses: ruby/install + with: + gem: ${{vars.gem}} + version: ${{package.version}} + + - uses: ruby/clean + +vars: + gem: ruby2_keywords + +update: + enabled: true + github: + identifier: ruby/ruby2_keywords + strip-prefix: v + +var-transforms: + - from: ${{package.name}} + match: ^ruby(\d\.\d+)-.* + replace: $1 + to: rubyMM + +test: + pipeline: + - uses: test/tw/gem-check diff --git a/ruby4.0-ruby2_keywords/changelog.patch b/ruby4.0-ruby2_keywords/changelog.patch new file mode 100644 index 00000000000..f64a6b5b55c --- /dev/null +++ b/ruby4.0-ruby2_keywords/changelog.patch @@ -0,0 +1,12 @@ +diff --git a/ruby2_keywords.gemspec b/ruby2_keywords.gemspec +index e2cd397..773da85 100644 +--- a/ruby2_keywords.gemspec ++++ b/ruby2_keywords.gemspec +@@ -13,7 +13,6 @@ Gem::Specification.new do |s| + s.extra_rdoc_files = [ + "LICENSE", + "README.md", +- "ChangeLog", + *Dir.glob("#{__dir__}/logs/ChangeLog-*[^~]").map {|path| path[(__dir__.size+1)..-1]}, + ] + s.files = [ diff --git a/ruby4.0-rubyzip.yaml b/ruby4.0-rubyzip.yaml new file mode 100644 index 00000000000..59f3d2b5062 --- /dev/null +++ b/ruby4.0-rubyzip.yaml @@ -0,0 +1,76 @@ +# Generated from https://github.com/rubyzip/rubyzip/tree/v2.3.2 +package: + name: ruby4.0-rubyzip + version: "3.2.2" + epoch: 0 + description: rubyzip is a ruby module for reading and writing zip files + copyright: + - license: BSD-2-Clause + +environment: + contents: + packages: + - build-base + - busybox + - ca-certificates-bundle + - git + - ruby-${{vars.rubyMM}} + - ruby-${{vars.rubyMM}}-dev + +pipeline: + - uses: git-checkout + with: + expected-commit: db674236b1b0b1a42032aff1c3ba07063a329253 + repository: https://github.com/rubyzip/rubyzip + tag: v${{package.version}} + + - uses: ruby/build + with: + gem: ${{vars.gem}} + + - uses: ruby/install + with: + gem: ${{vars.gem}} + version: ${{package.version}} + + - uses: ruby/clean + +vars: + gem: rubyzip + +update: + enabled: true + ignore-regex-patterns: + - show + github: + identifier: rubyzip/rubyzip + strip-prefix: v + use-tag: true + +var-transforms: + - from: ${{package.name}} + match: ^ruby(\d\.\d+)-.* + replace: $1 + to: rubyMM + +test: + pipeline: + - uses: test/tw/gem-check + with: + require: | + zip + zip/central_directory + zip/compressor + zip/constants + zip/decompressor + zip/dos_time + zip/entry + zip/entry_set + zip/errors + zip/extra_field + zip/filesystem + zip/ioextras + zip/null_decompressor + zip/version + zip/crypto/decrypted_io + zip/crypto/encryption diff --git a/ruby4.0-rugged.yaml b/ruby4.0-rugged.yaml new file mode 100644 index 00000000000..b94eae37a1d --- /dev/null +++ b/ruby4.0-rugged.yaml @@ -0,0 +1,89 @@ +# Generated from https://github.com/libgit2/rugged +package: + name: ruby4.0-rugged + version: 1.9.0 + epoch: 0 + description: | + Rugged is a Ruby bindings to the libgit2 linkable C Git library. + copyright: + - license: MIT + dependencies: + runtime: + - libgit2 + +environment: + contents: + packages: + - build-base + - busybox + - ca-certificates-bundle + - cmake + - git + - libgit2-dev + - ruby-${{vars.rubyMM}} + - ruby-${{vars.rubyMM}}-dev + +pipeline: + - uses: git-checkout + with: + repository: https://github.com/libgit2/rugged.git + tag: v${{package.version}} + expected-commit: 5b28daf1fca547f875489650345bf9067e78fa25 + + # Fixes needed to get things working with the system libgit2. + - uses: patch + with: + patches: fix-system-libgit2-1.9.0.patch fix-libgit2-paths.patch + + - uses: ruby/build + with: + gem: ${{vars.gem}} + + - uses: ruby/install + with: + gem: ${{vars.gem}} + version: ${{package.version}} + opts: -- --use-system-libraries + + - uses: ruby/clean + +update: + enabled: true + github: + identifier: libgit2/rugged + strip-prefix: v + use-tag: true + tag-filter: v + +vars: + gem: rugged + +test: + pipeline: + - uses: test/tw/gem-check + with: + require: | + rugged + rugged/attributes + rugged/blob + rugged/commit + rugged/credentials + rugged/index + rugged/object + rugged/reference + rugged/remote + rugged/repository + rugged/submodule_collection + rugged/tree + rugged/version + rugged/walker + rugged/diff/delta + rugged/diff/hunk + rugged/diff/line + - uses: test/tw/ldd-check + +var-transforms: + - from: ${{package.name}} + match: ^ruby(\d\.\d+)-.* + replace: $1 + to: rubyMM diff --git a/ruby4.0-rugged/fix-libgit2-paths.patch b/ruby4.0-rugged/fix-libgit2-paths.patch new file mode 100644 index 00000000000..31e81b0a37d --- /dev/null +++ b/ruby4.0-rugged/fix-libgit2-paths.patch @@ -0,0 +1,13 @@ +diff --git a/ext/rugged/extconf.rb b/ext/rugged/extconf.rb +index 5b1a21c..2b79512 100644 +--- a/ext/rugged/extconf.rb ++++ b/ext/rugged/extconf.rb +@@ -70,7 +70,7 @@ if arg_config("--use-system-libraries", !!ENV['RUGGED_USE_SYSTEM_LIBRARIES']) + + major = minor = nil + +- File.readlines(File.join(LIBGIT2_DIR, "include", "git2", "version.h")).each do |line| ++ File.readlines(File.join("/", "usr", "include", "git2", "version.h")).each do |line| + if !major && (matches = line.match(/^#define LIBGIT2_VERSION_MAJOR\s+([0-9]+)$/)) + major = matches[1] + next diff --git a/ruby4.0-rugged/fix-system-libgit2-1.9.0.patch b/ruby4.0-rugged/fix-system-libgit2-1.9.0.patch new file mode 100644 index 00000000000..df7aa3b05ce --- /dev/null +++ b/ruby4.0-rugged/fix-system-libgit2-1.9.0.patch @@ -0,0 +1,43 @@ +From 5fee507fef1a322efabceee6f938195795d90eea Mon Sep 17 00:00:00 2001 +From: Pete Walter +Date: Wed, 15 Jan 2025 23:34:08 +0000 +Subject: [PATCH] ext: Fix the build with system libgit2 1.9.0 + +Update version.h parsing regexes for 1.9.0 and fix compilation test by +including git2.h instead of directly including git2/version.h, which is +no longer supported. +--- + ext/rugged/extconf.rb | 8 ++++---- + 1 file changed, 4 insertions(+), 4 deletions(-) + +diff --git a/ext/rugged/extconf.rb b/ext/rugged/extconf.rb +index 7dbd2b3b9..5b1a21c19 100644 +--- a/ext/rugged/extconf.rb ++++ b/ext/rugged/extconf.rb +@@ -71,12 +71,12 @@ def self.run_cmake(timeout, args) + major = minor = nil + + File.readlines(File.join(LIBGIT2_DIR, "include", "git2", "version.h")).each do |line| +- if !major && (matches = line.match(/^#define LIBGIT2_VER_MAJOR\s+([0-9]+)$/)) ++ if !major && (matches = line.match(/^#define LIBGIT2_VERSION_MAJOR\s+([0-9]+)$/)) + major = matches[1] + next + end + +- if !minor && (matches = line.match(/^#define LIBGIT2_VER_MINOR\s+([0-9]+)$/)) ++ if !minor && (matches = line.match(/^#define LIBGIT2_VERSION_MINOR\s+([0-9]+)$/)) + minor = matches[1] + next + end +@@ -85,9 +85,9 @@ def self.run_cmake(timeout, args) + end + + try_compile(<<-SRC) or abort "libgit2 version is not compatible, expected ~> #{major}.#{minor}.0" +-#include ++#include + +-#if LIBGIT2_VER_MAJOR != #{major} || LIBGIT2_VER_MINOR != #{minor} ++#if LIBGIT2_VERSION_MAJOR != #{major} || LIBGIT2_VERSION_MINOR != #{minor} + #error libgit2 version is not compatible + #endif + SRC diff --git a/ruby4.0-sawyer.yaml b/ruby4.0-sawyer.yaml new file mode 100644 index 00000000000..9aa9e85b241 --- /dev/null +++ b/ruby4.0-sawyer.yaml @@ -0,0 +1,71 @@ +# Generated from https://github.com/lostisland/sawyer +package: + name: ruby4.0-sawyer + version: "0.9.3" + epoch: 0 + description: Secret User Agent of HTTP + copyright: + - license: MIT + dependencies: + runtime: + - ruby${{vars.rubyMM}}-addressable + - ruby${{vars.rubyMM}}-faraday + +environment: + contents: + packages: + - build-base + - busybox + - ca-certificates-bundle + - git + - ruby-${{vars.rubyMM}} + - ruby-${{vars.rubyMM}}-dev + +pipeline: + - uses: git-checkout + with: + repository: https://github.com/lostisland/sawyer.git + tag: v${{package.version}} + expected-commit: 7a60719e675f79d5569ff3e4729d58c03fb64831 + + - uses: ruby/build + with: + gem: ${{vars.gem}} + + - uses: ruby/install + with: + gem: ${{vars.gem}} + version: ${{package.version}} + + - uses: ruby/clean + +update: + enabled: true + github: + identifier: lostisland/sawyer + strip-prefix: v + use-tag: true + tag-filter: v + +vars: + gem: sawyer + +test: + pipeline: + - uses: test/tw/gem-check + with: + require: | + sawyer + sawyer/agent + sawyer/relation + sawyer/resource + sawyer/response + sawyer/serializer + sawyer/link_parsers/hal + sawyer/link_parsers/simple + +var-transforms: + - from: ${{package.name}} + match: ^ruby(\d\.\d+)-.* + replace: $1 + to: rubyMM diff --git a/ruby4.0-securerandom.yaml b/ruby4.0-securerandom.yaml new file mode 100644 index 00000000000..42c34528f25 --- /dev/null +++ b/ruby4.0-securerandom.yaml @@ -0,0 +1,66 @@ +package: + name: ruby4.0-securerandom + version: 0.4.1 + epoch: 0 + description: Interface for secure random number generator. + copyright: + - license: Ruby + - license: BSD-2-Clause + +environment: + contents: + packages: + - build-base + - busybox + - ca-certificates-bundle + - git + - ruby-${{vars.rubyMM}} + - ruby-${{vars.rubyMM}}-dev + +pipeline: + - uses: git-checkout + with: + repository: https://github.com/ruby/securerandom + tag: v${{package.version}} + expected-commit: 65fb8ddcc34f8d3b85aaa39b76554b686c3df280 + + - uses: ruby/build + with: + gem: ${{vars.gem}} + + - uses: ruby/install + with: + gem: ${{vars.gem}} + version: ${{package.version}} + + - uses: ruby/clean + +vars: + gem: securerandom + +update: + enabled: true + github: + identifier: ruby/securerandom + strip-prefix: v + +test: + pipeline: + - runs: ruby -e "require 'securerandom'" + - name: Parse URI + runs: | + cat < /tmp/test.rb + require 'securerandom' + SecureRandom.hex(10) #=> "52750b30ffbc7de3b362" + SecureRandom.base64(10) #=> "EcmTPZwWRAozdA==" + SecureRandom.random_bytes(10) #=> "\016\t{\370g\310pbr\301" + SecureRandom.alphanumeric(10) #=> "S8baxMJnPl" + SecureRandom.uuid #=> "2d931510-d99f-494a-8c67-87feb05e1594" + EOF + ruby /tmp/test.rb + +var-transforms: + - from: ${{package.name}} + match: ^ruby(\d\.\d+)-.* + replace: $1 + to: rubyMM diff --git a/ruby4.0-serverengine.yaml b/ruby4.0-serverengine.yaml new file mode 100644 index 00000000000..4dc5a4ce54c --- /dev/null +++ b/ruby4.0-serverengine.yaml @@ -0,0 +1,80 @@ +package: + name: ruby4.0-serverengine + version: 2.4.0 + epoch: 0 + description: A framework to implement robust multiprocess servers like Unicorn + copyright: + - license: Apache-2.0 + dependencies: + runtime: + - ruby${{vars.rubyMM}}-sigdump + - ruby-${{vars.rubyMM}} + +environment: + contents: + packages: + - build-base + - busybox + - ca-certificates-bundle + - git + - ruby-${{vars.rubyMM}} + - ruby-${{vars.rubyMM}}-dev + +vars: + gem: serverengine + +pipeline: + # This package makes use of `git ls-files` in it's gemspec so the git repo + # must be checked out in order for the gem to build with all files. + - uses: git-checkout + with: + destination: ${{vars.gem}} + expected-commit: c93a592bb9642cdb8880fe9366bbee37e5b764cd + repository: https://github.com/fluent/serverengine.git + tag: v${{package.version}} + + - working-directory: ${{vars.gem}} + pipeline: + - uses: ruby/build + with: + gem: ${{vars.gem}} + - uses: ruby/install + with: + gem: ${{vars.gem}} + version: ${{package.version}} + - uses: ruby/clean + +update: + enabled: true + github: + identifier: fluent/serverengine + strip-prefix: v + use-tag: true + +var-transforms: + - from: ${{package.name}} + match: ^ruby(\d\.\d+)-.* + replace: $1 + to: rubyMM + +test: + pipeline: + - uses: test/tw/gem-check + with: + require: | + serverengine + serverengine/blocking_flag + serverengine/command_sender + serverengine/config_loader + serverengine/daemon + serverengine/daemon_logger + serverengine/privilege + serverengine/process_manager + serverengine/signal_thread + serverengine/signals + serverengine/socket_manager + serverengine/socket_manager_unix + serverengine/supervisor + serverengine/utils + serverengine/version + serverengine/worker diff --git a/ruby4.0-sidekiq.yaml b/ruby4.0-sidekiq.yaml new file mode 100644 index 00000000000..34751e5c7d0 --- /dev/null +++ b/ruby4.0-sidekiq.yaml @@ -0,0 +1,69 @@ +# Generated from https://github.com/sidekiq/sidekiq +package: + name: ruby4.0-sidekiq + version: "8.1.0" + epoch: 0 + description: Simple, efficient background processing for Ruby. + copyright: + - license: LGPL-3.0-or-later + dependencies: + runtime: + - ruby${{vars.rubyMM}}-concurrent-ruby + - ruby${{vars.rubyMM}}-connection_pool + - ruby${{vars.rubyMM}}-rack + - ruby${{vars.rubyMM}}-redis-client + - ruby-${{vars.rubyMM}} + +environment: + contents: + packages: + - build-base + - busybox + - ca-certificates-bundle + - git + - ruby-${{vars.rubyMM}} + - ruby-${{vars.rubyMM}}-dev + +pipeline: + - uses: git-checkout + with: + expected-commit: bb172d9b2b17a086c9cfa2763f58eb0b89937a77 + repository: https://github.com/sidekiq/sidekiq + tag: v${{package.version}} + + - uses: ruby/unlock-spec + + - uses: ruby/build + with: + gem: ${{vars.gem}} + + - uses: ruby/install + with: + gem: ${{vars.gem}} + version: ${{package.version}} + + - uses: ruby/clean + +vars: + gem: sidekiq + +update: + enabled: true + github: + identifier: sidekiq/sidekiq + strip-prefix: v + use-tag: true + +test: + pipeline: + # AUTOGENERATED + - runs: | + sidekiq --version + sidekiqmon --version + sidekiqmon --help + +var-transforms: + - from: ${{package.name}} + match: ^ruby(\d\.\d+)-.* + replace: $1 + to: rubyMM diff --git a/ruby4.0-sigdump.yaml b/ruby4.0-sigdump.yaml new file mode 100644 index 00000000000..56cfa05bee3 --- /dev/null +++ b/ruby4.0-sigdump.yaml @@ -0,0 +1,69 @@ +package: + name: ruby4.0-sigdump + version: 0.2.5 + epoch: 0 + description: Setup signal handler which dumps backtrace of running threads and number of allocated objects per class. Require 'sigdump/setup', send SIGCONT, and see /tmp/sigdump-<pid>.log. + copyright: + - license: MIT + dependencies: + runtime: + - ruby-${{vars.rubyMM}} + +environment: + contents: + packages: + - build-base + - busybox + - ca-certificates-bundle + - git + - ruby-${{vars.rubyMM}} + - ruby-${{vars.rubyMM}}-dev + +vars: + gem: sigdump + +pipeline: + # This package makes use of `git ls-files` in it's gemspec so the git repo + # must be checked out in order for the gem to build with all files. + - uses: git-checkout + with: + destination: ${{vars.gem}} + expected-commit: 5be55405d18b43e70f30fb397376014a88d4b8fd + repository: https://github.com/frsyuki/sigdump.git + tag: v${{package.version}} + + - working-directory: ${{vars.gem}} + pipeline: + - uses: patch + with: + patches: | + ../remove-has_rdoc-ruby4.0.patch + - uses: ruby/build + with: + gem: ${{vars.gem}} + - uses: ruby/install + with: + gem: ${{vars.gem}} + version: ${{package.version}} + - uses: ruby/clean + +update: + enabled: true + github: + identifier: frsyuki/sigdump + strip-prefix: v + use-tag: true + +var-transforms: + - from: ${{package.name}} + match: ^ruby(\d\.\d+)-.* + replace: $1 + to: rubyMM + +test: + pipeline: + - uses: test/tw/gem-check + with: + require: | + sigdump + sigdump/setup diff --git a/ruby4.0-sin_lru_redux.yaml b/ruby4.0-sin_lru_redux.yaml new file mode 100644 index 00000000000..29368d2ce66 --- /dev/null +++ b/ruby4.0-sin_lru_redux.yaml @@ -0,0 +1,114 @@ +package: + name: ruby4.0-sin_lru_redux + version: "2.5.2" + epoch: 0 + description: Efficient and thread-safe LRU cache. + copyright: + - license: MIT + +environment: + contents: + packages: + - build-base + - busybox + - ca-certificates-bundle + - ruby-${{vars.rubyMM}} + - ruby-${{vars.rubyMM}}-dev + +pipeline: + - uses: git-checkout + with: + repository: https://github.com/cadenza-tech/sin_lru_redux.git + tag: v${{package.version}} + expected-commit: 1a802823410bc9fb19ae132834b28bdd3210bb29 + + - uses: ruby/build + with: + gem: ${{vars.gem}} + + - uses: ruby/install + with: + gem: ${{vars.gem}} + version: ${{package.version}} + + - uses: ruby/clean + +vars: + gem: sin_lru_redux + +update: + enabled: true + github: + identifier: cadenza-tech/sin_lru_redux + strip-prefix: v + use-tag: true + +var-transforms: + - from: ${{package.name}} + match: ^ruby(\d\.\d+)-.* + replace: $1 + to: rubyMM + +test: + pipeline: + - name: Verify library import + runs: ruby -e "require 'lru_redux'" + - name: Basic functionality test (adapted from project README) + runs: | + ruby -e ' + require "lru_redux" + + # non thread safe + cache = LruRedux::Cache.new(100) + cache[:a] = "1" + cache[:b] = "2" + + raise "Access failed" unless cache.to_a == [[:b, "2"], [:a, "1"]] + + # note the order matters here, last accessed is first + cache[:a] # a pushed to front + # "1" + raise "Access failed" unless cache.to_a == [[:a, "1"], [:b, "2"]] + + cache.delete(:a) + raise "Delete failed" unless cache.to_a == [[:b, "2"]] + + cache.max_size = 200 # cache now stores 200 items + cache.clear # cache has no items + + cache.getset(:a) { 1 } + raise "Getset failed" unless cache.to_a == [[:a, 1]] + + # already set so don"t call block + cache.getset(:a) { 99 } + raise "Getset unexpectedly updated" unless cache.to_a == [[:a, 1]] + ' + - name: Basic threadsafe functionality test (adapted from project README) + runs: | + ruby -e ' + require "lru_redux" + + cache = LruRedux::ThreadSafeCache.new(100) + cache[:a] = "1" + cache[:b] = "2" + + raise "Access failed" unless cache.to_a == [[:b, "2"], [:a, "1"]] + + # note the order matters here, last accessed is first + cache[:a] # a pushed to front + # "1" + raise "Access failed" unless cache.to_a == [[:a, "1"], [:b, "2"]] + + cache.delete(:a) + raise "Delete failed" unless cache.to_a == [[:b, "2"]] + + cache.max_size = 200 # cache now stores 200 items + cache.clear # cache has no items + + cache.getset(:a) { 1 } + raise "Getset failed" unless cache.to_a == [[:a, 1]] + + # already set so don"t call block + cache.getset(:a) { 99 } + raise "Getset unexpectedly updated" unless cache.to_a == [[:a, 1]] + ' diff --git a/ruby4.0-sinatra.yaml b/ruby4.0-sinatra.yaml new file mode 100644 index 00000000000..2848b34991d --- /dev/null +++ b/ruby4.0-sinatra.yaml @@ -0,0 +1,99 @@ +# Generated from https://github.com/sinatra/sinatra +package: + name: ruby4.0-sinatra + version: "4.2.1" + epoch: 0 + description: Sinatra is a DSL for quickly creating web applications in Ruby with minimal effort. + copyright: + - license: MIT + dependencies: + runtime: + - ruby${{vars.rubyMM}}-mustermann + - ruby${{vars.rubyMM}}-puma + - ruby${{vars.rubyMM}}-rack + - ruby${{vars.rubyMM}}-rack-protection + - ruby${{vars.rubyMM}}-rack-session + - ruby${{vars.rubyMM}}-rackup + - ruby${{vars.rubyMM}}-tilt + +environment: + contents: + packages: + - build-base + - busybox + - ca-certificates-bundle + - git + - ruby-${{vars.rubyMM}} + - ruby-${{vars.rubyMM}}-dev + +pipeline: + - uses: git-checkout + with: + expected-commit: 599a007a779dc9940e49f34e9077220f4c209f4b + repository: https://github.com/sinatra/sinatra + tag: v${{package.version}} + + - uses: ruby/unlock-spec + + - uses: ruby/build + with: + gem: ${{vars.gem}} + + - uses: ruby/install + with: + gem: ${{vars.gem}} + version: ${{package.version}} + + - uses: ruby/clean + +vars: + gem: sinatra + +test: + environment: + contents: + packages: + - curl + pipeline: + - runs: | + ruby -e 'require "sinatra"' > /dev/null 2>&1 & + cat << EOF > result.txt + + + + + + +

Sinatra doesn’t know this ditty.

+ +
+ Try this: +
get '/' do
+          "Hello World"
+        end
+        
+
+ + + EOF + + sleep 1 && curl 127.0.0.1:4567 > actual.txt + + diff actual.txt result.txt + +update: + enabled: true + github: + identifier: sinatra/sinatra + strip-prefix: v + use-tag: true + +var-transforms: + - from: ${{package.name}} + match: ^ruby(\d\.\d+)-.* + replace: $1 + to: rubyMM diff --git a/ruby4.0-snaky_hash.yaml b/ruby4.0-snaky_hash.yaml new file mode 100644 index 00000000000..9f06870adde --- /dev/null +++ b/ruby4.0-snaky_hash.yaml @@ -0,0 +1,63 @@ +package: + name: ruby4.0-snaky_hash + version: 2.0.3 + epoch: 0 + description: 'A Hashie::Mash joint to make #snakelife better' + copyright: + - license: MIT + dependencies: + runtime: + - ruby${{vars.rubyMM}}-hashie + - ruby${{vars.rubyMM}}-version_gem + +environment: + contents: + packages: + - build-base + - busybox + - ca-certificates-bundle + - git + - ruby${{vars.rubyMM}}-bundler + - ruby-${{vars.rubyMM}} + - ruby-${{vars.rubyMM}}-dev + +pipeline: + - uses: git-checkout + with: + expected-commit: fa841e326ec205802ee98662f66143125abb09d7 + tag: v${{package.version}} + repository: https://gitlab.com/oauth-xx/snaky_hash + + - uses: ruby/build + with: + gem: ${{vars.gem}} + + - uses: ruby/install + with: + gem: ${{vars.gem}} + version: ${{package.version}} + + - uses: ruby/clean + +vars: + gem: snaky_hash + +update: + enabled: true + git: + strip-prefix: v + +var-transforms: + - from: ${{package.name}} + match: ^ruby(\d\.\d+)-.* + replace: $1 + to: rubyMM + +test: + pipeline: + - uses: test/tw/gem-check + with: + require: | + snaky_hash + snaky_hash/snake + snaky_hash/version diff --git a/ruby4.0-stringio.yaml b/ruby4.0-stringio.yaml new file mode 100644 index 00000000000..d1b1748acd2 --- /dev/null +++ b/ruby4.0-stringio.yaml @@ -0,0 +1,60 @@ +# Generated from https://github.com/ruby/stringio +package: + name: ruby4.0-stringio + version: "3.2.0" + epoch: 0 + description: Pseudo `IO` class from/to `String`. + copyright: + - license: Ruby + - license: BSD-2-Clause + dependencies: + runtime: + - ruby-${{vars.rubyMM}} + +environment: + contents: + packages: + - build-base + - busybox + - ca-certificates-bundle + - git + - ruby-${{vars.rubyMM}} + - ruby-${{vars.rubyMM}}-dev + +pipeline: + - uses: git-checkout + with: + repository: https://github.com/ruby/stringio.git + tag: v${{package.version}} + expected-commit: fd9fbc33efe5993ce53fce3d4e6c76d7ef99402e + + - uses: ruby/build + with: + gem: ${{vars.gem}} + + - uses: ruby/install + with: + gem: ${{vars.gem}} + version: ${{package.version}} + + - uses: ruby/clean + +vars: + gem: stringio + +test: + pipeline: + - runs: ruby -e "require 'stringio'" + - uses: test/tw/ldd-check + +update: + enabled: true + github: + identifier: ruby/stringio + strip-prefix: v + +var-transforms: + - from: ${{package.name}} + match: ^ruby(\d\.\d+)-.* + replace: $1 + to: rubyMM diff --git a/ruby4.0-strptime.yaml b/ruby4.0-strptime.yaml new file mode 100644 index 00000000000..c5767941c65 --- /dev/null +++ b/ruby4.0-strptime.yaml @@ -0,0 +1,66 @@ +package: + name: ruby4.0-strptime + version: 0.2.5 + epoch: 0 + description: a fast strptime/strftime engine which uses VM. + copyright: + - license: BSD-2-Clause + dependencies: + runtime: + - ruby-${{vars.rubyMM}} + +environment: + contents: + packages: + - build-base + - busybox + - ca-certificates-bundle + - git + - ruby-${{vars.rubyMM}} + - ruby-${{vars.rubyMM}}-dev + +vars: + gem: strptime + +pipeline: + # This package makes use of `git ls-files` in it's gemspec so the git repo + # must be checked out in order for the gem to build with all files. + - uses: git-checkout + with: + destination: ${{vars.gem}} + expected-commit: 1583aaa510cae4660907b22c8262ab31b1eb1864 + repository: https://github.com/nurse/strptime.git + tag: v${{package.version}} + + - working-directory: ${{vars.gem}} + pipeline: + - uses: ruby/build + with: + gem: ${{vars.gem}} + - uses: ruby/install + with: + gem: ${{vars.gem}} + version: ${{package.version}} + - uses: ruby/clean + +update: + enabled: true + github: + identifier: nurse/strptime + strip-prefix: v + use-tag: true + +var-transforms: + - from: ${{package.name}} + match: ^ruby(\d\.\d+)-.* + replace: $1 + to: rubyMM + +test: + pipeline: + - uses: test/tw/gem-check + with: + require: | + strptime + strptime/version + - uses: test/tw/ldd-check diff --git a/ruby4.0-stud.yaml b/ruby4.0-stud.yaml new file mode 100644 index 00000000000..d71b65799b9 --- /dev/null +++ b/ruby4.0-stud.yaml @@ -0,0 +1,67 @@ +# Generated from https://github.com/jordansissel/ruby-stud +package: + name: ruby4.0-stud + version: 0.0.23 + epoch: 0 + description: Common software patterns I use frequently. + copyright: + - license: MIT + +environment: + contents: + packages: + - build-base + - busybox + - ca-certificates-bundle + - git + - ruby-${{vars.rubyMM}} + - ruby-${{vars.rubyMM}}-dev + +pipeline: + - uses: git-checkout + with: + repository: https://github.com/jordansissel/ruby-stud + tag: v${{package.version}} + expected-commit: 19b1e34f75637c502b150ce203741ce7db1b9d12 + + - uses: ruby/build + with: + gem: ${{vars.gem}} + + - uses: ruby/install + with: + gem: ${{vars.gem}} + version: ${{package.version}} + + - uses: ruby/clean + +vars: + gem: stud + +update: + enabled: true + github: + identifier: jordansissel/ruby-stud + strip-prefix: v + use-tag: true + +var-transforms: + - from: ${{package.name}} + match: ^ruby(\d\.\d+)-.* + replace: $1 + to: rubyMM + +test: + pipeline: + - uses: test/tw/gem-check + with: + require: | + stud/buffer + stud/interval + stud/pool + stud/secret + stud/task + stud/temporary + stud/trap + stud/try + stud/with diff --git a/ruby4.0-swd.yaml b/ruby4.0-swd.yaml new file mode 100644 index 00000000000..9c7e3fbb75b --- /dev/null +++ b/ruby4.0-swd.yaml @@ -0,0 +1,60 @@ +package: + name: ruby4.0-swd + version: 2.0.3 + epoch: 0 + description: SWD (Simple Web Discovery) Client Library + copyright: + - license: MIT + dependencies: + runtime: + - ruby${{vars.rubyMM}}-activesupport + - ruby${{vars.rubyMM}}-attr_required + - ruby${{vars.rubyMM}}-faraday + - ruby${{vars.rubyMM}}-faraday-follow_redirects + +environment: + contents: + packages: + - build-base + - busybox + - ca-certificates-bundle + - git + - ruby-${{vars.rubyMM}} + - ruby-${{vars.rubyMM}}-dev + +pipeline: + - uses: git-checkout + with: + repository: https://github.com/nov/swd + tag: v${{package.version}} + expected-commit: 80cb364d6c710477bc6e08d09da616532a741495 + + - uses: ruby/build + with: + gem: ${{vars.gem}} + + - uses: ruby/install + with: + gem: ${{vars.gem}} + version: ${{package.version}} + + - uses: ruby/clean + +vars: + gem: swd + +update: + enabled: true + github: + identifier: nov/swd + strip-prefix: v + +var-transforms: + - from: ${{package.name}} + match: ^ruby(\d\.\d+)-.* + replace: $1 + to: rubyMM + +test: + pipeline: + - uses: test/tw/gem-check diff --git a/ruby4.0-systemd-journal.yaml b/ruby4.0-systemd-journal.yaml new file mode 100644 index 00000000000..745a2ce00a2 --- /dev/null +++ b/ruby4.0-systemd-journal.yaml @@ -0,0 +1,60 @@ +package: + name: ruby4.0-systemd-journal + version: "2.1.1" + epoch: 0 + description: Provides the ability to navigate and read entries from the systemd journal in ruby, as well as write events to the journal. + copyright: + - license: MIT + dependencies: + runtime: + - libsystemd # libsystemd.so.0 is dlopened + - ruby${{vars.rubyMM}}-ffi + - ruby-${{vars.rubyMM}} + +environment: + contents: + packages: + - build-base + - busybox + - ca-certificates-bundle + - ruby-${{vars.rubyMM}} + - ruby-${{vars.rubyMM}}-dev + +vars: + gem: systemd-journal + +pipeline: + - uses: git-checkout + with: + expected-commit: aa663188dacc03eae1c41d07d5a43fe4c6291480 + repository: https://github.com/ledbettj/systemd-journal + tag: v${{package.version}} + + - uses: ruby/build + with: + gem: ${{vars.gem}} + + - uses: ruby/install + with: + gem: ${{vars.gem}} + version: ${{package.version}} + + - uses: ruby/clean + +test: + pipeline: + - runs: | + ruby -e "require 'systemd/journal'" + - uses: test/tw/ldd-check + +update: + enabled: true + github: + identifier: ledbettj/systemd-journal + strip-prefix: v + +var-transforms: + - from: ${{package.name}} + match: ^ruby(\d\.\d+)-.* + replace: $1 + to: rubyMM diff --git a/ruby4.0-thor.yaml b/ruby4.0-thor.yaml new file mode 100644 index 00000000000..fdad3796448 --- /dev/null +++ b/ruby4.0-thor.yaml @@ -0,0 +1,92 @@ +# Generated from https://github.com/rails/thor/tree/v1.3.2 +package: + name: ruby4.0-thor + version: "1.4.0" + epoch: 0 + description: Thor is a toolkit for building powerful command-line interfaces. + copyright: + - license: MIT + +environment: + contents: + packages: + - build-base + - busybox + - ca-certificates-bundle + - git + - ruby-${{vars.rubyMM}} + - ruby-${{vars.rubyMM}}-dev + +pipeline: + - uses: git-checkout + with: + repository: https://github.com/rails/thor.git + tag: v${{package.version}} + expected-commit: 518ae0f49bb1c3dc2226607c07da74b591759ed0 + + - uses: ruby/build + with: + gem: ${{vars.gem}} + + - uses: ruby/install + with: + gem: ${{vars.gem}} + version: ${{package.version}} + + - uses: ruby/clean + +update: + enabled: true + github: + identifier: rails/thor + strip-prefix: v + use-tag: true + tag-filter: v + +vars: + gem: thor + +test: + pipeline: + - uses: test/tw/gem-check + with: + require: | + thor + thor/actions + thor/base + thor/command + thor/error + thor/group + thor/invocation + thor/line_editor + thor/nested_context + thor/parser + thor/rake_compat + thor/runner + thor/shell + thor/util + thor/version + thor/actions/create_file + thor/actions/create_link + thor/actions/directory + thor/actions/empty_directory + thor/actions/file_manipulation + thor/actions/inject_into_file + thor/core_ext/hash_with_indifferent_access + thor/line_editor/basic + thor/parser/argument + thor/parser/arguments + thor/shell/basic + thor/shell/color + thor/shell/column_printer + thor/shell/html + thor/shell/lcs_diff + thor/shell/table_printer + thor/shell/terminal + thor/shell/wrapped_printer + +var-transforms: + - from: ${{package.name}} + match: ^ruby(\d\.\d+)-.* + replace: $1 + to: rubyMM diff --git a/ruby4.0-thread_safe.yaml b/ruby4.0-thread_safe.yaml new file mode 100644 index 00000000000..c1500c8efb3 --- /dev/null +++ b/ruby4.0-thread_safe.yaml @@ -0,0 +1,56 @@ +# Generated from https://github.com/ruby-concurrency/thread_safe +package: + name: ruby4.0-thread_safe + version: 0.3.6 + epoch: 0 + description: A collection of data structures and utilities to make thread-safe programming in Ruby easier + copyright: + - license: Apache-2.0 + +environment: + contents: + packages: + - build-base + - busybox + - ca-certificates-bundle + - git + - ruby-${{vars.rubyMM}} + - ruby-${{vars.rubyMM}}-dev + +pipeline: + - uses: git-checkout + with: + expected-commit: ccfd11b76d6cf74ba0e19278fba9ba1b7f5ea5ca + repository: https://github.com/ruby-concurrency/thread_safe + tag: v${{package.version}} + + - uses: ruby/build + with: + gem: ${{vars.gem}} + + - uses: ruby/install + with: + gem: ${{vars.gem}} + version: ${{package.version}} + + - uses: ruby/clean + +vars: + gem: thread_safe + +update: + enabled: true + github: + identifier: ruby-concurrency/thread_safe + strip-prefix: v + use-tag: true + +var-transforms: + - from: ${{package.name}} + match: ^ruby(\d\.\d+)-.* + replace: $1 + to: rubyMM + +test: + pipeline: + - uses: test/tw/gem-check diff --git a/ruby4.0-tilt.yaml b/ruby4.0-tilt.yaml new file mode 100644 index 00000000000..0a4ef039b41 --- /dev/null +++ b/ruby4.0-tilt.yaml @@ -0,0 +1,61 @@ +# Generated from https://github.com/jeremyevans/tilt +package: + name: ruby4.0-tilt + version: "2.6.1" + epoch: 0 + description: Generic interface to multiple Ruby template engines + copyright: + - license: MIT + dependencies: + runtime: + - ruby-${{vars.rubyMM}} + +environment: + contents: + packages: + - build-base + - busybox + - ca-certificates-bundle + - git + - ruby-${{vars.rubyMM}} + - ruby-${{vars.rubyMM}}-dev + +pipeline: + - uses: git-checkout + with: + expected-commit: 0697fe45e5b7ff2fabd947e7ae55d1312e1ec5ef + repository: https://github.com/jeremyevans/tilt + tag: v${{package.version}} + + - uses: ruby/build + with: + gem: ${{vars.gem}} + + - uses: ruby/install + with: + gem: ${{vars.gem}} + version: ${{package.version}} + + - uses: ruby/clean + +vars: + gem: tilt + +update: + enabled: true + github: + identifier: jeremyevans/tilt + strip-prefix: v + use-tag: true + +test: + pipeline: + # AUTOGENERATED + - runs: | + tilt --help + +var-transforms: + - from: ${{package.name}} + match: ^ruby(\d\.\d+)-.* + replace: $1 + to: rubyMM diff --git a/ruby4.0-timeout.yaml b/ruby4.0-timeout.yaml new file mode 100644 index 00000000000..60517502cd9 --- /dev/null +++ b/ruby4.0-timeout.yaml @@ -0,0 +1,55 @@ +package: + name: ruby4.0-timeout + version: "0.6.0" + epoch: 0 + description: Auto-terminate potentially long-running operations in Ruby. + copyright: + - license: Ruby + - license: BSD-2-Clause + +environment: + contents: + packages: + - build-base + - busybox + - ca-certificates-bundle + - git + - ruby-${{vars.rubyMM}} + - ruby-${{vars.rubyMM}}-dev + +pipeline: + - uses: git-checkout + with: + expected-commit: ab79dfff47092008ce08520763c846eba3a3a5f1 + repository: https://github.com/ruby/timeout + tag: v${{package.version}} + + - uses: ruby/build + with: + gem: ${{vars.gem}} + + - uses: ruby/install + with: + gem: ${{vars.gem}} + version: ${{package.version}} + + - uses: ruby/clean + +vars: + gem: timeout + +update: + enabled: true + github: + identifier: ruby/timeout + strip-prefix: v + +var-transforms: + - from: ${{package.name}} + match: ^ruby(\d\.\d+)-.* + replace: $1 + to: rubyMM + +test: + pipeline: + - uses: test/tw/gem-check diff --git a/ruby4.0-timers.yaml b/ruby4.0-timers.yaml new file mode 100644 index 00000000000..a80bbadfb8e --- /dev/null +++ b/ruby4.0-timers.yaml @@ -0,0 +1,75 @@ +package: + name: ruby4.0-timers + version: "4.4.0" + epoch: 0 + description: Pure Ruby one-shot and periodic timers. + copyright: + - license: MIT + dependencies: + runtime: + - ruby-${{vars.rubyMM}} + +environment: + contents: + packages: + - build-base + - busybox + - ca-certificates-bundle + - git + - ruby-${{vars.rubyMM}} + - ruby-${{vars.rubyMM}}-dev + +vars: + gem: timers + +pipeline: + - uses: git-checkout + with: + expected-commit: 23bccc713a244a339500318616fae79d9922a78f + repository: https://github.com/socketry/timers + tag: v${{package.version}} + + - uses: ruby/build + with: + gem: ${{vars.gem}} + + - uses: ruby/install + with: + gem: ${{vars.gem}} + version: ${{package.version}} + + - uses: ruby/clean + +update: + enabled: true + github: + identifier: socketry/timers + strip-prefix: v + use-tag: true + +var-transforms: + - from: ${{package.name}} + match: ^ruby(\d\.\d+)-.* + replace: $1 + to: rubyMM + +test: + environment: + contents: + packages: + - build-base + - ruby-${{vars.rubyMM}}-dev + - ruby${{vars.rubyMM}}-bundler + pipeline: + - runs: | + # Ensure our installed gem is importable + ruby -e "require 'timers'" + - uses: git-checkout + with: + expected-commit: 23bccc713a244a339500318616fae79d9922a78f + repository: https://github.com/socketry/timers + tag: v${{package.version}} + - runs: | + # Run upstream tests to find incompatibilities + bundle install + bundle exec bake test diff --git a/ruby4.0-traces.yaml b/ruby4.0-traces.yaml new file mode 100644 index 00000000000..840a5da9311 --- /dev/null +++ b/ruby4.0-traces.yaml @@ -0,0 +1,85 @@ +package: + name: ruby4.0-traces + version: "0.18.2" + epoch: 0 + description: Application instrumentation and tracing. + copyright: + - license: MIT + dependencies: + runtime: + - ruby-${{vars.rubyMM}} + +environment: + contents: + packages: + - build-base + - busybox + - ca-certificates-bundle + - git + - ruby-${{vars.rubyMM}} + - ruby-${{vars.rubyMM}}-dev + +vars: + gem: traces + +pipeline: + - uses: git-checkout + with: + expected-commit: b1718472d27f8aa57d88a1d66bd39a5dcfd4e534 + repository: https://github.com/socketry/traces + tag: v${{package.version}} + + - uses: ruby/build + with: + gem: ${{vars.gem}} + + - uses: ruby/install + with: + gem: ${{vars.gem}} + version: ${{package.version}} + + - uses: ruby/clean + +test: + pipeline: + - name: Validate import + runs: ruby -e "require 'traces'" + - name: Basic example + runs: | + cat > example.rb < 'bar' + } + + Traces.trace('my_method', attributes: attributes) do + super + end + end + end + + MyClass.new.my_method + EOF + ruby example.rb + +update: + enabled: true + github: + identifier: socketry/traces + strip-prefix: v + use-tag: true + +var-transforms: + - from: ${{package.name}} + match: ^ruby(\d\.\d+)-.* + replace: $1 + to: rubyMM diff --git a/ruby4.0-treetop.yaml b/ruby4.0-treetop.yaml new file mode 100644 index 00000000000..02fd38040fc --- /dev/null +++ b/ruby4.0-treetop.yaml @@ -0,0 +1,62 @@ +# Generated from https://github.com/cjheath/treetop +package: + name: ruby4.0-treetop + version: "1.6.14" + epoch: 0 + description: A Parsing Expression Grammar (PEG) Parser generator DSL for Ruby + copyright: + - license: MIT + dependencies: + runtime: + - ruby${{vars.rubyMM}}-polyglot + +environment: + contents: + packages: + - build-base + - busybox + - ca-certificates-bundle + - git + - ruby-${{vars.rubyMM}} + - ruby-${{vars.rubyMM}}-dev + +pipeline: + - uses: git-checkout + with: + expected-commit: 25bd9f65ef0eb47be7d7e7374cfcfee751df7842 + repository: https://github.com/cjheath/treetop + tag: v${{package.version}} + + - uses: ruby/build + with: + gem: ${{vars.gem}} + + - uses: ruby/install + with: + gem: ${{vars.gem}} + version: ${{package.version}} + + - uses: ruby/clean + +vars: + gem: treetop + +update: + enabled: true + github: + identifier: cjheath/treetop + strip-prefix: v + use-tag: true + +test: + pipeline: + # AUTOGENERATED + - runs: | + tt --version + tt --help + +var-transforms: + - from: ${{package.name}} + match: ^ruby(\d\.\d+)-.* + replace: $1 + to: rubyMM diff --git a/ruby4.0-tzinfo-data.yaml b/ruby4.0-tzinfo-data.yaml new file mode 100644 index 00000000000..3f0183e94be --- /dev/null +++ b/ruby4.0-tzinfo-data.yaml @@ -0,0 +1,63 @@ +package: + name: ruby4.0-tzinfo-data + version: "1.2025.3" + epoch: 0 + description: TZInfo::Data contains data from the IANA Time Zone database packaged as Ruby modules for use with TZInfo. + copyright: + - license: MIT + dependencies: + runtime: + - ruby${{vars.rubyMM}}-tzinfo + - ruby-${{vars.rubyMM}} + +environment: + contents: + packages: + - build-base + - busybox + - ca-certificates-bundle + - git + - ruby-${{vars.rubyMM}} + - ruby-${{vars.rubyMM}}-dev + +vars: + gem: tzinfo-data + +pipeline: + - uses: git-checkout + with: + expected-commit: 984750ce9786584ec0cc7948dc41b601cda66ac4 + repository: https://github.com/tzinfo/tzinfo-data + tag: v${{package.version}} + + - uses: ruby/build + with: + gem: ${{vars.gem}} + + - uses: ruby/install + with: + gem: ${{vars.gem}} + version: ${{package.version}} + + - uses: ruby/clean + +update: + enabled: true + github: + identifier: tzinfo/tzinfo-data + strip-prefix: v + +var-transforms: + - from: ${{package.name}} + match: ^ruby(\d\.\d+)-.* + replace: $1 + to: rubyMM + +test: + pipeline: + - uses: test/tw/gem-check + with: + require: | + tzinfo/data + tzinfo/data/tzdataparser + tzinfo/data/version diff --git a/ruby4.0-tzinfo.yaml b/ruby4.0-tzinfo.yaml new file mode 100644 index 00000000000..eb59530a9d0 --- /dev/null +++ b/ruby4.0-tzinfo.yaml @@ -0,0 +1,58 @@ +package: + name: ruby4.0-tzinfo + version: 2.0.6 + epoch: 0 + description: TZInfo provides access to time zone data and allows times to be converted using time zone rules. + copyright: + - license: MIT + dependencies: + runtime: + - ruby${{vars.rubyMM}}-concurrent-ruby + - ruby-${{vars.rubyMM}} + +environment: + contents: + packages: + - build-base + - busybox + - ca-certificates-bundle + - git + - ruby-${{vars.rubyMM}} + - ruby-${{vars.rubyMM}}-dev + +vars: + gem: tzinfo + +pipeline: + - uses: git-checkout + with: + expected-commit: d5893c99bbcd842af86023f02a84fac1659b3031 + repository: https://github.com/tzinfo/tzinfo + tag: v${{package.version}} + + - uses: ruby/build + with: + gem: ${{vars.gem}} + + - uses: ruby/install + with: + gem: ${{vars.gem}} + version: ${{package.version}} + + - uses: ruby/clean + +update: + enabled: true + github: + identifier: tzinfo/tzinfo + strip-prefix: v + +var-transforms: + - from: ${{package.name}} + match: ^ruby(\d\.\d+)-.* + replace: $1 + to: rubyMM + +test: + pipeline: + - uses: test/tw/gem-check diff --git a/ruby4.0-uri.yaml b/ruby4.0-uri.yaml new file mode 100644 index 00000000000..2eb36a1c521 --- /dev/null +++ b/ruby4.0-uri.yaml @@ -0,0 +1,56 @@ +package: + name: ruby4.0-uri + version: "1.1.1" + epoch: 0 + description: "URI is a module providing classes to handle Uniform Resource Identifiers" + copyright: + - license: BSD-2-Clause OR Ruby + +environment: + contents: + packages: + - build-base + - busybox + - ca-certificates-bundle + - git + - ruby-${{vars.rubyMM}} + - ruby-${{vars.rubyMM}}-dev + +pipeline: + - uses: git-checkout + with: + repository: https://github.com/ruby/uri + tag: v${{package.version}} + expected-commit: f1b05c89ab38667e7564896f994d4d6cfbc67149 + + - uses: ruby/build + with: + gem: ${{vars.gem}} + + - uses: ruby/install + with: + gem: ${{vars.gem}} + version: ${{package.version}} + + - uses: ruby/clean + +vars: + gem: uri + +test: + pipeline: + - runs: ruby -e "require 'uri'" + - runs: | + ruby -e 'require "uri"; uri = URI("https://wolfi.dev"); raise "Failed to parse URI" unless uri.host == "wolfi.dev" && uri.scheme == "https"' + +update: + enabled: true + github: + identifier: ruby/uri + strip-prefix: v + +var-transforms: + - from: ${{package.name}} + match: ^ruby(\d\.\d+)-.* + replace: $1 + to: rubyMM diff --git a/ruby4.0-validate_email.yaml b/ruby4.0-validate_email.yaml new file mode 100644 index 00000000000..7c9815811e6 --- /dev/null +++ b/ruby4.0-validate_email.yaml @@ -0,0 +1,59 @@ +package: + name: ruby4.0-validate_email + version: 0.1.6 + epoch: 0 + description: Library for validating email addresses in Rails 3 models. + dependencies: + runtime: + - ruby${{vars.rubyMM}}-activemodel + - ruby${{vars.rubyMM}}-mail + copyright: + - license: MIT + +environment: + contents: + packages: + - build-base + - busybox + - ca-certificates-bundle + - git + - ruby-${{vars.rubyMM}} + - ruby-${{vars.rubyMM}}-dev + +pipeline: + - uses: git-checkout + with: + repository: https://github.com/perfectline/validates_email + tag: v${{package.version}} + expected-commit: 25a5efcd7b4daa6445d3be9e8ba103b174ba9e4b + + - uses: ruby/build + with: + gem: ${{vars.gem}} + + - uses: ruby/install + with: + gem: ${{vars.gem}} + version: ${{package.version}} + + - uses: ruby/clean + +vars: + gem: validate_email + +update: + enabled: true + github: + identifier: perfectline/validates_email + strip-prefix: v + use-tag: true + +var-transforms: + - from: ${{package.name}} + match: ^ruby(\d\.\d+)-.* + replace: $1 + to: rubyMM + +test: + pipeline: + - uses: test/tw/gem-check diff --git a/ruby4.0-validate_url.yaml b/ruby4.0-validate_url.yaml new file mode 100644 index 00000000000..d3bcfdc338e --- /dev/null +++ b/ruby4.0-validate_url.yaml @@ -0,0 +1,58 @@ +package: + name: ruby4.0-validate_url + version: 1.0.15 + epoch: 0 + description: Library for validating urls in Rails. + dependencies: + runtime: + - ruby${{vars.rubyMM}}-activemodel + - ruby${{vars.rubyMM}}-public_suffix + copyright: + - license: MIT + +environment: + contents: + packages: + - build-base + - busybox + - ca-certificates-bundle + - git + - ruby-${{vars.rubyMM}} + - ruby-${{vars.rubyMM}}-dev + +pipeline: + # This is a workaround as validate_url stopped tagging releases + # after their 1.0.5 release. It is adapted from our git-checkout + # pipeline as of 2023-07-24. + - uses: fetch + with: + # This commit is the 1.0.15 release + uri: https://github.com/perfectline/validates_url/archive/9c8a33558bba162fcc8c23732ba5b6e47fceaf86.tar.gz + expected-sha512: 3e5af128a911c5eb7c7c8b128f8834000aa540105c4ba5d4b6ff30ae7c11038c1e7ad73afc3c03e28260b4167954967a3db4f73fb8a4dc083b95b5cce6767572 + + - uses: ruby/build + with: + gem: ${{vars.gem}} + + - uses: ruby/install + with: + gem: ${{vars.gem}} + version: ${{package.version}} + + - uses: ruby/clean + +vars: + gem: validate_url + +update: + enabled: false + +var-transforms: + - from: ${{package.name}} + match: ^ruby(\d\.\d+)-.* + replace: $1 + to: rubyMM + +test: + pipeline: + - uses: test/tw/gem-check diff --git a/ruby4.0-version_gem.yaml b/ruby4.0-version_gem.yaml new file mode 100644 index 00000000000..08aa7412111 --- /dev/null +++ b/ruby4.0-version_gem.yaml @@ -0,0 +1,56 @@ +package: + name: ruby4.0-version_gem + version: "1.1.9" + epoch: 0 + description: Versions are good. Versions are cool. Versions will win. + copyright: + - license: MIT + +environment: + contents: + packages: + - build-base + - busybox + - ca-certificates-bundle + - git + - ruby-${{vars.rubyMM}} + - ruby-${{vars.rubyMM}}-dev + +pipeline: + - uses: git-checkout + with: + expected-commit: a5d93f50d06af9ded2b1afeafeccf0cb74cf196b + tag: v${{package.version}} + repository: https://gitlab.com/oauth-xx/version_gem + + - runs: sed -i '/signing_key/d' ${{vars.gem}}.gemspec + + - uses: ruby/build + with: + gem: ${{vars.gem}} + + - uses: ruby/install + with: + gem: ${{vars.gem}} + version: ${{package.version}} + + - uses: ruby/clean + +vars: + gem: version_gem + +update: + enabled: true + git: + strip-prefix: v + tag-filter-prefix: v + +test: + pipeline: + - runs: ruby -e "require 'version_gem'" + +var-transforms: + - from: ${{package.name}} + match: ^ruby(\d\.\d+)-.* + replace: $1 + to: rubyMM diff --git a/ruby4.0-webfinger.yaml b/ruby4.0-webfinger.yaml new file mode 100644 index 00000000000..cfa9abb21ce --- /dev/null +++ b/ruby4.0-webfinger.yaml @@ -0,0 +1,59 @@ +package: + name: ruby4.0-webfinger + version: 2.1.2 + epoch: 0 + description: Ruby WebFinger client library + copyright: + - license: MIT + dependencies: + runtime: + - ruby${{vars.rubyMM}}-activesupport + - ruby${{vars.rubyMM}}-faraday + - ruby${{vars.rubyMM}}-faraday-follow_redirects + +environment: + contents: + packages: + - build-base + - busybox + - ca-certificates-bundle + - git + - ruby-${{vars.rubyMM}} + - ruby-${{vars.rubyMM}}-dev + +pipeline: + - uses: git-checkout + with: + repository: https://github.com/nov/webfinger + tag: v${{package.version}} + expected-commit: a79f140bcd5a0ac2140eefed5316e572625a0563 + + - uses: ruby/build + with: + gem: ${{vars.gem}} + + - uses: ruby/install + with: + gem: ${{vars.gem}} + version: ${{package.version}} + + - uses: ruby/clean + +vars: + gem: webfinger + +update: + enabled: true + github: + identifier: nov/webfinger + strip-prefix: v + +var-transforms: + - from: ${{package.name}} + match: ^ruby(\d\.\d+)-.* + replace: $1 + to: rubyMM + +test: + pipeline: + - uses: test/tw/gem-check diff --git a/ruby4.0-webrick.yaml b/ruby4.0-webrick.yaml new file mode 100644 index 00000000000..07237deec0c --- /dev/null +++ b/ruby4.0-webrick.yaml @@ -0,0 +1,92 @@ +package: + name: ruby4.0-webrick + version: "1.9.2" + epoch: 0 + description: WEBrick is an HTTP server toolkit that can be configured as an HTTPS server, a proxy server, and a virtual-host server. + copyright: + - license: Ruby + - license: BSD-2-Clause + dependencies: + runtime: + - ruby-${{vars.rubyMM}} + +environment: + contents: + packages: + - build-base + - busybox + - ca-certificates-bundle + - git + - ruby-${{vars.rubyMM}} + - ruby-${{vars.rubyMM}}-dev + +vars: + gem: webrick + +pipeline: + - uses: git-checkout + with: + expected-commit: b1684cecf9eb87cb2ae20fd52fbb80cf3e859c8a + repository: https://github.com/ruby/webrick + tag: v${{package.version}} + + - uses: ruby/build + with: + gem: ${{vars.gem}} + + - uses: ruby/install + with: + gem: ${{vars.gem}} + version: ${{package.version}} + + - uses: ruby/clean + +update: + enabled: true + github: + identifier: ruby/webrick + strip-prefix: v + +var-transforms: + - from: ${{package.name}} + match: ^ruby(\d\.\d+)-.* + replace: $1 + to: rubyMM + +test: + pipeline: + - uses: test/tw/gem-check + with: + require: | + webrick + webrick/accesslog + webrick/cgi + webrick/compat + webrick/config + webrick/cookie + webrick/htmlutils + webrick/httpauth + webrick/httpproxy + webrick/httprequest + webrick/httpresponse + webrick/https + webrick/httpserver + webrick/httpservlet + webrick/httpstatus + webrick/httputils + webrick/httpversion + webrick/log + webrick/server + webrick/ssl + webrick/utils + webrick/version + webrick/httpauth/basicauth + webrick/httpauth/digestauth + webrick/httpauth/htdigest + webrick/httpauth/htgroup + webrick/httpauth/htpasswd + webrick/httpauth/userdb + webrick/httpservlet/abstract + webrick/httpservlet/cgihandler + webrick/httpservlet/erbhandler + webrick/httpservlet/prochandler diff --git a/ruby4.0-yajl-ruby.yaml b/ruby4.0-yajl-ruby.yaml new file mode 100644 index 00000000000..8076650bda0 --- /dev/null +++ b/ruby4.0-yajl-ruby.yaml @@ -0,0 +1,112 @@ +#nolint:valid-pipeline-git-checkout-commit,valid-pipeline-git-checkout-tag +package: + name: ruby4.0-yajl-ruby + version: 1.4.3 + epoch: 0 + description: ruby C bindings for Yajl library + copyright: + - license: MIT + dependencies: + runtime: + - ruby-${{vars.rubyMM}} + +environment: + contents: + packages: + - build-base + - busybox + - ca-certificates-bundle + - git + - ruby-${{vars.rubyMM}} + - ruby-${{vars.rubyMM}}-dev + +vars: + gem: yajl-ruby + # The latest releases of yajl-ruby were released on rubygems.org but a tag + # was not created in the repo itself. https://github.com/brianmario/yajl-ruby + # + # This commit matches the 1.4.3 release on rubygems.org so it's used to check + # the repository out and build the 1.4.3 version of yajl-ruby + # https://github.com/brianmario/yajl-ruby/issues/216 + commit: 63760720e58d8cb818d59ae6c4f3d96760cd7854 + +pipeline: + # This package _also_ makes use of `git ls-files` in it's gemspec so the git + # repo must be checked out in order for the gem to build with all files. + - uses: git-checkout + with: + branch: master + destination: ${{vars.gem}} + repository: https://github.com/brianmario/yajl-ruby + depth: -1 + + - working-directory: ${{vars.gem}} + pipeline: + # NOTE: See the vars.commit comment + - runs: git checkout ${{vars.commit}} + - uses: ruby/build + with: + gem: ${{vars.gem}} + - uses: ruby/install + with: + gem: ${{vars.gem}} + version: ${{package.version}} + - uses: ruby/clean + +update: + enabled: true + manual: true # update fails while we are using a commit rather than tag + github: + identifier: brianmario/yajl-ruby + strip-prefix: v + use-tag: true + +var-transforms: + - from: ${{package.name}} + match: ^ruby(\d\.\d+)-.* + replace: $1 + to: rubyMM + +test: + environment: + contents: + packages: + - ruby-${{vars.rubyMM}} + pipeline: + - uses: test/tw/gem-check + with: + require: | + yajl + yajl/json_gem + yajl/json_gem/encoding + yajl/json_gem/parsing + yajl/version + - name: Verify library loading + runs: | + ruby -e "require 'yajl'; puts 'Successfully loaded yajl-ruby library'" + - name: Basic JSON parsing and encoding test + runs: | + ruby <<-EOF + require 'yajl' + + # Test parsing JSON + json_string = '{"test": "value", "numbers": [1, 2, 3]}' + parsed = Yajl::Parser.parse(json_string) + + # Verify parsing worked correctly + raise "Parsing failed: expected 'value', got '\#{parsed['test']}'" unless parsed['test'] == 'value' + raise "Array parsing failed" unless parsed['numbers'].is_a?(Array) && parsed['numbers'] == [1, 2, 3] + puts "JSON parsing test passed!" + + # Test encoding + hash = {"hello" => "world", "array" => [1, 2, "three"]} + encoded = Yajl::Encoder.encode(hash) + + # Verify we can parse what we encoded + decoded = Yajl::Parser.parse(encoded) + raise "Round-trip encoding test failed" unless decoded == hash + puts "JSON encoding test passed!" + + puts "All yajl-ruby tests passed successfully!" + EOF + - uses: test/tw/ldd-check