mirror of
https://github.com/l0ng-ai/openidea.git
synced 2026-11-14 16:07:52 +00:00
File › New Project offers 38 generators grouped by language (Java, Spring Boot, Quarkus, Micronaut, Kotlin, Ktor, Scala, Python/Django/FastAPI/Flask, Node/Vite/Next.js/Nuxt/Angular/SvelteKit/Astro/NestJS/Express, Go, Rust, C/C++, Zig, .NET, PHP/Laravel/Symfony, Ruby/Rails, Dart/Flutter, Swift, Elixir/Phoenix, Haskell, static website, empty). Each is a declaration in generators/<id>.toml run by the new ide-scaffold crate: built-in templates, the framework's official CLI run non-interactively, or a project service zip (Spring Initializr, code.quarkus.io, Micronaut Launch) whose metadata becomes form fields. Projects are built in a staging directory and moved into place only on success. The dialog renders each form from its schema, flags missing toolchains with install hints and streams progress; created projects open trusted. New Project is also on the welcome screen and the title bar project menu. Closes #709
49 lines
1.1 KiB
TOML
49 lines
1.1 KiB
TOML
id = "ruby"
|
|
name = "Ruby"
|
|
group = "Ruby"
|
|
icon = "project-ruby"
|
|
description = "A Ruby application with a Gemfile, or a gem from bundle gem."
|
|
|
|
[[requires]]
|
|
program = "bundle"
|
|
hint = "Install Ruby with Bundler: https://www.ruby-lang.org/en/documentation/installation/"
|
|
|
|
[[fields]]
|
|
id = "kind"
|
|
label = "Type:"
|
|
type = "choice"
|
|
segmented = true
|
|
options = [{ value = "app", label = "Application" }, { value = "gem", label = "Gem" }]
|
|
default = "app"
|
|
|
|
[[fields]]
|
|
id = "test"
|
|
label = "Test framework:"
|
|
type = "choice"
|
|
segmented = true
|
|
options = [{ value = "minitest", label = "Minitest" }, { value = "rspec", label = "RSpec" }]
|
|
default = "minitest"
|
|
visible = { kind = "gem" }
|
|
|
|
[[steps]]
|
|
label = "Running bundle init"
|
|
program = "bundle"
|
|
args = ["init"]
|
|
when = { kind = "app" }
|
|
|
|
[[steps]]
|
|
label = "Running bundle gem"
|
|
program = "bundle"
|
|
cwd = "parent"
|
|
args = ["gem", "{{name}}", "--test={{test}}", "--ci=none", "--linter=none", "--no-coc", "--no-mit", "--no-changelog"]
|
|
when = { kind = "gem" }
|
|
|
|
[[files]]
|
|
path = "main.rb"
|
|
when = { kind = "app" }
|
|
content = '''
|
|
# frozen_string_literal: true
|
|
|
|
puts "Hello, World!"
|
|
'''
|