toolcase 0.2.0 → 0.3.0

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 42ab4cde5229fee97fb5723d029c109caa0f20932fa4b9e6dbc17e7a1aec22ed
4
- data.tar.gz: 5bb7a33c4b6c9ec54c5d456d705f78a4ec1b642bba831428daa78b32357733a5
3
+ metadata.gz: f099f2193339ea7d0f31bb988a30b282133bc4e4b0310e63b4a7c7467ed282b2
4
+ data.tar.gz: 47299ea8eca5e21633d93df94928b85dd6236c0434eb7baf094944e42930a8cc
5
5
  SHA512:
6
- metadata.gz: 229e6fc407eae590b1403245be100df24839c66614e3dfcbaccb9fc43365eb35286e0e494d7f453e25e5ffec0bc29146474caf01a1c60cd1c67a2956d513cb27
7
- data.tar.gz: 4668874433002a46ed9b173b1d3e8735500d0c64513b8ed42d1c3a19147fc3b8fcdddeb3a62b9d00f296244d2cc81c513b366c6cc79680cac770d38a28a36655
6
+ metadata.gz: 511d82c8b0fe08718bdd95f8acb8ca5fbe5a4f91ec927d5c9fd90a95ef2997536642c422675cd599306d6d5c00cf086275bcdf08aa124bebd5dd34e4e376e49e
7
+ data.tar.gz: 322680fd34075024744fc159978c18af956da80b37fbc00304eadb41c0ef7d171f5fac247e85034b00b92a1abfce8f3274090d4028fb3a4cc2cec92de325a964
data/README.md CHANGED
@@ -104,6 +104,13 @@ Factory.remove(:windows)
104
104
  Factory.remove(Windows)
105
105
  ```
106
106
 
107
+ A registry can be cleared completely or by tag.
108
+
109
+ ```ruby
110
+ Factory.clear(:linux)
111
+ Factory.clear
112
+ ```
113
+
107
114
  ## Development
108
115
 
109
116
  After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake test` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
@@ -57,6 +57,10 @@ module Toolcase
57
57
  end
58
58
  end
59
59
 
60
+ def clear(tag = nil)
61
+ registries(tag).each { |object| remove(object) }
62
+ end
63
+
60
64
  def inherited(child)
61
65
  super
62
66
  child.elements.concat(registries)
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Toolcase
4
- VERSION = "0.2.0"
4
+ VERSION = "0.3.0"
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: toolcase
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.3.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - enchf
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-12-29 00:00:00.000000000 Z
11
+ date: 2022-01-12 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: byebug