pipeline 0.0.3 → 0.0.4

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/CHANGELOG CHANGED
@@ -1,3 +1,7 @@
1
+ 0.0.4
2
+ =====
3
+ * Allowing for custom name on stage
4
+
1
5
  0.0.3
2
6
  =====
3
7
 
data/README.rdoc CHANGED
@@ -21,7 +21,7 @@ Known Issues:
21
21
 
22
22
  Add the following lines to your config/environment.rb file:
23
23
 
24
- config.gem "pipeline", :version => ">= 0.0.3"
24
+ config.gem "pipeline"
25
25
 
26
26
  Run the following:
27
27
 
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.0.3
1
+ 0.0.4
@@ -25,8 +25,10 @@ module Pipeline
25
25
  chain
26
26
  end
27
27
 
28
+ class_inheritable_accessor :default_name, :instance_writer => false
29
+
28
30
  def after_initialize
29
- self.name ||= self.class.to_s
31
+ self.name ||= (default_name || self.class).to_s
30
32
  self[:status] = :not_started if new_record?
31
33
  end
32
34
 
data/pipeline.gemspec CHANGED
@@ -2,11 +2,11 @@
2
2
 
3
3
  Gem::Specification.new do |s|
4
4
  s.name = %q{pipeline}
5
- s.version = "0.0.3"
5
+ s.version = "0.0.4"
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"]
9
- s.date = %q{2009-07-31}
9
+ s.date = %q{2009-08-05}
10
10
  s.description = %q{Pipeline is a Rails plugin/gem to run asynchronous processes in a configurable pipeline.}
11
11
  s.email = %q{danilo@dtsato.com}
12
12
  s.extra_rdoc_files = [
@@ -37,6 +37,14 @@ module Pipeline
37
37
  Base.new.name.should == "Pipeline::Stage::Base"
38
38
  SampleStage.new.name.should == "SampleStage"
39
39
  end
40
+
41
+ it "should allow overriding name at class level" do
42
+ SampleStage.default_name = "My custom stage name"
43
+ SampleStage.new.name.should == "My custom stage name"
44
+
45
+ SampleStage.default_name = :some_symbol
46
+ SampleStage.new.name.should == "some_symbol"
47
+ end
40
48
 
41
49
  it "should allow specifying a name on creation" do
42
50
  Base.new(:name => "My Name").name.should == "My Name"
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.3
4
+ version: 0.0.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Danilo Sato
@@ -9,7 +9,7 @@ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
 
12
- date: 2009-07-31 00:00:00 +01:00
12
+ date: 2009-08-05 00:00:00 +01:00
13
13
  default_executable:
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency