jsonlint 0.3.0 → 0.4.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/workflows/ruby.yml +38 -0
- data/README.md +1 -1
- data/jsonlint.gemspec +2 -2
- data/lib/jsonlint/linter.rb +1 -1
- data/lib/jsonlint/version.rb +1 -1
- data/spec/data/serialised.json +1 -0
- data/spec/linter_spec.rb +4 -0
- metadata +10 -8
- data/.travis.yml +0 -10
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 7f90b077d96d488246693d4e290cda456d87811fc15eeace4b44550b0f2e6928
|
4
|
+
data.tar.gz: 0dee5476a67f9e9f64b9bbdd2ed884d0825359782c8d54a5996c735a1a00bbab
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a1f4395ee50f30488fe8327dcafcf9a3a00853c23725602d2667841b2842364113f5f5731901a5e13ceb93b938754c2137103d74563db35525caa863c68510fb
|
7
|
+
data.tar.gz: c2cbe22002cc5eba2bf7cd5a08d17ba1f9a2316910ed0e5bf52200abcdd7c4c769536492179206269bf9822abd8501cc820e68383f192307dcfc986054fe505b
|
@@ -0,0 +1,38 @@
|
|
1
|
+
# This workflow uses actions that are not certified by GitHub.
|
2
|
+
# They are provided by a third-party and are governed by
|
3
|
+
# separate terms of service, privacy policy, and support
|
4
|
+
# documentation.
|
5
|
+
# This workflow will download a prebuilt Ruby version, install dependencies and run tests with Rake
|
6
|
+
# For more information see: https://github.com/marketplace/actions/setup-ruby-jruby-and-truffleruby
|
7
|
+
|
8
|
+
name: Ruby
|
9
|
+
|
10
|
+
on:
|
11
|
+
push:
|
12
|
+
branches: [ "master" ]
|
13
|
+
pull_request:
|
14
|
+
branches: [ "master" ]
|
15
|
+
|
16
|
+
permissions:
|
17
|
+
contents: read
|
18
|
+
|
19
|
+
jobs:
|
20
|
+
test:
|
21
|
+
|
22
|
+
runs-on: ubuntu-latest
|
23
|
+
strategy:
|
24
|
+
matrix:
|
25
|
+
ruby-version: ['2.5', '2.6', '2.7', '3.0', '3.1', '3.2']
|
26
|
+
|
27
|
+
steps:
|
28
|
+
- uses: actions/checkout@v3
|
29
|
+
- name: Set up Ruby
|
30
|
+
# To automatically get bug fixes and new Ruby versions for ruby/setup-ruby,
|
31
|
+
# change this to (see https://github.com/ruby/setup-ruby#versioning):
|
32
|
+
# uses: ruby/setup-ruby@v1
|
33
|
+
uses: ruby/setup-ruby@55283cc23133118229fd3f97f9336ee23a179fcf # v1.146.0
|
34
|
+
with:
|
35
|
+
ruby-version: ${{ matrix.ruby-version }}
|
36
|
+
bundler-cache: true # runs 'bundle install' and caches installed gems automatically
|
37
|
+
- name: Run tests
|
38
|
+
run: bundle exec rake
|
data/README.md
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
# jsonlint
|
2
2
|
|
3
|
-
[![
|
3
|
+
[![Ruby](https://github.com/dougbarth/jsonlint/actions/workflows/ruby.yml/badge.svg)](https://github.com/dougbarth/jsonlint/actions/workflows/ruby.yml)
|
4
4
|
[![Gem Version](http://img.shields.io/gem/v/jsonlint.svg)](https://rubygems.org/gems/jsonlint)
|
5
5
|
|
6
6
|
jsonlint checks your JSON files for syntax errors or silly mistakes. Currently it checks for:
|
data/jsonlint.gemspec
CHANGED
@@ -21,7 +21,7 @@ Gem::Specification.new do |spec|
|
|
21
21
|
spec.add_dependency 'optimist', '~> 3'
|
22
22
|
|
23
23
|
spec.add_development_dependency 'bundler', '~> 2'
|
24
|
-
spec.add_development_dependency 'rake', '~>
|
24
|
+
spec.add_development_dependency 'rake', '~> 13'
|
25
25
|
spec.add_development_dependency 'rspec', '~> 3.8'
|
26
|
-
spec.add_development_dependency 'aruba', '~>
|
26
|
+
spec.add_development_dependency 'aruba', '~> 2'
|
27
27
|
end
|
data/lib/jsonlint/linter.rb
CHANGED
data/lib/jsonlint/version.rb
CHANGED
@@ -0,0 +1 @@
|
|
1
|
+
{"^o":"SerialisationTestWhichDefinitelyDoesNotExist"}
|
data/spec/linter_spec.rb
CHANGED
@@ -40,4 +40,8 @@ describe 'JsonLint::Linter' do
|
|
40
40
|
it 'should be unhapy with a JSON file full of spaces' do
|
41
41
|
expect(linter.check(spec_data('lots_of_spaces.json'))).to be(false)
|
42
42
|
end
|
43
|
+
|
44
|
+
it 'should not deserialise objects' do
|
45
|
+
expect(linter.check(spec_data('serialised.json'))).to be(true)
|
46
|
+
end
|
43
47
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: jsonlint
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.4.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Doug Barth
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2023-04-12 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: oj
|
@@ -58,14 +58,14 @@ dependencies:
|
|
58
58
|
requirements:
|
59
59
|
- - "~>"
|
60
60
|
- !ruby/object:Gem::Version
|
61
|
-
version: '
|
61
|
+
version: '13'
|
62
62
|
type: :development
|
63
63
|
prerelease: false
|
64
64
|
version_requirements: !ruby/object:Gem::Requirement
|
65
65
|
requirements:
|
66
66
|
- - "~>"
|
67
67
|
- !ruby/object:Gem::Version
|
68
|
-
version: '
|
68
|
+
version: '13'
|
69
69
|
- !ruby/object:Gem::Dependency
|
70
70
|
name: rspec
|
71
71
|
requirement: !ruby/object:Gem::Requirement
|
@@ -86,14 +86,14 @@ dependencies:
|
|
86
86
|
requirements:
|
87
87
|
- - "~>"
|
88
88
|
- !ruby/object:Gem::Version
|
89
|
-
version: '
|
89
|
+
version: '2'
|
90
90
|
type: :development
|
91
91
|
prerelease: false
|
92
92
|
version_requirements: !ruby/object:Gem::Requirement
|
93
93
|
requirements:
|
94
94
|
- - "~>"
|
95
95
|
- !ruby/object:Gem::Version
|
96
|
-
version: '
|
96
|
+
version: '2'
|
97
97
|
description: Checks JSON files for correct syntax and no silly mistakes
|
98
98
|
email:
|
99
99
|
- dougbarth@gmail.com
|
@@ -102,8 +102,8 @@ executables:
|
|
102
102
|
extensions: []
|
103
103
|
extra_rdoc_files: []
|
104
104
|
files:
|
105
|
+
- ".github/workflows/ruby.yml"
|
105
106
|
- ".gitignore"
|
106
|
-
- ".travis.yml"
|
107
107
|
- Gemfile
|
108
108
|
- LICENSE.txt
|
109
109
|
- README.md
|
@@ -123,6 +123,7 @@ files:
|
|
123
123
|
- spec/data/missing_brace.json
|
124
124
|
- spec/data/missing_comma.json
|
125
125
|
- spec/data/overlapping_keys.json
|
126
|
+
- spec/data/serialised.json
|
126
127
|
- spec/data/valid.json
|
127
128
|
- spec/data/valid_array_of_arrays.json
|
128
129
|
- spec/data/valid_array_of_objects.json
|
@@ -147,7 +148,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
147
148
|
- !ruby/object:Gem::Version
|
148
149
|
version: '0'
|
149
150
|
requirements: []
|
150
|
-
rubygems_version: 3.0.3
|
151
|
+
rubygems_version: 3.0.3.1
|
151
152
|
signing_key:
|
152
153
|
specification_version: 4
|
153
154
|
summary: JSON lint checker
|
@@ -159,6 +160,7 @@ test_files:
|
|
159
160
|
- spec/data/missing_brace.json
|
160
161
|
- spec/data/missing_comma.json
|
161
162
|
- spec/data/overlapping_keys.json
|
163
|
+
- spec/data/serialised.json
|
162
164
|
- spec/data/valid.json
|
163
165
|
- spec/data/valid_array_of_arrays.json
|
164
166
|
- spec/data/valid_array_of_objects.json
|