From 4076eb3fcf5307ea2f023cd5f6ca81b35d1f2f00 Mon Sep 17 00:00:00 2001 From: Benjamin Neff Date: Sun, 26 Jun 2022 19:28:19 +0200 Subject: [PATCH] Bump json-schema and remove json-schema-rspec (unmaintained) --- Gemfile | 3 +-- Gemfile.lock | 16 ++++------------ spec/integration/exporter_spec.rb | 3 ++- spec/spec_helper.rb | 3 --- 4 files changed, 7 insertions(+), 18 deletions(-) diff --git a/Gemfile b/Gemfile index 00be971d4..a4aa14879 100644 --- a/Gemfile +++ b/Gemfile @@ -22,7 +22,7 @@ gem "diaspora_federation-rails", "0.2.7" gem "acts_as_api", "1.0.1" gem "json", "2.6.2" -gem "json-schema", "2.8.1" +gem "json-schema", "3.0.0" # Authentication @@ -269,7 +269,6 @@ group :test do gem "fixture_builder", "0.5.2" gem "fuubar", "2.5.1" - gem "json-schema-rspec", "0.0.4" gem "rspec-json_expectations", "~> 2.1" # Cucumber (integration tests) diff --git a/Gemfile.lock b/Gemfile.lock index 60206de4e..209b0e446 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -371,11 +371,8 @@ GEM activesupport (>= 4.2) aes_key_wrap bindata - json-schema (2.8.1) - addressable (>= 2.4) - json-schema-rspec (0.0.4) - json-schema (~> 2.5) - rspec + json-schema (3.0.0) + addressable (>= 2.8) jsonpath (1.1.0) multi_json jwt (2.3.0) @@ -502,7 +499,7 @@ GEM pry-byebug (3.8.0) byebug (~> 11.0) pry (~> 0.10) - public_suffix (4.0.6) + public_suffix (4.0.7) raabro (1.4.0) racc (1.6.0) rack (2.2.3.1) @@ -628,10 +625,6 @@ GEM chunky_png (~> 1.0) rqrcode_core (~> 1.0) rqrcode_core (1.2.0) - rspec (3.10.0) - rspec-core (~> 3.10.0) - rspec-expectations (~> 3.10.0) - rspec-mocks (~> 3.10.0) rspec-core (3.10.1) rspec-support (~> 3.10.0) rspec-expectations (3.10.1) @@ -846,8 +839,7 @@ DEPENDENCIES js-routes (= 2.1.2) js_image_paths (= 0.1.1) json (= 2.6.2) - json-schema (= 2.8.1) - json-schema-rspec (= 0.0.4) + json-schema (= 3.0.0) leaflet-rails (= 1.7.0) listen (= 3.5.1) logging-rails (= 0.6.0) diff --git a/spec/integration/exporter_spec.rb b/spec/integration/exporter_spec.rb index 7794c07de..5a17f98d8 100644 --- a/spec/integration/exporter_spec.rb +++ b/spec/integration/exporter_spec.rb @@ -16,7 +16,8 @@ describe Diaspora::Exporter do %i[generic_user_data activity status_messages_flavours work_aspect] ) - expect(JSON.parse(json)).to match_json_schema(:archive_schema) + errors = JSON::Validator.fully_validate("lib/schemas/archive-format.json", JSON.parse(json)) + expect(errors).to be_empty end it "contains basic user data" do diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb index 0fe4e1097..3cbdbaff0 100644 --- a/spec/spec_helper.rb +++ b/spec/spec_helper.rb @@ -133,9 +133,6 @@ RSpec.configure do |config| config.include FactoryGirl::Syntax::Methods - config.include JSON::SchemaMatchers - config.json_schemas[:archive_schema] = "lib/schemas/archive-format.json" - JSON::Validator.add_schema( JSON::Schema.new( DiasporaFederation::Schemas.federation_entities,