Skip to content

Commit

Permalink
open source dashboard: add romer-sdk and elasticgraph and add Ruby/Ge…
Browse files Browse the repository at this point in the history
…m support
  • Loading branch information
finn-block committed Jan 24, 2025
1 parent 5f134e7 commit 9544add
Show file tree
Hide file tree
Showing 5 changed files with 66 additions and 1 deletion.
1 change: 1 addition & 0 deletions projects-dashboard/src/components/LanguageIcon.astro
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ const iconMap = {
go: { icon: "go", color: "#00ADD8" },
java: { icon: "java", color: "#b07219" },
python: { icon: "py", color: "#3572A5" },
ruby: { icon: "ruby", color: "#701516" },
};
---

Expand Down
4 changes: 3 additions & 1 deletion projects-dashboard/src/content/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ const languageSchema = z.enum([
"go",
"java",
"python",
"rust",
"ruby",
]);

export type Language = z.infer<typeof languageSchema>;
Expand All @@ -29,6 +29,7 @@ const artifactTypeSchema = z.enum([
"reference-docs",
"pypi",
"cocoapods",
"rubygems"
]);

export type ArtifactType = z.infer<typeof artifactTypeSchema>;
Expand Down Expand Up @@ -71,6 +72,7 @@ const badgeTypeSchema = z.enum([
"github-discussions",
"slack",
"link",
"rubygems"
]);

export type BadgeType = z.infer<typeof badgeTypeSchema>;
Expand Down
35 changes: 35 additions & 0 deletions projects-dashboard/src/content/project/block_elasticgraph.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
---
repo:
owner: block
name: elasticgraph
title: ElasticGraph
description: Schema-driven, scalable, cloud-native, batteries-included GraphQL with superpowers
branding: block
lifeCycleStatus: mature
ciChecks:
- type: github-actions
label: test
value: ci.yml
licenses:
- type: github-license
securityScans:
- type: github-actions
label: scan
value: scorecards.yml
scoreCards:
- type: ossf
contributing:
- type: "code-of-conduct"
value: "CODE_OF_CONDUCT.md"
- type: "contribution-guidelines"
value: "CONTRIBUTING.md"
- type: "issues"
packages:
- packageName: elasticgraph
language: ruby
artifacts:
- type: rubygems
value: elasticgraph
- type: reference-docs
value: https://block.github.io/elasticgraph/docs/main/
---
13 changes: 13 additions & 0 deletions projects-dashboard/src/content/project/block_romer-sdk.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
---
repo:
owner: "block"
name: "romer-sdk"
title: romer-sdk
description: "A ready-to-go library for integrating lightning payments into your application."
branding: "block"
lifeCycleStatus: "incubation"
licenses:
- type: "github-license"
contributing:
- type: "issues"
---
14 changes: 14 additions & 0 deletions projects-dashboard/src/lib/badge.ts
Original file line number Diff line number Diff line change
Expand Up @@ -251,6 +251,18 @@ function getLinkBadge(label?: string, value?: string): [string, string] {
return [badgeSrc, href];
}

function getRubygemsBadge(value?: string): [string, string] {
if (!value) {
throw new Error("gem name required for badge");
}


let badgeSrc = `https://img.shields.io/gem/v/${value}`
let href = `https://rubygems.org/gems/${value}`

return [badgeSrc, href];
}

export function getBadgeInfo(
repo: Repo,
badge: Badge,
Expand Down Expand Up @@ -306,6 +318,8 @@ export function getBadgeInfo(
return getSlackBadge(label, value);
case "link":
return getLinkBadge(label, value);
case "rubygems":
return getRubygemsBadge(value);
default:
throw new Error(`Unknown badge type: ${type}`);
}
Expand Down

0 comments on commit 9544add

Please sign in to comment.