simplestate 2.0.11 → 2.0.12

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
  SHA1:
3
- metadata.gz: 639f735cb621718f30583bee648cf84241044b71
4
- data.tar.gz: 24d5eac5b74c04052c7b3fdc0077b6ef35d6f500
3
+ metadata.gz: e1d5a0becf29a132a2772a1be27f65d57bbe7d57
4
+ data.tar.gz: c7cd80c70bc69f51c1049660da1876f4021509f6
5
5
  SHA512:
6
- metadata.gz: 6182c57e2952430fd713c62ef4066aaba7473686c824e9f34543986959bd814cc2140953da9e2e71f22aae9a7baf04e399ba656e3ecc3f06cd1c4753b7be2128
7
- data.tar.gz: 2f67fd1908ae656b483a32f6881574478458861eadf74630eae8ddc513e9c8a2df82afeddeb9ee34a2455be0d76c5ef689fa39c56ff7e164887c65d5c5b49bd8
6
+ metadata.gz: 0871ee04966cba102bea3958e29921bba0f8934367fdbd3afbed58d21b839915684cea5cf72e57269e31fe505e0a1f08a8fd98b9dd06e5351058fd3de0ce2ca5
7
+ data.tar.gz: b840e5e102f1bb9b5b9b6457e0ef683f81edf32b053d962e2cd49dfe58889a0d73fcde94a77526b55e44826e0ba35361e7bedf831b56efab7fd41ba68f7723f6
data/CHANGE_NOTES.md CHANGED
@@ -1,3 +1,8 @@
1
+ #### SimpleState version 2.0.12
2
+ NullState now correctly inherits from State rather than mimicking State.
3
+ Code grooming.
4
+
5
+
1
6
  #### SimpleState version 2.0.11
2
7
  Drop travis check against ruby 2.2.
3
8
  Add tests to bring up reported test coverage to 100%. Add test coverage badge to README.
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- simplestate (2.0.10)
4
+ simplestate (2.0.11)
5
5
 
6
6
  GEM
7
7
  remote: https://rubygems.org/
data/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  [![Gem Version](https://badge.fury.io/rb/simplestate.svg)](https://badge.fury.io/rb/simplestate)
2
- [![Build Status](https://travis-ci.org/dpneumo/simplestate.svg?branch=master)](https://travis-ci.org/dpneumo/simplestate)
3
2
  [![Code Climate](https://codeclimate.com/github/dpneumo/simplestate/badges/gpa.svg)](https://codeclimate.com/github/dpneumo/simplestate)
3
+ [![Build Status](https://travis-ci.org/dpneumo/simplestate.svg?branch=master)](https://travis-ci.org/dpneumo/simplestate)
4
4
  [![Test Coverage](https://codeclimate.com/github/dpneumo/simplestate/badges/coverage.svg)](https://codeclimate.com/github/dpneumo/simplestate/coverage)
5
5
 
6
6
  ## Ruby Version requirement: >= 2.1.0
@@ -1,28 +1,16 @@
1
- class NullState
2
- # Avoid chicken and egg problem by mimicing rather than inheriting from State
3
-
4
- attr_reader :holder
5
- def initialize(holder:, opts: {})
6
- @holder = holder
7
- @holder.__send__(:add_state, self)
8
- end
9
-
1
+ class NullState < State
10
2
  def name
11
3
  'NullState'
12
4
  end
13
5
  alias :to_s :name
14
6
 
15
- def symbol
16
- :NullState
17
- end
18
-
19
7
  private
20
- def transition_to(state)
21
- end
8
+ def transition_to(state)
9
+ end
22
10
 
23
- def enter
24
- end
11
+ def enter
12
+ end
25
13
 
26
- def exit
27
- end
14
+ def exit
15
+ end
28
16
  end
@@ -15,15 +15,15 @@ class State
15
15
  end
16
16
 
17
17
  private
18
- def transition_to(state)
19
- holder.__send__ :transition_to, state
20
- end
18
+ def transition_to(state)
19
+ holder.__send__ :transition_to, state
20
+ end
21
21
 
22
- def enter
23
- raise NotImplementedError, "#enter was called on an instance of State either directly or via super."
24
- end
22
+ def enter
23
+ raise NotImplementedError, "#enter was called on an instance of State either directly or via super."
24
+ end
25
25
 
26
- def exit
27
- raise NotImplementedError, "#exit was called on an instance of State either directly or via super."
28
- end
26
+ def exit
27
+ raise NotImplementedError, "#exit was called on an instance of State either directly or via super."
28
+ end
29
29
  end
@@ -1,3 +1,3 @@
1
1
  module Simplestate
2
- VERSION = "2.0.11"
2
+ VERSION = "2.0.12"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: simplestate
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.11
4
+ version: 2.0.12
5
5
  platform: ruby
6
6
  authors:
7
7
  - Mitchell C Kuppinger