pastafari 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: 826ce80ab51bf0bf0f065662fe05887bb8fa492e
4
+ data.tar.gz: 75dbc566afbbd71d10c938a86cc8bf8d5926be8d
5
+ SHA512:
6
+ metadata.gz: ca09299d06320bbf4119cdc56399ee6855270ddf891ba84983eb64b9e99d5420d5f2f6884d804c2db89577b2acca3a6e0ac9a5bd28d0b3dc0e3ad90f04e5cf25
7
+ data.tar.gz: 769a9252a4e0443321cc798b895a85aef7f40d1b4ea898542b819f78d4da9b0f9d6ac93db12396385243147fbf0304ebeb1bc67c444f6922b5f3ab1a3a220358
data/.gitignore ADDED
@@ -0,0 +1,9 @@
1
+ /.bundle/
2
+ /.yardoc
3
+ /Gemfile.lock
4
+ /_yardoc/
5
+ /coverage/
6
+ /doc/
7
+ /pkg/
8
+ /spec/reports/
9
+ /tmp/
data/.rspec ADDED
@@ -0,0 +1,2 @@
1
+ --format documentation
2
+ --color
data/.rubocop.yml ADDED
@@ -0,0 +1,16 @@
1
+ inherit_from: .rubocop_todo.yml
2
+
3
+ Style/Documentation:
4
+ Enabled: false
5
+
6
+ Style/FrozenStringLiteralComment:
7
+ Enabled: false
8
+
9
+ Metrics/BlockLength:
10
+ Exclude:
11
+ - 'spec/**/*'
12
+
13
+ AllCops:
14
+ TargetRubyVersion: 2.3
15
+ Exclude:
16
+ - '*.gemspec'
data/.rubocop_todo.yml ADDED
@@ -0,0 +1,15 @@
1
+ # This configuration was generated by
2
+ # `rubocop --auto-gen-config`
3
+ # on 2016-12-24 16:08:28 -0500 using RuboCop version 0.46.0.
4
+ # The point is for the user to remove these configuration records
5
+ # one by one as the offenses are removed from the code base.
6
+ # Note that changes in the inspected code, or installation of new
7
+ # versions of RuboCop, may require this file to be generated again.
8
+
9
+ # Offense count: 1
10
+ # Cop supports --auto-correct.
11
+ # Configuration parameters: ExactNameMatch, AllowPredicates, AllowDSLWriters, IgnoreClassMethods, Whitelist.
12
+ # Whitelist: to_ary, to_a, to_c, to_enum, to_h, to_hash, to_i, to_int, to_io, to_open, to_path, to_proc, to_r, to_regexp, to_str, to_s, to_sym
13
+ Style/TrivialAccessors:
14
+ Exclude:
15
+ - 'lib/pastafari/builders/fsm_builder.rb'
data/.travis.yml ADDED
@@ -0,0 +1,5 @@
1
+ sudo: false
2
+ language: ruby
3
+ rvm:
4
+ - 2.3.1
5
+ before_install: gem install bundler -v 1.12.5
@@ -0,0 +1,49 @@
1
+ # Contributor Code of Conduct
2
+
3
+ As contributors and maintainers of this project, and in the interest of
4
+ fostering an open and welcoming community, we pledge to respect all people who
5
+ contribute through reporting issues, posting feature requests, updating
6
+ documentation, submitting pull requests or patches, and other activities.
7
+
8
+ We are committed to making participation in this project a harassment-free
9
+ experience for everyone, regardless of level of experience, gender, gender
10
+ identity and expression, sexual orientation, disability, personal appearance,
11
+ body size, race, ethnicity, age, religion, or nationality.
12
+
13
+ Examples of unacceptable behavior by participants include:
14
+
15
+ * The use of sexualized language or imagery
16
+ * Personal attacks
17
+ * Trolling or insulting/derogatory comments
18
+ * Public or private harassment
19
+ * Publishing other's private information, such as physical or electronic
20
+ addresses, without explicit permission
21
+ * Other unethical or unprofessional conduct
22
+
23
+ Project maintainers have the right and responsibility to remove, edit, or
24
+ reject comments, commits, code, wiki edits, issues, and other contributions
25
+ that are not aligned to this Code of Conduct, or to ban temporarily or
26
+ permanently any contributor for other behaviors that they deem inappropriate,
27
+ threatening, offensive, or harmful.
28
+
29
+ By adopting this Code of Conduct, project maintainers commit themselves to
30
+ fairly and consistently applying these principles to every aspect of managing
31
+ this project. Project maintainers who do not follow or enforce the Code of
32
+ Conduct may be permanently removed from the project team.
33
+
34
+ This code of conduct applies both within project spaces and in public spaces
35
+ when an individual is representing the project or its community.
36
+
37
+ Instances of abusive, harassing, or otherwise unacceptable behavior may be
38
+ reported by contacting a project maintainer at josh@joshtompkins.com. All
39
+ complaints will be reviewed and investigated and will result in a response that
40
+ is deemed necessary and appropriate to the circumstances. Maintainers are
41
+ obligated to maintain confidentiality with regard to the reporter of an
42
+ incident.
43
+
44
+ This Code of Conduct is adapted from the [Contributor Covenant][homepage],
45
+ version 1.3.0, available at
46
+ [http://contributor-covenant.org/version/1/3/0/][version]
47
+
48
+ [homepage]: http://contributor-covenant.org
49
+ [version]: http://contributor-covenant.org/version/1/3/0/
data/Gemfile ADDED
@@ -0,0 +1,4 @@
1
+ source 'https://rubygems.org'
2
+
3
+ # Specify your gem's dependencies in pastafari.gemspec
4
+ gemspec
data/LICENSE.txt ADDED
@@ -0,0 +1,21 @@
1
+ The MIT License (MIT)
2
+
3
+ Copyright (c) 2016 Joshua Tompkins
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
13
+ all 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
21
+ THE SOFTWARE.
data/README.md ADDED
@@ -0,0 +1,84 @@
1
+ # Pastafari
2
+
3
+ Pastafari is a library for building simple finite state machines in Ruby.
4
+
5
+ ## Installation
6
+
7
+ Add this line to your application's Gemfile:
8
+
9
+ ```ruby
10
+ gem 'pastafari'
11
+ ```
12
+
13
+ And then execute:
14
+
15
+ $ bundle
16
+
17
+ Or install it yourself as:
18
+
19
+ $ gem install pastafari
20
+
21
+ ## Usage
22
+
23
+ ```ruby
24
+ # Define an FSM with the Pastafari FSM DSL:
25
+ fsm = Pastafari::FSM.build do
26
+ # Set the order of operations with #transition.
27
+ # :before runs the current state's transition functions before processing the input.
28
+ # :after runs the transition function after input processing.
29
+ transition :after # :after is the default value
30
+
31
+ # Set the initial state:
32
+ initial_state :first_state
33
+ # If #initial_state isn't called, the first state defined by the DSL will be
34
+ # assumed to be the initial FSM state.
35
+
36
+ state :first_state do
37
+ # Define the input processing function:
38
+ process { |i| puts i }
39
+
40
+ # If this state can transition into another state, define the transition
41
+ # conditions:
42
+ transition_to(:second_state).when { |i| i == 1 }
43
+ # The transition function is a predicate - it should return a truthy or falsey
44
+ # value. If the function returns a truthy value, the FSM will transition into
45
+ # the new state.
46
+
47
+ # You can define as many transitions as you'd like:
48
+ transition_to(:third_state).when { |i| i == 2 }
49
+ # If a transition references a state that isn't defined, Pastafari will
50
+ # raise an error.
51
+ end
52
+
53
+ state :second_state do
54
+ # The processing function MUST be called; if it isn't, Pastafari will
55
+ # raise an error.
56
+ process { |i| puts i / 2 }
57
+ end
58
+
59
+ state :third_state do
60
+ process { |i| puts i / 3 }
61
+
62
+ # Transition functions are optional.
63
+ end
64
+ end
65
+
66
+ # Run the FSM with #run. Pass in an array, or a value that can be converted to an
67
+ # Array with #Array.
68
+ fsm.run([1, 2, 3]) # => should print 1, 1, 1
69
+ ```
70
+
71
+ ## Development
72
+
73
+ After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake spec` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
74
+
75
+ To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).
76
+
77
+ ## Contributing
78
+
79
+ Bug reports and pull requests are welcome on GitHub at https://github.com/[USERNAME]/pastafari. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [Contributor Covenant](http://contributor-covenant.org) code of conduct.
80
+
81
+
82
+ ## License
83
+
84
+ The gem is available as open source under the terms of the [MIT License](http://opensource.org/licenses/MIT).
data/Rakefile ADDED
@@ -0,0 +1,10 @@
1
+ require 'bundler/gem_tasks'
2
+ require 'rspec/core/rake_task'
3
+ require 'rubocop/rake_task'
4
+
5
+ RuboCop::RakeTask.new
6
+ RSpec::Core::RakeTask.new(:spec)
7
+
8
+ task default: :spec
9
+
10
+ task ci: [:spec, :rubocop]
data/bin/console ADDED
@@ -0,0 +1,14 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ require 'bundler/setup'
4
+ require 'pastafari'
5
+
6
+ # You can add fixtures and/or initialization code here to make experimenting
7
+ # with your gem easier. You can also use a different console, if you like.
8
+
9
+ # (If you use this, don't forget to add pry to your Gemfile!)
10
+ # require "pry"
11
+ # Pry.start
12
+
13
+ require 'irb'
14
+ IRB.start
data/bin/setup ADDED
@@ -0,0 +1,8 @@
1
+ #!/usr/bin/env bash
2
+ set -euo pipefail
3
+ IFS=$'\n\t'
4
+ set -vx
5
+
6
+ bundle install
7
+
8
+ # Do any other automated setup that you need to do here
data/lib/pastafari.rb ADDED
@@ -0,0 +1,7 @@
1
+ require 'pastafari/version'
2
+ require 'pastafari/fsm'
3
+ require 'pastafari/state'
4
+ require 'pastafari/transition'
5
+ require 'pastafari/builders/fsm_builder'
6
+ require 'pastafari/builders/state_builder'
7
+ require 'pastafari/errors/invalid_state_error'
@@ -0,0 +1,79 @@
1
+ module Pastafari
2
+ module Builders
3
+ class FsmBuilder
4
+ VALID_TRANSITIONS = [:before, :after].freeze
5
+
6
+ def initialize
7
+ @states = {}
8
+ @transition_at = :after
9
+ end
10
+
11
+ def state(name, &block)
12
+ builder = Builders::StateBuilder.new(name)
13
+ builder.instance_eval(&block)
14
+
15
+ state = builder.build
16
+
17
+ @states[state.name] = state
18
+ end
19
+
20
+ def transition(at)
21
+ validate_transition_at(at)
22
+
23
+ @transition_at = at
24
+ end
25
+
26
+ def initial_state(state)
27
+ @initial_state = state
28
+ end
29
+
30
+ def build
31
+ validate_states_given
32
+ validate_initial_state
33
+ validate_transitions
34
+
35
+ set_initial_state!
36
+
37
+ Pastafari::Fsm.new(@states, @transition_at, @initial_state)
38
+ end
39
+
40
+ private
41
+
42
+ def set_initial_state!
43
+ @initial_state ||= @states.values.first.name
44
+ end
45
+
46
+ def validate_transition_at(at)
47
+ return if VALID_TRANSITIONS.include?(at)
48
+
49
+ raise ArgumentError, 'Transition value must be one of :before, :after.'
50
+ end
51
+
52
+ def validate_states_given
53
+ return unless @states.length.zero?
54
+
55
+ raise Pastafari::Errors::InvalidStateError, 'No states defined.'
56
+ end
57
+
58
+ def validate_initial_state
59
+ return unless @initial_state
60
+
61
+ return if @states.key?(@initial_state)
62
+
63
+ raise Pastafari::Errors::InvalidStateError,
64
+ 'Initial state points to a non-existent state.'
65
+ end
66
+
67
+ def validate_transitions
68
+ @states.each do |name, state|
69
+ state.transitions.map(&:next_state).each do |k|
70
+ next if @states.key? k
71
+
72
+ raise Pastafari::Errors::InvalidStateError,
73
+ "State #{name} is transitioning to non-existent state #{k}"
74
+ end
75
+ end
76
+ end
77
+ end
78
+ end
79
+ end
@@ -0,0 +1,35 @@
1
+ module Pastafari
2
+ module Builders
3
+ class StateBuilder
4
+ def initialize(name)
5
+ @name = name
6
+ @transitions = []
7
+ end
8
+
9
+ def process(&block)
10
+ raise ArgumentError unless block
11
+
12
+ @handler = block
13
+ end
14
+
15
+ def transition_to(new_state)
16
+ Pastafari::Transition.new(new_state).tap { |t| @transitions << t }
17
+ end
18
+
19
+ def build
20
+ validate_handler
21
+
22
+ State.new(@name, @handler, @transitions)
23
+ end
24
+
25
+ private
26
+
27
+ def validate_handler
28
+ return if @handler
29
+
30
+ raise Pastafari::Errors::InvalidStateError,
31
+ '#process must be called when defining the State.'
32
+ end
33
+ end
34
+ end
35
+ end
@@ -0,0 +1,5 @@
1
+ module Pastafari
2
+ module Errors
3
+ class InvalidStateError < StandardError; end
4
+ end
5
+ end
@@ -0,0 +1,44 @@
1
+ require 'pastafari/state'
2
+
3
+ module Pastafari
4
+ class Fsm
5
+ def self.build(&block)
6
+ raise ArgumentError unless block
7
+
8
+ builder = Builders::FsmBuilder.new
9
+ builder.instance_eval(&block)
10
+
11
+ builder.build
12
+ end
13
+
14
+ def run(input)
15
+ Array(input).map { |value| process(value) }
16
+ end
17
+
18
+ attr_reader :states, :transition_at, :current_state
19
+
20
+ private
21
+
22
+ def initialize(states, transition_at, initial_state)
23
+ @transition_at = transition_at
24
+ @states = states
25
+ @current_state = initial_state || states.first
26
+ end
27
+
28
+ def process(input)
29
+ transition!(input) if transition_at == :before
30
+
31
+ output = states[current_state].process(input)
32
+
33
+ transition!(input) if transition_at == :after
34
+
35
+ output
36
+ end
37
+
38
+ def transition!(input)
39
+ new_state = states[current_state].evaluate_transitions(input)
40
+
41
+ @current_state = new_state if new_state
42
+ end
43
+ end
44
+ end
@@ -0,0 +1,32 @@
1
+ module Pastafari
2
+ class State
3
+ def self.build(name, &block)
4
+ raise ArgumentError unless block
5
+
6
+ builder = Builders::StateBuilder.new(name)
7
+ builder.instance_eval(&block)
8
+
9
+ builder.build
10
+ end
11
+
12
+ attr_accessor :name, :handler, :transitions
13
+
14
+ def process(input)
15
+ handler.call(input)
16
+ end
17
+
18
+ def evaluate_transitions(input)
19
+ transition = transitions.detect { |t| t.evaluate(input) }
20
+
21
+ transition&.next_state
22
+ end
23
+
24
+ private
25
+
26
+ def initialize(name, handler, transitions)
27
+ @name = name
28
+ @handler = handler
29
+ @transitions = transitions || []
30
+ end
31
+ end
32
+ end
@@ -0,0 +1,21 @@
1
+ module Pastafari
2
+ class Transition
3
+ def initialize(next_state)
4
+ @next_state = next_state
5
+ end
6
+
7
+ attr_reader :next_state, :evaluator
8
+
9
+ def when(&block)
10
+ raise ArgumentError unless block
11
+
12
+ @evaluator = block
13
+ end
14
+
15
+ def evaluate(input)
16
+ raise Pastafari::Errors::InvalidStateError unless evaluator
17
+
18
+ evaluator.call(input)
19
+ end
20
+ end
21
+ end
@@ -0,0 +1,3 @@
1
+ module Pastafari
2
+ VERSION = '0.1.0'.freeze
3
+ end
data/pastafari.gemspec ADDED
@@ -0,0 +1,28 @@
1
+ # coding: utf-8
2
+ lib = File.expand_path('../lib', __FILE__)
3
+ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
+ require 'pastafari/version'
5
+
6
+ Gem::Specification.new do |spec|
7
+ spec.name = "pastafari"
8
+ spec.version = Pastafari::VERSION
9
+ spec.authors = ["Joshua Tompkins"]
10
+ spec.email = ["josh@joshtompkins.com"]
11
+
12
+ spec.summary = "A library for creating simple finite state machines."
13
+ spec.homepage = "https://github.com/jtompkins/pastafari"
14
+ spec.license = "MIT"
15
+
16
+ spec.files = `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
17
+ spec.bindir = "exe"
18
+ spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
19
+ spec.require_paths = ["lib"]
20
+
21
+ spec.add_development_dependency "bundler", "~> 1.12"
22
+ spec.add_development_dependency "rake", "~> 10.0"
23
+ spec.add_development_dependency "rspec", "~> 3.0"
24
+ spec.add_development_dependency "rubocop"
25
+ spec.add_development_dependency "pry"
26
+ spec.add_development_dependency "pry-byebug"
27
+ spec.add_development_dependency 'simplecov'
28
+ end
data/sample/Gemfile ADDED
@@ -0,0 +1,3 @@
1
+ source 'https://rubygems.org'
2
+
3
+ gem 'pastafari'
data/sample/README.md ADDED
@@ -0,0 +1,15 @@
1
+ # Pastafari Sample App
2
+
3
+ A simple sample app for Pastafari.
4
+
5
+ ## Installation
6
+
7
+ ```sh
8
+ bundle install
9
+ ```
10
+
11
+ ## Usage
12
+
13
+ ```sh
14
+ bundle exec ruby sample.rb
15
+ ```
data/sample/sample.rb ADDED
@@ -0,0 +1,29 @@
1
+ require 'pastafari'
2
+
3
+ fsm = Pastafari::Fsm.build do
4
+ transition :after
5
+
6
+ state :process_a do
7
+ process { 1 }
8
+
9
+ transition_to(:process_b).when { |i| i == 'a' }
10
+ end
11
+
12
+ state :process_b do
13
+ process { 2 }
14
+
15
+ transition_to(:process_c).when { |i| i == 'b' }
16
+ end
17
+
18
+ state :process_c do
19
+ process { 3 }
20
+ end
21
+ end
22
+
23
+ input = %w(a b c)
24
+
25
+ puts "Running FSM for input: '#{input.join(', ')}'. Expected output: '1, 2, 3'"
26
+
27
+ output = fsm.run(%w(a b c)).join(', ')
28
+
29
+ puts "Received output: #{output}"
metadata ADDED
@@ -0,0 +1,166 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: pastafari
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.1.0
5
+ platform: ruby
6
+ authors:
7
+ - Joshua Tompkins
8
+ autorequire:
9
+ bindir: exe
10
+ cert_chain: []
11
+ date: 2016-12-24 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: bundler
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - "~>"
18
+ - !ruby/object:Gem::Version
19
+ version: '1.12'
20
+ type: :development
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - "~>"
25
+ - !ruby/object:Gem::Version
26
+ version: '1.12'
27
+ - !ruby/object:Gem::Dependency
28
+ name: rake
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - "~>"
32
+ - !ruby/object:Gem::Version
33
+ version: '10.0'
34
+ type: :development
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - "~>"
39
+ - !ruby/object:Gem::Version
40
+ version: '10.0'
41
+ - !ruby/object:Gem::Dependency
42
+ name: rspec
43
+ requirement: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - "~>"
46
+ - !ruby/object:Gem::Version
47
+ version: '3.0'
48
+ type: :development
49
+ prerelease: false
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - "~>"
53
+ - !ruby/object:Gem::Version
54
+ version: '3.0'
55
+ - !ruby/object:Gem::Dependency
56
+ name: rubocop
57
+ requirement: !ruby/object:Gem::Requirement
58
+ requirements:
59
+ - - ">="
60
+ - !ruby/object:Gem::Version
61
+ version: '0'
62
+ type: :development
63
+ prerelease: false
64
+ version_requirements: !ruby/object:Gem::Requirement
65
+ requirements:
66
+ - - ">="
67
+ - !ruby/object:Gem::Version
68
+ version: '0'
69
+ - !ruby/object:Gem::Dependency
70
+ name: pry
71
+ requirement: !ruby/object:Gem::Requirement
72
+ requirements:
73
+ - - ">="
74
+ - !ruby/object:Gem::Version
75
+ version: '0'
76
+ type: :development
77
+ prerelease: false
78
+ version_requirements: !ruby/object:Gem::Requirement
79
+ requirements:
80
+ - - ">="
81
+ - !ruby/object:Gem::Version
82
+ version: '0'
83
+ - !ruby/object:Gem::Dependency
84
+ name: pry-byebug
85
+ requirement: !ruby/object:Gem::Requirement
86
+ requirements:
87
+ - - ">="
88
+ - !ruby/object:Gem::Version
89
+ version: '0'
90
+ type: :development
91
+ prerelease: false
92
+ version_requirements: !ruby/object:Gem::Requirement
93
+ requirements:
94
+ - - ">="
95
+ - !ruby/object:Gem::Version
96
+ version: '0'
97
+ - !ruby/object:Gem::Dependency
98
+ name: simplecov
99
+ requirement: !ruby/object:Gem::Requirement
100
+ requirements:
101
+ - - ">="
102
+ - !ruby/object:Gem::Version
103
+ version: '0'
104
+ type: :development
105
+ prerelease: false
106
+ version_requirements: !ruby/object:Gem::Requirement
107
+ requirements:
108
+ - - ">="
109
+ - !ruby/object:Gem::Version
110
+ version: '0'
111
+ description:
112
+ email:
113
+ - josh@joshtompkins.com
114
+ executables: []
115
+ extensions: []
116
+ extra_rdoc_files: []
117
+ files:
118
+ - ".gitignore"
119
+ - ".rspec"
120
+ - ".rubocop.yml"
121
+ - ".rubocop_todo.yml"
122
+ - ".travis.yml"
123
+ - CODE_OF_CONDUCT.md
124
+ - Gemfile
125
+ - LICENSE.txt
126
+ - README.md
127
+ - Rakefile
128
+ - bin/console
129
+ - bin/setup
130
+ - lib/pastafari.rb
131
+ - lib/pastafari/builders/fsm_builder.rb
132
+ - lib/pastafari/builders/state_builder.rb
133
+ - lib/pastafari/errors/invalid_state_error.rb
134
+ - lib/pastafari/fsm.rb
135
+ - lib/pastafari/state.rb
136
+ - lib/pastafari/transition.rb
137
+ - lib/pastafari/version.rb
138
+ - pastafari.gemspec
139
+ - sample/Gemfile
140
+ - sample/README.md
141
+ - sample/sample.rb
142
+ homepage: https://github.com/jtompkins/pastafari
143
+ licenses:
144
+ - MIT
145
+ metadata: {}
146
+ post_install_message:
147
+ rdoc_options: []
148
+ require_paths:
149
+ - lib
150
+ required_ruby_version: !ruby/object:Gem::Requirement
151
+ requirements:
152
+ - - ">="
153
+ - !ruby/object:Gem::Version
154
+ version: '0'
155
+ required_rubygems_version: !ruby/object:Gem::Requirement
156
+ requirements:
157
+ - - ">="
158
+ - !ruby/object:Gem::Version
159
+ version: '0'
160
+ requirements: []
161
+ rubyforge_project:
162
+ rubygems_version: 2.5.1
163
+ signing_key:
164
+ specification_version: 4
165
+ summary: A library for creating simple finite state machines.
166
+ test_files: []