odysseus-core 0.3.1 → 0.3.2

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: c9fccc17d8083580df79c2f73ebaae519876b14ad22f276eb44b741153388e2d
4
- data.tar.gz: f939ee4930fccf56343c56530a6a77d7557a9e6a9d95ca3fb69c77e156ab71bc
3
+ metadata.gz: e3fd4c3bfd44f78e7cdb0cbcf455d365b23e7ccd18fb9497a6f3cdd427f25b9f
4
+ data.tar.gz: 2531a37231560cfe10c0c7a9f3d7e3feed5080ad932e7400953670e0dbe8029d
5
5
  SHA512:
6
- metadata.gz: 9ccbca0d5efa08047a5e1f30f2e90fa8b98138f7f2a38261845252cd809deff65055c8f814e411ccb1f6e8476814a15bbb454c71fd691f8c3c1f6d9d5e8b4097
7
- data.tar.gz: a243189b3a2b245a61c7c8c4a7e2062b19929229785a7a2c6797200045ed26ff525ff9cb9121e90702ec0fb7e49625ed0cd4831b1e04fecf056a81e9335fe8b5
6
+ metadata.gz: e7e90c0115224ab15e0d73d22504bb6f9262f9efdedbb6f0c8766a7e42008ebb3798ebab9eae3237fde1ef6221cecab997ce00181982fe7744fca857219093bc
7
+ data.tar.gz: 18f19cbf04921ea7bc858f0911155e0e02156c22d54c58ce641e0d3fdd3283d5dd7bf80c7fdde887f82f93d5dfede7183045f5864b2e06335da337b940ad1507
data/CHANGELOG.md CHANGED
File without changes
data/LICENSE.txt CHANGED
File without changes
data/README.md CHANGED
File without changes
data/Rakefile CHANGED
File without changes
File without changes
@@ -78,6 +78,12 @@ module Odysseus
78
78
  existing_idx = routes.find_index { |r| r['@id'] == "route-#{service}" }
79
79
 
80
80
  if existing_idx
81
+ # Update hosts if they changed
82
+ current_hosts = routes[existing_idx].dig('match', 0, 'host') || []
83
+ if current_hosts.sort != hosts.sort
84
+ api_request('PATCH', "/config/apps/http/servers/srv0/routes/#{existing_idx}/match/0/host", hosts)
85
+ end
86
+
81
87
  # Update existing route's upstreams
82
88
  current_upstreams = routes[existing_idx].dig('handle', 0, 'upstreams') || []
83
89
  unless current_upstreams.any? { |u| u['dial'] == upstream }
File without changes
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Odysseus
4
4
  module Core
5
- VERSION = "0.3.1"
5
+ VERSION = "0.3.2"
6
6
  end
7
7
  end
File without changes
data/lib/odysseus/core.rb CHANGED
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
data/lib/odysseus.rb CHANGED
File without changes
File without changes
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: odysseus-core
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.1
4
+ version: 0.3.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Thomas