transitions 1.0.1 → 1.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.codeclimate.yml +10 -0
- data/.rubocop.yml +2 -0
- data/.todo.reek +85 -0
- data/.travis.yml +2 -0
- data/CHANGELOG.md +4 -0
- data/Rakefile +4 -2
- data/lib/transitions/event.rb +1 -0
- data/lib/transitions/presenter.rb +2 -2
- data/lib/transitions/version.rb +1 -1
- data/transitions.gemspec +2 -1
- metadata +20 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f104d4ab40d3eed0fa80ea8f7478ceda3392e2c0
|
4
|
+
data.tar.gz: 4da942a300e3bfada33284dcc7e2c53c1f3e7dc6
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 944438392a350653aa572612852e475da7d4284cdc2d1a2f28babb2e762ba692da9d6a22c08afaa65df09bf79ac00c254245a813c0906d80fcc780a5bfe4bf3f
|
7
|
+
data.tar.gz: 6fb231329c1fc52f1e8572496ed0fbb1cbb5009ca93ebc66092175edaa5ade0195d5f3130f08a8ba678a6bd5561205a8e2f32dffa93c8183511c07730c6236a6
|
data/.codeclimate.yml
ADDED
data/.rubocop.yml
CHANGED
data/.todo.reek
ADDED
@@ -0,0 +1,85 @@
|
|
1
|
+
---
|
2
|
+
DuplicateMethodCall:
|
3
|
+
exclude:
|
4
|
+
- ActiveModel::Transitions#read_state
|
5
|
+
- ActiveModel::Transitions#reload
|
6
|
+
- ActiveModel::Transitions#set_initial_state
|
7
|
+
- ActiveModel::Transitions#set_initial_state
|
8
|
+
- Transitions::Event#error_message_for_invalid_transitions
|
9
|
+
- Transitions::Event#fire
|
10
|
+
- Transitions::Event#fire
|
11
|
+
- Transitions::Event#initialize
|
12
|
+
- Transitions::Event#initialize
|
13
|
+
- Transitions::Event#update
|
14
|
+
- Transitions::Machine#handle_event_success_callback
|
15
|
+
- Transitions::Machine#handle_event_success_callback
|
16
|
+
- Transitions::Machine#initial_state
|
17
|
+
- Transitions::State#define_state_query_method
|
18
|
+
IrresponsibleModule:
|
19
|
+
exclude:
|
20
|
+
- ActiveModel::Transitions
|
21
|
+
- Transitions::Machine
|
22
|
+
- Transitions::Presenter
|
23
|
+
- Transitions::State
|
24
|
+
- Transitions::StateTransition
|
25
|
+
- Transitions
|
26
|
+
- Transitions::ClassMethods
|
27
|
+
- Transitions::InvalidMethodOverride
|
28
|
+
- Transitions::InvalidTransition
|
29
|
+
NilCheck:
|
30
|
+
exclude:
|
31
|
+
- ActiveModel::Transitions#state_not_set?
|
32
|
+
- Transitions::Event#timestamp_defined?
|
33
|
+
- Transitions::StateTransition#execute
|
34
|
+
- Transitions#current_state
|
35
|
+
UncommunicativeVariableName:
|
36
|
+
exclude:
|
37
|
+
- ActiveModel::Transitions#state_included?
|
38
|
+
- Transitions::Event#can_execute_transition_from_state?
|
39
|
+
- Transitions::Event#fire
|
40
|
+
- Transitions::Event#transitions
|
41
|
+
- Transitions::Event#transitions_from_state?
|
42
|
+
- Transitions::Machine#fire_event
|
43
|
+
- Transitions::StateTransition#executable?
|
44
|
+
FeatureEnvy:
|
45
|
+
exclude:
|
46
|
+
- Transitions::Event#can_execute_transition_from_state?
|
47
|
+
- Transitions::Event#default_timestamp_name
|
48
|
+
- Transitions::Event#error_message_for_invalid_transitions
|
49
|
+
NestedIterators:
|
50
|
+
exclude:
|
51
|
+
- Transitions::Event#build_success_callback
|
52
|
+
TooManyInstanceVariables:
|
53
|
+
exclude:
|
54
|
+
- Transitions::Event
|
55
|
+
- Transitions::Machine
|
56
|
+
- Transitions::StateTransition
|
57
|
+
TooManyStatements:
|
58
|
+
exclude:
|
59
|
+
- Transitions::Event#build_success_callback
|
60
|
+
- Transitions::Event#fire
|
61
|
+
- Transitions::Machine#fire_event
|
62
|
+
- Transitions#current_state
|
63
|
+
Attribute:
|
64
|
+
exclude:
|
65
|
+
- Transitions::Machine#events
|
66
|
+
- Transitions::Machine#initial_state
|
67
|
+
- Transitions::Machine#state_index
|
68
|
+
- Transitions::Machine#states
|
69
|
+
DataClump:
|
70
|
+
exclude:
|
71
|
+
- Transitions::Machine
|
72
|
+
LongParameterList:
|
73
|
+
exclude:
|
74
|
+
- Transitions::Machine#fire_event
|
75
|
+
UtilityFunction:
|
76
|
+
exclude:
|
77
|
+
- Transitions::Machine#handle_event_failed_callback
|
78
|
+
- Transitions::Machine#handle_event_fired_callback
|
79
|
+
- Transitions::StateTransition#perform_guard
|
80
|
+
BooleanParameter:
|
81
|
+
exclude:
|
82
|
+
- Transitions#update_current_state
|
83
|
+
ControlParameter:
|
84
|
+
exclude:
|
85
|
+
- Transitions#update_current_state
|
data/.travis.yml
CHANGED
data/CHANGELOG.md
CHANGED
data/Rakefile
CHANGED
@@ -3,6 +3,7 @@ require 'bundler/gem_tasks'
|
|
3
3
|
require 'appraisal'
|
4
4
|
require 'rake/testtask'
|
5
5
|
require 'rubocop/rake_task'
|
6
|
+
require 'reek/rake/task'
|
6
7
|
|
7
8
|
Rake::TestTask.new(:test) do |test|
|
8
9
|
test.libs = %w(lib test)
|
@@ -15,5 +16,6 @@ RuboCop::RakeTask.new do |task|
|
|
15
16
|
task.patterns = ['lib/**/*.rb']
|
16
17
|
end
|
17
18
|
|
18
|
-
|
19
|
-
|
19
|
+
Reek::Rake::Task.new
|
20
|
+
|
21
|
+
task default: [:test, :reek, :rubocop]
|
data/lib/transitions/event.rb
CHANGED
@@ -1,11 +1,11 @@
|
|
1
1
|
module Transitions
|
2
2
|
module Presenter
|
3
3
|
def available_states
|
4
|
-
get_state_machine.states.map(&:name)
|
4
|
+
get_state_machine.states.map(&:name)
|
5
5
|
end
|
6
6
|
|
7
7
|
def available_events
|
8
|
-
get_state_machine.events.keys
|
8
|
+
get_state_machine.events.keys
|
9
9
|
end
|
10
10
|
end
|
11
11
|
end
|
data/lib/transitions/version.rb
CHANGED
data/transitions.gemspec
CHANGED
@@ -24,5 +24,6 @@ Gem::Specification.new do |spec|
|
|
24
24
|
spec.add_development_dependency 'random_data'
|
25
25
|
spec.add_development_dependency 'appraisal'
|
26
26
|
spec.add_development_dependency 'activerecord', ['>= 3.0', '<= 4.0']
|
27
|
-
spec.add_development_dependency 'rubocop', '~> 0.36'
|
27
|
+
spec.add_development_dependency 'rubocop', '~> 0.36.0'
|
28
|
+
spec.add_development_dependency 'reek'
|
28
29
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: transitions
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0
|
4
|
+
version: 1.1.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Timo Rößner
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-
|
11
|
+
date: 2016-04-08 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -120,14 +120,28 @@ dependencies:
|
|
120
120
|
requirements:
|
121
121
|
- - "~>"
|
122
122
|
- !ruby/object:Gem::Version
|
123
|
-
version:
|
123
|
+
version: 0.36.0
|
124
124
|
type: :development
|
125
125
|
prerelease: false
|
126
126
|
version_requirements: !ruby/object:Gem::Requirement
|
127
127
|
requirements:
|
128
128
|
- - "~>"
|
129
129
|
- !ruby/object:Gem::Version
|
130
|
-
version:
|
130
|
+
version: 0.36.0
|
131
|
+
- !ruby/object:Gem::Dependency
|
132
|
+
name: reek
|
133
|
+
requirement: !ruby/object:Gem::Requirement
|
134
|
+
requirements:
|
135
|
+
- - ">="
|
136
|
+
- !ruby/object:Gem::Version
|
137
|
+
version: '0'
|
138
|
+
type: :development
|
139
|
+
prerelease: false
|
140
|
+
version_requirements: !ruby/object:Gem::Requirement
|
141
|
+
requirements:
|
142
|
+
- - ">="
|
143
|
+
- !ruby/object:Gem::Version
|
144
|
+
version: '0'
|
131
145
|
description: Lightweight state machine extracted from ActiveModel
|
132
146
|
email:
|
133
147
|
- timo.roessner@googlemail.com
|
@@ -135,9 +149,11 @@ executables: []
|
|
135
149
|
extensions: []
|
136
150
|
extra_rdoc_files: []
|
137
151
|
files:
|
152
|
+
- ".codeclimate.yml"
|
138
153
|
- ".gitignore"
|
139
154
|
- ".rubocop.yml"
|
140
155
|
- ".ruby-version"
|
156
|
+
- ".todo.reek"
|
141
157
|
- ".travis.yml"
|
142
158
|
- Appraisals
|
143
159
|
- CHANGELOG.md
|