fly_io 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 +6 -0
- data/README.md +7 -0
- data/lib/fly_io/resources/base.rb +2 -2
- data/lib/fly_io/resources.rb +10 -0
- data/lib/fly_io/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 228516dfe92da54a7220aa8dcaff8b762b564ae9e238ef5bb62e58329e07491f
|
|
4
|
+
data.tar.gz: 5c24f6d0b9d47323c5c5a394f3887afa35396c94ba66b0dabda6c31815e2786e
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 32ea12bea8615df7aaa70fcefd6bf735f88048ecb3a17b212f371f519f6bc7d4ca7628e1287692c6513f7d3f4a998796f19b05610d604df975be5cb7af344c48
|
|
7
|
+
data.tar.gz: 4271122f84162ab0bbca7b9434ab1886a3c7f95ff5762a3da0c879317f0f7022bbeb220c1a172c63729c910f015ba4f93a153af71f5798225d0d46009fc16819
|
data/CHANGELOG.md
CHANGED
data/README.md
CHANGED
|
@@ -45,6 +45,13 @@ client.machines.start(app_name: "my-app", machine_id: machine.id)
|
|
|
45
45
|
client.machines.wait(app_name: "my-app", machine_id: machine.id, state: "started", timeout: 60)
|
|
46
46
|
```
|
|
47
47
|
|
|
48
|
+
When destroying an app, pass its selected custom private network to delete the attachment along with the app. Omit
|
|
49
|
+
`network:` for apps on the default network:
|
|
50
|
+
|
|
51
|
+
```ruby
|
|
52
|
+
client.apps.destroy(app_name: "my-app", network: "customer-network")
|
|
53
|
+
```
|
|
54
|
+
|
|
48
55
|
Resource methods return `FlyIO::Response`. `response.body` is coerced to the documented `FlyIO::Models::*` class (or
|
|
49
56
|
an array/primitive where the contract says so), while response methods delegate to a model for concise code such as
|
|
50
57
|
`machine.id`. Models keep unknown fields and preserve exact wire keys for forward compatibility.
|
|
@@ -16,14 +16,14 @@ module FlyIO
|
|
|
16
16
|
|
|
17
17
|
private
|
|
18
18
|
|
|
19
|
-
def invoke(operation, arguments)
|
|
19
|
+
def invoke(operation, arguments, extra_query: {})
|
|
20
20
|
arguments = arguments.dup
|
|
21
21
|
body = arguments.delete(:body) { FlyIO::UNSET }
|
|
22
22
|
extra_headers = arguments.delete(:headers) || {}
|
|
23
23
|
retry_unsafe = arguments.delete(:retry_unsafe)
|
|
24
24
|
request_timeout = arguments.delete(:request_timeout)
|
|
25
25
|
path_params = {}
|
|
26
|
-
query =
|
|
26
|
+
query = extra_query.dup
|
|
27
27
|
operation_headers = {}
|
|
28
28
|
|
|
29
29
|
operation.parameters.each do |parameter|
|
data/lib/fly_io/resources.rb
CHANGED
|
@@ -2,6 +2,16 @@
|
|
|
2
2
|
|
|
3
3
|
module FlyIO
|
|
4
4
|
module Resources
|
|
5
|
+
class Apps < Base
|
|
6
|
+
def destroy(network: nil, **arguments)
|
|
7
|
+
operation = OperationRegistry.fetch("Apps_delete")
|
|
8
|
+
SchemaValidator.validate!({"type" => "string"}, network, location: "network") unless network.nil?
|
|
9
|
+
extra_query = network.nil? ? {} : {"network" => network}
|
|
10
|
+
|
|
11
|
+
invoke(operation, arguments, extra_query: extra_query)
|
|
12
|
+
end
|
|
13
|
+
end
|
|
14
|
+
|
|
5
15
|
module_function
|
|
6
16
|
|
|
7
17
|
def install!
|
data/lib/fly_io/version.rb
CHANGED