transition_through 1.0.0.pre.rc.1 → 1.0.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 +4 -4
- data/README.md +15 -0
- data/lib/transition_through/version.rb +1 -1
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 0d41241876048696d75e8385c63202cb72388eff35471a01a4e5501254f97b3d
|
4
|
+
data.tar.gz: 9c5dcb7d15d133d6f128d037bf2769ecf66d0fea596832fc72f5813cccc0157c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5bf54daf3b5d0e04e7f9653cfd3d7dbf3ef3e582ffed4e6a6f01bc982214090ddccf953a4da9187a1683d7fac404ad848a1c3f1b347b27062587c0d08970e5cc
|
7
|
+
data.tar.gz: de27354247781e9728b735cf5864c42e775c7496bcccf392b0c65daca1710a6f84fe4b78e3307697a73d6d59eea70c74cc3114233d95406fe5f17dd57408b10b
|
data/README.md
CHANGED
@@ -51,8 +51,23 @@ it 'should transition through' do
|
|
51
51
|
|
52
52
|
expect { count.call }.to transition { counter.count }.through [0, 1, 4, 2, 0]
|
53
53
|
end
|
54
|
+
|
55
|
+
it 'should transition nowhere' do
|
56
|
+
counter = Counter.new
|
57
|
+
count = -> {}
|
58
|
+
|
59
|
+
expect { count.call }.to transition { counter.count }.nowhere
|
60
|
+
end
|
54
61
|
```
|
55
62
|
|
63
|
+
## Note on instance variables
|
64
|
+
|
65
|
+
Currently, mutating state through an instance variable is not supported. This
|
66
|
+
due to the fact that instance variables cannot be observed for changes like an
|
67
|
+
accessor can. For more information, see [the tests](https://github.com/keygen-sh/transition_through/blob/d2c6b685e4959d08e70bb5012af98fa01fcdebef/spec/transition_through_spec.rb#L8-L21).
|
68
|
+
|
69
|
+
If you know of a way to support ivars, please open an issue or PR.
|
70
|
+
|
56
71
|
## Supported Rubies
|
57
72
|
|
58
73
|
**`transition_through` supports Ruby 3.1 and above.** We encourage you to upgrade
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: transition_through
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.0
|
4
|
+
version: 1.0.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Zeke Gabrielse
|
@@ -81,7 +81,7 @@ dependencies:
|
|
81
81
|
- !ruby/object:Gem::Version
|
82
82
|
version: '0'
|
83
83
|
description: Assert state changes through multiple values for an object, enabling
|
84
|
-
you to test complex state transitions in sequence.
|
84
|
+
you to test complex state transitions in sequence with RSpec.
|
85
85
|
email:
|
86
86
|
- oss@keygen.sh
|
87
87
|
executables: []
|
@@ -113,9 +113,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
113
113
|
version: '3.1'
|
114
114
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
115
115
|
requirements:
|
116
|
-
- - "
|
116
|
+
- - ">="
|
117
117
|
- !ruby/object:Gem::Version
|
118
|
-
version:
|
118
|
+
version: '0'
|
119
119
|
requirements: []
|
120
120
|
rubygems_version: 3.4.13
|
121
121
|
signing_key:
|