trailblazer-context 0.5.0 → 0.5.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: f2f68ea3324607256a507718188b38dcb7d0252f17bf49221b97b5e62be4d252
4
- data.tar.gz: 6841b846db299f4c21352f03703c3b8780539e2eb59efbadf0bd1ecd780bb0d8
3
+ metadata.gz: 5c491d5456a100bdb4853e02af240d56039864b7589e576db32f82f1683375e6
4
+ data.tar.gz: 0f4b8b205289cb71b2cb7bca8e562312bb184e681e501af6741e37a82b7ff298
5
5
  SHA512:
6
- metadata.gz: d1ec16cbdba1cfeca1f3820e188dc5c8b449ff0295ee8849f5509297123b5c8b5046a9265206dff83051457e42aa7a7771387c82a4dfb5da6be9b2d93387b3aa
7
- data.tar.gz: ee014562e35ad36355a8e62f18b8e8c2e497c86014aabac143ef308099e1f79f0b740d3f3e78fdeb0d9e5155b440ddb31e7f945da02fd48fc42eba1d7197f681
6
+ metadata.gz: 022fccd76fa9936a7fd0b80070d703cd2f64f5cf7c96c03831d06e7160cf8d2b2581cfa3debaab6bcb106208f91cb9ff5db2a7e7957aab388cdbdc5ccc1c9f9e
7
+ data.tar.gz: 1ff63b11983902dbd79630be7535095f62812d7522378fff42944bd291ad5e2b7dce55d4b7e985b9ae575f488d65109dcbac2886c51e548f3061095bb54e9a34
data/CHANGES.md CHANGED
@@ -1,3 +1,7 @@
1
+ # 0.5.1
2
+
3
+ * Fix `ctx.delete` to return the value being deleted.
4
+
1
5
  # 0.5.0
2
6
 
3
7
  * Extracted `Option` into its own repository, `trailblazer-option` ✨
@@ -50,8 +50,8 @@ module Trailblazer
50
50
  alias_method :store, :[]=
51
51
 
52
52
  def delete(key)
53
- @replica.delete(key)
54
53
  @mutable_options.delete(key)
54
+ @replica.delete(key)
55
55
  end
56
56
 
57
57
  def merge(other_hash)
@@ -1,5 +1,5 @@
1
1
  module Trailblazer
2
2
  module Context
3
- VERSION = "0.5.0"
3
+ VERSION = "0.5.1"
4
4
  end
5
5
  end
data/test/context_test.rb CHANGED
@@ -123,8 +123,9 @@ class ContextWithIndifferentAccessTest < Minitest::Spec
123
123
 
124
124
  # delete
125
125
  ctx[:model] = Object
126
- ctx.delete 'model'
126
+ value = ctx.delete 'model'
127
127
 
128
+ _(value).must_equal Object
128
129
  _(ctx.key?(:model)).must_equal false
129
130
  _(ctx.key?("model")).must_equal false
130
131
 
@@ -202,8 +203,9 @@ class ContextWithIndifferentAccessTest < Minitest::Spec
202
203
 
203
204
  # delete
204
205
  ctx[:result] = Object
205
- ctx.delete :result
206
+ value = ctx.delete :result
206
207
 
208
+ _(value).must_equal Object
207
209
  _(ctx.key?(:result)).must_equal false
208
210
  _(ctx.key?("result")).must_equal false
209
211
 
@@ -9,7 +9,7 @@ Gem::Specification.new do |spec|
9
9
  spec.email = ["apotonick@gmail.com"]
10
10
 
11
11
  spec.summary = "Argument-specific data structures for Trailblazer."
12
- spec.description = "Argument-specific data structures for Trailblazer such as Context, Option and ContainerChain."
12
+ spec.description = "Argument-specific data structures for Trailblazer such as Context and ContainerChain."
13
13
  spec.homepage = "https://trailblazer.to/"
14
14
  spec.licenses = ["MIT"]
15
15
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: trailblazer-context
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.0
4
+ version: 0.5.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Nick Sutterer
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-04-10 00:00:00.000000000 Z
11
+ date: 2022-10-09 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: hashie
@@ -66,8 +66,8 @@ dependencies:
66
66
  - - ">="
67
67
  - !ruby/object:Gem::Version
68
68
  version: '0'
69
- description: Argument-specific data structures for Trailblazer such as Context, Option
70
- and ContainerChain.
69
+ description: Argument-specific data structures for Trailblazer such as Context and
70
+ ContainerChain.
71
71
  email:
72
72
  - apotonick@gmail.com
73
73
  executables: []
@@ -113,7 +113,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
113
113
  - !ruby/object:Gem::Version
114
114
  version: '0'
115
115
  requirements: []
116
- rubygems_version: 3.0.8
116
+ rubygems_version: 3.3.18
117
117
  signing_key:
118
118
  specification_version: 4
119
119
  summary: Argument-specific data structures for Trailblazer.