mythic-beasts 0.1.0 → 0.1.1
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 +17 -1
- data/README.md +53 -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: e734cacf00418c70c1454d64245f1a1dc59d67b97cab096acd53ca2f793f0c53
|
|
4
|
+
data.tar.gz: 8e0e5cce97bc96c7308f5876e1060a9b872ca16bd66b740a8d54344f0990c79c
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: b543c6e8697ad0053624bf2da72db6600a36a1b951697b76ddece75484af95d498e6b4c6316e1c9ff1dcba2486fb832f8199f30fa40bb3eeae89907c4fd9c8f8
|
|
7
|
+
data.tar.gz: 4493ff77b9877d8bc635da3074a13affdfd2f81a37a0e67f42c121434ce1522ce3846bee6331ccc95d370574b9187adcae4f16b96817adf055531246b27978c3
|
data/CHANGELOG.md
CHANGED
|
@@ -5,10 +5,26 @@ 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.1] - 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
|
+
- Example scripts in `examples/` directory:
|
|
16
|
+
- `list_zones_and_types.rb` - List available zones and VPS types
|
|
17
|
+
- `provision_vps.rb` - Complete VPS provisioning example
|
|
18
|
+
|
|
19
|
+
### Changed
|
|
20
|
+
|
|
21
|
+
- Updated README with new VPS methods and examples
|
|
22
|
+
- Improved VPS create documentation with optional parameters
|
|
23
|
+
|
|
24
|
+
## [0.1.0] - 2025-01-27
|
|
25
|
+
|
|
26
|
+
### Features
|
|
27
|
+
|
|
12
28
|
- Initial release by James Inman (@jfi)
|
|
13
29
|
- OAuth2 authentication support with automatic token refresh
|
|
14
30
|
- 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
|
|
@@ -131,6 +143,7 @@ end
|
|
|
131
143
|
```
|
|
132
144
|
|
|
133
145
|
Available error classes:
|
|
146
|
+
|
|
134
147
|
- `MythicBeasts::Error` - Base error class
|
|
135
148
|
- `MythicBeasts::AuthenticationError` - Invalid credentials
|
|
136
149
|
- `MythicBeasts::NotFoundError` - Resource not found
|
|
@@ -138,13 +151,48 @@ Available error classes:
|
|
|
138
151
|
- `MythicBeasts::RateLimitError` - Rate limit exceeded
|
|
139
152
|
- `MythicBeasts::ServerError` - Server-side error
|
|
140
153
|
|
|
154
|
+
## Examples
|
|
155
|
+
|
|
156
|
+
See the `examples/` directory for complete working examples:
|
|
157
|
+
|
|
158
|
+
- `examples/list_zones_and_types.rb` - List available zones and VPS types
|
|
159
|
+
- `examples/provision_vps.rb` - Provision a new VPS server
|
|
160
|
+
|
|
161
|
+
Run examples with:
|
|
162
|
+
|
|
163
|
+
```bash
|
|
164
|
+
export MYTHIC_BEASTS_API_KEY=your_key
|
|
165
|
+
export MYTHIC_BEASTS_API_SECRET=your_secret
|
|
166
|
+
ruby examples/list_zones_and_types.rb
|
|
167
|
+
```
|
|
168
|
+
|
|
141
169
|
## Development
|
|
142
170
|
|
|
143
|
-
After checking out the repo:
|
|
171
|
+
After checking out the repo, run the setup script to install dependencies and git hooks:
|
|
144
172
|
|
|
145
173
|
```bash
|
|
146
|
-
|
|
147
|
-
|
|
174
|
+
bin/setup
|
|
175
|
+
```
|
|
176
|
+
|
|
177
|
+
This will:
|
|
178
|
+
|
|
179
|
+
- Install all gem dependencies
|
|
180
|
+
- Set up lefthook git hooks that run before pushing
|
|
181
|
+
|
|
182
|
+
The pre-push hooks automatically run:
|
|
183
|
+
|
|
184
|
+
- `bundle exec standardrb` - Ruby code linting
|
|
185
|
+
- `npx markdownlint-cli2 "**/*.md"` - Markdown linting
|
|
186
|
+
- `bundle exec rspec` - Test suite
|
|
187
|
+
- `bundle exec bundler-audit check --update` - Security audit
|
|
188
|
+
|
|
189
|
+
You can also run these checks manually:
|
|
190
|
+
|
|
191
|
+
```bash
|
|
192
|
+
bundle exec rspec # Run tests
|
|
193
|
+
bundle exec standardrb # Run linter
|
|
194
|
+
npx markdownlint-cli2 "**/*.md" # Run markdown linter
|
|
195
|
+
bundle exec bundler-audit check --update # Run security audit
|
|
148
196
|
```
|
|
149
197
|
|
|
150
198
|
## Contributing
|
|
@@ -154,6 +202,7 @@ Bug reports and pull requests are welcome on GitHub at https://github.com/tastyb
|
|
|
154
202
|
## Author
|
|
155
203
|
|
|
156
204
|
**James Inman** ([@jfi](https://github.com/jfi))
|
|
205
|
+
|
|
157
206
|
- Email: james@otaina.co.uk
|
|
158
207
|
- GitHub: https://github.com/tastybamboo
|
|
159
208
|
|
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.1
|
|
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:
|