Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
61 changes: 61 additions & 0 deletions ruby4.0-quantile.yaml
Original file line number Diff line number Diff line change
@@ -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
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we should switch these to git-checkout

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
189 changes: 189 additions & 0 deletions ruby4.0-rails-8.1.yaml
Original file line number Diff line number Diff line change
@@ -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
Loading
Loading