Skip to content

Instantly share code, notes, and snippets.

View omarqureshi's full-sized avatar

Omar Qureshi omarqureshi

View GitHub Profile
source "https://rubygems.org"
gem "foobara"
gem "foobara-rack-connector"
# Plans the deployment from the manifest, packages one artifact per domain, and
# provides the Lambda handler and optional-auth authorizer. Its CDK half is a
# separate require, used only by infra/ — nothing here loads it.
gem "foobara-aws", "~> 0.2"
gem "foobara-typescript-remote-command-generator", group: :development
source 'https://rubygems.omarqureshi.net' do
gem 'aws-cdk-lib', '>= 0.0.0.pre'
gem 'constructs', '>= 0.0.0.pre'
gem 'jsii-ruby-runtime', '>= 0.0.0.pre'
gem 'aws-cdk-asset-awscli-v1', '>= 0.0.0.pre'
gem 'aws-cdk-asset-node-proxy-agent-v6', '>= 0.0.0.pre'
gem 'aws-cdk-cloud-assembly-schema', '>= 0.0.0.pre'
end

RFC - Ruby Language Bindings

  • Original Author(s):: @omarqureshi
  • Tracking Issue: aws/jsii#5129
  • API Bar Raiser: @{BAR_RAISER_USER}

This RFC proposes the introduction of native Ruby language bindings for the AWS Cloud Development Kit (CDK).

The Problem

@omarqureshi
omarqureshi / 1-aws-cdk.diff
Last active May 22, 2026 13:29
Example of synth output from `cdk synth` when writing CDK in Ruby
diff --git a/packages/aws-cdk-lib/package.json b/packages/aws-cdk-lib/package.json
index 8420c94bc5..bdd75dd017 100644
--- a/packages/aws-cdk-lib/package.json
+++ b/packages/aws-cdk-lib/package.json
@@ -66,6 +66,10 @@
"tsconfig": "tsconfig.json",
"outdir": "dist",
"targets": {
+ "ruby": {
+ "gem": "aws-cdk-lib",
# Generated from jsii-pacmak from calculator.ts
require 'jsii'
class Calculator < Jsii::Object
self.jsii_fqn = "minimal-test.Calculator"
def add(a, b)
jsii_call_method("add", [a, b])
apiVersion: v1
kind: ServiceAccount
metadata:
labels:
k8s-app: metrics-server
name: metrics-server
namespace: kube-system
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
@omarqureshi
omarqureshi / 7.rb
Last active December 9, 2018 22:41
steps = Hash.new([])
File.open("./input.txt") do |file|
file.each_line do |line|
line =~ /Step ([A-Z]) must be finished before step ([A-Z])/
step = $2
prereq = $1
steps[prereq] = [] unless steps.has_key?(prereq)
steps[step] += [prereq]
end
version: '3'
services:
haproxy:
image: haproxy:1.5
volumes:
- /path/to/haproxy.cfg:/usr/local/etc/haproxy/haproxy.cfg
ports:
- "80:80"
require "minitest/autorun"
class Potter
attr_accessor :items
PRICE_PER_BOOK = 8
def initialize(items)
@items = items.sort
@current_value = items.first