tidy_json 0.2.0 → 0.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.yardopts +3 -1
- data/Gemfile +2 -0
- data/LICENSE +1 -1
- data/README.md +105 -47
- data/Rakefile +2 -0
- data/bin/jtidy +128 -0
- data/bin/jtidy_info.rb +34 -0
- data/lib/tidy_json.rb +85 -343
- data/lib/tidy_json/dedication.rb +18 -8
- data/lib/tidy_json/formatter.rb +238 -0
- data/lib/tidy_json/serializer.rb +118 -0
- data/lib/tidy_json/version.rb +3 -1
- data/test/JsonableObject.json +1 -0
- data/test/codecov_runner.rb +16 -0
- data/test/test_tidy_json.rb +121 -33
- data/tidy_json.gemspec +13 -5
- metadata +65 -20
    
        data/tidy_json.gemspec
    CHANGED
    
    | @@ -1,3 +1,5 @@ | |
| 1 | 
            +
            # frozen_string_literal: true
         | 
| 2 | 
            +
             | 
| 1 3 | 
             
            require_relative 'lib/tidy_json/version'
         | 
| 2 4 | 
             
            require_relative 'lib/tidy_json/dedication'
         | 
| 3 5 |  | 
| @@ -8,18 +10,24 @@ Gem::Specification.new do |spec| | |
| 8 10 | 
             
              spec.summary     = 'Serialize any Ruby object as readable JSON'
         | 
| 9 11 | 
             
              spec.description = 'A mixin providing (recursive) JSON serialization and pretty printing.'
         | 
| 10 12 | 
             
              spec.authors     = ['Robert Di Pardo']
         | 
| 11 | 
            -
              spec.email       = ' | 
| 13 | 
            +
              spec.email       = 'dipardo.r@gmail.com'
         | 
| 12 14 | 
             
              spec.homepage    = 'https://github.com/rdipardo/tidy_json'
         | 
| 13 | 
            -
              spec.metadata    = { 'documentation_uri' => 'https://rubydoc.org/github/rdipardo/tidy_json/master' }
         | 
| 14 15 | 
             
              spec.license     = 'MIT'
         | 
| 16 | 
            +
              spec.metadata    = {
         | 
| 17 | 
            +
                'documentation_uri' => 'https://rubydoc.org/github/rdipardo/tidy_json',
         | 
| 18 | 
            +
                'bug_tracker_uri' => 'https://github.com/rdipardo/tidy_json/issues'
         | 
| 19 | 
            +
              }
         | 
| 15 20 | 
             
              spec.files = Dir.chdir(File.expand_path(__dir__)) do
         | 
| 16 | 
            -
                ['.yardopts'].concat(`git ls-files -z`.split("\x0").reject { |f| f.match(/^(\.[\w+\.]+|test|spec|features)/) })
         | 
| 21 | 
            +
                ['.yardopts'].concat(`git ls-files -z`.split("\x0").reject { |f| f.match(/^(\.[\w+\.]+|test|spec|features|codecov)/) })
         | 
| 17 22 | 
             
              end
         | 
| 18 23 | 
             
              spec.test_files = Dir['test/*']
         | 
| 19 24 | 
             
              spec.require_paths = ['lib']
         | 
| 25 | 
            +
              spec.executables = ['jtidy']
         | 
| 20 26 | 
             
              spec.required_ruby_version = Gem::Requirement.new('>= 2.3')
         | 
| 21 | 
            -
              spec.add_runtime_dependency 'json', '~> 2. | 
| 22 | 
            -
              spec.add_development_dependency ' | 
| 27 | 
            +
              spec.add_runtime_dependency 'json', '~> 2.5'
         | 
| 28 | 
            +
              spec.add_development_dependency 'codecov', '~> 0.2.5'
         | 
| 29 | 
            +
              spec.add_development_dependency 'simplecov', '~> 0.17'
         | 
| 30 | 
            +
              spec.add_development_dependency 'test-unit', '~> 3.4'
         | 
| 23 31 | 
             
              spec.add_development_dependency 'yard', '~> 0.9'
         | 
| 24 32 | 
             
              spec.rdoc_options = ['-x test/*']
         | 
| 25 33 | 
             
              spec.post_install_message = TidyJson::DEDICATION
         | 
    
        metadata
    CHANGED
    
    | @@ -1,14 +1,14 @@ | |
| 1 1 | 
             
            --- !ruby/object:Gem::Specification
         | 
| 2 2 | 
             
            name: tidy_json
         | 
| 3 3 | 
             
            version: !ruby/object:Gem::Version
         | 
| 4 | 
            -
              version: 0. | 
| 4 | 
            +
              version: 0.4.0
         | 
| 5 5 | 
             
            platform: ruby
         | 
| 6 6 | 
             
            authors:
         | 
