dememoize 0.1.0 → 0.1.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (4) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +10 -6
  3. data/lib/dememoize/version.rb +1 -1
  4. metadata +6 -6
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 8c7f5057cf01e4f06611fad7b1545f4594adcd564b8b094563c9eeee6e278628
4
- data.tar.gz: db3ce11f1c3fc50f9bd35ad37992114730acdcd130dd102110fb7e7ad99db0c2
3
+ metadata.gz: 478ee9dc606d1071d51654a8507f42a4257b8aa1e8ef7020142261c49f76ccfd
4
+ data.tar.gz: 25155f81d698bbd35483c818f6e9b5c4b63a930160d39c8039f7b4d3b7ea99fa
5
5
  SHA512:
6
- metadata.gz: ab5799fb52990b8d84280542a29cb73d04a6d77bbc71e17f7a706262ac0620868b74f6d605c67c03e78947fb08bb6896b2c5c3b43790c28e5c77e27347f32dc7
7
- data.tar.gz: b07ab5360ea302854486dc6bf27b1b13de458394733eb2448b086b3be088853de00cd19cae2a629ff948c0395e63b3b137cf92748fb0bf764956f000efeb6277
6
+ metadata.gz: 7776192404efb2958fd6937afa10f9f1da70b0b3a0c9ab740dc0edcd193a39c903159ec91adc7a1a3f872ec45e2ac325240599830abe6fb5da092ea9eb0527d6
7
+ data.tar.gz: e1a0aa9736c24468cebe70956e61480c0dab9e8cf8f4ee9a90f3e2dfe7d79f0ec3e45efd9affe8d6230583ccc1398418542e9d104a82bf3e5b123b2e34abea1d
data/README.md CHANGED
@@ -1,17 +1,19 @@
1
1
  dememoize
2
2
  =========
3
3
 
4
- [![Gem Version](https://badge.fury.io/rb/dememoize.svg)](https://badge.fury.io/rb/dememoize)
4
+ [![Gem Version](https://img.shields.io/gem/v/dememoize?color=green)](https://rubygems.org/gems/dememoize)
5
+ [![specs workflow](https://github.com/hlascelles/dememoize/actions/workflows/specs.yml/badge.svg)](https://github.com/hlascelles/dememoize/actions)
6
+ [![License](https://img.shields.io/badge/License-MIT-blue.svg)](https://opensource.org/licenses/MIT)
5
7
 
6
8
  ## Description
7
9
 
8
- `dememoize` is a gem that provides a method to remove a memoized value (an instance variable) from a
10
+ `dememoize` is a gem that provides a way to remove a memoized value (an instance variable) from a
9
11
  class or an object instance.
10
12
 
11
13
  The primary use case is usage in spec tests. If you have a code that memoizes a value, but you
12
14
  would like to check that the value is calculated differently under different circumstances, you can
13
15
  use `dememoize` to remove the memoized value, leaving you free to add another spec that can check
14
- the value again.
16
+ the value again. There are rspec shared contexts that can help you with this.
15
17
 
16
18
  eg:
17
19
 
@@ -42,10 +44,12 @@ end
42
44
 
43
45
  ## Installation
44
46
 
45
- Add this line to your application's Gemfile:
47
+ Add this line to your application's Gemfile, probably in the `:test` group:
46
48
 
47
49
  ```ruby
48
- gem 'dememoize'
50
+ group :test do
51
+ gem "dememoize"
52
+ end
49
53
  ```
50
54
 
51
55
  ## Simple usage
@@ -111,7 +115,7 @@ end
111
115
  # first argument to dememoized.
112
116
 
113
117
  describe "specify a different class (Bar) to dememoize" do
114
- include_context "with dememoized class variable", :@categories, Bar # <-- Bar is the class
118
+ include_context "with dememoized class variable", :@categories, clazz: Bar # <-- Bar is the class
115
119
  # ...
116
120
  end
117
121
  ```
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Dememoize
4
- VERSION = "0.1.0"
4
+ VERSION = "0.1.1"
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: dememoize
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Harry Lascelles
8
- autorequire:
8
+ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-01-18 00:00:00.000000000 Z
11
+ date: 2024-05-11 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: fasterer
@@ -145,7 +145,7 @@ metadata:
145
145
  source_code_uri: https://github.com/hlascelles/dememoize/
146
146
  bug_tracker_uri: https://github.com/hlascelles/dememoize/issues
147
147
  rubygems_mfa_required: 'true'
148
- post_install_message:
148
+ post_install_message:
149
149
  rdoc_options: []
150
150
  require_paths:
151
151
  - lib
@@ -160,8 +160,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
160
160
  - !ruby/object:Gem::Version
161
161
  version: '0'
162
162
  requirements: []
163
- rubygems_version: 3.1.6
164
- signing_key:
163
+ rubygems_version: 3.5.9
164
+ signing_key:
165
165
  specification_version: 4
166
166
  summary: A gem to clean up memoization
167
167
  test_files: []