workflow_kit 0.0.1.apha → 0.0.2.alpha
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.
- data/.travis.yml +2 -0
- data/Gemfile.lock +1 -1
- data/README.md +1 -1
- data/app/models/workflow_kit/workflow.rb +5 -1
- data/lib/workflow_kit/version.rb +1 -1
- data/spec/models/brick_spec.rb +2 -2
- data/spec/models/workflow_spec.rb +2 -1
- metadata +3 -2
data/.travis.yml
ADDED
data/Gemfile.lock
CHANGED
data/README.md
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
# WorkflowKit
|
1
|
+
# WorkflowKit [](http://travis-ci.org/fiedl/workflow_kit)
|
2
2
|
|
3
3
|
This *ruby on rails gem* provides a *workflow construction kit* for rails apps. Users can arrange workflow bricks in a sequence for each workflow and add parameters. When a workflow is executed, each workflow brick executes a callback method written in ruby and passes the parameters.
|
4
4
|
|
@@ -3,7 +3,7 @@ module WorkflowKit
|
|
3
3
|
|
4
4
|
attr_accessible :description, :name, :parameters
|
5
5
|
|
6
|
-
has_many :steps, dependent: :destroy
|
6
|
+
has_many :steps, dependent: :destroy
|
7
7
|
|
8
8
|
extend WorkflowKit::Parameterable
|
9
9
|
has_many_parameters
|
@@ -16,5 +16,9 @@ module WorkflowKit
|
|
16
16
|
end
|
17
17
|
end
|
18
18
|
|
19
|
+
def steps
|
20
|
+
super.order( :sequence_index ).order( :created_at )
|
21
|
+
end
|
22
|
+
|
19
23
|
end
|
20
24
|
end
|
data/lib/workflow_kit/version.rb
CHANGED
data/spec/models/brick_spec.rb
CHANGED
@@ -27,8 +27,8 @@ describe WorkflowKit::Brick do
|
|
27
27
|
describe ".all" do
|
28
28
|
subject { WorkflowKit::Brick.all }
|
29
29
|
it "should list all inherited classes, i.e. the different kind of WorkflowBricks" do
|
30
|
-
subject
|
31
|
-
[WorkflowKit::BoilWaterBrick, WorkflowKit::BoilSpaghettiBrick, WorkflowKit::ServeSpaghettiBrick]
|
30
|
+
(subject & [WorkflowKit::BoilWaterBrick, WorkflowKit::BoilSpaghettiBrick, WorkflowKit::ServeSpaghettiBrick] )
|
31
|
+
.should == [WorkflowKit::BoilWaterBrick, WorkflowKit::BoilSpaghettiBrick, WorkflowKit::ServeSpaghettiBrick]
|
32
32
|
end
|
33
33
|
end
|
34
34
|
|
@@ -15,7 +15,8 @@ describe WorkflowKit::Workflow do
|
|
15
15
|
it "should list the sequence entries" do
|
16
16
|
subject.count.should == 3
|
17
17
|
end
|
18
|
-
it { should be_kind_of(
|
18
|
+
it { should be_kind_of( ActiveRecord::Relation ) }
|
19
|
+
its( :all ) { should be_kind_of( Array ) }
|
19
20
|
its( :first ) { should be_kind_of( WorkflowKit::Step ) }
|
20
21
|
end
|
21
22
|
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: workflow_kit
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.2.alpha
|
5
5
|
prerelease: 6
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -183,6 +183,7 @@ extra_rdoc_files: []
|
|
183
183
|
files:
|
184
184
|
- .gitignore
|
185
185
|
- .rspec
|
186
|
+
- .travis.yml
|
186
187
|
- Gemfile
|
187
188
|
- Gemfile.lock
|
188
189
|
- Guardfile
|
@@ -287,7 +288,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
287
288
|
version: '0'
|
288
289
|
segments:
|
289
290
|
- 0
|
290
|
-
hash: -
|
291
|
+
hash: -1050207759
|
291
292
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
292
293
|
none: false
|
293
294
|
requirements:
|