thermos 0.5.0 → 0.5.1
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/thermos/notifier.rb +1 -1
- data/lib/thermos/version.rb +1 -1
- data/test/thermos_test.rb +17 -0
- metadata +30 -30
    
        checksums.yaml
    CHANGED
    
    | @@ -1,7 +1,7 @@ | |
| 1 1 | 
             
            ---
         | 
| 2 2 | 
             
            SHA256:
         | 
| 3 | 
            -
              metadata.gz:  | 
| 4 | 
            -
              data.tar.gz:  | 
| 3 | 
            +
              metadata.gz: caef41475321f2d1d3286a253267f0138396addb93dda96774f3ce29502e42d4
         | 
| 4 | 
            +
              data.tar.gz: 0b347ad89c7cbd0082c801537270d5efd140db676131985f0c65625d27f3669f
         | 
| 5 5 | 
             
            SHA512:
         | 
| 6 | 
            -
              metadata.gz:  | 
| 7 | 
            -
              data.tar.gz:  | 
| 6 | 
            +
              metadata.gz: b2fcf8764757cbc90257a1b2f1a2c96aa2d39b117702b399ac9d44527e62a9bf14cf394344ffe3300d3513d88b0a9a18063696d299e282794edbcadf5d2bac9d
         | 
| 7 | 
            +
              data.tar.gz: 2c20039b4fe427402c3ab8dbfacc83266530c0d63e169055f574ae6a433d69a772a9b4d8aa097988bced9ebb6f0c5c532963f7b0ef85f57003dbc7eb1c5e6bd7
         | 
    
        data/lib/thermos/notifier.rb
    CHANGED
    
    
    
        data/lib/thermos/version.rb
    CHANGED
    
    
    
        data/test/thermos_test.rb
    CHANGED
    
    | @@ -111,6 +111,23 @@ class ThermosTest < ActiveSupport::TestCase | |
| 111 111 | 
             
                assert_raises(MockExpectationError) { mock.verify }
         | 
| 112 112 | 
             
              end
         | 
| 113 113 |  | 
| 114 | 
            +
              test "does not rebuild the cache on primary model destroy" do
         | 
| 115 | 
            +
                mock = Minitest::Mock.new
         | 
| 116 | 
            +
                category = categories(:baseball)
         | 
| 117 | 
            +
             | 
| 118 | 
            +
                Thermos.fill(key: "key", model: Category) do |id|
         | 
| 119 | 
            +
                  mock.call(id)
         | 
| 120 | 
            +
                end
         | 
| 121 | 
            +
             | 
| 122 | 
            +
                mock.expect(:call, 1, [category.id])
         | 
| 123 | 
            +
                assert_equal 1, Thermos.drink(key: "key", id: category.id)
         | 
| 124 | 
            +
                mock.verify
         | 
| 125 | 
            +
             | 
| 126 | 
            +
                mock.expect(:call, 2, [category.id])
         | 
| 127 | 
            +
                category.destroy!
         | 
| 128 | 
            +
                assert_raises(MockExpectationError) { mock.verify }
         | 
| 129 | 
            +
              end
         | 
| 130 | 
            +
             | 
| 114 131 | 
             
              test "pre-builds cache for new primary model records" do
         | 
| 115 132 | 
             
                mock = Minitest::Mock.new
         | 
| 116 133 |  | 
    
        metadata
    CHANGED
    
    | @@ -1,14 +1,14 @@ | |
| 1 1 | 
             
            --- !ruby/object:Gem::Specification
         | 
| 2 2 | 
             
            name: thermos
         | 
| 3 3 | 
             
            version: !ruby/object:Gem::Version
         | 
| 4 | 
            -
              version: 0.5. | 
| 4 | 
            +
              version: 0.5.1
         | 
| 5 5 | 
             
            platform: ruby
         | 
| 6 6 | 
             
            authors:
         | 
| 7 7 | 
             
            - Andrew Thal
         | 
| 8 8 | 
             
            autorequire: 
         | 
| 9 9 | 
             
            bindir: bin
         | 
| 10 10 | 
             
            cert_chain: []
         | 
| 11 | 
            -
            date: 2021- | 
| 11 | 
            +
            date: 2021-09-24 00:00:00.000000000 Z
         | 
| 12 12 | 
             
            dependencies:
         | 
| 13 13 | 
             
            - !ruby/object:Gem::Dependency
         | 
| 14 14 | 
             
              name: rails
         | 
| @@ -154,53 +154,53 @@ signing_key: | |
| 154 154 | 
             
            specification_version: 4
         | 
| 155 155 | 
             
            summary: Always-warm, auto-rebuilding rails caching without timers or touching.
         | 
| 156 156 | 
             
            test_files:
         | 
| 157 | 
            -
            - test/ | 
| 157 | 
            +
            - test/fixtures/category_items.yml
         | 
| 158 | 
            +
            - test/fixtures/stores.yml
         | 
| 158 159 | 
             
            - test/fixtures/categories.yml
         | 
| 159 160 | 
             
            - test/fixtures/products.yml
         | 
| 160 | 
            -
            - test/fixtures/stores.yml
         | 
| 161 | 
            -
            - test/fixtures/category_items.yml
         | 
| 162 161 | 
             
            - test/dummy/README.rdoc
         | 
| 163 | 
            -
            - test/dummy/ | 
| 162 | 
            +
            - test/dummy/public/404.html
         | 
| 163 | 
            +
            - test/dummy/public/422.html
         | 
