camille 0.5.0 → 0.5.2
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/CHANGELOG.md +13 -0
- data/Gemfile.lock +2 -2
- data/README.md +4 -0
- data/lib/camille/endpoint.rb +1 -3
- data/lib/camille/types/string.rb +1 -1
- data/lib/camille/types/union.rb +1 -1
- data/lib/camille/version.rb +1 -1
- 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: a5d2a7ffaa4c7361b74237e051c928076a5d67b1e05629804c7fa1ab28af76e3
         | 
| 4 | 
            +
              data.tar.gz: 8b341b964c8a3527f5ab0b11565bb1cbf12b525413f4eec0bba2e4292551528e
         | 
| 5 5 | 
             
            SHA512:
         | 
| 6 | 
            -
              metadata.gz:  | 
| 7 | 
            -
              data.tar.gz:  | 
| 6 | 
            +
              metadata.gz: c2dbd934c66958f439dd803a0ca7bdc43c19089d4b5a303a644644be2e6ef021937be9b2b7c95a7e929d044b33f28fd12be9056578c5151bb9c6694f875b53c6
         | 
| 7 | 
            +
              data.tar.gz: 5c63fe09fd9080e6995db273891dabb3ca90c417c488f58488ae32d1a5d84ad72e7804ad45fbcbfa77685195ca6e4d54f6d3bb693b10762bccfbc4686e487179
         | 
    
        data/CHANGELOG.md
    CHANGED
    
    | @@ -1,5 +1,18 @@ | |
| 1 1 | 
             
            # Changelog
         | 
| 2 2 |  | 
| 3 | 
            +
            ## 0.5.2
         | 
| 4 | 
            +
             | 
| 5 | 
            +
            ### Added
         | 
| 6 | 
            +
             | 
| 7 | 
            +
            * Symbols are now accepted in string types
         | 
| 8 | 
            +
            * When omitted, the response type of an endpoint will now have the default `{}`
         | 
| 9 | 
            +
             | 
| 10 | 
            +
            ## 0.5.1
         | 
| 11 | 
            +
             | 
| 12 | 
            +
            ### Fixed
         | 
| 13 | 
            +
             | 
| 14 | 
            +
            * Fixed the wrong error returned for `union.left`
         | 
| 15 | 
            +
             | 
| 3 16 | 
             
            ## 0.5.0
         | 
| 4 17 |  | 
| 5 18 | 
             
            ### Changed
         | 
    
        data/Gemfile.lock
    CHANGED
    
    | @@ -1,7 +1,7 @@ | |
| 1 1 | 
             
            PATH
         | 
| 2 2 | 
             
              remote: .
         | 
| 3 3 | 
             
              specs:
         | 
| 4 | 
            -
                camille (0. | 
| 4 | 
            +
                camille (0.5.1)
         | 
| 5 5 | 
             
                  rails (>= 6.1, < 8)
         | 
| 6 6 |  | 
| 7 7 | 
             
            GEM
         | 
| @@ -103,7 +103,7 @@ GEM | |
| 103 103 | 
             
                  timeout
         | 
| 104 104 | 
             
                net-smtp (0.3.3)
         | 
| 105 105 | 
             
                  net-protocol
         | 
| 106 | 
            -
                nio4r (2.5. | 
| 106 | 
            +
                nio4r (2.5.9)
         | 
| 107 107 | 
             
                nokogiri (1.14.2-x86_64-linux)
         | 
| 108 108 | 
             
                  racc (~> 1.4)
         | 
| 109 109 | 
             
                racc (1.6.2)
         | 
    
        data/README.md
    CHANGED
    
    | @@ -29,6 +29,10 @@ Therefore, if the front-end requests the API by calling `data`, we have guarante | |
| 29 29 |  | 
| 30 30 | 
             
            By using these request functions, we also don't need to know about HTTP verbs and paths. It's impossible to have unrecognized routes, since Camille will make sure that each function handled by the correct Rails action.
         | 
| 31 31 |  | 
| 32 | 
            +
            ## Tutorial
         | 
| 33 | 
            +
             | 
| 34 | 
            +
            There's a step by step tutorial for setting up and showcasing Camille: https://github.com/onyxblade/camille-tutorial.
         | 
| 35 | 
            +
             | 
| 32 36 | 
             
            ## Installation
         | 
| 33 37 |  | 
| 34 38 | 
             
            Add this line to your application's Gemfile:
         | 
    
        data/lib/camille/endpoint.rb
    CHANGED
    
    | @@ -12,9 +12,7 @@ module Camille | |
| 12 12 | 
             
                end
         | 
| 13 13 |  | 
| 14 14 | 
             
                def signature
         | 
| 15 | 
            -
                   | 
| 16 | 
            -
                    raise UnknownResponseError.new("Endpoint lacking a `response` definition.")
         | 
| 17 | 
            -
                  end
         | 
| 15 | 
            +
                  @response_type ||= Camille::Types::Object.new({})
         | 
| 18 16 | 
             
                  if @params_type
         | 
| 19 17 | 
             
                    "#{ActiveSupport::Inflector.camelize @name, false}(params: #{@params_type.literal}): Promise<#{@response_type.literal}>"
         | 
| 20 18 | 
             
                  else
         | 
    
        data/lib/camille/types/string.rb
    CHANGED
    
    
    
        data/lib/camille/types/union.rb
    CHANGED
    
    
    
        data/lib/camille/version.rb
    CHANGED
    
    
    
        metadata
    CHANGED
    
    | @@ -1,14 +1,14 @@ | |
| 1 1 | 
             
            --- !ruby/object:Gem::Specification
         | 
| 2 2 | 
             
            name: camille
         | 
| 3 3 | 
             
            version: !ruby/object:Gem::Version
         | 
| 4 | 
            -
              version: 0.5. | 
| 4 | 
            +
              version: 0.5.2
         | 
| 5 5 | 
             
            platform: ruby
         | 
| 6 6 | 
             
            authors:
         | 
| 7 7 | 
             
            - 辻彩
         | 
| 8 8 | 
             
            autorequire: 
         | 
| 9 9 | 
             
            bindir: exe
         | 
| 10 10 | 
             
            cert_chain: []
         | 
| 11 | 
            -
            date: 2023- | 
| 11 | 
            +
            date: 2023-05-06 00:00:00.000000000 Z
         | 
| 12 12 | 
             
            dependencies:
         | 
| 13 13 | 
             
            - !ruby/object:Gem::Dependency
         | 
| 14 14 | 
             
              name: rails
         | 
| @@ -110,7 +110,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement | |
| 110 110 | 
             
                - !ruby/object:Gem::Version
         | 
| 111 111 | 
             
                  version: '0'
         | 
| 112 112 | 
             
            requirements: []
         | 
| 113 | 
            -
            rubygems_version: 3. | 
| 113 | 
            +
            rubygems_version: 3.2.33
         | 
| 114 114 | 
             
            signing_key: 
         | 
| 115 115 | 
             
            specification_version: 4
         | 
| 116 116 | 
             
            summary: Typed API schema for Rails with TypeScript codegen
         |