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 ADDED
@@ -0,0 +1,2 @@
1
+ before_script:
2
+ - "sh -c 'bundle & bundle exec rake db:drop db:migrate'"
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- workflow_kit (0.0.1.apha)
4
+ workflow_kit (0.0.2.alpha)
5
5
  rails (~> 3.2.6)
6
6
 
7
7
  GEM
data/README.md CHANGED
@@ -1,4 +1,4 @@
1
- # WorkflowKit
1
+ # WorkflowKit [![Build Status](https://secure.travis-ci.org/fiedl/workflow_kit.png?branch=master)](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, order: :sequence_index
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
@@ -1,3 +1,3 @@
1
1
  module WorkflowKit
2
- VERSION = "0.0.1.apha"
2
+ VERSION = "0.0.2.alpha"
3
3
  end
@@ -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.should ==
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( Array ) }
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.1.apha
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: -236265873
291
+ hash: -1050207759
291
292
  required_rubygems_version: !ruby/object:Gem::Requirement
292
293
  none: false
293
294
  requirements: