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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 865549ae7f81666a0d93c1ea750f1e58c49b72f9d122d337370512759970cceb
4
- data.tar.gz: a219e77d9061374565d230057e2b9374e801b94f3a557f8a2aa9a8229c2fda0f
3
+ metadata.gz: 7f90b077d96d488246693d4e290cda456d87811fc15eeace4b44550b0f2e6928
4
+ data.tar.gz: 0dee5476a67f9e9f64b9bbdd2ed884d0825359782c8d54a5996c735a1a00bbab
5
5
  SHA512:
6
- metadata.gz: 5fa98267d4c36018a931084e42d66590755d272dc15fb880eef54e659300a8bdb3b3cec59d5e691cfbdaec899ed95269a56ee7a680b1c638b7dd8acf85f4334d
7
- data.tar.gz: 84de08ff27a4fcec4d7a07b7e06e589ffda10adc91430b6b7ca689f9ac48dcb9b23bd982964ea48f28dafe446889a80412718e94f1f2a1ca45e1aff594884d3d
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
- [![Build Status](https://travis-ci.org/dougbarth/jsonlint.svg?branch=master)](https://travis-ci.org/dougbarth/jsonlint)
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', '~> 12.3'
24
+ spec.add_development_dependency 'rake', '~> 13'
25
25
  spec.add_development_dependency 'rspec', '~> 3.8'
26
- spec.add_development_dependency 'aruba', '~> 0.14'
26
+ spec.add_development_dependency 'aruba', '~> 2'
27
27
  end
@@ -79,7 +79,7 @@ module JsonLint
79
79
  end
80
80
 
81
81
  def check_syntax_valid?(json_data, errors_array)
82
- Oj.load(json_data, nilnil: false)
82
+ Oj.load(json_data, nilnil: false, mode: :strict)
83
83
  true
84
84
  rescue Oj::ParseError => e
85
85
  errors_array << e.message
@@ -1,3 +1,3 @@
1
1
  module JsonLint
2
- VERSION = '0.3.0'
2
+ VERSION = '0.4.0'
3
3
  end
@@ -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.3.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: 2019-06-10 00:00:00.000000000 Z
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: '12.3'
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: '12.3'
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: '0.14'
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: '0.14'
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
data/.travis.yml DELETED
@@ -1,10 +0,0 @@
1
- dist: xenial
2
- language: ruby
3
- before_install:
4
- - gem update --system
5
- - gem install bundler
6
- rvm:
7
- - 2.3
8
- - 2.4
9
- - 2.5
10
- - 2.6