mythic-beasts 0.1.0 → 0.1.2
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 +21 -1
- data/README.md +85 -4
- data/lib/mythic_beasts/version.rb +1 -1
- data/lib/mythic_beasts/vps.rb +10 -0
- metadata +29 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: b3ce37ca163918f82d1612c56fc75ce81e8de315abf65500a90b98ff6ca586dd
|
|
4
|
+
data.tar.gz: 21885db9c87b16458429a26a886b5873437d29d4232d7b11833ce9a9c2016029
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: b4629b547c7aa646fdba1eedf30c51d9e524005f3e8c7de3c112abc1d38f305a1befa6f421cf2334520e9a8ba683450709b7398a7e29bdd2f8f1bb6ddf204e2a
|
|
7
|
+
data.tar.gz: 8e9e1879278b5b9fa898328835be2ceaa3bcb1a4d6dd809f58050374903e609869a5af216095e09fb46f8a72b7f0a92d0e4944c7ca85afbf7e44d98fa6f68586
|
data/CHANGELOG.md
CHANGED
|
@@ -5,10 +5,30 @@ All notable changes to this project will be documented in this file.
|
|
|
5
5
|
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
|
6
6
|
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
7
7
|
|
|
8
|
-
## [0.1.
|
|
8
|
+
## [0.1.2] - 2025-11-05
|
|
9
9
|
|
|
10
10
|
### Added
|
|
11
11
|
|
|
12
|
+
- VPS zones listing method (`MythicBeasts.client.vps.zones`) to query available datacenters
|
|
13
|
+
- VPS types listing method (`MythicBeasts.client.vps.types`) to query available VPS plans
|
|
14
|
+
- Optional parameters for VPS creation: `location`, `service`, `description`, `notes`
|
|
15
|
+
- IPv6-only VPS provisioning support (`ipv4: false`) for cost savings
|
|
16
|
+
- Example scripts in `examples/` directory:
|
|
17
|
+
- `list_zones_and_types.rb` - List available zones and VPS types
|
|
18
|
+
- `provision_vps.rb` - Complete VPS provisioning example
|
|
19
|
+
- `ipv6_only_vps.rb` - IPv6-only VPS with proxy setup guide
|
|
20
|
+
- Test coverage for IPv6-only VPS provisioning
|
|
21
|
+
|
|
22
|
+
### Changed
|
|
23
|
+
|
|
24
|
+
- Updated README with new VPS methods and examples
|
|
25
|
+
- Improved VPS create documentation with optional parameters
|
|
26
|
+
- Added IPv6-only servers documentation with proxy setup instructions
|
|
27
|
+
|
|
28
|
+
## [0.1.0] - 2025-01-27
|
|
29
|
+
|
|
30
|
+
### Features
|
|
31
|
+
|
|
12
32
|
- Initial release by James Inman (@jfi)
|
|
13
33
|
- OAuth2 authentication support with automatic token refresh
|
|
14
34
|
- DNS API v2 client with full CRUD operations
|
data/README.md
CHANGED
|
@@ -87,6 +87,14 @@ MythicBeasts.client.dns.dynamic_update('home.example.com')
|
|
|
87
87
|
### VPS Management
|
|
88
88
|
|
|
89
89
|
```ruby
|
|
90
|
+
# List available zones/datacenters
|
|
91
|
+
zones = MythicBeasts.client.vps.zones
|
|
92
|
+
# => ["london", "cambridge", "amsterdam", "fremont"]
|
|
93
|
+
|
|
94
|
+
# List available VPS types/plans
|
|
95
|
+
types = MythicBeasts.client.vps.types
|
|
96
|
+
# => ["VPS-1", "VPS-2", "VPS-3", ...]
|
|
97
|
+
|
|
90
98
|
# List all VPS servers
|
|
91
99
|
servers = MythicBeasts.client.vps.list
|
|
92
100
|
|
|
@@ -97,7 +105,11 @@ server = MythicBeasts.client.vps.get('my-server')
|
|
|
97
105
|
MythicBeasts.client.vps.create(
|
|
98
106
|
name: 'my-new-server',
|
|
99
107
|
type: 'VPS-2',
|
|
100
|
-
ssh_key: 'ssh-rsa AAAAB3...'
|
|
108
|
+
ssh_key: 'ssh-rsa AAAAB3...',
|
|
109
|
+
location: 'london', # Optional: specify datacenter
|
|
110
|
+
service: 'my-service', # Optional: service/project name
|
|
111
|
+
description: 'My test server', # Optional: server description
|
|
112
|
+
notes: 'Any additional notes' # Optional: special requests
|
|
101
113
|
)
|
|
102
114
|
|
|
103
115
|
# Control servers
|
|
@@ -112,6 +124,37 @@ console = MythicBeasts.client.vps.console('my-server')
|
|
|
112
124
|
MythicBeasts.client.vps.delete('my-server')
|
|
113
125
|
```
|
|
114
126
|
|
|
127
|
+
#### IPv6-Only Servers (Cost Savings)
|
|
128
|
+
|
|
129
|
+
Provision cheaper IPv6-only servers without IPv4 addresses. Perfect for services accessible via Mythic Beasts' IPv4-to-IPv6 proxy:
|
|
130
|
+
|
|
131
|
+
```ruby
|
|
132
|
+
# Create an IPv6-only VPS (cheaper!)
|
|
133
|
+
MythicBeasts.client.vps.create(
|
|
134
|
+
name: 'my-ipv6-server',
|
|
135
|
+
type: 'VPS-2',
|
|
136
|
+
ipv4: false, # No IPv4 address = lower cost
|
|
137
|
+
ssh_key: 'ssh-rsa AAAAB3...',
|
|
138
|
+
location: 'london'
|
|
139
|
+
)
|
|
140
|
+
```
|
|
141
|
+
|
|
142
|
+
**IPv4-to-IPv6 Proxy Setup:**
|
|
143
|
+
|
|
144
|
+
1. Provision your IPv6-only VPS (as shown above)
|
|
145
|
+
2. In Mythic Beasts control panel, configure IPv4-to-IPv6 proxy
|
|
146
|
+
3. Point your domain's DNS to `proxy.mythic-beasts.com` (CNAME or ANAME)
|
|
147
|
+
|
|
148
|
+
**Supported proxy protocols:**
|
|
149
|
+
|
|
150
|
+
- HTTP (port 80) and HTTPS (port 443)
|
|
151
|
+
- IMAPS (port 993) and SMTPS (port 465)
|
|
152
|
+
- Gemini (port 1965)
|
|
153
|
+
|
|
154
|
+
See `examples/ipv6_only_vps.rb` for a complete working example with setup instructions.
|
|
155
|
+
|
|
156
|
+
**Documentation:** [IPv4 to IPv6 Proxy](https://www.mythic-beasts.com/support/topics/proxy)
|
|
157
|
+
|
|
115
158
|
## Error Handling
|
|
116
159
|
|
|
117
160
|
The gem provides specific error classes:
|
|
@@ -131,6 +174,7 @@ end
|
|
|
131
174
|
```
|
|
132
175
|
|
|
133
176
|
Available error classes:
|
|
177
|
+
|
|
134
178
|
- `MythicBeasts::Error` - Base error class
|
|
135
179
|
- `MythicBeasts::AuthenticationError` - Invalid credentials
|
|
136
180
|
- `MythicBeasts::NotFoundError` - Resource not found
|
|
@@ -138,13 +182,49 @@ Available error classes:
|
|
|
138
182
|
- `MythicBeasts::RateLimitError` - Rate limit exceeded
|
|
139
183
|
- `MythicBeasts::ServerError` - Server-side error
|
|
140
184
|
|
|
185
|
+
## Examples
|
|
186
|
+
|
|
187
|
+
See the `examples/` directory for complete working examples:
|
|
188
|
+
|
|
189
|
+
- `examples/list_zones_and_types.rb` - List available zones and VPS types
|
|
190
|
+
- `examples/provision_vps.rb` - Provision a new VPS server
|
|
191
|
+
- `examples/ipv6_only_vps.rb` - Provision an IPv6-only VPS with proxy setup guide
|
|
192
|
+
|
|
193
|
+
Run examples with:
|
|
194
|
+
|
|
195
|
+
```bash
|
|
196
|
+
export MYTHIC_BEASTS_API_KEY=your_key
|
|
197
|
+
export MYTHIC_BEASTS_API_SECRET=your_secret
|
|
198
|
+
ruby examples/list_zones_and_types.rb
|
|
199
|
+
```
|
|
200
|
+
|
|
141
201
|
## Development
|
|
142
202
|
|
|
143
|
-
After checking out the repo:
|
|
203
|
+
After checking out the repo, run the setup script to install dependencies and git hooks:
|
|
144
204
|
|
|
145
205
|
```bash
|
|
146
|
-
|
|
147
|
-
|
|
206
|
+
bin/setup
|
|
207
|
+
```
|
|
208
|
+
|
|
209
|
+
This will:
|
|
210
|
+
|
|
211
|
+
- Install all gem dependencies
|
|
212
|
+
- Set up lefthook git hooks that run before pushing
|
|
213
|
+
|
|
214
|
+
The pre-push hooks automatically run:
|
|
215
|
+
|
|
216
|
+
- `bundle exec standardrb` - Ruby code linting
|
|
217
|
+
- `npx markdownlint-cli2 "**/*.md"` - Markdown linting
|
|
218
|
+
- `bundle exec rspec` - Test suite
|
|
219
|
+
- `bundle exec bundler-audit check --update` - Security audit
|
|
220
|
+
|
|
221
|
+
You can also run these checks manually:
|
|
222
|
+
|
|
223
|
+
```bash
|
|
224
|
+
bundle exec rspec # Run tests
|
|
225
|
+
bundle exec standardrb # Run linter
|
|
226
|
+
npx markdownlint-cli2 "**/*.md" # Run markdown linter
|
|
227
|
+
bundle exec bundler-audit check --update # Run security audit
|
|
148
228
|
```
|
|
149
229
|
|
|
150
230
|
## Contributing
|
|
@@ -154,6 +234,7 @@ Bug reports and pull requests are welcome on GitHub at https://github.com/tastyb
|
|
|
154
234
|
## Author
|
|
155
235
|
|
|
156
236
|
**James Inman** ([@jfi](https://github.com/jfi))
|
|
237
|
+
|
|
157
238
|
- Email: james@otaina.co.uk
|
|
158
239
|
- GitHub: https://github.com/tastybamboo
|
|
159
240
|
|
data/lib/mythic_beasts/vps.rb
CHANGED
|
@@ -57,5 +57,15 @@ module MythicBeasts
|
|
|
57
57
|
def console(server_name)
|
|
58
58
|
client.get("/api/vps/#{server_name}/console")
|
|
59
59
|
end
|
|
60
|
+
|
|
61
|
+
# List available zones/locations for VPS provisioning
|
|
62
|
+
def zones
|
|
63
|
+
client.get("/api/vps/zones")
|
|
64
|
+
end
|
|
65
|
+
|
|
66
|
+
# List available VPS types/plans
|
|
67
|
+
def types
|
|
68
|
+
client.get("/api/vps/types")
|
|
69
|
+
end
|
|
60
70
|
end
|
|
61
71
|
end
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: mythic-beasts
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.1.
|
|
4
|
+
version: 0.1.2
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- James Inman
|
|
@@ -121,6 +121,34 @@ dependencies:
|
|
|
121
121
|
- - "~>"
|
|
122
122
|
- !ruby/object:Gem::Version
|
|
123
123
|
version: '0.14'
|
|
124
|
+
- !ruby/object:Gem::Dependency
|
|
125
|
+
name: lefthook
|
|
126
|
+
requirement: !ruby/object:Gem::Requirement
|
|
127
|
+
requirements:
|
|
128
|
+
- - "~>"
|
|
129
|
+
- !ruby/object:Gem::Version
|
|
130
|
+
version: '1.5'
|
|
131
|
+
type: :development
|
|
132
|
+
prerelease: false
|
|
133
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
134
|
+
requirements:
|
|
135
|
+
- - "~>"
|
|
136
|
+
- !ruby/object:Gem::Version
|
|
137
|
+
version: '1.5'
|
|
138
|
+
- !ruby/object:Gem::Dependency
|
|
139
|
+
name: bundler-audit
|
|
140
|
+
requirement: !ruby/object:Gem::Requirement
|
|
141
|
+
requirements:
|
|
142
|
+
- - "~>"
|
|
143
|
+
- !ruby/object:Gem::Version
|
|
144
|
+
version: '0.9'
|
|
145
|
+
type: :development
|
|
146
|
+
prerelease: false
|
|
147
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
148
|
+
requirements:
|
|
149
|
+
- - "~>"
|
|
150
|
+
- !ruby/object:Gem::Version
|
|
151
|
+
version: '0.9'
|
|
124
152
|
description: A Ruby gem for interacting with Mythic Beasts APIs including DNS, VPS
|
|
125
153
|
provisioning, and domain management
|
|
126
154
|
email:
|