rubypitaya 3.2.0 → 3.3.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/lib/rubypitaya/app-template/Gemfile +1 -1
 - data/lib/rubypitaya/app-template/Gemfile.lock +2 -2
 - data/lib/rubypitaya/app-template/app/constants/status_codes.rb +1 -0
 - data/lib/rubypitaya/core/main.rb +8 -2
 - data/lib/rubypitaya/core/route_error.rb +13 -0
 - data/lib/rubypitaya/core/spec-helpers/handler_spec_helper.rb +8 -0
 - data/lib/rubypitaya/version.rb +1 -1
 - metadata +2 -1
 
    
        checksums.yaml
    CHANGED
    
    | 
         @@ -1,7 +1,7 @@ 
     | 
|
| 
       1 
1 
     | 
    
         
             
            ---
         
     | 
| 
       2 
2 
     | 
    
         
             
            SHA256:
         
     | 
| 
       3 
     | 
    
         
            -
              metadata.gz:  
     | 
| 
       4 
     | 
    
         
            -
              data.tar.gz:  
     | 
| 
      
 3 
     | 
    
         
            +
              metadata.gz: 94da55ebb23095e84bb7673c03c090c5e6d750258ab8a04861776e0f3bccd488
         
     | 
| 
      
 4 
     | 
    
         
            +
              data.tar.gz: b15065b35ab812d985d30bdd0b5ef073b739282632966c09a59e600bfc63b54c
         
     | 
| 
       5 
5 
     | 
    
         
             
            SHA512:
         
     | 
| 
       6 
     | 
    
         
            -
              metadata.gz:  
     | 
| 
       7 
     | 
    
         
            -
              data.tar.gz:  
     | 
| 
      
 6 
     | 
    
         
            +
              metadata.gz: c7355c105856b63dbd68f15c6181adfba4a5450b6f94c98444e431c1692ab3fddee02d8609dc28b3e3e9afd83792d1fd6197f22e3a7f41b88643551d23b9baa1
         
     | 
| 
      
 7 
     | 
    
         
            +
              data.tar.gz: cf3132334be52609395c0fde4bd1bacc27fe2335dcd75dc5cca27b73351d681145f9e9a5ddc422490809d848053524b59c30ff0149edfe2e0986cdc82700a9c1
         
     | 
| 
         @@ -103,7 +103,7 @@ GEM 
     | 
|
| 
       103 
103 
     | 
    
         
             
                  rspec-support (~> 3.10.0)
         
     | 
| 
       104 
104 
     | 
    
         
             
                rspec-support (3.10.3)
         
     | 
| 
       105 
105 
     | 
    
         
             
                ruby2_keywords (0.0.5)
         
     | 
