finite_machine 0.13.0 → 0.14.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,6 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require 'monitor'
3
+ require "monitor"
4
4
 
5
5
  module FiniteMachine
6
6
  # A class responsibile for storage of event subscribers
@@ -1,6 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require_relative 'two_phase_lock'
3
+ require_relative "two_phase_lock"
4
4
 
5
5
  module FiniteMachine
6
6
  # A mixin to allow instance methods to be synchronized
@@ -1,7 +1,7 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require_relative 'callable'
4
- require_relative 'threadable'
3
+ require_relative "callable"
4
+ require_relative "threadable"
5
5
 
6
6
  module FiniteMachine
7
7
  # Class describing a transition associated with a given event
@@ -117,7 +117,7 @@ module FiniteMachine
117
117
  #
118
118
  # @example
119
119
  # transition = Transition.new(context, name: :go)
120
- # transition.to_s # => 'go'
120
+ # transition.to_s # => "go"
121
121
  #
122
122
  # @return [String]
123
123
  #
@@ -132,8 +132,9 @@ module FiniteMachine
132
132
  #
133
133
  # @api public
134
134
  def inspect
135
- transitions = @states.map { |from, to| "#{from} -> #{to}" }.join(', ')
136
- "<##{self.class} @name=#{@name}, @transitions=#{transitions}, @when=#{@conditions}>"
135
+ transitions = @states.map { |from, to| "#{from} -> #{to}" }.join(", ")
136
+ "<##{self.class} @name=#{@name}, @transitions=#{transitions}, " \
137
+ "@when=#{@conditions}>"
137
138
  end
138
139
  end # Transition
139
140
  end # FiniteMachine
@@ -1,9 +1,9 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require_relative 'event_definition'
4
- require_relative 'state_definition'
5
- require_relative 'state_parser'
6
- require_relative 'transition'
3
+ require_relative "event_definition"
4
+ require_relative "state_definition"
5
+ require_relative "state_parser"
6
+ require_relative "transition"
7
7
 
8
8
  module FiniteMachine
9
9
  # A class reponsible for building transition out of parsed states
@@ -1,6 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require_relative 'threadable'
3
+ require_relative "threadable"
4
4
 
5
5
  module FiniteMachine
6
6
  # A class representing a callback transition event
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module FiniteMachine
4
- VERSION = "0.13.0"
4
+ VERSION = "0.14.0"
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: finite_machine
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.13.0
4
+ version: 0.14.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Piotr Murach
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-05-13 00:00:00.000000000 Z
11
+ date: 2020-09-12 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: concurrent-ruby
@@ -39,33 +39,33 @@ dependencies:
39
39
  - !ruby/object:Gem::Version
40
40
  version: '0.5'
41
41
  - !ruby/object:Gem::Dependency
42
- name: rspec
42
+ name: rake
43
43
  requirement: !ruby/object:Gem::Requirement
44
44
  requirements:
45
45
  - - ">="
46
46
  - !ruby/object:Gem::Version
47
- version: '3.1'
47
+ version: '0'
48
48
  type: :development
49
49
  prerelease: false
50
50
  version_requirements: !ruby/object:Gem::Requirement
51
51
  requirements:
52
52
  - - ">="
53
53
  - !ruby/object:Gem::Version
54
- version: '3.1'
54
+ version: '0'
55
55
  - !ruby/object:Gem::Dependency
56
- name: rake
56
+ name: rspec
57
57
  requirement: !ruby/object:Gem::Requirement
58
58
  requirements:
59
59
  - - ">="
60
60
  - !ruby/object:Gem::Version
61
- version: '0'
61
+ version: '3.0'
62
62
  type: :development
63
63
  prerelease: false
64
64
  version_requirements: !ruby/object:Gem::Requirement
65
65
  requirements:
66
66
  - - ">="
67
67
  - !ruby/object:Gem::Version
68
- version: '0'
68
+ version: '3.0'
69
69
  description: A minimal finite state machine with a straightforward syntax. You can
70
70
  quickly model states, add callbacks and use object-oriented techniques to integrate
71
71
  with ORMs.
@@ -73,7 +73,10 @@ email:
73
73
  - piotr@piotrmurach.com
74
74
  executables: []
75
75
  extensions: []
76
- extra_rdoc_files: []
76
+ extra_rdoc_files:
77
+ - README.md
78
+ - CHANGELOG.md
79
+ - LICENSE.txt
77
80
  files:
78
81
  - CHANGELOG.md
79
82
  - LICENSE.txt