state_machines 0.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.gitignore +21 -0
- data/.idea/.name +1 -0
- data/.idea/.rakeTasks +7 -0
- data/.idea/cssxfire.xml +9 -0
- data/.idea/encodings.xml +5 -0
- data/.idea/misc.xml +5 -0
- data/.idea/modules.xml +12 -0
- data/.idea/scopes/scope_settings.xml +5 -0
- data/.idea/state_machine2.iml +34 -0
- data/.idea/vcs.xml +9 -0
- data/.idea/workspace.xml +1156 -0
- data/.rspec +3 -0
- data/.travis.yml +8 -0
- data/Gemfile +4 -0
- data/LICENSE.txt +23 -0
- data/README.md +29 -0
- data/Rakefile +1 -0
- data/lib/state_machines/assertions.rb +40 -0
- data/lib/state_machines/branch.rb +187 -0
- data/lib/state_machines/callback.rb +220 -0
- data/lib/state_machines/core.rb +25 -0
- data/lib/state_machines/core_ext/class/state_machine.rb +5 -0
- data/lib/state_machines/core_ext.rb +2 -0
- data/lib/state_machines/error.rb +13 -0
- data/lib/state_machines/eval_helpers.rb +87 -0
- data/lib/state_machines/event.rb +246 -0
- data/lib/state_machines/event_collection.rb +141 -0
- data/lib/state_machines/extensions.rb +148 -0
- data/lib/state_machines/helper_module.rb +17 -0
- data/lib/state_machines/integrations/base.rb +100 -0
- data/lib/state_machines/integrations.rb +113 -0
- data/lib/state_machines/machine.rb +2234 -0
- data/lib/state_machines/machine_collection.rb +84 -0
- data/lib/state_machines/macro_methods.rb +520 -0
- data/lib/state_machines/matcher.rb +123 -0
- data/lib/state_machines/matcher_helpers.rb +54 -0
- data/lib/state_machines/node_collection.rb +221 -0
- data/lib/state_machines/path.rb +120 -0
- data/lib/state_machines/path_collection.rb +90 -0
- data/lib/state_machines/state.rb +276 -0
- data/lib/state_machines/state_collection.rb +112 -0
- data/lib/state_machines/state_context.rb +138 -0
- data/lib/state_machines/transition.rb +470 -0
- data/lib/state_machines/transition_collection.rb +245 -0
- data/lib/state_machines/version.rb +3 -0
- data/lib/state_machines/yard.rb +8 -0
- data/lib/state_machines.rb +3 -0
- data/spec/errors/default_spec.rb +14 -0
- data/spec/errors/with_message_spec.rb +39 -0
- data/spec/helpers/helper_spec.rb +14 -0
- data/spec/internal/app/models/auto_shop.rb +31 -0
- data/spec/internal/app/models/car.rb +19 -0
- data/spec/internal/app/models/model_base.rb +6 -0
- data/spec/internal/app/models/motorcycle.rb +9 -0
- data/spec/internal/app/models/traffic_light.rb +47 -0
- data/spec/internal/app/models/vehicle.rb +123 -0
- data/spec/machine_spec.rb +3167 -0
- data/spec/matcher_helpers_spec.rb +39 -0
- data/spec/matcher_spec.rb +157 -0
- data/spec/models/auto_shop_spec.rb +41 -0
- data/spec/models/car_spec.rb +90 -0
- data/spec/models/motorcycle_spec.rb +44 -0
- data/spec/models/traffic_light_spec.rb +56 -0
- data/spec/models/vehicle_spec.rb +580 -0
- data/spec/node_collection_spec.rb +371 -0
- data/spec/path_collection_spec.rb +271 -0
- data/spec/path_spec.rb +488 -0
- data/spec/spec_helper.rb +6 -0
- data/spec/state_collection_spec.rb +352 -0
- data/spec/state_context_spec.rb +442 -0
- data/spec/state_machine_spec.rb +29 -0
- data/spec/state_spec.rb +970 -0
- data/spec/support/migration_helpers.rb +50 -0
- data/spec/support/models.rb +6 -0
- data/spec/transition_collection_spec.rb +2199 -0
- data/spec/transition_spec.rb +1558 -0
- data/state_machines.gemspec +23 -0
- metadata +194 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: 6093c9c0c586ab9b799627afd14d9cf686a13881
|
4
|
+
data.tar.gz: f7457d8d6f8ed9df8fa7da0fed6e74599aa59712
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 9222dfe808bb45c75521177c470dff45522cae32155b2e65e18a221d53cae07d2b59b5431a0717b8ab2f6a472efc944bf13c7f1527b2e8913295ec135335a6e3
|
7
|
+
data.tar.gz: b7f3fbfd31a5062b745ca131a7916739baca538c0254ed2ec495e2e57f7e13561bd4ef0da772a4aa035d560649f6f0d74f5707c87c200bf40f3de3348c05db58
|
data/.gitignore
ADDED
data/.idea/.name
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
state_machine2
|
data/.idea/.rakeTasks
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
2
|
+
<Settings><!--This file was automatically generated by Ruby plugin.
|
3
|
+
You are allowed to:
|
4
|
+
1. Remove rake task
|
5
|
+
2. Add existing rake tasks
|
6
|
+
To add existing rake tasks automatically delete this file and reload the project.
|
7
|
+
--><RakeGroup description="" fullCmd="" taksId="rake" /></Settings>
|
data/.idea/cssxfire.xml
ADDED
@@ -0,0 +1,9 @@
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
2
|
+
<project version="4">
|
3
|
+
<component name="CssXFireSettings">
|
4
|
+
<general autoClear="false" autoExpand="false" />
|
5
|
+
<strategy useRoutes="false" mediaReduce="false" fileReduce="false" currentDocumentsReduce="false" resolveVariables="true" resolveMixins="true" />
|
6
|
+
<routes />
|
7
|
+
</component>
|
8
|
+
</project>
|
9
|
+
|
data/.idea/encodings.xml
ADDED
data/.idea/misc.xml
ADDED
data/.idea/modules.xml
ADDED
@@ -0,0 +1,12 @@
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
2
|
+
<project version="4">
|
3
|
+
<component name="ProjectModuleManager">
|
4
|
+
<modules>
|
5
|
+
<module fileurl="file://$PROJECT_DIR$/.idea/state_machine2.iml" filepath="$PROJECT_DIR$/.idea/state_machine2.iml" />
|
6
|
+
<module fileurl="file://$PROJECT_DIR$/../state_machine2-graphviz/.idea/state_machine2-graphviz.iml" filepath="$PROJECT_DIR$/../state_machine2-graphviz/.idea/state_machine2-graphviz.iml" />
|
7
|
+
<module fileurl="file://$PROJECT_DIR$/../state_machine2_activemodel/.idea/state_machine2_activemodel.iml" filepath="$PROJECT_DIR$/../state_machine2_activemodel/.idea/state_machine2_activemodel.iml" />
|
8
|
+
<module fileurl="file://$PROJECT_DIR$/../state_machine2_activerecord/.idea/state_machine2_activerecord.iml" filepath="$PROJECT_DIR$/../state_machine2_activerecord/.idea/state_machine2_activerecord.iml" />
|
9
|
+
</modules>
|
10
|
+
</component>
|
11
|
+
</project>
|
12
|
+
|
@@ -0,0 +1,34 @@
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
2
|
+
<module type="RUBY_MODULE" version="4">
|
3
|
+
<component name="FacetManager">
|
4
|
+
<facet type="gem" name="Ruby Gem">
|
5
|
+
<configuration>
|
6
|
+
<option name="GEM_APP_ROOT_PATH" value="$MODULE_DIR$" />
|
7
|
+
<option name="GEM_APP_TEST_PATH" value="" />
|
8
|
+
<option name="GEM_APP_LIB_PATH" value="$MODULE_DIR$/lib" />
|
9
|
+
</configuration>
|
10
|
+
</facet>
|
11
|
+
</component>
|
12
|
+
<component name="NewModuleRootManager">
|
13
|
+
<content url="file://$MODULE_DIR$" />
|
14
|
+
<orderEntry type="inheritedJdk" />
|
15
|
+
<orderEntry type="sourceFolder" forTests="false" />
|
16
|
+
<orderEntry type="module" module-name="state_machine2_activemodel" />
|
17
|
+
<orderEntry type="module" module-name="state_machine2-graphviz" />
|
18
|
+
<orderEntry type="module" module-name="state_machine2_activerecord" />
|
19
|
+
<orderEntry type="module-library">
|
20
|
+
<library name="state_machines (v0.0.1, /home/abdelkader/RubymineProjects/gems/state_machine2) [path][gem]">
|
21
|
+
<CLASSES>
|
22
|
+
<root url="file://$MODULE_DIR$/lib" />
|
23
|
+
<root url="file://$MODULE_DIR$/.idea" />
|
24
|
+
</CLASSES>
|
25
|
+
<SOURCES>
|
26
|
+
<root url="file://$MODULE_DIR$/lib" />
|
27
|
+
<root url="file://$MODULE_DIR$/.idea" />
|
28
|
+
</SOURCES>
|
29
|
+
</library>
|
30
|
+
</orderEntry>
|
31
|
+
<orderEntry type="library" scope="PROVIDED" name="rake (v0.9.2.2, rbenv: 1.9.3-p448) [gem]" level="application" />
|
32
|
+
</component>
|
33
|
+
</module>
|
34
|
+
|
data/.idea/vcs.xml
ADDED
@@ -0,0 +1,9 @@
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
2
|
+
<project version="4">
|
3
|
+
<component name="VcsDirectoryMappings">
|
4
|
+
<mapping directory="" vcs="Git" />
|
5
|
+
<mapping directory="$PROJECT_DIR$/../state_machine2-graphviz" vcs="Git" />
|
6
|
+
<mapping directory="$PROJECT_DIR$/../state_machine2_activerecord" vcs="Git" />
|
7
|
+
</component>
|
8
|
+
</project>
|
9
|
+
|