| 7 7 | 
             
            - Robert Di Pardo
         | 
| 8 8 | 
             
            autorequire: 
         | 
| 9 9 | 
             
            bindir: bin
         | 
| 10 10 | 
             
            cert_chain: []
         | 
| 11 | 
            -
            date:  | 
| 11 | 
            +
            date: 2021-06-20 00:00:00.000000000 Z
         | 
| 12 12 | 
             
            dependencies:
         | 
| 13 13 | 
             
            - !ruby/object:Gem::Dependency
         | 
| 14 14 | 
             
              name: json
         | 
| @@ -16,28 +16,56 @@ dependencies: | |
| 16 16 | 
             
                requirements:
         | 
| 17 17 | 
             
                - - "~>"
         | 
| 18 18 | 
             
                  - !ruby/object:Gem::Version
         | 
| 19 | 
            -
                    version: '2. | 
| 19 | 
            +
                    version: '2.5'
         | 
| 20 20 | 
             
              type: :runtime
         | 
| 21 21 | 
             
              prerelease: false
         | 
| 22 22 | 
             
              version_requirements: !ruby/object:Gem::Requirement
         | 
| 23 23 | 
             
                requirements:
         | 
| 24 24 | 
             
                - - "~>"
         | 
| 25 25 | 
             
                  - !ruby/object:Gem::Version
         | 
| 26 | 
            -
                    version: '2. | 
| 26 | 
            +
                    version: '2.5'
         | 
| 27 27 | 
             
            - !ruby/object:Gem::Dependency
         | 
| 28 | 
            -
              name:  | 
| 28 | 
            +
              name: codecov
         | 
| 29 29 | 
             
              requirement: !ruby/object:Gem::Requirement
         | 
| 30 30 | 
             
                requirements:
         | 
| 31 31 | 
             
                - - "~>"
         | 
| 32 32 | 
             
                  - !ruby/object:Gem::Version
         | 
| 33 | 
            -
                    version:  | 
| 33 | 
            +
                    version: 0.2.5
         | 
| 34 34 | 
             
              type: :development
         | 
| 35 35 | 
             
              prerelease: false
         | 
| 36 36 | 
             
              version_requirements: !ruby/object:Gem::Requirement
         | 
| 37 37 | 
             
                requirements:
         | 
| 38 38 | 
             
                - - "~>"
         | 
| 39 39 | 
             
                  - !ruby/object:Gem::Version
         | 
| 40 | 
            -
                    version:  | 
| 40 | 
            +
                    version: 0.2.5
         | 
| 41 | 
            +
            - !ruby/object:Gem::Dependency
         | 
| 42 | 
            +
              name: simplecov
         | 
| 43 | 
            +
              requirement: !ruby/object:Gem::Requirement
         | 
| 44 | 
            +
                requirements:
         | 
| 45 | 
            +
                - - "~>"
         | 
| 46 | 
            +
                  - !ruby/object:Gem::Version
         | 
| 47 | 
            +
                    version: '0.17'
         | 
| 48 | 
            +
              type: :development
         | 
| 49 | 
            +
              prerelease: false
         | 
| 50 | 
            +
              version_requirements: !ruby/object:Gem::Requirement
         | 
| 51 | 
            +
                requirements:
         | 
| 52 | 
            +
                - - "~>"
         | 
| 53 | 
            +
                  - !ruby/object:Gem::Version
         | 
| 54 | 
            +
                    version: '0.17'
         | 
| 55 | 
            +
            - !ruby/object:Gem::Dependency
         | 
| 56 | 
            +
              name: test-unit
         | 
| 57 | 
            +
              requirement: !ruby/object:Gem::Requirement
         | 
| 58 | 
            +
                requirements:
         | 
| 59 | 
            +
                - - "~>"
         | 
| 60 | 
            +
                  - !ruby/object:Gem::Version
         | 
| 61 | 
            +
                    version: '3.4'
         | 
| 62 | 
            +
              type: :development
         | 
| 63 | 
            +
              prerelease: false
         | 
| 64 | 
            +
              version_requirements: !ruby/object:Gem::Requirement
         | 
| 65 | 
            +
                requirements:
         | 
| 66 | 
            +
                - - "~>"
         | 
| 67 | 
            +
                  - !ruby/object:Gem::Version
         | 
| 68 | 
            +
                    version: '3.4'
         | 
| 41 69 | 
             
            - !ruby/object:Gem::Dependency
         | 
| 42 70 | 
             
              name: yard
         | 
| 43 71 | 
             
              requirement: !ruby/object:Gem::Requirement
         | 
| @@ -53,8 +81,9 @@ dependencies: | |
| 53 81 | 
             
                  - !ruby/object:Gem::Version
         | 
| 54 82 | 
             
                    version: '0.9'
         | 
