skull_island 2.2.0 → 2.2.1

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: 17234eaf013609bf69fd1bb6be226d2da41c5c2d720fcf7c8aab6320bed7be49
4
- data.tar.gz: bb19cf537906e3fce0b577e75261eb9ca5cba7039086b89b07dbdb69d1b4cd61
3
+ metadata.gz: '08939c35fee9b8e4c4365c3f723fd72613ab4f5294df58e8f1d4512f67a3f259'
4
+ data.tar.gz: 180ef4c7198571533c8c1744224014df3fb40b0546b085b941bb13aa119f2821
5
5
  SHA512:
6
- metadata.gz: 481f50743c1f3dad36f04426c2bb791484d11503df91744233f6da4789429f7b0c469ad919a25402de17da33ad03c744afb5aa60f04d11f89e96d3410e31982e
7
- data.tar.gz: c2e8109e0ae1bdb10f0a8fa707ef8a0fac48266a4cb034d8092f86215d583fe164e57cef4b343a09cd6b0fc5a2241bd8a191e809b860f18712b5b03ae04544d2
6
+ metadata.gz: ca8d64d98746acb99b690cdfa363eee82faf8e08c4046ef5916cdd8db70d578e98ef34e8a31800064aa37c6b11fa01540d205b60757ebdfa634be8f132a3d4a7
7
+ data.tar.gz: f31992f4bc045905976ce6b73920605dec99a138fe4cfefde2f061b3f601d3a86ba9b0f202548aebfac54ff9daad61673a1114d53e73f308781b2961e5795c72
@@ -3,7 +3,8 @@ cache: bundler
3
3
  rvm:
4
4
  - 2.5
5
5
  - 2.6
6
- before_install: gem install bundler -v 2.0.1
6
+ - 2.7
7
+ before_install: gem install bundler -v '~> 2.0'
7
8
  deploy:
8
9
  provider: rubygems
9
10
  api_key:
@@ -1,13 +1,13 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- skull_island (2.2.0)
4
+ skull_island (2.2.1)
5
5
  deepsort (~> 0.4)
6
6
  erubi (~> 1.8)
7
7
  json (~> 2.1)
8
8
  linguistics (~> 2.1)
9
9
  rest-client (~> 2.1)
10
- thor (~> 0.20)
10
+ thor (~> 1.0)
11
11
  will_paginate (~> 3.1)
12
12
 
13
13
  GEM
@@ -21,7 +21,7 @@ GEM
21
21
  addressable (2.7.0)
22
22
  public_suffix (>= 2.0.2, < 5.0)
23
23
  ast (2.4.1)
24
- concurrent-ruby (1.1.7)
24
+ concurrent-ruby (1.1.8)
25
25
  coveralls (0.7.1)
26
26
  multi_json (~> 1.3)
27
27
  rest-client
@@ -30,13 +30,15 @@ GEM
30
30
  thor
31
31
  deepsort (0.4.5)
32
32
  diff-lcs (1.4.4)
33
- docile (1.3.3)
33
+ docile (1.3.5)
34
34
  domain_name (0.5.20190701)
35
35
  unf (>= 0.0.5, < 1.0.0)
36
36
  erubi (1.10.0)
37
- faraday (1.1.0)
37
+ faraday (1.3.0)
38
+ faraday-net_http (~> 1.0)
38
39
  multipart-post (>= 1.2, < 3)
39
40
  ruby2_keywords
41
+ faraday-net_http (1.0.1)
40
42
  faraday_middleware (1.0.0)
41
43
  faraday (~> 1.0)
42
44
  gh (0.18.0)
@@ -51,34 +53,34 @@ GEM
51
53
  http-accept (1.7.0)
52
54
  http-cookie (1.0.3)
53
55
  domain_name (~> 0.5)
54
- i18n (1.8.5)
56
+ i18n (1.8.7)
55
57
  concurrent-ruby (~> 1.0)
56
- json (2.4.1)
57
- json_pure (2.4.1)
58
+ json (2.5.1)
59
+ json_pure (2.5.1)
58
60
  launchy (2.4.3)
59
61
  addressable (~> 2.3)
60
62
  linguistics (2.1.0)
61
63
  loggability (~> 0.11)
62
- loggability (0.17.0)
64
+ loggability (0.18.2)
63
65
  mime-types (3.3.1)
64
66
  mime-types-data (~> 3.2015)
