stable-cli-rails 0.2.0 → 0.4.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.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. metadata +3 -49
  3. data/README.md +0 -189
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: bafe8b35c7bcdb9e006bb397cc8886bada3aa2a4c5d8b3fa1a9adb1b58acbeb7
4
- data.tar.gz: 2588434d05a99499fbda818602bf90014f0c9371c775d59d7e3094a376faab32
3
+ metadata.gz: 44255eb169e13d0f525e93fd948eb7f5f4b2fa9c6818fba7b1bd09889adc9d2a
4
+ data.tar.gz: 82af0cf68641c023280ba82e8c8c808182cf5c1455e9341086df9d7b99ca24ae
5
5
  SHA512:
6
- metadata.gz: 121b37effd9a47901bd867be859899ef4c27aa12e03493480232848abd3bca22bad06d09752603ce8d07723a2e434484457084f9691696c9c2c4316d52409269
7
- data.tar.gz: 6369c0e52982569c20516bea53c13dc04bd0c2ddf1893de486358dc3cb2a2c914fd3d60416b79ab1916cf6e1024a1de9d56a03eeefce0b3e2ab4508079324fcd
6
+ metadata.gz: 0fe49c3aed3dbbc723d63b5a72fe7b2f51c110d17e076b1c6d882079a7df3ed338675fe1a8633c12dcd449150cecc797680182efe68011e037c150ed37abf754
7
+ data.tar.gz: 2e5007ac55dc7f06fc70e6dd0e00636a5a545f6e1e87ea0f6a81ca4195405cb5eaf631da9ac99048c966cc3ed0aa987a2aa57e673ebcaf3a29e8b3617ec7588e
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: stable-cli-rails
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.4.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Danny Simfukwe
@@ -37,53 +37,8 @@ dependencies:
37
37
  - - ">="
38
38
  - !ruby/object:Gem::Version
39
39
  version: '0'
