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