petruchio 0.1.3 → 0.1.4
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 +5 -1
- data/Gemfile +1 -0
- data/Gemfile.lock +2 -0
- data/README.md +15 -1
- data/lib/petruchio/version.rb +1 -1
- metadata +17 -3
    
        checksums.yaml
    CHANGED
    
    | @@ -1,7 +1,7 @@ | |
| 1 1 | 
             
            ---
         | 
| 2 2 | 
             
            SHA256:
         | 
| 3 | 
            -
              metadata.gz:  | 
| 4 | 
            -
              data.tar.gz:  | 
| 3 | 
            +
              metadata.gz: b0b76420612d0f0c0d5250b803c126ff590b02b099e438ba876e84627f42f5e5
         | 
| 4 | 
            +
              data.tar.gz: 89510a71c6a0d3548230f3539785f67e72fccff74177d61cf709addc50928e14
         | 
| 5 5 | 
             
            SHA512:
         | 
| 6 | 
            -
              metadata.gz:  | 
| 7 | 
            -
              data.tar.gz:  | 
| 6 | 
            +
              metadata.gz: 4d3c0f634e0a3225b8e3074257c80567118c7bddd85d833edc088e90f003edb82cc5fd393d385b22e27c62fa2187cf45b90d706a18af6c8a021636c8575e9c82
         | 
| 7 | 
            +
              data.tar.gz: b9526399d64a7432eba25e40200cffd7afbd45d6013d1541d7b306e26fad74879122ef33055638cd8465fc9eb99696ab8513ffb23d21a6a112d86dc5504b8901
         | 
    
        data/CHANGELOG.md
    CHANGED
    
    
    
        data/Gemfile
    CHANGED
    
    
    
        data/Gemfile.lock
    CHANGED
    
    
    
        data/README.md
    CHANGED
    
    | @@ -40,7 +40,21 @@ push will add the newest things: | |
| 40 40 | 
             
            @ring.push(future_request_time.to_f)
         | 
| 41 41 | 
             
            ```
         | 
| 42 42 |  | 
| 43 | 
            -
            ( | 
| 43 | 
            +
            The buffer doesn't monitor its own constant size (i.e. it won't currently raise an error if you push to a full buffer). So you could push and pop simultaneously.
         | 
| 44 | 
            +
             | 
| 45 | 
            +
            ```ruby
         | 
| 46 | 
            +
            previous_request_time = @ring.push_pop(future_request_time.to_f)
         | 
| 47 | 
            +
            ```
         | 
| 48 | 
            +
             | 
| 49 | 
            +
            Or lock around your push/pop operations. (And if you need a lock [stay tuned](https://github.com/sutrolabs))
         | 
| 50 | 
            +
             | 
| 51 | 
            +
             | 
| 52 | 
            +
            ## Todos
         | 
| 53 | 
            +
             | 
| 54 | 
            +
            Potentially nice things this could have:
         | 
| 55 | 
            +
             | 
| 56 | 
            +
            - Error when trying to add to the buffer and its full
         | 
| 57 | 
            +
            - Force push to the buffer
         | 
| 44 58 |  | 
| 45 59 | 
             
            ## License
         | 
| 46 60 |  | 
    
        data/lib/petruchio/version.rb
    CHANGED
    
    
    
        metadata
    CHANGED
    
    | @@ -1,15 +1,29 @@ | |
| 1 1 | 
             
            --- !ruby/object:Gem::Specification
         | 
| 2 2 | 
             
            name: petruchio
         | 
| 3 3 | 
             
            version: !ruby/object:Gem::Version
         | 
| 4 | 
            -
              version: 0.1. | 
| 4 | 
            +
              version: 0.1.4
         | 
| 5 5 | 
             
            platform: ruby
         | 
| 6 6 | 
             
            authors:
         | 
| 7 7 | 
             
            - n8
         | 
| 8 8 | 
             
            autorequire: 
         | 
| 9 9 | 
             
            bindir: bin
         | 
| 10 10 | 
             
            cert_chain: []
         | 
| 11 | 
            -
            date: 2023- | 
| 12 | 
            -
            dependencies: | 
| 11 | 
            +
            date: 2023-02-02 00:00:00.000000000 Z
         | 
| 12 | 
            +
            dependencies:
         | 
| 13 | 
            +
            - !ruby/object:Gem::Dependency
         | 
| 14 | 
            +
              name: redis
         | 
| 15 | 
            +
              requirement: !ruby/object:Gem::Requirement
         | 
| 16 | 
            +
                requirements:
         | 
| 17 | 
            +
                - - ">="
         | 
| 18 | 
            +
                  - !ruby/object:Gem::Version
         | 
| 19 | 
            +
                    version: '0'
         | 
| 20 | 
            +
              type: :runtime
         | 
| 21 | 
            +
              prerelease: false
         | 
| 22 | 
            +
              version_requirements: !ruby/object:Gem::Requirement
         | 
| 23 | 
            +
                requirements:
         | 
| 24 | 
            +
                - - ">="
         | 
| 25 | 
            +
                  - !ruby/object:Gem::Version
         | 
| 26 | 
            +
                    version: '0'
         | 
| 13 27 | 
             
            description: Redis makes a great shared ring buffer
         | 
| 14 28 | 
             
            email:
         | 
| 15 29 | 
             
            - nate@getcensus.com
         |