40
- description: "# Stable CLI (macOS)\n\nStable is a CLI tool to manage local Rails applications
41
- with automatic Caddy setup on macOS, local trusted HTTPS certificates, and easy
42
- start/stop functionality.\n\n## Features\n\n- Add and remove Rails apps.\n- Automatically
43
- generate and manage local HTTPS certificates using `mkcert`.\n- Automatically update
44
- `/etc/hosts` for `.test` domains.\n- Start Rails apps with integrated Caddy reverse
45
- proxy.\n- Reload Caddy after adding/removing apps.\n- List all registered apps.\n\n##
46
- Installation\n\n### From source\n\n```bash\n# Clone the repository\ngit clone git@github.com:dannysimfukwe/stable-rails.git\ncd
47
- stable-rails\n\n# Install dependencies\nbundle install\n```\n\n### As a gem from
48
- Rubygems registry\n\n```bash\ngem install stable-cli-rails\n```\n\n### Or add it
49
- to your Gemfile\n```bash\ngem \"stable-cli-rails\" \n```\n\n## Setup\n\nInitialize
50
- Caddy home and required directories:\n\n```bash\nstable setup\n```\n\nThis will
51
- create: \n- `~/StableCaddy/` for Caddy configuration. \n- `~/StableCaddy/certs`
52
- for generated certificates. \n- `~/StableCaddy/Caddyfile` for Caddy configuration.
53
- \ \n\n## CLI Commands\n\n### List apps\n\n```bash\nstable list\n```\n\nLists all
54
- registered apps and their domains.\n\n### Add a Rails app\n\n```bash\nstable add
55
- /path/to/rails_app\n```\n\nThis will: \n- Register the app. \n- Add a `/etc/hosts`
56
- entry. \n- Generate local trusted HTTPS certificates. \n- Add a Caddy reverse
57
- proxy block. \n- Reload Caddy.\n\n### Remove a Rails app\n\n```bash\nstable remove
58
- app_name\n```\n\nThis will: \n- Remove the app from registry. \n- Remove `/etc/hosts`
59
- entry. \n- Remove the Caddy reverse proxy block. \n- Reload Caddy.\n\n### Start
60
- an app\n\n```bash\nrvmsudo stable start app_name\n```\n\nStarts the Rails server
61
- on the assigned port and ensures Caddy is running with the proper reverse proxy.
62
- Rails logs can be viewed in your terminal.\n\n### Stop an app\n\n```bash\nstable
63
- stop app_name\n```\n\nStops the Rails server running on the assigned port.\n\n###
64
- Secure an app manually\n\n```bash\nrvmsudo stable secure app_name.test\n```\n\nGenerates
65
- or updates trusted local HTTPS certificates and reloads Caddy.\n\n### Reload Caddy\n\n```bash\nstable
66
- caddy reload\n```\n\nReloads Caddy configuration after changes.\n\n### Health check\n\n```bash\nstable
67
- doctor\n```\n\nChecks the environment, RVM/Ruby, Caddy, mkcert, and app readiness.\n\n###
68
- Upgrade Ruby for an app\n\n```bash\nstable upgrade-ruby myapp 3.4.4\n```\n\nUpgrades
69
- the Ruby version for a specific app, updating `.ruby-version` and ensuring gemset
70
- compatibility.\n\n### Create a new Rails app\n\n```bash\nstable new myapp [--ruby
71
- 3.4.4] [--rails 7.0.7.1] [--skip-ssl]\n```\n\nCreates a new Rails app, generates
72
- `.ruby-version`, installs Rails, adds the app to Stable, and optionally secures
73
- it with HTTPS.\n\n## Paths\n\n- Caddy home: `~/StableCaddy` \n- Caddyfile: `~/StableCaddy/Caddyfile`
74
- \ \n- Certificates: `~/StableCaddy/certs` \n- Registered apps: `~/StableCaddy/apps.yml`
75
- \ \n\n## Dependencies\n\n- Homebrew \n- Caddy \n- mkcert \n- RVM (or rbenv fallback)\n\n`ensure_dependencies!`
76
- will install missing dependencies automatically.\n\n## Known Issues\n\n- Sometimes
77
- you may see: \n```\nTCPSocket#initialize: Connection refused - connect(2) for \"127.0.0.1\"
78
- port 300.. (Errno::ECONNREFUSED)\n```\nThis usually disappears after a few seconds
79
- when Caddy reloads. If it persists, run:\n\n```bash\nrvmsudo stable secure myapp.test\n```\n\n-
80
- Some commands may need to be run consecutively for proper setup: \n```bash\nstable
81
- setup\nrvmsudo stable add myapp\nrvmsudo stable secure myapp.test\nstable start
82
- myapp\n```\n\n- PATH warnings from RVM may appear on the first run. Make sure your
83
- shell is properly configured for RVM.\n\n## Notes\n\n- Make sure to run `stable
84
- setup` initially. \n- Requires `sudo` to modify `/etc/hosts`. \n- Rails apps are
85
- started on ports assigned by Stable (default 3000+). \n- Domains are automatically
86
- suffixed with `.test`. \n\n## License\n\nMIT License\n"
40
+ description: 'Stable CLI: manage local Rails apps with automatic Caddy, HTTPS, and
41
+ simple start/stop commands.'
87
42
  email:
88
43
  - dannysimfukwe@gmail.com
89
44
  executables:
@@ -91,7 +46,6 @@ executables:
91
46
  extensions: []
92
47
  extra_rdoc_files: []
93
48
  files:
94
- - README.md
95
49
  - bin/stable
96
50
  - lib/stable.rb
97
51
  - lib/stable/bootstrap.rb
data/README.md DELETED
@@ -1,189 +0,0 @@
1
- # Stable CLI (macOS)
2
-
3
- Stable is a CLI tool to manage local Rails applications with automatic Caddy setup on macOS, local trusted HTTPS certificates, and easy start/stop functionality.
4
-
5
- ## Features
6
-
7
- - Add and remove Rails apps.
8
- - Automatically generate and manage local HTTPS certificates using `mkcert`.
9
- - Automatically update `/etc/hosts` for `.test` domains.
10
- - Start Rails apps with integrated Caddy reverse proxy.
11
- - Reload Caddy after adding/removing apps.
12
- - List all registered apps.
13
-
14
- ## Installation
15
-
16
- ### From source
17
-
18
- ```bash
19
- # Clone the repository
20
- git clone git@github.com:dannysimfukwe/stable-rails.git
21
- cd stable-rails
22
-
23
- # Install dependencies
24
- bundle install
25
- ```
26
-
27
- ### As a gem from Rubygems registry
28
-
29
- ```bash
30
- gem install stable-cli-rails
31
- ```
32
-
33
- ### Or add it to your Gemfile
34
- ```bash
35
- gem "stable-cli-rails"
36
- ```
37
-
38
- ## Setup
39
-
40
- Initialize Caddy home and required directories:
41
-
42
- ```bash
43
- stable setup
44
- ```
45
-
46
- This will create:
47
- - `~/StableCaddy/` for Caddy configuration.
48
- - `~/StableCaddy/certs` for generated certificates.
49
- - `~/StableCaddy/Caddyfile` for Caddy configuration.
50
-
51
- ## CLI Commands
52
-
53
- ### List apps
54
-
55
- ```bash
56
- stable list
57
- ```
58
-
59
- Lists all registered apps and their domains.
60
-
61
- ### Add a Rails app
62
-
63
- ```bash
64
- stable add /path/to/rails_app
65
- ```
66
-
67
- This will:
68
- - Register the app.
69
- - Add a `/etc/hosts` entry.
70
- - Generate local trusted HTTPS certificates.
71
- - Add a Caddy reverse proxy block.
72
- - Reload Caddy.
73
-
74
- ### Remove a Rails app
75
-
76
- ```bash
77
- stable remove app_name
78
- ```
79
-
80
- This will:
81
- - Remove the app from registry.
82
- - Remove `/etc/hosts` entry.
83
- - Remove the Caddy reverse proxy block.
84
- - Reload Caddy.
85
-
86
- ### Start an app
87
-
88
- ```bash
89
- rvmsudo stable start app_name
90
- ```
91
-
92
- Starts the Rails server on the assigned port and ensures Caddy is running with the proper reverse proxy. Rails logs can be viewed in your terminal.
93
-
94
- ### Stop an app
95
-
96
- ```bash
97
- stable stop app_name
98
- ```
99
-
100
- Stops the Rails server running on the assigned port.
101
-
102
- ### Secure an app manually
103
-
104
- ```bash
105
- rvmsudo stable secure app_name.test
106
- ```
107
-
108
- Generates or updates trusted local HTTPS certificates and reloads Caddy.
109
-
110
- ### Reload Caddy
111
-
112
- ```bash
113
- stable caddy reload
114
- ```
115
-
116
- Reloads Caddy configuration after changes.
117
-
118
- ### Health check
119
-
120
- ```bash
121
- stable doctor
122
- ```
123
-
124
- Checks the environment, RVM/Ruby, Caddy, mkcert, and app readiness.
125
-
126
- ### Upgrade Ruby for an app
127
-
128
- ```bash
129
- stable upgrade-ruby myapp 3.4.4
130
- ```
131
-
132
- Upgrades the Ruby version for a specific app, updating `.ruby-version` and ensuring gemset compatibility.
133
-
134
- ### Create a new Rails app
135
-
136
- ```bash
137
- stable new myapp [--ruby 3.4.4] [--rails 7.0.7.1] [--skip-ssl]
138
- ```
139
-
140
- Creates a new Rails app, generates `.ruby-version`, installs Rails, adds the app to Stable, and optionally secures it with HTTPS.
141
-
142
- ## Paths
143
-
144
- - Caddy home: `~/StableCaddy`
145
- - Caddyfile: `~/StableCaddy/Caddyfile`
146
- - Certificates: `~/StableCaddy/certs`
147
- - Registered apps: `~/StableCaddy/apps.yml`
148
-
149
- ## Dependencies
150
-
151
- - Homebrew
152
- - Caddy
153
- - mkcert
154
- - RVM (or rbenv fallback)
155
-
156
- `ensure_dependencies!` will install missing dependencies automatically.
157
-
158
- ## Known Issues
159
-
160
- - Sometimes you may see:
161
- ```
162
- TCPSocket#initialize: Connection refused - connect(2) for "127.0.0.1" port 300.. (Errno::ECONNREFUSED)
163
- ```
164
- This usually disappears after a few seconds when Caddy reloads. If it persists, run:
165
-
166
- ```bash
167
- rvmsudo stable secure myapp.test
168
- ```
169
-
170
- - Some commands may need to be run consecutively for proper setup:
171
- ```bash
172
- stable setup
173
- rvmsudo stable add myapp
174
- rvmsudo stable secure myapp.test
175
- stable start myapp
176
- ```
177
-
178
- - PATH warnings from RVM may appear on the first run. Make sure your shell is properly configured for RVM.
179
-
180
- ## Notes
181
-
182
- - Make sure to run `stable setup` initially.
183
- - Requires `sudo` to modify `/etc/hosts`.
184
- - Rails apps are started on ports assigned by Stable (default 3000+).
185
- - Domains are automatically suffixed with `.test`.
186
-
187
- ## License
188
-
189
- MIT License