stateful.rb 2.3.2 → 2.3.4
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/CHANGELOG.md +22 -0
- data/LICENSE +21 -0
- data/README.md +7 -2
- data/lib/Stateful/VERSION.rb +1 -1
- data/lib/Stateful.rb +2 -0
- data/stateful.rb.gemspec +1 -0
- data/test/Stateful.rb +2 -0
- data/test/VERSION.rb +25 -0
- metadata +4 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 76836b904757327dca9d69e1938022b78f22b7eba4883d631662b90a7c73f092
|
|
4
|
+
data.tar.gz: 3eeffc4c8bab601de3a158a562f7f4cb9847b014af3a5099edb7e37c0edd0557
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: f667aceca2eb2a708cd7b6a41e7e246a14d5dea2944ccf28c75762492046f93fea0d3f979d40b6fca91584e8bdb11bab39b123858ca393ccb08e2c0ffa02c252
|
|
7
|
+
data.tar.gz: f268873ad0d04c7437f1ad55158acf6ad8b3d7c0e2a1cd4dd5ae2d2ae450600041039d31e9fda1c33346e500bfbe5a34c364807af6ffa665fe4ce64b34c68084
|
data/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,27 @@
|
|
|
1
1
|
# stateful/CHANGELOG.md
|
|
2
2
|
|
|
3
|
+
## 2.3.4 (20260910): ~ lib/Stateful.rb: + require_relative File.join('Stateful', 'VERSION'); + test/VERSION.rb
|
|
4
|
+
----------------------------------------------------------------------------------------------------
|
|
5
|
+
|
|
6
|
+
### +
|
|
7
|
+
1. test/VERSION.rb: that Stateful::VERSION is a string, that it is three numbers separated by dots, and that it matches the newest entry in the changelog. Modelled on moby's, which is where the convention comes from. The test loads the library rather than VERSION.rb, which is the whole of its value: run against v2.3.3 it fails with "uninitialized constant Stateful::VERSION".
|
|
8
|
+
|
|
9
|
+
### ~
|
|
10
|
+
1. lib/Stateful.rb: + `require_relative File.join('Stateful', 'VERSION')`. The file has been present and unreached, so `require 'stateful.rb'` left Stateful::VERSION undefined and the gemspec was the only thing loading it.
|
|
11
|
+
2. test/Stateful.rb: + `require_relative 'VERSION'`, the runner globbing only the three persistence directories.
|
|
12
|
+
3. Stateful::VERSION: /2.3.3/2.3.4/
|
|
13
|
+
|
|
14
|
+
## 2.3.3 (20260822): + LICENSE, and correct the README.
|
|
15
|
+
-----------------------------------------------------------------------------------------------------------------------
|
|
16
|
+
### +
|
|
17
|
+
1. LICENSE: the MIT text, copyright 2014-2026 thoran. The gemspec has declared MIT while the repository carried no licence text at all.
|
|
18
|
+
2. README.md: a License section, saying MIT, last.
|
|
19
|
+
### ~
|
|
20
|
+
1. stateful.rb.gemspec: + 'LICENSE' to spec.files, so the gem carries what the declaration claims.
|
|
21
|
+
2. README.md: /thoran\/Stateful/thoran\/stateful/ in the mruby install line, the repository having been renamed.
|
|
22
|
+
3. README.md: /### 6. Multiple state machines per class/### 8. Multiple state machines per class/, the sequence having run 1 to 7 and then 6 again.
|
|
23
|
+
4. lib/Stateful/VERSION.rb: /2.3.2/2.3.3/
|
|
24
|
+
|
|
3
25
|
## 2.3.2 (20260418): Add Sequel examples to README.
|
|
4
26
|
-----------------------------------------------------------------------------------------------------------------------
|
|
5
27
|
|
data/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2014-2026 thoran
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
data/README.md
CHANGED
|
@@ -31,7 +31,7 @@ $ gem install stateful.rb
|
|
|
31
31
|
Add this to your `build_config.rb`:
|
|
32
32
|
|
|
33
33
|
```ruby
|
|
34
|
-
conf.gem github: 'thoran/
|
|
34
|
+
conf.gem github: 'thoran/stateful'
|
|
35
35
|
```
|
|
36
36
|
|
|
37
37
|
## Usage
|
|
@@ -247,7 +247,7 @@ active_record_machine.final_state?
|
|
|
247
247
|
# => false
|
|
248
248
|
```
|
|
249
249
|
|
|
250
|
-
###
|
|
250
|
+
### 8. Multiple state machines per class
|
|
251
251
|
|
|
252
252
|
A single class can have multiple independent (orthogonal) state machines. Each machine gets its own namespaced methods, while domain predicates and event methods remain unnamespaced.
|
|
253
253
|
|
|
@@ -365,3 +365,8 @@ For Poro, each machine uses an instance variable named `@<machine_name>_state`.
|
|
|
365
365
|
3. Commit your changes: `git commit -am 'Add some feature'`
|
|
366
366
|
4. Push to the branch: `git push origin my-new-feature`
|
|
367
367
|
5. Create a new pull request
|
|
368
|
+
|
|
369
|
+
|
|
370
|
+
## License
|
|
371
|
+
|
|
372
|
+
MIT
|
data/lib/Stateful/VERSION.rb
CHANGED
data/lib/Stateful.rb
CHANGED
data/stateful.rb.gemspec
CHANGED
data/test/Stateful.rb
CHANGED
data/test/VERSION.rb
ADDED
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
# test/VERSION.rb
|
|
2
|
+
|
|
3
|
+
gem 'minitest'
|
|
4
|
+
gem 'minitest-spec-context'
|
|
5
|
+
|
|
6
|
+
require 'minitest/autorun'
|
|
7
|
+
require 'minitest-spec-context'
|
|
8
|
+
require_relative '../lib/Stateful'
|
|
9
|
+
|
|
10
|
+
describe Stateful do
|
|
11
|
+
describe "VERSION" do
|
|
12
|
+
it "is a string" do
|
|
13
|
+
_(Stateful::VERSION).must_be_instance_of String
|
|
14
|
+
end
|
|
15
|
+
|
|
16
|
+
it "is three numbers separated by dots" do
|
|
17
|
+
_(Stateful::VERSION).must_match(/\A\d+\.\d+\.\d+\z/)
|
|
18
|
+
end
|
|
19
|
+
|
|
20
|
+
it "matches the newest entry in the CHANGELOG" do
|
|
21
|
+
changelog = File.read(File.expand_path('../CHANGELOG.md', __dir__))
|
|
22
|
+
_(changelog[/^## (\d+\.\d+\.\d+) \(/, 1]).must_equal Stateful::VERSION
|
|
23
|
+
end
|
|
24
|
+
end
|
|
25
|
+
end
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: stateful.rb
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 2.3.
|
|
4
|
+
version: 2.3.4
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- thoran
|
|
@@ -87,6 +87,7 @@ extra_rdoc_files: []
|
|
|
87
87
|
files:
|
|
88
88
|
- CHANGELOG.md
|
|
89
89
|
- Gemfile
|
|
90
|
+
- LICENSE
|
|
90
91
|
- README.md
|
|
91
92
|
- lib/Stateful.rb
|
|
92
93
|
- lib/Stateful/ActiveRecord.rb
|
|
@@ -147,6 +148,7 @@ files:
|
|
|
147
148
|
- test/Sequel/WithPersistenceSpecificExtendAndStatefulBlock.rb
|
|
148
149
|
- test/Sequel/test_helper.rb
|
|
149
150
|
- test/Stateful.rb
|
|
151
|
+
- test/VERSION.rb
|
|
150
152
|
homepage: http://github.com/thoran/stateful
|
|
151
153
|
licenses:
|
|
152
154
|
- MIT
|
|
@@ -165,7 +167,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
165
167
|
- !ruby/object:Gem::Version
|
|
166
168
|
version: '0'
|
|
167
169
|
requirements: []
|
|
168
|
-
rubygems_version: 4.0.
|
|
170
|
+
rubygems_version: 4.0.19
|
|
169
171
|
specification_version: 4
|
|
170
172
|
summary: A Ruby state machine.
|
|
171
173
|
test_files: []
|