pipeline 0.0.1 → 0.0.2

Sign up to get free protection for your applications and to get access to all the features.
data/CHANGELOG CHANGED
@@ -1,7 +1,15 @@
1
+ 0.0.2
2
+ =====
3
+
4
+ Bug Fix:
5
+ * Bundling migrations on generator to avoid timestamp clashing
6
+
1
7
  0.0.1
2
8
  =====
3
9
 
4
- Initial Release:
10
+ Initial Release
11
+
12
+ Features:
5
13
  * Execution of sequential user-defined stages in an asynchronous pipeline
6
14
  * Persistence of pipeline instances and stages
7
15
  * Error recovery strategies:
data/README.rdoc CHANGED
@@ -18,7 +18,7 @@ Pipeline is a Rails plugin/gem to run asynchronous processes in a configurable p
18
18
 
19
19
  Add the following lines to your config/environment.rb file:
20
20
 
21
- config.gem "dtsato-pipeline", :version => ">= 0.0.1", :source => "http://gems.github.com"
21
+ config.gem "pipeline", :version => ">= 0.0.2"
22
22
 
23
23
  Run the following:
24
24
 
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.0.1
1
+ 0.0.2
@@ -2,10 +2,8 @@ class PipelineGenerator < Rails::Generator::Base
2
2
 
3
3
  def manifest
4
4
  record do |m|
5
- m.migration_template "pipeline_instances_migration.rb", 'db/migrate',
6
- :migration_file_name => "create_pipeline_instances"
7
- m.migration_template "pipeline_stages_migration.rb", 'db/migrate',
8
- :migration_file_name => "create_pipeline_stages"
5
+ m.migration_template "migration.rb", 'db/migrate',
6
+ :migration_file_name => "create_pipeline_instances_and_stages"
9
7
  end
10
8
  end
11
9
 
@@ -1,5 +1,13 @@
1
- class CreatePipelineStages < ActiveRecord::Migration
1
+ class CreatePipelineInstancesAndStages < ActiveRecord::Migration
2
2
  def self.up
3
+ create_table :pipeline_instances, :force => true do |t|
4
+ t.string :type # For single table inheritance
5
+ t.string :status # Current status of the pipeline
6
+ t.integer :attempts, :default => 0 # Number of times this pipeline was executed
7
+
8
+ t.timestamps
9
+ end
10
+
3
11
  create_table :pipeline_stages, :force => true do |t|
4
12
  t.references :pipeline_instance # Pipeline that holds this stage
5
13
  t.string :type # For single table inheritance
@@ -9,11 +17,10 @@ class CreatePipelineStages < ActiveRecord::Migration
9
17
  t.integer :attempts, :default => 0 # Number of times this stage was executed
10
18
 
11
19
  t.timestamps
12
- end
13
-
14
20
  end
15
21
 
16
22
  def self.down
17
- drop_table :pipeline_stages
23
+ drop_table :pipeline_stages
24
+ drop_table :pipeline_instances
18
25
  end
19
26
  end
data/pipeline.gemspec CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  Gem::Specification.new do |s|
4
4
  s.name = %q{pipeline}
5
- s.version = "0.0.1"
5
+ s.version = "0.0.2"
6
6
 
7
7
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
8
8
  s.authors = ["Danilo Sato"]
@@ -24,8 +24,7 @@ Gem::Specification.new do |s|
24
24
  "examples/two_step_pipeline.rb",
25
25
  "examples/user_recoverable_pipeline.rb",
26
26
  "generators/pipeline/pipeline_generator.rb",
27
- "generators/pipeline/templates/pipeline_instances_migration.rb",
28
- "generators/pipeline/templates/pipeline_stages_migration.rb",
27
+ "generators/pipeline/templates/migration.rb",
29
28
  "init.rb",
30
29
  "lib/pipeline.rb",
31
30
  "lib/pipeline/api_methods.rb",
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: pipeline
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Danilo Sato
@@ -52,8 +52,7 @@ files:
52
52
  - examples/two_step_pipeline.rb
53
53
  - examples/user_recoverable_pipeline.rb
54
54
  - generators/pipeline/pipeline_generator.rb
55
- - generators/pipeline/templates/pipeline_instances_migration.rb
56
- - generators/pipeline/templates/pipeline_stages_migration.rb
55
+ - generators/pipeline/templates/migration.rb
57
56
  - init.rb
58
57
  - lib/pipeline.rb
59
58
  - lib/pipeline/api_methods.rb
@@ -1,16 +0,0 @@
1
- class CreatePipelineInstances < ActiveRecord::Migration
2
- def self.up
3
- create_table :pipeline_instances, :force => true do |t|
4
- t.string :type # For single table inheritance
5
- t.string :status # Current status of the pipeline
6
- t.integer :attempts, :default => 0 # Number of times this pipeline was executed
7
-
8
- t.timestamps
9
- end
10
-
11
- end
12
-
13
- def self.down
14
- drop_table :pipeline_instances
15
- end
16
- end