kongfigure 0.1.0 → 0.1.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: ebd0fda03353da5cf51cc19302e048edcce67f2fc49284d7567151c340178575
4
- data.tar.gz: eba528613e4170c540396f4e506ae256349a2b1ca8cb7737fb5e5b2ce318d8a3
3
+ metadata.gz: 99d468f0288a7b9f14c3e9e8ded209a7517a5f28c682c8f84319d0c0b00bfa8b
4
+ data.tar.gz: cc69fd670c1b3d0276bfb803279b6ba3c1ac232177e3563625c23fa0af26f951
5
5
  SHA512:
6
- metadata.gz: c53ebed51301866e1461261964151d532479f33d7b3e510a8b908e1d997254042746156b9b5cf4e74e7180a096f6f6e8b13e1abcf54b28e007ca9cf8bbb4e8ea
7
- data.tar.gz: 7b31b90435a1ca0dc5d2a4c7882048972ce24b1d8f14ac40c83945c321e7ffe319297530c9e32ec39a906795a25dbfefde19a04ff500e41c3ff1d3ec720968f6
6
+ metadata.gz: ea935b1241cb38b811becbb0be527b9e6cab322f9daed2d1028871b949ac22fa94a71821e4c23ea62345f2d94d1bc4d54ed5823e087903d57fa5645af185a15b
7
+ data.tar.gz: 3327024b27c02ba4b68c30ad9c5ef6050b581427b7e95ea6f953c56020fdcedb68246f20e98a36e6636a85f9ac16d6eb4fa073f0ff6607b53d1c3a6b7f8406e5
@@ -18,6 +18,10 @@ module Kongfigure
18
18
  parser.on("-d", "--debug", "Debug mode.") do
19
19
  @options[:debug] = true
20
20
  end
21
+ parser.on("-v", "--version", "Display version and exit.") do
22
+ puts "Kongfigure version: #{Kongfigure::VERSION}"
23
+ exit 0
24
+ end
21
25
  end
22
26
  end
23
27
 
@@ -1,6 +1,6 @@
1
1
  module Kongfigure::Resources
2
2
  class Route < Base
3
- attr_accessor :name, :protocols, :methods, :hosts, :paths, :regex_priority, :strip_path, :preserve_host, :snis,
3
+ attr_accessor :name, :protocols, :methods, :hosts, :headers, :paths, :regex_priority, :strip_path, :preserve_host, :snis,
4
4
  :sources, :destinations, :service
5
5
 
6
6
  def self.build(hash)
@@ -16,6 +16,7 @@ module Kongfigure::Resources
16
16
  route.sources = hash["destinations"]
17
17
  route.service = hash["service"]
18
18
  route.hosts = hash["hosts"]
19
+ route.headers = hash["headers"]
19
20
  route.plugins = Kongfigure::Resources::Plugin.build_all(hash["plugins"] || [])
20
21
  route
21
22
  end
@@ -44,6 +45,7 @@ module Kongfigure::Resources
44
45
  "methods" => methods,
45
46
  "paths" => paths,
46
47
  "hosts" => hosts,
48
+ "headers" => headers,
47
49
  "regex_priority" => regex_priority,
48
50
  "strip_path" => strip_path,
49
51
  "preserve_host" => preserve_host,
@@ -3,7 +3,7 @@ module Kongfigure::Synchronizers
3
3
 
4
4
  def load_all_remote_resources
5
5
  remote_resources = if parent_resource.nil?
6
- super.filter do |resource|
6
+ super.select do |resource|
7
7
  resource.is_global?
8
8
  end
9
9
  else
@@ -1,3 +1,3 @@
1
1
  module Kongfigure
2
- VERSION = "0.1.0"
2
+ VERSION = "0.1.1"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: kongfigure
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ibanity
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2020-09-28 00:00:00.000000000 Z
11
+ date: 2022-03-21 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -150,7 +150,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
150
150
  - !ruby/object:Gem::Version
151
151
  version: '0'
152
152
  requirements: []
153
- rubygems_version: 3.0.3
153
+ rubygems_version: 3.0.3.1
154
154
  signing_key:
155
155
  specification_version: 4
156
156
  summary: Kongfigure.