| 
       106 
     | 
    
         
            -
                rubypitaya (3. 
     | 
| 
      
 106 
     | 
    
         
            +
                rubypitaya (3.3.3)
         
     | 
| 
       107 
107 
     | 
    
         
             
                  activerecord (= 6.1.4.1)
         
     | 
| 
       108 
108 
     | 
    
         
             
                  etcdv3 (= 0.11.4)
         
     | 
| 
       109 
109 
     | 
    
         
             
                  google-protobuf (= 3.18.1)
         
     | 
| 
         @@ -143,7 +143,7 @@ DEPENDENCIES 
     | 
|
| 
       143 
143 
     | 
    
         
             
              listen (= 3.7.0)
         
     | 
| 
       144 
144 
     | 
    
         
             
              pry (= 0.14.1)
         
     | 
| 
       145 
145 
     | 
    
         
             
              rspec (= 3.10.0)
         
     | 
| 
       146 
     | 
    
         
            -
              rubypitaya (= 3. 
     | 
| 
      
 146 
     | 
    
         
            +
              rubypitaya (= 3.3.3)
         
     | 
| 
       147 
147 
     | 
    
         
             
              sinatra-contrib (= 2.1.0)
         
     | 
| 
       148 
148 
     | 
    
         | 
| 
       149 
149 
     | 
    
         
             
            BUNDLED WITH
         
     | 
| 
         @@ -11,6 +11,7 @@ class StatusCodes 
     | 
|
| 
       11 
11 
     | 
    
         
             
              #
         
     | 
| 
       12 
12 
     | 
    
         
             
              #
         
     | 
| 
       13 
13 
     | 
    
         
             
              ## Error codes
         
     | 
| 
      
 14 
     | 
    
         
            +
              # RubyPitaya::StatusCodes::CODE_ERROR                = 'RP-201'
         
     | 
| 
       14 
15 
     | 
    
         
             
              # RubyPitaya::StatusCodes::CODE_UNKNOWN              = 'RP-000'
         
     | 
| 
       15 
16 
     | 
    
         
             
              # RubyPitaya::StatusCodes::CODE_HANDLER_NOT_FOUND    = 'RP-001'
         
     | 
| 
       16 
17 
     | 
    
         
             
              # RubyPitaya::StatusCodes::CODE_ACTION_NOT_FOUND     = 'RP-002'
         
     | 
    
        data/lib/rubypitaya/core/main.rb
    CHANGED
    
    | 
         @@ -10,6 +10,7 @@ require 'rubypitaya/core/session' 
     | 
|
| 
       10 
10 
     | 
    
         
             
            require 'rubypitaya/core/postman'
         
     | 
| 
       11 
11 
     | 
    
         
             
            require 'rubypitaya/core/parameters'
         
     | 
| 
       12 
12 
     | 
    
         
             
            require 'rubypitaya/core/http_routes'
         
     | 
| 
      
 13 
     | 
    
         
            +
            require 'rubypitaya/core/route_error'
         
     | 
| 
       13 
14 
     | 
    
         
             
            require 'rubypitaya/core/routes_base'
         
     | 
| 
       14 
15 
     | 
    
         
             
            require 'rubypitaya/core/status_codes'
         
     | 
| 
       15 
16 
     | 
    
         
             
            require 'rubypitaya/core/handler_router'
         
     | 
| 
         @@ -190,9 +191,14 @@ module RubyPitaya 
     | 
|
| 
       190 
191 
     | 
    
         | 
| 
       191 
192 
     | 
    
         
             
                    response
         
     | 
| 
       192 
193 
     | 
    
         
             
                  end
         
     | 
| 
      
 194 
     | 
    
         
            +
                  rescue RouteError => error
         
     | 
| 
      
 195 
     | 
    
         
            +
                    @log.error "ROUTE ERROR: #{error.class} | #{error.message}} \n #{error.backtrace.join("\n")}"
         
     | 
| 
      
 196 
     | 
    
         
            +
                    response = {
         
     | 
| 
      
 197 
     | 
    
         
            +
                      code: error.code,
         
     | 
| 
      
 198 
     | 
    
         
            +
                      message: error.message
         
     | 
| 
      
 199 
     | 
    
         
            +
                    }
         
     | 
| 
       193 
200 
     | 
    
         
             
                  rescue Exception => error
         
     | 
| 
       194 
     | 
    
         
            -
                    @log. 
     | 
| 
       195 
     | 
    
         
            -
                    @log.info error.backtrace.join("\n")
         
     | 
| 
      
 201 
     | 
    
         
            +
                    @log.error "INTERNAL ERROR: #{error.class} | #{error.message}} \n #{error.backtrace.join("\n")}"
         
     | 
| 
       196 
202 
     | 
    
         
             
                    run_nats_connection
         
     | 
| 
       197 
203 
     | 
    
         
             
                end
         
     | 
| 
       198 
204 
     | 
    
         
             
              end
         
     | 
    
        data/lib/rubypitaya/version.rb
    CHANGED
    
    
    
        metadata
    CHANGED
    
    | 
         @@ -1,7 +1,7 @@ 
     | 
|
| 
       1 
1 
     | 
    
         
             
            --- !ruby/object:Gem::Specification
         
     | 
| 
       2 
2 
     | 
    
         
             
            name: rubypitaya
         
     | 
| 
       3 
3 
     | 
    
         
             
            version: !ruby/object:Gem::Version
         
     | 
| 
       4 
     | 
    
         
            -
              version: 3. 
     | 
| 
      
 4 
     | 
    
         
            +
              version: 3.3.3
         
     | 
| 
       5 
5 
     | 
    
         
             
            platform: ruby
         
     | 
| 
       6 
6 
     | 
    
         
             
            authors:
         
     | 
| 
       7 
7 
     | 
    
         
             
            - Luciano Prestes Cavalcanti
         
     | 
| 
         @@ -358,6 +358,7 @@ files: 
     | 
|
| 
       358 
358 
     | 
    
         
             
            - "./lib/rubypitaya/core/protos/nats_connector.proto"
         
     | 
| 
       359 
359 
     | 
    
         
             
            - "./lib/rubypitaya/core/protos/nats_connector_pb.rb"
         
     | 
| 
       360 
360 
     | 
    
         
             
            - "./lib/rubypitaya/core/redis_connector.rb"
         
     | 
| 
      
 361 
     | 
    
         
            +
            - "./lib/rubypitaya/core/route_error.rb"
         
     | 
| 
       361 
362 
     | 
    
         
             
            - "./lib/rubypitaya/core/routes_base.rb"
         
     | 
| 
       362 
363 
     | 
    
         
             
            - "./lib/rubypitaya/core/session.rb"
         
     | 
| 
       363 
364 
     | 
    
         
             
            - "./lib/rubypitaya/core/setup.rb"
         
     |