skull_island 1.1.4 → 1.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/README.md +6 -6
- data/lib/skull_island/cli.rb +4 -3
- data/lib/skull_island/version.rb +2 -2
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 67a8f014f5c284c8fe9a8201fa1296130abb88a08b52e8f512e935eb178bb337
|
4
|
+
data.tar.gz: ed28d0b9011b978e0939ae7ba73b8934d147f77df0ebee8f6a38464f6ed12440
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e63e8b8e203f408df32846e4aec20cbbcea5ac7688ef2ec06db386c9e1f7f88a13094706dcb2b12dba98639c25d9488209ff6b6ce6b9ce60af3c2237bd39f1b0
|
7
|
+
data.tar.gz: e150792100e0b64286c7dee6338bf723aa0f2e88487bc9f5846485e410e57207504c974b7e861dc366082e849bea1b845a20d00cf9250951db46da62cc05ce5d
|
data/Gemfile.lock
CHANGED
data/README.md
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
# Skull Island
|
2
2
|
|
3
|
-
A full-featured SDK for [Kong](https://konghq.com/kong/) 1.1.x (with support for migrating from 0.14.x). Note that this is unofficial (meaning this project is in no way officially endorsed, recommended, or related to Kong [as a company](https://konghq.com/) or an [open-source project](https://github.com/Kong/kong)). It is also in no way related to the [pet toy company](https://www.kongcompany.com/) by the same name (but hopefully that was obvious).
|
3
|
+
A full-featured SDK for [Kong](https://konghq.com/kong/) 1.1.x/1.2.x (with support for migrating from 0.14.x). Note that this is unofficial (meaning this project is in no way officially endorsed, recommended, or related to Kong [as a company](https://konghq.com/) or an [open-source project](https://github.com/Kong/kong)). It is also in no way related to the [pet toy company](https://www.kongcompany.com/) by the same name (but hopefully that was obvious).
|
4
4
|
|
5
5
|
## Installation
|
6
6
|
|
@@ -13,7 +13,7 @@ gem install skull_island
|
|
13
13
|
Or add this to your Gemfile:
|
14
14
|
|
15
15
|
```ruby
|
16
|
-
gem 'skull_island', '~> 1.
|
16
|
+
gem 'skull_island', '~> 1.2'
|
17
17
|
```
|
18
18
|
|
19
19
|
Or add this to your .gemspec:
|
@@ -21,7 +21,7 @@ Or add this to your .gemspec:
|
|
21
21
|
```ruby
|
22
22
|
Gem::Specification.new do |spec|
|
23
23
|
# ...
|
24
|
-
spec.add_runtime_dependency 'skull_island', '~> 1.
|
24
|
+
spec.add_runtime_dependency 'skull_island', '~> 1.2'
|
25
25
|
# ...
|
26
26
|
end
|
27
27
|
```
|
@@ -114,7 +114,7 @@ skull_island import --verbose --test /path/to/export.yml
|
|
114
114
|
|
115
115
|
### Migrating
|
116
116
|
|
117
|
-
With Skull Island, it is possible to migrate a configuration from a 0.14.x gateway to one compatible with a 1.
|
117
|
+
With Skull Island, it is possible to migrate a configuration from a 0.14.x gateway to one compatible with a 1.2.x gateway. If you have a previous export, you can just run `skull_island migrate /path/to/export.yml` and you'll receive a 1.2 compatible config on standard out. If you'd prefer, you can have that config written to a file as well (just like the export command) like so:
|
118
118
|
|
119
119
|
```
|
120
120
|
skull_island migrate /path/to/export.yml /output/location/migrated.yml
|
@@ -132,7 +132,7 @@ The import/export/migrate CLI functions produce YAML with support for embedded R
|
|
132
132
|
|
133
133
|
```yaml
|
134
134
|
---
|
135
|
-
version: '1.
|
135
|
+
version: '1.2'
|
136
136
|
certificates: []
|
137
137
|
consumers:
|
138
138
|
- username: foo
|
@@ -310,7 +310,7 @@ service.routes.size
|
|
310
310
|
# => 4
|
311
311
|
```
|
312
312
|
|
313
|
-
From here, the SDK mostly wraps the attributes described in the [Kong API Docs](https://docs.konghq.com/1.
|
313
|
+
From here, the SDK mostly wraps the attributes described in the [Kong API Docs](https://docs.konghq.com/1.2.x/admin-api/). For simplicity, I'll go over the resource types and attributes this SDK supports manipulating. Rely on the API documentation to determine which attributes are required and under which conditions.
|
314
314
|
|
315
315
|
#### Certificates
|
316
316
|
|
data/lib/skull_island/cli.rb
CHANGED
@@ -28,7 +28,7 @@ module SkullIsland
|
|
28
28
|
|
29
29
|
validate_server_version
|
30
30
|
|
31
|
-
output = { 'version' => '1.
|
31
|
+
output = { 'version' => '1.2' }
|
32
32
|
|
33
33
|
[
|
34
34
|
Resources::Certificate,
|
@@ -130,7 +130,7 @@ module SkullIsland
|
|
130
130
|
end
|
131
131
|
|
132
132
|
def validate_config_version(version)
|
133
|
-
if version &&
|
133
|
+
if version && ['1.1', '1.2'].include?(version)
|
134
134
|
validate_server_version
|
135
135
|
elsif version && ['0.14', '1.0'].include?(version)
|
136
136
|
STDERR.puts '[CRITICAL] Config version is too old. Try `migrate` instead of `import`.'
|
@@ -151,7 +151,8 @@ module SkullIsland
|
|
151
151
|
end
|
152
152
|
|
153
153
|
def validate_server_version
|
154
|
-
|
154
|
+
server_version = SkullIsland::APIClient.about_service['version']
|
155
|
+
if server_version.match?(/^1.[12]/)
|
155
156
|
true
|
156
157
|
else
|
157
158
|
STDERR.puts '[CRITICAL] Server version mismatch!'
|
data/lib/skull_island/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: skull_island
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jonathan Gnagy
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-06-
|
11
|
+
date: 2019-06-26 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: deepsort
|