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 +4 -0
- data/README.rdoc +1 -1
- data/VERSION +1 -1
- data/lib/pipeline/stage/base.rb +3 -1
- data/pipeline.gemspec +2 -2
- data/spec/pipeline/stage/base_spec.rb +8 -0
- metadata +2 -2
data/CHANGELOG
CHANGED
data/README.rdoc
CHANGED
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.0.
|
1
|
+
0.0.4
|
data/lib/pipeline/stage/base.rb
CHANGED
@@ -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.
|
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-
|
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.
|
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-
|
12
|
+
date: 2009-08-05 00:00:00 +01:00
|
13
13
|
default_executable:
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|