create-rails-app 0.1.0 → 0.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +4 -0
- data/README.md +95 -6
- data/exe/create-rails-app +8 -4
- data/lib/create_rails_app/cli.rb +586 -0
- data/lib/create_rails_app/command_builder.rb +54 -0
- data/lib/create_rails_app/compatibility/matrix.rb +132 -0
- data/lib/create_rails_app/config/store.rb +149 -0
- data/lib/create_rails_app/detection/rails_versions.rb +67 -0
- data/lib/create_rails_app/detection/runtime.rb +24 -0
- data/lib/create_rails_app/error.rb +15 -0
- data/lib/create_rails_app/options/catalog.rb +120 -0
- data/lib/create_rails_app/options/validator.rb +99 -0
- data/lib/create_rails_app/runner.rb +48 -0
- data/lib/create_rails_app/ui/palette.rb +87 -0
- data/lib/create_rails_app/ui/prompter.rb +104 -0
- data/lib/create_rails_app/version.rb +1 -1
- data/lib/create_rails_app/wizard.rb +368 -0
- data/lib/create_rails_app.rb +22 -1
- metadata +48 -5
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 31761708f2752c65097c71b8c1310f39b214ed64daf1b009bbd182af75e9ab0b
|
|
4
|
+
data.tar.gz: d9eed4ca1bc04a66d7dbebd094b2863e23455c9d3e25009d4eb2267af4c0481c
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 29d05c5d9afdb86f3f841521a626e254d5694d092d36048ffb241bf53d62058e8d4e756846a3f1d458d124dd390dc8629f16fb4b4e3c85d7ebe363c5e0d0778a
|
|
7
|
+
data.tar.gz: 5668526785efb82aed7b39f970b3a2c915c2e0f5e5a257250a3757f2c66eee4a3a56166cd91702d86b3ebf4cddb55bab6d42bb5ce6ad4cac9069c721c1c9f192
|
data/CHANGELOG.md
CHANGED
data/README.md
CHANGED
|
@@ -1,10 +1,24 @@
|
|
|
1
|
-
# create-rails-app
|
|
1
|
+
# create-rails-app [](https://rubygems.org/gems/create-rails-app) [](https://app.codecov.io/gh/svyatov/create-rails-app) [](https://github.com/svyatov/create-rails-app/actions?query=workflow%3ACI)
|
|
2
2
|
|
|
3
|
-
Interactive CLI wizard for `rails new` —
|
|
3
|
+
> Interactive CLI wizard for `rails new` — walks you through every option, remembers your choices, and saves reusable presets.
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
## Table of Contents
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
- [Supported Ruby Versions](#supported-ruby-versions)
|
|
8
|
+
- [Installation](#installation)
|
|
9
|
+
- [Features](#features)
|
|
10
|
+
- [Usage](#usage)
|
|
11
|
+
- [Configuration](#configuration)
|
|
12
|
+
- [Supported Rails Versions](#supported-rails-versions)
|
|
13
|
+
- [Development](#development)
|
|
14
|
+
- [Contributing](#contributing)
|
|
15
|
+
- [Changelog](#changelog)
|
|
16
|
+
- [Versioning](#versioning)
|
|
17
|
+
- [License](#license)
|
|
18
|
+
|
|
19
|
+
## Supported Ruby Versions
|
|
20
|
+
|
|
21
|
+
Ruby 3.2+ is required.
|
|
8
22
|
|
|
9
23
|
## Installation
|
|
10
24
|
|
|
@@ -12,10 +26,85 @@ Sibling project: [create-ruby-gem](https://github.com/svyatov/create-ruby-gem)
|
|
|
12
26
|
gem install create-rails-app
|
|
13
27
|
```
|
|
14
28
|
|
|
29
|
+
## Features
|
|
30
|
+
|
|
31
|
+
- Interactive step-by-step wizard for all `rails new` options
|
|
32
|
+
- Supports Rails 7.2+ with version-aware option filtering
|
|
33
|
+
- Remembers last-used choices and saves reusable presets
|
|
34
|
+
- Back navigation (<kbd>Ctrl+B</kbd>) to change previous answers
|
|
35
|
+
- Dry-run mode to preview the generated command
|
|
36
|
+
- Smart skip rules (e.g., skips database prompt if Active Record is disabled)
|
|
37
|
+
- Color-coded terminal UI
|
|
38
|
+
|
|
39
|
+
## Usage
|
|
40
|
+
|
|
41
|
+
Start the wizard:
|
|
42
|
+
|
|
43
|
+
```bash
|
|
44
|
+
create-rails-app
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
With an app name:
|
|
48
|
+
|
|
49
|
+
```bash
|
|
50
|
+
create-rails-app myapp
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
Preview the generated command without running it:
|
|
54
|
+
|
|
55
|
+
```bash
|
|
56
|
+
create-rails-app --dry-run
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
Use a saved preset:
|
|
60
|
+
|
|
61
|
+
```bash
|
|
62
|
+
create-rails-app --preset api
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
List available presets:
|
|
66
|
+
|
|
67
|
+
```bash
|
|
68
|
+
create-rails-app --list-presets
|
|
69
|
+
```
|
|
70
|
+
|
|
71
|
+
## Configuration
|
|
72
|
+
|
|
73
|
+
Presets and last-used choices are stored in `~/.config/create-rails-app/config.yml` (follows the [XDG Base Directory Specification](https://specifications.freedesktop.org/basedir-spec/latest/)).
|
|
74
|
+
|
|
75
|
+
## Supported Rails Versions
|
|
76
|
+
|
|
77
|
+
| Version | Supported |
|
|
78
|
+
|---------|--------------------|
|
|
79
|
+
| 8.1 | :white_check_mark: |
|
|
80
|
+
| 8.0 | :white_check_mark: |
|
|
81
|
+
| 7.2 | :white_check_mark: |
|
|
82
|
+
|
|
83
|
+
## Development
|
|
84
|
+
|
|
85
|
+
After checking out the repo, run `bin/setup` to install dependencies.
|
|
86
|
+
Then, run `bundle exec rake` to run the tests. You can also run `bin/console`
|
|
87
|
+
for an interactive prompt that will allow you to experiment.
|
|
88
|
+
|
|
89
|
+
To install this gem onto your local machine, run `bundle exec rake install`.
|
|
90
|
+
|
|
91
|
+
Sibling project: [create-ruby-gem](https://github.com/svyatov/create-ruby-gem) — the same idea for `bundle gem`.
|
|
92
|
+
|
|
15
93
|
## Contributing
|
|
16
94
|
|
|
17
|
-
Bug reports and pull requests are welcome on GitHub
|
|
95
|
+
Bug reports and pull requests are welcome on [GitHub](https://github.com/svyatov/create-rails-app). See [CONTRIBUTING.md](CONTRIBUTING.md) for development setup, code style, and PR guidelines.
|
|
96
|
+
|
|
97
|
+
This project follows the [Contributor Covenant Code of Conduct](CODE_OF_CONDUCT.md).
|
|
98
|
+
|
|
99
|
+
## Changelog
|
|
100
|
+
|
|
101
|
+
See [CHANGELOG.md](CHANGELOG.md) for a detailed history of changes, following [Keep a Changelog](https://keepachangelog.com/en/1.1.0/) format.
|
|
102
|
+
|
|
103
|
+
## Versioning
|
|
104
|
+
|
|
105
|
+
This project follows [Semantic Versioning 2.0.0](https://semver.org/spec/v2.0.0.html)
|
|
18
106
|
|
|
19
107
|
## License
|
|
20
108
|
|
|
21
|
-
The gem is available as open source under the terms of
|
|
109
|
+
The gem is available as open source under the terms of
|
|
110
|
+
the [MIT License](LICENSE.txt).
|
data/exe/create-rails-app
CHANGED
|
@@ -3,7 +3,11 @@
|
|
|
3
3
|
|
|
4
4
|
require 'create_rails_app'
|
|
5
5
|
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
6
|
+
begin
|
|
7
|
+
exit CreateRailsApp::CLI.start(ARGV)
|
|
8
|
+
rescue Interrupt
|
|
9
|
+
exit 130
|
|
10
|
+
rescue StandardError => e
|
|
11
|
+
warn "create-rails-app: #{e.message}"
|
|
12
|
+
exit 1
|
|
13
|
+
end
|