| 55 83 | 
             
            description: A mixin providing (recursive) JSON serialization and pretty printing.
         | 
| 56 | 
            -
            email:  | 
| 57 | 
            -
            executables: | 
| 84 | 
            +
            email: dipardo.r@gmail.com
         | 
| 85 | 
            +
            executables:
         | 
| 86 | 
            +
            - jtidy
         | 
| 58 87 | 
             
            extensions: []
         | 
| 59 88 | 
             
            extra_rdoc_files: []
         | 
| 60 89 | 
             
            files:
         | 
| @@ -63,27 +92,41 @@ files: | |
| 63 92 | 
             
            - LICENSE
         | 
| 64 93 | 
             
            - README.md
         | 
| 65 94 | 
             
            - Rakefile
         | 
| 95 | 
            +
            - bin/jtidy
         | 
| 96 | 
            +
            - bin/jtidy_info.rb
         | 
| 66 97 | 
             
            - lib/tidy_json.rb
         | 
| 67 98 | 
             
            - lib/tidy_json/dedication.rb
         | 
| 99 | 
            +
            - lib/tidy_json/formatter.rb
         | 
| 100 | 
            +
            - lib/tidy_json/serializer.rb
         | 
| 68 101 | 
             
            - lib/tidy_json/version.rb
         | 
| 102 | 
            +
            - test/JsonableObject.json
         | 
| 103 | 
            +
            - test/codecov_runner.rb
         | 
| 69 104 | 
             
            - test/test_tidy_json.rb
         | 
| 70 105 | 
             
            - tidy_json.gemspec
         | 
| 71 106 | 
             
            homepage: https://github.com/rdipardo/tidy_json
         | 
| 72 107 | 
             
            licenses:
         | 
| 73 108 | 
             
            - MIT
         | 
| 74 109 | 
             
            metadata:
         | 
| 75 | 
            -
              documentation_uri: https://rubydoc.org/github/rdipardo/tidy_json | 
| 110 | 
            +
              documentation_uri: https://rubydoc.org/github/rdipardo/tidy_json
         | 
| 111 | 
            +
              bug_tracker_uri: https://github.com/rdipardo/tidy_json/issues
         | 
| 76 112 | 
             
            post_install_message: |2+
         | 
| 77 113 |  | 
| 78 | 
            -
               | 
| 79 | 
            -
               | 
| 80 | 
            -
               | 
| 81 | 
            -
               | 
| 82 | 
            -
               | 
| 83 | 
            -
               | 
| 84 | 
            -
               | 
| 85 | 
            -
               | 
| 86 | 
            -
               | 
| 114 | 
            +
              ....................................................
         | 
| 115 | 
            +
              .............. This gem is dedicated ...............
         | 
| 116 | 
            +
              ................. to the memory of .................
         | 
| 117 | 
            +
              ....................................................
         | 
| 118 | 
            +
              ................. MICHAEL DI PARDO .................
         | 
| 119 | 
            +
              ....................................................
         | 
| 120 | 
            +
              ............ Please consider supporting ............
         | 
| 121 | 
            +
              ........... multiple sclerosis research: ...........
         | 
| 122 | 
            +
              ....................................................
         | 
| 123 | 
            +
              ....................... (US) .......................
         | 
| 124 | 
            +
              ..... https://www.nationalmssociety.org/Donate .....
         | 
| 125 | 
            +
              ..................... (Canada) .....................
         | 
| 126 | 
            +
              ........ https://mssociety.ca/get-involved .........
         | 
| 127 | 
            +
              ....................... (UK) .......................
         | 
| 128 | 
            +
              .... https://www.mssociety.org.uk/get-involved .....
         | 
| 129 | 
            +
              ....................................................
         | 
| 87 130 |  | 
| 88 131 | 
             
            rdoc_options:
         | 
| 89 132 | 
             
            - "-x test/*"
         | 
| @@ -100,9 +143,11 @@ required_rubygems_version: !ruby/object:Gem::Requirement | |
| 100 143 | 
             
                - !ruby/object:Gem::Version
         | 
| 101 144 | 
             
                  version: '0'
         | 
| 102 145 | 
             
            requirements: []
         | 
| 103 | 
            -
            rubygems_version: 3. | 
| 146 | 
            +
            rubygems_version: 3.2.3
         | 
| 104 147 | 
             
            signing_key: 
         | 
| 105 148 | 
             
            specification_version: 4
         | 
| 106 149 | 
             
            summary: Serialize any Ruby object as readable JSON
         | 
| 107 150 | 
             
            test_files:
         | 
| 151 | 
            +
            - test/JsonableObject.json
         | 
| 152 | 
            +
            - test/codecov_runner.rb
         | 
| 108 153 | 
             
            - test/test_tidy_json.rb
         |