65
67
  mime-types-data (3.2020.1104)
66
- minitest (5.14.2)
68
+ minitest (5.14.3)
67
69
  multi_json (1.15.0)
68
70
  multipart-post (2.1.1)
69
71
  net-http-persistent (2.9.4)
70
72
  net-http-pipeline (1.0.1)
71
73
  netrc (0.11.0)
72
74
  parallel (1.20.1)
73
- parser (2.7.2.0)
75
+ parser (3.0.0.0)
74
76
  ast (~> 2.4.1)
75
77
  public_suffix (4.0.6)
76
78
  pusher-client (0.6.2)
77
79
  json
78
80
  websocket (~> 1.0)
79
81
  rainbow (3.0.0)
80
- rake (13.0.1)
81
- regexp_parser (2.0.0)
82
+ rake (13.0.3)
83
+ regexp_parser (2.0.3)
82
84
  rest-client (2.1.0)
83
85
  http-accept (>= 1.7.0, < 2.0)
84
86
  http-cookie (>= 1.0.2, < 2.0)
@@ -89,15 +91,15 @@ GEM
89
91
  rspec-core (~> 3.10.0)
90
92
  rspec-expectations (~> 3.10.0)
91
93
  rspec-mocks (~> 3.10.0)
92
- rspec-core (3.10.0)
94
+ rspec-core (3.10.1)
93
95
  rspec-support (~> 3.10.0)
94
- rspec-expectations (3.10.0)
96
+ rspec-expectations (3.10.1)
95
97
  diff-lcs (>= 1.2.0, < 2.0)
96
98
  rspec-support (~> 3.10.0)
97
- rspec-mocks (3.10.0)
99
+ rspec-mocks (3.10.1)
98
100
  diff-lcs (>= 1.2.0, < 2.0)
99
101
  rspec-support (~> 3.10.0)
100
- rspec-support (3.10.0)
102
+ rspec-support (3.10.1)
101
103
  rubocop (0.93.1)
102
104
  parallel (~> 1.10)
103
105
  parser (>= 2.7.1.5)
@@ -107,11 +109,11 @@ GEM
107
109
  rubocop-ast (>= 0.6.0)
108
110
  ruby-progressbar (~> 1.7)
109
111
  unicode-display_width (>= 1.4.0, < 2.0)
110
- rubocop-ast (1.3.0)
112
+ rubocop-ast (1.4.0)
111
113
  parser (>= 2.7.1.5)
112
- ruby-progressbar (1.10.1)
113
- ruby2_keywords (0.0.2)
114
- simplecov (0.20.0)
114
+ ruby-progressbar (1.11.0)
115
+ ruby2_keywords (0.0.4)
116
+ simplecov (0.21.2)
115
117
  docile (~> 1.1)
116
118
  simplecov-html (~> 0.11)
117
119
  simplecov_json_formatter (~> 0.1)
@@ -120,9 +122,9 @@ GEM
120
122
  sync (0.5.0)
121
123
  term-ansicolor (1.7.1)
122
124
  tins (~> 1.0)
123
- thor (0.20.3)
125
+ thor (1.0.1)
124
126
  thread_safe (0.3.6)
125
- tins (1.26.0)
127
+ tins (1.28.0)
126
128
  sync
127
129
  travis (1.10.0)
128
130
  faraday (~> 1.0)
@@ -140,7 +142,7 @@ GEM
140
142
  unicode-display_width (1.7.0)
141
143
  websocket (1.2.9)
142
144
  will_paginate (3.3.0)
143
- yard (0.9.25)
145
+ yard (0.9.26)
144
146
 
145
147
  PLATFORMS
146
148
  ruby
@@ -157,4 +159,4 @@ DEPENDENCIES
157
159
  yard (~> 0.9.20)
158
160
 
159
161
  BUNDLED WITH