| 164 | 
            +
            - test/dummy/public/500.html
         | 
| 165 | 
            +
            - test/dummy/public/favicon.ico
         | 
| 164 166 | 
             
            - test/dummy/Rakefile
         | 
| 165 | 
            -
            - test/dummy/db/schema.rb
         | 
| 166 | 
            -
            - test/dummy/db/migrate/20160325214744_create_categories.rb
         | 
| 167 | 
            -
            - test/dummy/db/migrate/20160326174530_create_stores.rb
         | 
| 168 | 
            -
            - test/dummy/db/migrate/20160325214849_create_products.rb
         | 
| 169 | 
            -
            - test/dummy/db/migrate/20160325220006_create_category_items.rb
         | 
| 170 | 
            -
            - test/dummy/config/environment.rb
         | 
| 171 | 
            -
            - test/dummy/config/secrets.yml
         | 
| 172 167 | 
             
            - test/dummy/config/application.rb
         | 
| 168 | 
            +
            - test/dummy/config/routes.rb
         | 
| 169 | 
            +
            - test/dummy/config/environments/production.rb
         | 
| 173 170 | 
             
            - test/dummy/config/environments/test.rb
         | 
| 174 171 | 
             
            - test/dummy/config/environments/development.rb
         | 
| 175 | 
            -
            - test/dummy/config/environments/production.rb
         | 
| 176 | 
            -
            - test/dummy/config/boot.rb
         | 
| 177 | 
            -
            - test/dummy/config/locales/en.yml
         | 
| 178 172 | 
             
            - test/dummy/config/database.yml
         | 
| 179 | 
            -
            - test/dummy/config/initializers/cookies_serializer.rb
         | 
| 180 | 
            -
            - test/dummy/config/initializers/assets.rb
         | 
| 181 173 | 
             
            - test/dummy/config/initializers/backtrace_silencers.rb
         | 
| 182 | 
            -
            - test/dummy/config/initializers/ | 
| 183 | 
            -
            - test/dummy/config/initializers/session_store.rb
         | 
| 174 | 
            +
            - test/dummy/config/initializers/assets.rb
         | 
| 184 175 | 
             
            - test/dummy/config/initializers/wrap_parameters.rb
         | 
| 185 176 | 
             
            - test/dummy/config/initializers/filter_parameter_logging.rb
         | 
| 177 | 
            +
            - test/dummy/config/initializers/session_store.rb
         | 
| 186 178 | 
             
            - test/dummy/config/initializers/inflections.rb
         | 
| 187 | 
            -
            - test/dummy/config/ | 
| 188 | 
            -
            - test/dummy/ | 
| 189 | 
            -
            - test/dummy/ | 
| 190 | 
            -
            - test/dummy/ | 
| 191 | 
            -
            - test/dummy/ | 
| 179 | 
            +
            - test/dummy/config/initializers/mime_types.rb
         | 
| 180 | 
            +
            - test/dummy/config/initializers/cookies_serializer.rb
         | 
| 181 | 
            +
            - test/dummy/config/locales/en.yml
         | 
| 182 | 
            +
            - test/dummy/config/environment.rb
         | 
| 183 | 
            +
            - test/dummy/config/secrets.yml
         | 
| 184 | 
            +
            - test/dummy/config/boot.rb
         | 
| 192 185 | 
             
            - test/dummy/app/models/category_item.rb
         | 
| 193 | 
            -
            - test/dummy/app/models/product.rb
         | 
| 194 186 | 
             
            - test/dummy/app/models/category.rb
         | 
| 195 187 | 
             
            - test/dummy/app/models/store.rb
         | 
| 196 | 
            -
            - test/dummy/app/ | 
| 188 | 
            +
            - test/dummy/app/models/product.rb
         | 
| 197 189 | 
             
            - test/dummy/app/views/layouts/application.html.erb
         | 
| 198 190 | 
             
            - test/dummy/app/assets/javascripts/application.js
         | 
| 199 191 | 
             
            - test/dummy/app/assets/stylesheets/application.css
         | 
| 200 192 | 
             
            - test/dummy/app/assets/config/manifest.js
         | 
| 201 193 | 
             
            - test/dummy/app/controllers/application_controller.rb
         | 
| 202 | 
            -
            - test/dummy/ | 
| 203 | 
            -
            - test/dummy/ | 
| 204 | 
            -
            - test/dummy/ | 
| 194 | 
            +
            - test/dummy/app/helpers/application_helper.rb
         | 
| 195 | 
            +
            - test/dummy/config.ru
         | 
| 196 | 
            +
            - test/dummy/db/migrate/20160325214849_create_products.rb
         | 
| 197 | 
            +
            - test/dummy/db/migrate/20160325220006_create_category_items.rb
         | 
| 198 | 
            +
            - test/dummy/db/migrate/20160326174530_create_stores.rb
         | 
| 199 | 
            +
            - test/dummy/db/migrate/20160325214744_create_categories.rb
         | 
| 200 | 
            +
            - test/dummy/db/schema.rb
         | 
| 205 201 | 
             
            - test/dummy/bin/rails
         | 
| 202 | 
            +
            - test/dummy/bin/rake
         | 
| 203 | 
            +
            - test/dummy/bin/bundle
         | 
| 204 | 
            +
            - test/dummy/bin/setup
         | 
| 205 | 
            +
            - test/thermos_test.rb
         | 
| 206 206 | 
             
            - test/test_helper.rb
         |