skull_island 0.14.0 → 0.14.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 77f1c85f6b132cd82c464c4f765fd8a9f2d827cfb4f1ae84d0f0e6fe51ebf50d
4
- data.tar.gz: 4d8b63a725dc47449c35f98e7823560ab5a3ab0a80cc71c6775dcc558bea9f43
3
+ metadata.gz: d2a3355226814eb0d485dbac28624003b323eb62b4a1116493ef5da234108930
4
+ data.tar.gz: 8fe0388fb91633ea0bd1eba39e98671bb3fe88bc691700573ed1a6daa7814e8e
5
5
  SHA512:
6
- metadata.gz: eddc2821d7747539879b9aa7e467779ec402ce8911f5937b8c95ed1e7d05c95e9361a6511bc24ae66dad0009f6887d878ed5fc4a570beb3d59e696eda70b43f6
7
- data.tar.gz: 6f9b37d01dbaa77ebc354a6143deaff4ff3045a6388045b45e88862803ebac4ad4a9b1e3730e45f7876000f4f741dcc5f7beef996b78d25ec3b7ec757e173b29
6
+ metadata.gz: 9e429af9e6768ad18c00e2b6e0f60844f2194eb32c627c7bb9cacfa4a0c282cb3069ed70c54a5be686c9c36a7b5f3882b0c6dfe34d5566a7c48a92b648894632
7
+ data.tar.gz: 320f1a3e376ac977d050460d978e6e838914932d759f82542bba0c797ae37c1ef2bb1f830f2c810f2843d0db91238074ac9c9f3a371a1e13eaa05beeb2d9c07e
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- skull_island (0.14.0)
4
+ skull_island (0.14.1)
5
5
  deepsort (~> 0.4)
6
6
  erubi (~> 1.8)
7
7
  json (~> 2.1)
@@ -7,7 +7,6 @@ module SkullIsland
7
7
  #
8
8
  # @see https://docs.konghq.com/0.14.x/admin-api/#route-object Route API definition
9
9
  class Route < Resource
10
- property :name
11
10
  property :methods
12
11
  property :paths
13
12
  property :protocols, validate: true
@@ -15,7 +14,8 @@ module SkullIsland
15
14
  property :regex_priority, validate: true
16
15
  property :strip_path, type: :boolean
17
16
  property :preserve_host, type: :boolean
18
- # The following are 1.0.x only
17
+ # The following are 1.0+ only
18
+ # property :name
19
19
  # property :snis
20
20
  # property :sources
21
21
  # property :destinations
@@ -25,13 +25,12 @@ module SkullIsland
25
25
 
26
26
  # rubocop:disable Metrics/CyclomaticComplexity
27
27
  # rubocop:disable Metrics/PerceivedComplexity
28
- # rubocop:disable Metrics/AbcSize
29
28
  def self.batch_import(data, verbose: false, test: false)
30
29
  raise(Exceptions::InvalidArguments) unless data.is_a?(Array)
31
30
 
32
31
  data.each_with_index do |rdata, index|
33
32
  resource = new
34
- resource.name = rdata['name']
33
+ # resource.name = rdata['name'] # 1.0+ only
35
34
  resource.methods = rdata['methods'] if rdata['methods']
36
35
  resource.paths = rdata['paths'] if rdata['paths']
37
36
  resource.protocols = rdata['protocols'] if rdata['protocols']
@@ -45,7 +44,6 @@ module SkullIsland
45
44
  end
46
45
  # rubocop:enable Metrics/CyclomaticComplexity
47
46
  # rubocop:enable Metrics/PerceivedComplexity
48
- # rubocop:enable Metrics/AbcSize
49
47
 
50
48
  # Provides a collection of related {Plugin} instances
51
49
  def plugins
@@ -54,7 +52,7 @@ module SkullIsland
54
52
 
55
53
  def export(options = {})
56
54
  hash = {
57
- 'name' => name,
55
+ # 'name' => name, # 1.0+ only
58
56
  'methods' => methods,
59
57
  'paths' => paths,
60
58
  'protocols' => protocols,
@@ -76,8 +74,11 @@ module SkullIsland
76
74
  def modified_existing?
77
75
  return false unless new?
78
76
 
79
- # Find routes of the same name and service
80
- same_name_and_service = self.class.where(:name, name).and(:service, service)
77
+ # Find routes of the same host, path, protocol, and service
78
+ same_name_and_service = self.class.where(:protocols, protocols)
79
+ .and(:hosts, hosts)
80
+ .and(:paths, paths)
81
+ .and(:service, service)
81
82
 
82
83
  existing = same_name_and_service.size == 1 ? same_name_and_service.first : nil
83
84
 
@@ -4,6 +4,6 @@ module SkullIsland
4
4
  VERSION = [
5
5
  0, # Major
6
6
  14, # Minor
7
- 0 # Patch
7
+ 1 # 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.14.0
4
+ version: 0.14.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: 2019-04-11 00:00:00.000000000 Z
11
+ date: 2019-05-01 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: deepsort