skull_island 0.2.3 → 0.2.4

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 8321e31b43685f8bcf071f1cbcfc227bbcf29f18f4e3f1da1377ec3cc7538ef9
4
- data.tar.gz: 9e3c1f19171ec4d3c45c2f074374bba6249f03884741cffd3b16df7ea2862f57
3
+ metadata.gz: 7b1ddcc4d39d09012c127f337b438f83c2e5397f8e05ecfb87d696872bd57544
4
+ data.tar.gz: f096c22899ea60a9f35053b22f9cd628c2f7677dd3065417aee2d83404ba7f90
5
5
  SHA512:
6
- metadata.gz: eb3422efbea9ac46ec54ac1ecf8ba11ef161327719032411e2cc2e0caf3dcb12703963523ffa253afe9ff5006f0ab5874b2a87de906c15068214cf928dd0bd3c
7
- data.tar.gz: 78956b6591c0d8de32b084ede4d1a9f73160bb6fff2a94f0f23792a3cdbfc6371e1c96a9800c2c590bb6e089bb4d2b4b273ec7398e559b9bd45707f1411eca7c
6
+ metadata.gz: 100b4cd19f08fd8499e8c13fab6871faf1c635edc1968f34d280c56b0f1d665244e29dbe52ef4a583a6762ab8bdaa7f2e86a0717f06277a2d51f8a29316b0e29
7
+ data.tar.gz: 21bf5f772e7be86408fae7b0e6791a2c698e8bc8b1aee6815d00a4cb5c30e4235b4720519fc99239044961d62ed08f69aabcb4d891faa981435fd5fcb642b8ce
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- skull_island (0.2.3)
4
+ skull_island (0.2.4)
5
5
  deepsort (~> 0.4)
6
6
  erubi (~> 1.8)
7
7
  json (~> 2.1)
@@ -40,7 +40,7 @@ GEM
40
40
  http-cookie (1.0.3)
41
41
  domain_name (~> 0.5)
42
42
  jaro_winkler (1.5.2)
43
- json (2.1.0)
43
+ json (2.2.0)
44
44
  launchy (2.4.3)
45
45
  addressable (~> 2.3)
46
46
  linguistics (2.1.0)
@@ -54,7 +54,7 @@ GEM
54
54
  net-http-persistent (2.9.4)
55
55
  net-http-pipeline (1.0.1)
56
56
  netrc (0.11.0)
57
- parallel (1.13.0)
57
+ parallel (1.14.0)
58
58
  parser (2.6.0.0)
59
59
  ast (~> 2.4.0)
60
60
  powerpack (0.1.2)
data/README.md CHANGED
@@ -111,6 +111,73 @@ KONG_ADMIN_URL='https://api-admin.mydomain.com' \
111
111
  skull_island import --verbose --test /path/to/export.yml
112
112
  ```
113
113
 
114
+ ### File Format
115
+
116
+ The import/export CLI functions produce YAML with support for embedded Ruby ([ERB](https://ruby-doc.org/stdlib-2.5.3/libdoc/erb/rdoc/ERB.html)). The file is structured like this (as an example):
117
+
118
+ ```yaml
119
+ ---
120
+ version: '0.14'
121
+ consumers:
122
+ - username: foo
123
+ custom_id: foo
124
+ credentials:
125
+ key-auth:
126
+ - key: q90r8908w09rqw9jfj09jq0f8y389
127
+ basic-auth:
128
+ - username: foo
129
+ password: bar
130
+ services:
131
+ - name: apidocs
132
+ protocol: https
133
+ host: api.example.com
134
+ port: 443
135
+ path: "/v2/api-docs"
136
+ routes:
137
+ - paths:
138
+ - "/api-docs"
139
+ protocols:
140
+ - http
141
+ - https
142
+ strip_path: true
143
+ preserve_host: false
144
+ - name: search_api
145
+ retries: 5
146
+ protocol: https
147
+ host: api.example.com
148
+ port: 3737
149
+ connect_timeout: 30000
150
+ write_timeout: 30000
151
+ read_timeout: 30000
152
+ routes:
153
+ - methods:
154
+ - POST
155
+ paths:
156
+ - "/v2/search"
157
+ protocols:
158
+ - http
159
+ - https
160
+ regex_priority: 0
161
+ strip_path: true
162
+ preserve_host: false
163
+ upstreams: []
164
+ plugins:
165
+ - name: key-auth
166
+ enabled: true
167
+ config:
168
+ anonymous: ''
169
+ hide_credentials: false
170
+ key_in_body: false
171
+ key_names:
172
+ - x-api-key
173
+ run_on_preflight: true
174
+ service_id: "<%= lookup :service, 'search_api' %>"
175
+ ```
176
+
177
+ All top-level keys (other than `version`) require an Array as a parameter, either by providing a list of entries or an empty Array (`[]`). The above shows how to use the `lookup()` function to refer to another resource. This "looks up" the resource type (`service` in this case) by `name` (`search_api` in this case) and resolves its `id`. This function can also be used to lookup a `route` or `upstream` by its `name`, or a `consumer` by its `username`. Note that Kong itself doesn't _require_ `route` resources to have unique names, so you'll need to enforce that practice yourself for `lookup` to be useful for Routes.
178
+
179
+
180
+
114
181
  ## SDK Usage
115
182
 
116
183
  The API Client requires configuration before it can be used. For now, this is a matter of calling `APIClient.configure()`, passing a Hash, with Symbols for keys:
@@ -4,6 +4,6 @@ module SkullIsland
4
4
  VERSION = [
5
5
  0, # Major
6
6
  2, # Minor
7
- 3 # Patch
7
+ 4 # Patch
8
8
  ].join('.')
9
9
  end
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: 0.2.3
4
+ version: 0.2.4
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-03-11 00:00:00.000000000 Z
11
+ date: 2019-03-14 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: deepsort