kong_schema 1.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.gitignore +3 -0
- data/.rspec +1 -0
- data/.rubocop.yml +31 -0
- data/.ruby-version +1 -0
- data/CHANGELOG.md +14 -0
- data/Gemfile +4 -0
- data/Gemfile.lock +85 -0
- data/LICENSE.md +14 -0
- data/README.md +197 -0
- data/bin/kong_schema +27 -0
- data/ext/kong/upstream.rb +36 -0
- data/kong_schema.gemspec +29 -0
- data/lib/kong_schema/actions.rb +44 -0
- data/lib/kong_schema/adapter.rb +35 -0
- data/lib/kong_schema/cli.rb +86 -0
- data/lib/kong_schema/client.rb +30 -0
- data/lib/kong_schema/reporter.rb +101 -0
- data/lib/kong_schema/resource/api.rb +57 -0
- data/lib/kong_schema/resource/target.rb +60 -0
- data/lib/kong_schema/resource/upstream.rb +42 -0
- data/lib/kong_schema/resource.rb +3 -0
- data/lib/kong_schema/schema.rb +103 -0
- data/lib/kong_schema/version.rb +5 -0
- data/lib/kong_schema.rb +10 -0
- data/spec/examples.txt +0 -0
- data/spec/kong_schema/reporter_spec.rb +89 -0
- data/spec/kong_schema/resource/api_spec.rb +125 -0
- data/spec/kong_schema/resource/target_spec.rb +209 -0
- data/spec/kong_schema/resource/upstream_spec.rb +122 -0
- data/spec/spec_helper.rb +109 -0
- data/spec/support/coverage.rb +18 -0
- data/spec/support/kong_schema_test_utils.rb +24 -0
- metadata +212 -0
@@ -0,0 +1,209 @@
|
|
1
|
+
describe KongSchema::Resource::Target do
|
2
|
+
let(:schema) { KongSchema::Schema }
|
3
|
+
let(:test_utils) { KongSchemaTestUtils.new }
|
4
|
+
|
5
|
+
after(:each) do
|
6
|
+
test_utils.reset_kong
|
7
|
+
end
|
8
|
+
|
9
|
+
describe 'creating targets' do
|
10
|
+
let :config do
|
11
|
+
test_utils.generate_config({
|
12
|
+
upstreams: [{
|
13
|
+
name: 'bridge-learn.kong-service'
|
14
|
+
}],
|
15
|
+
|
16
|
+
targets: [{
|
17
|
+
upstream_id: 'bridge-learn.kong-service',
|
18
|
+
target: '127.0.0.1:3000'
|
19
|
+
}]
|
20
|
+
})
|
21
|
+
end
|
22
|
+
|
23
|
+
it 'adds a target if it does not exist' do
|
24
|
+
directives = schema.scan(config)
|
25
|
+
|
26
|
+
expect(directives.map(&:class)).to eq([ KongSchema::Actions::Create, KongSchema::Actions::Create ])
|
27
|
+
end
|
28
|
+
|
29
|
+
it 'does add a target' do
|
30
|
+
directives = schema.scan(config)
|
31
|
+
|
32
|
+
expect {
|
33
|
+
schema.commit(config, directives)
|
34
|
+
}.to change {
|
35
|
+
KongSchema::Client.connect(config) { Kong::Upstream.all.count }
|
36
|
+
}.by(1)
|
37
|
+
end
|
38
|
+
|
39
|
+
it 'does not add a target if it exists' do
|
40
|
+
directives = schema.scan(config)
|
41
|
+
|
42
|
+
schema.commit(config, directives)
|
43
|
+
|
44
|
+
next_directives = schema.scan(config)
|
45
|
+
|
46
|
+
expect(next_directives.map(&:class)).not_to include(KongSchema::Actions::Create)
|
47
|
+
end
|
48
|
+
|
49
|
+
it 'does not allow defining a target without an upstream_id' do
|
50
|
+
directives = schema.scan(test_utils.generate_config({
|
51
|
+
targets: [{ target: '127.0.0.1:3000' }]
|
52
|
+
}))
|
53
|
+
|
54
|
+
expect {
|
55
|
+
schema.commit(config, directives)
|
56
|
+
}.to raise_error(/Can not add a target without an upstream!/)
|
57
|
+
end
|
58
|
+
end
|
59
|
+
|
60
|
+
describe "changing a target's target" do
|
61
|
+
let :config do
|
62
|
+
test_utils.generate_config({
|
63
|
+
upstreams: [{
|
64
|
+
name: 'bridge-learn.kong-service'
|
65
|
+
}],
|
66
|
+
|
67
|
+
targets: [{
|
68
|
+
upstream_id: 'bridge-learn.kong-service',
|
69
|
+
target: '127.0.0.1:3000'
|
70
|
+
}]
|
71
|
+
})
|
72
|
+
end
|
73
|
+
|
74
|
+
let :with_updated do
|
75
|
+
test_utils.generate_config({
|
76
|
+
upstreams: [{
|
77
|
+
name: 'bridge-learn.kong-service'
|
78
|
+
}],
|
79
|
+
|
80
|
+
targets: [{
|
81
|
+
upstream_id: 'bridge-learn.kong-service',
|
82
|
+
target: '127.0.0.1:9999'
|
83
|
+
}]
|
84
|
+
})
|
85
|
+
end
|
86
|
+
|
87
|
+
before(:each) do
|
88
|
+
schema.commit(config, schema.scan(config))
|
89
|
+
end
|
90
|
+
|
91
|
+
it 'identifies targets to be updated' do
|
92
|
+
directives = schema.scan(with_updated)
|
93
|
+
|
94
|
+
expect(directives.map(&:class)).to eq([KongSchema::Actions::Create, KongSchema::Actions::Delete])
|
95
|
+
end
|
96
|
+
|
97
|
+
it 'updates a target' do
|
98
|
+
expect {
|
99
|
+
schema.commit(with_updated, schema.scan(with_updated))
|
100
|
+
}.to change {
|
101
|
+
KongSchema::Client.connect(config) {
|
102
|
+
KongSchema::Resource::Target.all.map { |x| [ x.weight, x.target ] }
|
103
|
+
}
|
104
|
+
}.from([
|
105
|
+
[ 100, '127.0.0.1:3000' ]
|
106
|
+
]).to([
|
107
|
+
[ 100, '127.0.0.1:9999' ]
|
108
|
+
])
|
109
|
+
end
|
110
|
+
end
|
111
|
+
|
112
|
+
describe "changing a target's weight" do
|
113
|
+
let :config do
|
114
|
+
test_utils.generate_config({
|
115
|
+
upstreams: [{
|
116
|
+
name: 'bridge-learn.kong-service'
|
117
|
+
}],
|
118
|
+
|
119
|
+
targets: [{
|
120
|
+
upstream_id: 'bridge-learn.kong-service',
|
121
|
+
target: '127.0.0.1:3000'
|
122
|
+
}]
|
123
|
+
})
|
124
|
+
end
|
125
|
+
|
126
|
+
let :with_different_weight do
|
127
|
+
test_utils.generate_config({
|
128
|
+
upstreams: [{
|
129
|
+
name: 'bridge-learn.kong-service'
|
130
|
+
}],
|
131
|
+
|
132
|
+
targets: [{
|
133
|
+
upstream_id: 'bridge-learn.kong-service',
|
134
|
+
target: '127.0.0.1:3000',
|
135
|
+
weight: 20
|
136
|
+
}]
|
137
|
+
})
|
138
|
+
end
|
139
|
+
|
140
|
+
before(:each) do
|
141
|
+
schema.commit(config, schema.scan(config))
|
142
|
+
end
|
143
|
+
|
144
|
+
it 'updates the existing target' do
|
145
|
+
directives = schema.scan(with_different_weight)
|
146
|
+
|
147
|
+
expect(directives.map(&:class)).to eq([ KongSchema::Actions::Update ])
|
148
|
+
end
|
149
|
+
|
150
|
+
it 'updates a target' do
|
151
|
+
expect {
|
152
|
+
schema.commit(with_different_weight, schema.scan(with_different_weight))
|
153
|
+
}.to change {
|
154
|
+
KongSchema::Client.connect(config) {
|
155
|
+
KongSchema::Resource::Target.all.map { |x| [ x.weight, x.target ] }
|
156
|
+
}
|
157
|
+
}.from([
|
158
|
+
[ 100, '127.0.0.1:3000' ]
|
159
|
+
]).to([
|
160
|
+
[ 20, '127.0.0.1:3000' ]
|
161
|
+
])
|
162
|
+
end
|
163
|
+
end
|
164
|
+
|
165
|
+
describe 'deleting targets' do
|
166
|
+
let :config do
|
167
|
+
test_utils.generate_config(
|
168
|
+
upstreams: [{
|
169
|
+
name: 'bridge-learn.kong-service'
|
170
|
+
}],
|
171
|
+
|
172
|
+
targets: [{
|
173
|
+
upstream_id: 'bridge-learn.kong-service',
|
174
|
+
target: '127.0.0.1:3000'
|
175
|
+
}]
|
176
|
+
)
|
177
|
+
end
|
178
|
+
|
179
|
+
let :with_deleted do
|
180
|
+
test_utils.generate_config(
|
181
|
+
upstreams: [{ name: 'bridge-learn.kong-service' }],
|
182
|
+
targets: []
|
183
|
+
)
|
184
|
+
end
|
185
|
+
|
186
|
+
before(:each) do
|
187
|
+
schema.commit(config, schema.scan(config))
|
188
|
+
end
|
189
|
+
|
190
|
+
it 'identifies targets to be deleted' do
|
191
|
+
directives = schema.scan(with_deleted)
|
192
|
+
|
193
|
+
expect(directives.map(&:class)).to include(KongSchema::Actions::Delete)
|
194
|
+
end
|
195
|
+
|
196
|
+
it 'deletes a target' do
|
197
|
+
expect {
|
198
|
+
schema.commit(with_deleted, schema.scan(with_deleted))
|
199
|
+
}.to change {
|
200
|
+
KongSchema::Client.connect(config) {
|
201
|
+
KongSchema::Resource::Target.all.map { |x| [ x.target, x.weight ] }
|
202
|
+
}
|
203
|
+
}.from([
|
204
|
+
[ '127.0.0.1:3000', 100 ]
|
205
|
+
]).to([
|
206
|
+
])
|
207
|
+
end
|
208
|
+
end
|
209
|
+
end
|
@@ -0,0 +1,122 @@
|
|
1
|
+
describe KongSchema::Resource::Upstream do
|
2
|
+
let(:schema) { KongSchema::Schema }
|
3
|
+
let(:test_utils) { KongSchemaTestUtils.new }
|
4
|
+
|
5
|
+
after(:each) do
|
6
|
+
test_utils.reset_kong
|
7
|
+
end
|
8
|
+
|
9
|
+
describe 'creating upstreams' do
|
10
|
+
let :config do
|
11
|
+
test_utils.generate_config({
|
12
|
+
upstreams: [{
|
13
|
+
name: 'bridge-learn.kong-service'
|
14
|
+
}]
|
15
|
+
})
|
16
|
+
end
|
17
|
+
|
18
|
+
it 'adds an upstream if it does not exist' do
|
19
|
+
changes = schema.scan(config)
|
20
|
+
|
21
|
+
expect(changes.map(&:class)).to include(KongSchema::Actions::Create)
|
22
|
+
end
|
23
|
+
|
24
|
+
it 'does add an upstream' do
|
25
|
+
changes = schema.scan(config)
|
26
|
+
|
27
|
+
expect {
|
28
|
+
schema.commit(config, changes)
|
29
|
+
}.to change {
|
30
|
+
KongSchema::Client.connect(config) { Kong::Upstream.all.count }
|
31
|
+
}.by(1)
|
32
|
+
end
|
33
|
+
|
34
|
+
it 'does not add an upstream if it exists' do
|
35
|
+
changes = schema.scan(config)
|
36
|
+
|
37
|
+
schema.commit(config, changes)
|
38
|
+
|
39
|
+
next_changes = schema.scan(config)
|
40
|
+
|
41
|
+
expect(next_changes.map(&:class)).not_to include(KongSchema::Actions::Create)
|
42
|
+
end
|
43
|
+
end
|
44
|
+
|
45
|
+
describe 'updating upstreams' do
|
46
|
+
let :config do
|
47
|
+
test_utils.generate_config({
|
48
|
+
upstreams: [{
|
49
|
+
name: 'bridge-learn.kong-service',
|
50
|
+
}]
|
51
|
+
})
|
52
|
+
end
|
53
|
+
|
54
|
+
let :with_updated_config do
|
55
|
+
test_utils.generate_config({
|
56
|
+
upstreams: [{
|
57
|
+
name: 'bridge-learn.kong-service',
|
58
|
+
slots: 50,
|
59
|
+
orderlist: nil
|
60
|
+
}]
|
61
|
+
})
|
62
|
+
end
|
63
|
+
|
64
|
+
before(:each) do
|
65
|
+
schema.commit(config, schema.scan(config))
|
66
|
+
end
|
67
|
+
|
68
|
+
it 'updates an upstream' do
|
69
|
+
changes = schema.scan(with_updated_config)
|
70
|
+
|
71
|
+
expect(changes.map(&:class)).to eq([ KongSchema::Actions::Update ])
|
72
|
+
end
|
73
|
+
|
74
|
+
it 'does update an upstream' do
|
75
|
+
changes = schema.scan(with_updated_config)
|
76
|
+
|
77
|
+
expect {
|
78
|
+
schema.commit(with_updated_config, changes)
|
79
|
+
}.to change {
|
80
|
+
KongSchema::Client.connect(config) {
|
81
|
+
Kong::Upstream.all.first.slots
|
82
|
+
}
|
83
|
+
}.from(100).to(50)
|
84
|
+
end
|
85
|
+
end
|
86
|
+
|
87
|
+
describe 'deleting upstreams' do
|
88
|
+
let :config do
|
89
|
+
test_utils.generate_config({
|
90
|
+
upstreams: [{
|
91
|
+
name: 'bridge-learn.kong-service',
|
92
|
+
}]
|
93
|
+
})
|
94
|
+
end
|
95
|
+
|
96
|
+
let :with_deleted_config do
|
97
|
+
test_utils.generate_config({
|
98
|
+
upstreams: []
|
99
|
+
})
|
100
|
+
end
|
101
|
+
|
102
|
+
before(:each) do
|
103
|
+
schema.commit(config, schema.scan(config))
|
104
|
+
end
|
105
|
+
|
106
|
+
it 'deletes an upstream' do
|
107
|
+
changes = schema.scan(with_deleted_config)
|
108
|
+
|
109
|
+
expect(changes.map(&:class)).to include(KongSchema::Actions::Delete)
|
110
|
+
end
|
111
|
+
|
112
|
+
it 'does delete an upstream' do
|
113
|
+
changes = schema.scan(with_deleted_config)
|
114
|
+
|
115
|
+
expect {
|
116
|
+
schema.commit(with_deleted_config, changes)
|
117
|
+
}.to change {
|
118
|
+
KongSchema::Client.connect(config) { Kong::Upstream.all.count }
|
119
|
+
}.from(1).to(0)
|
120
|
+
end
|
121
|
+
end
|
122
|
+
end
|
data/spec/spec_helper.rb
ADDED
@@ -0,0 +1,109 @@
|
|
1
|
+
require_relative './support/coverage' if ENV["COVERAGE"] == "1"
|
2
|
+
require_relative './support/kong_schema_test_utils'
|
3
|
+
|
4
|
+
require 'kong_schema'
|
5
|
+
|
6
|
+
# This file was generated by the `rspec --init` command. Conventionally, all
|
7
|
+
# specs live under a `spec` directory, which RSpec adds to the `$LOAD_PATH`.
|
8
|
+
# The generated `.rspec` file contains `--require spec_helper` which will cause
|
9
|
+
# this file to always be loaded, without a need to explicitly require it in any
|
10
|
+
# files.
|
11
|
+
#
|
12
|
+
# Given that it is always loaded, you are encouraged to keep this file as
|
13
|
+
# light-weight as possible. Requiring heavyweight dependencies from this file
|
14
|
+
# will add to the boot time of your test suite on EVERY test run, even for an
|
15
|
+
# individual file that may not need all of that loaded. Instead, consider making
|
16
|
+
# a separate helper file that requires the additional dependencies and performs
|
17
|
+
# the additional setup, and require it from the spec files that actually need
|
18
|
+
# it.
|
19
|
+
#
|
20
|
+
# See http://rubydoc.info/gems/rspec-core/RSpec/Core/Configuration
|
21
|
+
RSpec.configure do |config|
|
22
|
+
config.before(:all) do
|
23
|
+
KongSchemaTestUtils.new.reset_kong
|
24
|
+
end
|
25
|
+
|
26
|
+
# rspec-expectations config goes here. You can use an alternate
|
27
|
+
# assertion/expectation library such as wrong or the stdlib/minitest
|
28
|
+
# assertions if you prefer.
|
29
|
+
config.expect_with :rspec do |expectations|
|
30
|
+
# This option will default to `true` in RSpec 4. It makes the `description`
|
31
|
+
# and `failure_message` of custom matchers include text for helper methods
|
32
|
+
# defined using `chain`, e.g.:
|
33
|
+
# be_bigger_than(2).and_smaller_than(4).description
|
34
|
+
# # => "be bigger than 2 and smaller than 4"
|
35
|
+
# ...rather than:
|
36
|
+
# # => "be bigger than 2"
|
37
|
+
expectations.include_chain_clauses_in_custom_matcher_descriptions = true
|
38
|
+
end
|
39
|
+
|
40
|
+
# rspec-mocks config goes here. You can use an alternate test double
|
41
|
+
# library (such as bogus or mocha) by changing the `mock_with` option here.
|
42
|
+
config.mock_with :rspec do |mocks|
|
43
|
+
# Prevents you from mocking or stubbing a method that does not exist on
|
44
|
+
# a real object. This is generally recommended, and will default to
|
45
|
+
# `true` in RSpec 4.
|
46
|
+
mocks.verify_partial_doubles = true
|
47
|
+
end
|
48
|
+
|
49
|
+
# This option will default to `:apply_to_host_groups` in RSpec 4 (and will
|
50
|
+
# have no way to turn it off -- the option exists only for backwards
|
51
|
+
# compatibility in RSpec 3). It causes shared context metadata to be
|
52
|
+
# inherited by the metadata hash of host groups and examples, rather than
|
53
|
+
# triggering implicit auto-inclusion in groups with matching metadata.
|
54
|
+
config.shared_context_metadata_behavior = :apply_to_host_groups
|
55
|
+
|
56
|
+
# The settings below are suggested to provide a good initial experience
|
57
|
+
# with RSpec, but feel free to customize to your heart's content.
|
58
|
+
config.filter_run_when_matching :focus
|
59
|
+
=begin
|
60
|
+
# This allows you to limit a spec run to individual examples or groups
|
61
|
+
# you care about by tagging them with `:focus` metadata. When nothing
|
62
|
+
# is tagged with `:focus`, all examples get run. RSpec also provides
|
63
|
+
# aliases for `it`, `describe`, and `context` that include `:focus`
|
64
|
+
# metadata: `fit`, `fdescribe` and `fcontext`, respectively.
|
65
|
+
|
66
|
+
# Allows RSpec to persist some state between runs in order to support
|
67
|
+
# the `--only-failures` and `--next-failure` CLI options. We recommend
|
68
|
+
# you configure your source control system to ignore this file.
|
69
|
+
config.example_status_persistence_file_path = "spec/examples.txt"
|
70
|
+
|
71
|
+
# Limits the available syntax to the non-monkey patched syntax that is
|
72
|
+
# recommended. For more details, see:
|
73
|
+
# - http://rspec.info/blog/2012/06/rspecs-new-expectation-syntax/
|
74
|
+
# - http://www.teaisaweso.me/blog/2013/05/27/rspecs-new-message-expectation-syntax/
|
75
|
+
# - http://rspec.info/blog/2014/05/notable-changes-in-rspec-3/#zero-monkey-patching-mode
|
76
|
+
config.disable_monkey_patching!
|
77
|
+
|
78
|
+
# This setting enables warnings. It's recommended, but in some cases may
|
79
|
+
# be too noisy due to issues in dependencies.
|
80
|
+
config.warnings = true
|
81
|
+
|
82
|
+
# Many RSpec users commonly either run the entire suite or an individual
|
83
|
+
# file, and it's useful to allow more verbose output when running an
|
84
|
+
# individual spec file.
|
85
|
+
if config.files_to_run.one?
|
86
|
+
# Use the documentation formatter for detailed output,
|
87
|
+
# unless a formatter has already been configured
|
88
|
+
# (e.g. via a command-line flag).
|
89
|
+
config.default_formatter = "doc"
|
90
|
+
end
|
91
|
+
|
92
|
+
# Print the 10 slowest examples and example groups at the
|
93
|
+
# end of the spec run, to help surface which specs are running
|
94
|
+
# particularly slow.
|
95
|
+
config.profile_examples = 10
|
96
|
+
|
97
|
+
# Run specs in random order to surface order dependencies. If you find an
|
98
|
+
# order dependency and want to debug it, you can fix the order by providing
|
99
|
+
# the seed, which is printed after each run.
|
100
|
+
# --seed 1234
|
101
|
+
config.order = :random
|
102
|
+
|
103
|
+
# Seed global randomization in this process using the `--seed` CLI option.
|
104
|
+
# Setting this allows you to use `--seed` to deterministically reproduce
|
105
|
+
# test failures related to randomization by passing the same `--seed` value
|
106
|
+
# as the one that triggered the failure.
|
107
|
+
Kernel.srand config.seed
|
108
|
+
=end
|
109
|
+
end
|
@@ -0,0 +1,18 @@
|
|
1
|
+
require "simplecov"
|
2
|
+
require "simplecov_compact_json"
|
3
|
+
|
4
|
+
SimpleCov.at_exit do
|
5
|
+
SimpleCov.minimum_coverage(95)
|
6
|
+
SimpleCov.maximum_coverage_drop(1)
|
7
|
+
SimpleCov.formatters = [
|
8
|
+
SimpleCov::Formatter::CompactJSON,
|
9
|
+
SimpleCov::Formatter::HTMLFormatter
|
10
|
+
]
|
11
|
+
SimpleCov.result.format!
|
12
|
+
end
|
13
|
+
|
14
|
+
SimpleCov.start do
|
15
|
+
add_filter "/.gem/"
|
16
|
+
add_filter "/bin/"
|
17
|
+
add_filter "/spec/"
|
18
|
+
end
|
@@ -0,0 +1,24 @@
|
|
1
|
+
require 'kong_schema'
|
2
|
+
|
3
|
+
class KongSchemaTestUtils
|
4
|
+
attr_reader :host
|
5
|
+
|
6
|
+
def initialize(host: ENV.fetch('KONG_URI', '127.0.0.1:9712'))
|
7
|
+
@host = host
|
8
|
+
end
|
9
|
+
|
10
|
+
def generate_config(config = {})
|
11
|
+
JSON.parse(JSON.dump({ admin_host: host }.merge(config)))
|
12
|
+
end
|
13
|
+
|
14
|
+
def reset_kong
|
15
|
+
KongSchema::Client.connect(generate_config) do
|
16
|
+
KongSchema::Resource::Upstream.all.each do |upstream|
|
17
|
+
upstream.targets.each(&:delete)
|
18
|
+
upstream.delete
|
19
|
+
end
|
20
|
+
|
21
|
+
KongSchema::Resource::Api.all.each(&:delete)
|
22
|
+
end
|
23
|
+
end
|
24
|
+
end
|
metadata
ADDED
@@ -0,0 +1,212 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: kong_schema
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 1.1.0
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Ahmad Amireh
|
8
|
+
autorequire:
|
9
|
+
bindir: bin
|
10
|
+
cert_chain: []
|
11
|
+
date: 2017-09-12 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: gli
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - "~>"
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: '2.16'
|
20
|
+
type: :runtime
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - "~>"
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: '2.16'
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: diffy
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - "~>"
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: '3.1'
|
34
|
+
type: :runtime
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - "~>"
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: '3.1'
|
41
|
+
- !ruby/object:Gem::Dependency
|
42
|
+
name: kong
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - "~>"
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: '0.3'
|
48
|
+
type: :runtime
|
49
|
+
prerelease: false
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - "~>"
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: '0.3'
|
55
|
+
- !ruby/object:Gem::Dependency
|
56
|
+
name: tty-prompt
|
57
|
+
requirement: !ruby/object:Gem::Requirement
|
58
|
+
requirements:
|
59
|
+
- - "~>"
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: '0.13'
|
62
|
+
type: :runtime
|
63
|
+
prerelease: false
|
64
|
+
version_requirements: !ruby/object:Gem::Requirement
|
65
|
+
requirements:
|
66
|
+
- - "~>"
|
67
|
+
- !ruby/object:Gem::Version
|
68
|
+
version: '0.13'
|
69
|
+
- !ruby/object:Gem::Dependency
|
70
|
+
name: tty-table
|
71
|
+
requirement: !ruby/object:Gem::Requirement
|
72
|
+
requirements:
|
73
|
+
- - "~>"
|
74
|
+
- !ruby/object:Gem::Version
|
75
|
+
version: '0.8'
|
76
|
+
type: :runtime
|
77
|
+
prerelease: false
|
78
|
+
version_requirements: !ruby/object:Gem::Requirement
|
79
|
+
requirements:
|
80
|
+
- - "~>"
|
81
|
+
- !ruby/object:Gem::Version
|
82
|
+
version: '0.8'
|
83
|
+
- !ruby/object:Gem::Dependency
|
84
|
+
name: bundler
|
85
|
+
requirement: !ruby/object:Gem::Requirement
|
86
|
+
requirements:
|
87
|
+
- - "~>"
|
88
|
+
- !ruby/object:Gem::Version
|
89
|
+
version: '1.15'
|
90
|
+
type: :development
|
91
|
+
prerelease: false
|
92
|
+
version_requirements: !ruby/object:Gem::Requirement
|
93
|
+
requirements:
|
94
|
+
- - "~>"
|
95
|
+
- !ruby/object:Gem::Version
|
96
|
+
version: '1.15'
|
97
|
+
- !ruby/object:Gem::Dependency
|
98
|
+
name: rspec
|
99
|
+
requirement: !ruby/object:Gem::Requirement
|
100
|
+
requirements:
|
101
|
+
- - "~>"
|
102
|
+
- !ruby/object:Gem::Version
|
103
|
+
version: '3.6'
|
104
|
+
type: :development
|
105
|
+
prerelease: false
|
106
|
+
version_requirements: !ruby/object:Gem::Requirement
|
107
|
+
requirements:
|
108
|
+
- - "~>"
|
109
|
+
- !ruby/object:Gem::Version
|
110
|
+
version: '3.6'
|
111
|
+
- !ruby/object:Gem::Dependency
|
112
|
+
name: simplecov
|
113
|
+
requirement: !ruby/object:Gem::Requirement
|
114
|
+
requirements:
|
115
|
+
- - "~>"
|
116
|
+
- !ruby/object:Gem::Version
|
117
|
+
version: '0.15'
|
118
|
+
type: :development
|
119
|
+
prerelease: false
|
120
|
+
version_requirements: !ruby/object:Gem::Requirement
|
121
|
+
requirements:
|
122
|
+
- - "~>"
|
123
|
+
- !ruby/object:Gem::Version
|
124
|
+
version: '0.15'
|
125
|
+
- !ruby/object:Gem::Dependency
|
126
|
+
name: simplecov_compact_json
|
127
|
+
requirement: !ruby/object:Gem::Requirement
|
128
|
+
requirements:
|
129
|
+
- - "~>"
|
130
|
+
- !ruby/object:Gem::Version
|
131
|
+
version: '1.0'
|
132
|
+
type: :development
|
133
|
+
prerelease: false
|
134
|
+
version_requirements: !ruby/object:Gem::Requirement
|
135
|
+
requirements:
|
136
|
+
- - "~>"
|
137
|
+
- !ruby/object:Gem::Version
|
138
|
+
version: '1.0'
|
139
|
+
description:
|
140
|
+
email:
|
141
|
+
- ahmad@instructure.com
|
142
|
+
executables:
|
143
|
+
- kong_schema
|
144
|
+
extensions: []
|
145
|
+
extra_rdoc_files: []
|
146
|
+
files:
|
147
|
+
- ".gitignore"
|
148
|
+
- ".rspec"
|
149
|
+
- ".rubocop.yml"
|
150
|
+
- ".ruby-version"
|
151
|
+
- CHANGELOG.md
|
152
|
+
- Gemfile
|
153
|
+
- Gemfile.lock
|
154
|
+
- LICENSE.md
|
155
|
+
- README.md
|
156
|
+
- bin/kong_schema
|
157
|
+
- ext/kong/upstream.rb
|
158
|
+
- kong_schema.gemspec
|
159
|
+
- lib/kong_schema.rb
|
160
|
+
- lib/kong_schema/actions.rb
|
161
|
+
- lib/kong_schema/adapter.rb
|
162
|
+
- lib/kong_schema/cli.rb
|
163
|
+
- lib/kong_schema/client.rb
|
164
|
+
- lib/kong_schema/reporter.rb
|
165
|
+
- lib/kong_schema/resource.rb
|
166
|
+
- lib/kong_schema/resource/api.rb
|
167
|
+
- lib/kong_schema/resource/target.rb
|
168
|
+
- lib/kong_schema/resource/upstream.rb
|
169
|
+
- lib/kong_schema/schema.rb
|
170
|
+
- lib/kong_schema/version.rb
|
171
|
+
- spec/examples.txt
|
172
|
+
- spec/kong_schema/reporter_spec.rb
|
173
|
+
- spec/kong_schema/resource/api_spec.rb
|
174
|
+
- spec/kong_schema/resource/target_spec.rb
|
175
|
+
- spec/kong_schema/resource/upstream_spec.rb
|
176
|
+
- spec/spec_helper.rb
|
177
|
+
- spec/support/coverage.rb
|
178
|
+
- spec/support/kong_schema_test_utils.rb
|
179
|
+
homepage: https://github.com/amireh/kong_schema
|
180
|
+
licenses:
|
181
|
+
- AGPL-3.0
|
182
|
+
metadata: {}
|
183
|
+
post_install_message:
|
184
|
+
rdoc_options: []
|
185
|
+
require_paths:
|
186
|
+
- lib
|
187
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
188
|
+
requirements:
|
189
|
+
- - ">="
|
190
|
+
- !ruby/object:Gem::Version
|
191
|
+
version: '0'
|
192
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
193
|
+
requirements:
|
194
|
+
- - ">="
|
195
|
+
- !ruby/object:Gem::Version
|
196
|
+
version: '0'
|
197
|
+
requirements: []
|
198
|
+
rubyforge_project:
|
199
|
+
rubygems_version: 2.5.2
|
200
|
+
signing_key:
|
201
|
+
specification_version: 4
|
202
|
+
summary: Configure Kong from a file using its REST API.
|
203
|
+
test_files:
|
204
|
+
- spec/examples.txt
|
205
|
+
- spec/kong_schema/reporter_spec.rb
|
206
|
+
- spec/kong_schema/resource/api_spec.rb
|
207
|
+
- spec/kong_schema/resource/target_spec.rb
|
208
|
+
- spec/kong_schema/resource/upstream_spec.rb
|
209
|
+
- spec/spec_helper.rb
|
210
|
+
- spec/support/coverage.rb
|
211
|
+
- spec/support/kong_schema_test_utils.rb
|
212
|
+
has_rdoc:
|