pact_broker 2.42.0 → 2.43.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +21 -0
- data/lib/pact_broker/api/resources/integrations.rb +1 -1
- data/lib/pact_broker/badges/service.rb +4 -1
- data/lib/pact_broker/db/models.rb +37 -0
- data/lib/pact_broker/integrations/service.rb +18 -0
- data/lib/pact_broker/matrix/query_builder.rb +78 -0
- data/lib/pact_broker/matrix/query_ids.rb +40 -0
- data/lib/pact_broker/matrix/quick_row.rb +192 -127
- data/lib/pact_broker/matrix/repository.rb +4 -27
- data/lib/pact_broker/matrix/resolved_selector.rb +9 -3
- data/lib/pact_broker/test/test_data_builder.rb +19 -2
- data/lib/pact_broker/version.rb +1 -1
- data/lib/rack/pact_broker/request_target.rb +58 -0
- data/lib/rack/pact_broker/ui_request_filter.rb +6 -43
- data/pact_broker.gemspec +3 -3
- data/spec/lib/pact_broker/badges/service_spec.rb +19 -0
- data/spec/lib/pact_broker/integrations/service_spec.rb +10 -0
- data/spec/lib/pact_broker/matrix/deployment_status_summary_spec.rb +0 -2
- data/spec/lib/pact_broker/matrix/integration_spec.rb +40 -0
- data/spec/lib/pact_broker/matrix/quick_row_spec.rb +3 -2
- data/spec/lib/pact_broker/matrix/repository_spec.rb +5 -3
- data/spec/lib/rack/pact_broker/{ui_request_filter_spec.rb → request_target_spec.rb} +22 -29
- data/tasks/database/annotate.rb +12 -4
- data/vendor/hal-browser/js/hal/http/client.js +1 -1
- metadata +28 -12
data/tasks/database/annotate.rb
CHANGED
@@ -4,9 +4,13 @@ module PactBroker
|
|
4
4
|
class Annotate
|
5
5
|
def self.call
|
6
6
|
annotation_configuration.each_pair do | klass, path |
|
7
|
-
|
8
|
-
|
9
|
-
|
7
|
+
begin
|
8
|
+
puts "Annotating #{klass}"
|
9
|
+
sa = Sequel::Annotate.new(klass)
|
10
|
+
sa.annotate(path)
|
11
|
+
rescue StandardError => e
|
12
|
+
puts "Error annnotating #{klass} - #{e.message}\n#{e.backtrace.join("\n")}"
|
13
|
+
end
|
10
14
|
end
|
11
15
|
end
|
12
16
|
|
@@ -14,7 +18,11 @@ module PactBroker
|
|
14
18
|
sequel_domain_classes.each_with_object({}) do | klass, configs |
|
15
19
|
file_path = file_path_for_class(klass)
|
16
20
|
if File.exist?(file_path)
|
17
|
-
|
21
|
+
if klass.db.table_exists?(klass.table_name)
|
22
|
+
configs[klass] = file_path
|
23
|
+
else
|
24
|
+
puts "Skipping annotation for #{klass} as the configured table_name '#{klass.table_name}' is not a real table"
|
25
|
+
end
|
18
26
|
else
|
19
27
|
puts "Skipping annotation for #{klass} as the generated file path #{file_path} does not exist"
|
20
28
|
end
|
@@ -1,6 +1,6 @@
|
|
1
1
|
HAL.Http.Client = function(opts) {
|
2
2
|
this.vent = opts.vent;
|
3
|
-
$.ajaxSetup({ headers: { 'Accept': 'application/hal+json, application/json, */*; q=0.01' } });
|
3
|
+
$.ajaxSetup({ headers: { 'Accept': 'application/hal+json, application/json, */*; q=0.01', 'X-Interface': 'HAL Browser' } });
|
4
4
|
};
|
5
5
|
|
6
6
|
HAL.Http.Client.prototype.get = function(url) {
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: pact_broker
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.
|
4
|
+
version: 2.43.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Bethany Skurrie
|
@@ -10,7 +10,7 @@ authors:
|
|
10
10
|
autorequire:
|
11
11
|
bindir: bin
|
12
12
|
cert_chain: []
|
13
|
-
date:
|
13
|
+
date: 2020-01-05 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: httparty
|
@@ -136,7 +136,7 @@ dependencies:
|
|
136
136
|
requirements:
|
137
137
|
- - ">="
|
138
138
|
- !ruby/object:Gem::Version
|
139
|
-
version: 2.0.
|
139
|
+
version: 2.0.8
|
140
140
|
- - "~>"
|
141
141
|
- !ruby/object:Gem::Version
|
142
142
|
version: '2.0'
|
@@ -146,7 +146,7 @@ dependencies:
|
|
146
146
|
requirements:
|
147
147
|
- - ">="
|
148
148
|
- !ruby/object:Gem::Version
|
149
|
-
version: 2.0.
|
149
|
+
version: 2.0.8
|
150
150
|
- - "~>"
|
151
151
|
- !ruby/object:Gem::Version
|
152
152
|
version: '2.0'
|
@@ -210,14 +210,20 @@ dependencies:
|
|
210
210
|
requirements:
|
211
211
|
- - ">="
|
212
212
|
- !ruby/object:Gem::Version
|
213
|
-
version: 2.0.
|
213
|
+
version: 2.0.8.1
|
214
|
+
- - "<"
|
215
|
+
- !ruby/object:Gem::Version
|
216
|
+
version: '3.0'
|
214
217
|
type: :runtime
|
215
218
|
prerelease: false
|
216
219
|
version_requirements: !ruby/object:Gem::Requirement
|
217
220
|
requirements:
|
218
221
|
- - ">="
|
219
222
|
- !ruby/object:Gem::Version
|
220
|
-
version: 2.0.
|
223
|
+
version: 2.0.8.1
|
224
|
+
- - "<"
|
225
|
+
- !ruby/object:Gem::Version
|
226
|
+
version: '3.0'
|
221
227
|
- !ruby/object:Gem::Dependency
|
222
228
|
name: haml
|
223
229
|
requirement: !ruby/object:Gem::Requirement
|
@@ -250,16 +256,22 @@ dependencies:
|
|
250
256
|
name: rack-protection
|
251
257
|
requirement: !ruby/object:Gem::Requirement
|
252
258
|
requirements:
|
253
|
-
- - "
|
259
|
+
- - ">="
|
254
260
|
- !ruby/object:Gem::Version
|
255
|
-
version:
|
261
|
+
version: 2.0.8.1
|
262
|
+
- - "<"
|
263
|
+
- !ruby/object:Gem::Version
|
264
|
+
version: '3.0'
|
256
265
|
type: :runtime
|
257
266
|
prerelease: false
|
258
267
|
version_requirements: !ruby/object:Gem::Requirement
|
259
268
|
requirements:
|
260
|
-
- - "
|
269
|
+
- - ">="
|
261
270
|
- !ruby/object:Gem::Version
|
262
|
-
version:
|
271
|
+
version: 2.0.8.1
|
272
|
+
- - "<"
|
273
|
+
- !ruby/object:Gem::Version
|
274
|
+
version: '3.0'
|
263
275
|
- !ruby/object:Gem::Dependency
|
264
276
|
name: dry-types
|
265
277
|
requirement: !ruby/object:Gem::Requirement
|
@@ -919,6 +931,7 @@ files:
|
|
919
931
|
- lib/pact_broker/db/log_quietener.rb
|
920
932
|
- lib/pact_broker/db/migrate.rb
|
921
933
|
- lib/pact_broker/db/migrate_data.rb
|
934
|
+
- lib/pact_broker/db/models.rb
|
922
935
|
- lib/pact_broker/db/seed/pact_1.json
|
923
936
|
- lib/pact_broker/db/seed/pact_2.json
|
924
937
|
- lib/pact_broker/db/seed/pact_3.json
|
@@ -997,6 +1010,8 @@ files:
|
|
997
1010
|
- lib/pact_broker/matrix/integration.rb
|
998
1011
|
- lib/pact_broker/matrix/parse_can_i_deploy_query.rb
|
999
1012
|
- lib/pact_broker/matrix/parse_query.rb
|
1013
|
+
- lib/pact_broker/matrix/query_builder.rb
|
1014
|
+
- lib/pact_broker/matrix/query_ids.rb
|
1000
1015
|
- lib/pact_broker/matrix/query_results.rb
|
1001
1016
|
- lib/pact_broker/matrix/query_results_with_deployment_status_summary.rb
|
1002
1017
|
- lib/pact_broker/matrix/quick_row.rb
|
@@ -1122,6 +1137,7 @@ files:
|
|
1122
1137
|
- lib/rack/pact_broker/database_transaction.rb
|
1123
1138
|
- lib/rack/pact_broker/invalid_uri_protection.rb
|
1124
1139
|
- lib/rack/pact_broker/no_auth.rb
|
1140
|
+
- lib/rack/pact_broker/request_target.rb
|
1125
1141
|
- lib/rack/pact_broker/reset_thread_data.rb
|
1126
1142
|
- lib/rack/pact_broker/store_base_url.rb
|
1127
1143
|
- lib/rack/pact_broker/ui_authentication.rb
|
@@ -1467,7 +1483,7 @@ files:
|
|
1467
1483
|
- spec/lib/rack/pact_broker/add_pact_broker_version_header_spec.rb
|
1468
1484
|
- spec/lib/rack/pact_broker/database_transaction_spec.rb
|
1469
1485
|
- spec/lib/rack/pact_broker/invalid_uri_protection_spec.rb
|
1470
|
-
- spec/lib/rack/pact_broker/
|
1486
|
+
- spec/lib/rack/pact_broker/request_target_spec.rb
|
1471
1487
|
- spec/lib/webmachine/rack_adapter_monkey_patch_spec.rb
|
1472
1488
|
- spec/migrations/20180201_create_head_matrix_spec.rb
|
1473
1489
|
- spec/migrations/23_pact_versions_spec.rb
|
@@ -1839,7 +1855,7 @@ test_files:
|
|
1839
1855
|
- spec/lib/rack/pact_broker/add_pact_broker_version_header_spec.rb
|
1840
1856
|
- spec/lib/rack/pact_broker/database_transaction_spec.rb
|
1841
1857
|
- spec/lib/rack/pact_broker/invalid_uri_protection_spec.rb
|
1842
|
-
- spec/lib/rack/pact_broker/
|
1858
|
+
- spec/lib/rack/pact_broker/request_target_spec.rb
|
1843
1859
|
- spec/lib/webmachine/rack_adapter_monkey_patch_spec.rb
|
1844
1860
|
- spec/migrations/20180201_create_head_matrix_spec.rb
|
1845
1861
|
- spec/migrations/23_pact_versions_spec.rb
|