Skip to content

Commit

Permalink
https:
Browse files Browse the repository at this point in the history
  • Loading branch information
seanpdoyle committed Apr 13, 2018
1 parent 5d50911 commit d69cf35
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 9 deletions.
12 changes: 6 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ Or install it yourself as:

Inspired by [Validating JSON Schemas with an RSpec Matcher][original-blog-post].

[original-blog-post]: (http://robots.thoughtbot.com/validating-json-schemas-with-an-rspec-matcher)
[original-blog-post]: (https://robots.thoughtbot.com/validating-json-schemas-with-an-rspec-matcher)

First, configure it in your test suite's helper file:

Expand Down Expand Up @@ -55,19 +55,19 @@ Minitest::Test.send(:include, JsonMatchers::Minitest::Assertions)

### Declare

Declare your [JSON Schema](http://json-schema.org/example1.html) in the schema
Declare your [JSON Schema](https://json-schema.org/example1.html) in the schema
directory.

`spec/support/api/schemas/location.json` or
`test/support/api/schemas/location.json`:

Define your [JSON Schema](http://json-schema.org/example1.html) in the schema
Define your [JSON Schema](https://json-schema.org/example1.html) in the schema
directory.

```json
{
"id": "http://json-schema.org/geo",
"$schema": "http://json-schema.org/draft-06/schema#",
"id": "https://json-schema.org/geo",
"$schema": "https://json-schema.org/draft-06/schema#",
"description": "A geographical coordinate",
"type": "object",
"properties": {
Expand Down Expand Up @@ -176,7 +176,7 @@ In this case `"user.json"` and `"users/index.json"` are resolved relative to
To learn more about `$ref`, check out
[Understanding JSON Schema Structuring][$ref].

[$ref]: http://spacetelescope.github.io/understanding-json-schema/structuring.html
[$ref]: https://spacetelescope.github.io/understanding-json-schema/structuring.html

## Configuration

Expand Down
2 changes: 1 addition & 1 deletion lib/json_matchers/matcher.rb
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ def build_and_populate_document_store
Dir.glob("#{JsonMatchers.schema_root}/**/*.json").
map { |path| Pathname.new(path) }.
map { |schema_path| Parser.new(schema_path).parse }.
map { |schema| document_store.add_schema(schema) }
each { |schema| document_store.add_schema(schema) }

document_store
end
Expand Down
4 changes: 2 additions & 2 deletions spec/factories.rb
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@

initialize_with do
FakeSchema.new(name, {
"$schema": "http://json-schema.org/draft-04/schema#",
"$schema": "https://json-schema.org/draft-04/schema#",
"type": "array",
"items": { "$ref": "file:/#{items.name}.json#" },
})
Expand All @@ -82,7 +82,7 @@

json do
{
"$schema": "http://json-schema.org/draft-04/schema#",
"$schema": "https://json-schema.org/draft-04/schema#",
"id": "file:/#{name}.json#",
"type": "object",
"definitions": {
Expand Down

0 comments on commit d69cf35

Please sign in to comment.