160
- 2.1.4
162
+ 2.2.6
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/) 2.0.x (with support for migrating from 0.14.x, 1.1.x, 1.2.x, 1.4.x, and 1.5.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/) 2.2.x (with support 2.0.x and 2.1.x, and for migrating from 0.14.x, 1.1.x, 1.2.x, 1.4.x, and 1.5.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
  ![Gem](https://img.shields.io/gem/v/skull_island)
6
6
  ![Travis (.org)](https://img.shields.io/travis/jgnagy/skull_island)
@@ -30,7 +30,7 @@ gem install skull_island
30
30
  Or add this to your Gemfile:
31
31
 
32
32
  ```ruby
33
- gem 'skull_island', '~> 2.0'
33
+ gem 'skull_island', '~> 2.2'
34
34
  ```
35
35
 
36
36
  Or add this to your .gemspec:
@@ -38,7 +38,7 @@ Or add this to your .gemspec:
38
38
  ```ruby
39
39
  Gem::Specification.new do |spec|
40
40
  # ...
41
- spec.add_runtime_dependency 'skull_island', '~> 2.0'
41
+ spec.add_runtime_dependency 'skull_island', '~> 2.2'
42
42
  # ...
43
43
  end
44
44
  ```
@@ -149,7 +149,7 @@ When using the `project` feature of Skull Island, the CLI tool will automaticall
149
149
 
150
150
  ### Migrating
151
151
 
152
- With Skull Island, it is possible to migrate a configuration from a 0.14.x, 1.1.x, 1.2.x, 1.4.x, or 1.5.x gateway to the most recent compatible gateway. If you have a previous export, you can just run `skull_island migrate /path/to/export.yml` and you'll receive a 2.0 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:
152
+ With Skull Island, it is possible to migrate a configuration from a 0.14.x, 1.1.x, 1.2.x, 1.4.x, or 1.5.x gateway to the most recent compatible gateway. If you have a previous export, you can just run `skull_island migrate /path/to/export.yml` and you'll receive a 2.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:
153
153
 
154
154
  ```sh
155
155
  skull_island migrate /path/to/export.yml /output/location/migrated.yml
@@ -159,7 +159,7 @@ While this hasn't been heavily tested for all possible use-cases, any configurat
159
159
 
160
160
  If you don't have a previous export, you'll need to install an older version of this gem using something like `gem install --version '~> 0.14' skull_island`, then perform an `export`, then you can switch back to the latest version of the gem for migrating and importing.
161
161
 
162
- While it would be possible to make migration _automatic_ for the `import` command, `skull_island` intentionally doesn't do this to avoid the appearance that the config is losslessly compatible across versions. In reality, the newer config version has additional features (like tagging) that are used heavily by skull_island. It makes sense to this author to maintain the migration component and the normal functionality as distinct features to encourage the use of the newer capabilities in 1.1 and beyond. That said, Skull Island does allow 1.1, 1.2, and 1.4 version configurations to be applied to 2.0 gateways, but not the opposite.
162
+ While it would be possible to make migration _automatic_ for the `import` command, `skull_island` intentionally doesn't do this to avoid the appearance that the config is losslessly compatible across versions. In reality, the newer config version has additional features (like tagging) that are used heavily by skull_island. It makes sense to this author to maintain the migration component and the normal functionality as distinct features to encourage the use of the newer capabilities in 1.1 and beyond. That said, Skull Island does allow 1.x, 2.0.x, and 2.1.x version configurations to be applied to 2.2 gateways, but not the opposite.
163
163
 
164
164
  ### Reset A Gateway
165
165
 
@@ -188,7 +188,7 @@ If you're wondering what version of `skull_island` is installed, use:
188
188
  ```sh
189
189
  $ skull_island version
190
190
 
191
- SkullIsland Version: 2.0.0
191
+ SkullIsland Version: 2.2.0
192
192
  ```
193
193
 
194
194
  ### File Format
@@ -197,7 +197,7 @@ The import/export/migrate CLI functions produce YAML with support for embedded R
197
197
 
198
198
  ```yaml
199
199
  ---
200
- version: '2.0'
200
+ version: '2.2'
201
201
  project: FooV2
202
202
  certificates: []
203
203
  ca_certificates:
@@ -398,7 +398,7 @@ service.routes.size
398
398
  # => 4
399
399
  ```
400
400
 
401
- From here, the SDK mostly wraps the attributes described in the [Kong API Docs](https://docs.konghq.com/2.0.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.
401
+ From here, the SDK mostly wraps the attributes described in the [Kong API Docs](https://docs.konghq.com/2.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.
402
402
 
403
403
  #### CA Certificates
404
404
 
@@ -419,6 +419,14 @@ resource.created_at
419
419
  # => #<DateTime: 2018-07-17T12:51:28+00:00 ((2458317j,46288s,0n),+0s,2299161j)>
420
420
  ```
421
421
 
422
+ Skull Island includes support for adding a _virtual_ `name` attribute to CA Certificates (useful for maintaining them over time) based on a metadata tag that Skull Island will manage for you:
423
+
424
+ ```ruby
425
+ resource.name = 'internalca'
426
+ resource.name
427
+ # => "internalca"
428
+ ```
429
+
422
430
  #### Certificates
423
431
 
424
432
  ```ruby
@@ -438,6 +446,14 @@ resource.created_at
438
446
  # => #<DateTime: 2018-07-17T12:51:28+00:00 ((2458317j,46288s,0n),+0s,2299161j)>
439
447
  ```
440
448
 
449
+ Skull Island includes support for adding a _virtual_ `name` attribute to Certificates (useful for maintaining them over time) based on a metadata tag that Skull Island will manage for you:
450
+
451
+ ```ruby
452
+ resource.name = 'apicert'
453
+ resource.name
454
+ # => "apicert"
455
+ ```
456
+
441
457
  #### Consumers (along with their Access Control Lists and Credentials)
442
458
 
443
459
  Note that for Consumer credentials, only [`key-auth`](https://docs.konghq.com/hub/kong-inc/key-auth/), [`jwt`](https://docs.konghq.com/hub/kong-inc/jwt/), and [`basic-auth`](https://docs.konghq.com/hub/kong-inc/basic-auth/) are currently supported.
@@ -122,7 +122,7 @@ module SkullIsland
122
122
  )
123
123
  end
124
124
 
125
- def self.from_hash(hash)
125
+ def self.from_hash(hash, options = {})
126
126
  # TODO: better options validations
127
127
  raise Exceptions::InvalidOptions unless options.is_a?(Hash)
128
128
 
@@ -4,6 +4,6 @@ module SkullIsland
4
4
  VERSION = [
5
5
  2, # Major
6
6
  2, # Minor
7
- 0 # Patch
7
+ 1 # Patch
8
8
  ].join('.')
9
9
  end
@@ -11,7 +11,7 @@ Gem::Specification.new do |spec|
11
11
  spec.email = ['jonathan.gnagy@gmail.com']
12
12
 
13
13
  spec.summary = 'Ruby SDK for Kong'
14
- spec.description = 'A Ruby SDK for Kong 0.14.x'
14
+ spec.description = 'A Ruby SDK for Kong'
15
15
  spec.homepage = 'https://github.com/jgnagy/skull_island'
16
16
  spec.license = 'MIT'
17
17
 
@@ -31,7 +31,7 @@ Gem::Specification.new do |spec|
31
31
  spec.add_runtime_dependency 'json', '~> 2.1'
32
32
  spec.add_runtime_dependency 'linguistics', '~> 2.1'
33
33
  spec.add_runtime_dependency 'rest-client', '~> 2.1'
34
- spec.add_runtime_dependency 'thor', '~> 0.20'
34
+ spec.add_runtime_dependency 'thor', '~> 1.0'
35
35
  spec.add_runtime_dependency 'will_paginate', '~> 3.1'
36
36
 
37
37
  spec.add_development_dependency 'bundler', '~> 2.0'
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: 2.2.0
4
+ version: 2.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jonathan Gnagy
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2020-12-19 00:00:00.000000000 Z
11
+ date: 2021-01-20 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: deepsort
@@ -86,14 +86,14 @@ dependencies:
86
86
  requirements:
87
87
  - - "~>"
88
88
  - !ruby/object:Gem::Version
89
- version: '0.20'
89
+ version: '1.0'
90
90
  type: :runtime
91
91
  prerelease: false
92
92
  version_requirements: !ruby/object:Gem::Requirement
93
93
  requirements:
94
94
  - - "~>"
95
95
  - !ruby/object:Gem::Version
96
- version: '0.20'
96
+ version: '1.0'
97
97
  - !ruby/object:Gem::Dependency
98
98
  name: will_paginate
99
99
  requirement: !ruby/object:Gem::Requirement
@@ -220,7 +220,7 @@ dependencies:
220
220
  - - "~>"
221
221
  - !ruby/object:Gem::Version
222
222
  version: 0.9.20
223
- description: A Ruby SDK for Kong 0.14.x
223
+ description: A Ruby SDK for Kong
224
224
  email:
225
225
  - jonathan.gnagy@gmail.com
226
226
  executables: