simple_endpoint 1.0.2 → 1.0.3
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/README.md +1 -1
- data/lib/simple_endpoint/version.rb +1 -1
- data/lib/simple_endpoint.rb +3 -3
- metadata +3 -3
    
        checksums.yaml
    CHANGED
    
    | @@ -1,7 +1,7 @@ | |
| 1 1 | 
             
            ---
         | 
| 2 2 | 
             
            SHA256:
         | 
| 3 | 
            -
              metadata.gz:  | 
| 4 | 
            -
              data.tar.gz:  | 
| 3 | 
            +
              metadata.gz: 564abc9a2f3de05e4253902c202322a01032d846674f4a4a9bc6f21855ae5d25
         | 
| 4 | 
            +
              data.tar.gz: fd91c69ca42ed20076c8b4c209f9c38d0a43d962d68e16abc815eb23dd955a25
         | 
| 5 5 | 
             
            SHA512:
         | 
| 6 | 
            -
              metadata.gz:  | 
| 7 | 
            -
              data.tar.gz:  | 
| 6 | 
            +
              metadata.gz: 21914d7baf720ce8cc5be7e92852904057c3000dbb19b5d9a27bc2141a763b965da145c5f46ad9f8766f2beadcc04bc91c98e42c850e8978258e32f3a9a6525d
         | 
| 7 | 
            +
              data.tar.gz: b2a0364c9bd4fc38d611ddf3d2278c29ecba8fc565fd658173471181d25296eb6e89dceee9f8a2ddb31bcd6b5e5739228f59f93fc935eed47762cb3ec43770ec
         | 
    
        data/README.md
    CHANGED
    
    | @@ -57,7 +57,7 @@ end | |
| 57 57 |  | 
| 58 58 | 
             
            `OperationIsNotHandled` error will be raised if `#default_cases` doesn't contain case for specific operation result.
         | 
| 59 59 |  | 
| 60 | 
            -
            ` | 
| 60 | 
            +
            `UnhandledResultError` will be raised if `#default_handler` doesn't contain for some cases.
         | 
| 61 61 |  | 
| 62 62 | 
             
            `NotImplementedError` will be raised if `default_cases` or `default_handler` methods aren't defined.
         | 
| 63 63 |  | 
    
        data/lib/simple_endpoint.rb
    CHANGED
    
    | @@ -43,7 +43,7 @@ module SimpleEndpoint | |
| 43 43 | 
             
                def call(result, cases, renderer_options = {}, handler = {}, before_response = {})
         | 
| 44 44 | 
             
                  matched_case = matched_case(cases, result)
         | 
| 45 45 | 
             
                  procees_handler(matched_case, before_response, result, renderer_options) unless before_response.empty?
         | 
| 46 | 
            -
                  procees_handler(matched_case, handler, result, renderer_options,  | 
| 46 | 
            +
                  procees_handler(matched_case, handler, result, renderer_options, UnhandledResultError)
         | 
| 47 47 | 
             
                end
         | 
| 48 48 |  | 
| 49 49 | 
             
                def matched_case(cases, result)
         | 
| @@ -67,7 +67,7 @@ module SimpleEndpoint | |
| 67 67 | 
             
              end
         | 
| 68 68 |  | 
| 69 69 | 
             
              class OperationIsNotHandled < StandardError; end
         | 
| 70 | 
            -
              class  | 
| 70 | 
            +
              class UnhandledResultError < StandardError; end
         | 
| 71 71 |  | 
| 72 72 | 
             
              OPERATION_IS_NOT_HANDLER_ERROR = 'Current operation result is not handled at #default_cases method'
         | 
| 73 73 | 
             
              HANDLER_ERROR_MESSAGE = <<-LARGE_ERROR
         | 
| @@ -86,7 +86,7 @@ module SimpleEndpoint | |
| 86 86 | 
             
                    when :success then render :json ...
         | 
| 87 87 | 
             
                    else
         | 
| 88 88 | 
             
                      # just in case you forgot to add handler for some of case
         | 
| 89 | 
            -
                      SimpleEndpoint:: | 
| 89 | 
            +
                      SimpleEndpoint::UnhandledResultError, 'Oh nooooo!!! Really???!!'
         | 
| 90 90 | 
             
                    end
         | 
| 91 91 | 
             
                  end
         | 
| 92 92 | 
             
                end
         | 
    
        metadata
    CHANGED
    
    | @@ -1,14 +1,14 @@ | |
| 1 1 | 
             
            --- !ruby/object:Gem::Specification
         | 
| 2 2 | 
             
            name: simple_endpoint
         | 
| 3 3 | 
             
            version: !ruby/object:Gem::Version
         | 
| 4 | 
            -
              version: 1.0. | 
| 4 | 
            +
              version: 1.0.3
         | 
| 5 5 | 
             
            platform: ruby
         | 
| 6 6 | 
             
            authors:
         | 
| 7 7 | 
             
            - Alex Bal
         | 
| 8 8 | 
             
            autorequire: 
         | 
| 9 9 | 
             
            bindir: exe
         | 
| 10 10 | 
             
            cert_chain: []
         | 
| 11 | 
            -
            date: 2022- | 
| 11 | 
            +
            date: 2022-05-23 00:00:00.000000000 Z
         | 
| 12 12 | 
             
            dependencies:
         | 
| 13 13 | 
             
            - !ruby/object:Gem::Dependency
         | 
| 14 14 | 
             
              name: bundler
         | 
| @@ -137,7 +137,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement | |
| 137 137 | 
             
                - !ruby/object:Gem::Version
         | 
| 138 138 | 
             
                  version: '0'
         | 
| 139 139 | 
             
            requirements: []
         | 
| 140 | 
            -
            rubygems_version: 3.1. | 
| 140 | 
            +
            rubygems_version: 3.1.6
         | 
| 141 141 | 
             
            signing_key: 
         | 
| 142 142 | 
             
            specification_version: 4
         | 
| 143 143 | 
             
            summary: Simple implementation of Trailblazer endpoint
         |