pakada 0.2.0 → 0.2.1
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/pakada/module.rb +2 -2
- data/lib/pakada/version.rb +1 -1
- data/lib/pakada.rb +1 -1
- data/spec/module_spec.rb +2 -2
- data/spec/pakada_spec.rb +1 -1
- metadata +5 -7
data/lib/pakada/module.rb
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
class Pakada
|
2
2
|
module Module
|
3
|
-
@descendants =
|
3
|
+
@descendants = []
|
4
4
|
|
5
5
|
class << self
|
6
6
|
attr_reader :descendants
|
@@ -25,7 +25,7 @@ class Pakada
|
|
25
25
|
klass.instance_variable_set :@path, detect_path(file)
|
26
26
|
end
|
27
27
|
|
28
|
-
@descendants
|
28
|
+
@descendants << klass
|
29
29
|
end
|
30
30
|
|
31
31
|
def detect_name(klass)
|
data/lib/pakada/version.rb
CHANGED
data/lib/pakada.rb
CHANGED
data/spec/module_spec.rb
CHANGED
@@ -5,7 +5,7 @@ require "spec_helper"
|
|
5
5
|
describe Pakada::Module do
|
6
6
|
describe ".descendants" do
|
7
7
|
it "keeps a list containing its descendants" do
|
8
|
-
Pakada::Module.descendants.should ==
|
8
|
+
Pakada::Module.descendants.should == []
|
9
9
|
end
|
10
10
|
end
|
11
11
|
|
@@ -120,7 +120,7 @@ describe Pakada::Module do
|
|
120
120
|
@module_name = :some_module
|
121
121
|
include Pakada::Module
|
122
122
|
end
|
123
|
-
Pakada::Module.descendants
|
123
|
+
Pakada::Module.descendants.should include(klass)
|
124
124
|
end
|
125
125
|
end
|
126
126
|
end
|
data/spec/pakada_spec.rb
CHANGED
@@ -100,7 +100,7 @@ describe Pakada do
|
|
100
100
|
mod = double "module"
|
101
101
|
modcls = double "module class", :module_name => :foo
|
102
102
|
modcls.should_receive(:new) { mod }
|
103
|
-
Pakada::Module.stub(:descendants) {
|
103
|
+
Pakada::Module.stub(:descendants) { [modcls] }
|
104
104
|
|
105
105
|
subject.load_modules
|
106
106
|
subject.modules[:foo].should == mod
|
metadata
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
name: pakada
|
3
3
|
version: !ruby/object:Gem::Version
|
4
4
|
prerelease:
|
5
|
-
version: 0.2.
|
5
|
+
version: 0.2.1
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
8
8
|
- Lars Gierth
|
@@ -10,8 +10,7 @@ autorequire:
|
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
12
|
|
13
|
-
date: 2011-
|
14
|
-
default_executable:
|
13
|
+
date: 2011-05-06 00:00:00 Z
|
15
14
|
dependencies:
|
16
15
|
- !ruby/object:Gem::Dependency
|
17
16
|
name: rack
|
@@ -90,7 +89,6 @@ files:
|
|
90
89
|
- spec/module_spec.rb
|
91
90
|
- spec/pakada_spec.rb
|
92
91
|
- spec/spec_helper.rb
|
93
|
-
has_rdoc: true
|
94
92
|
homepage: https://rubygems.org/gems/pakada
|
95
93
|
licenses: []
|
96
94
|
|
@@ -104,7 +102,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
104
102
|
requirements:
|
105
103
|
- - ">="
|
106
104
|
- !ruby/object:Gem::Version
|
107
|
-
hash:
|
105
|
+
hash: -121495153
|
108
106
|
segments:
|
109
107
|
- 0
|
110
108
|
version: "0"
|
@@ -113,14 +111,14 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
113
111
|
requirements:
|
114
112
|
- - ">="
|
115
113
|
- !ruby/object:Gem::Version
|
116
|
-
hash:
|
114
|
+
hash: -121495153
|
117
115
|
segments:
|
118
116
|
- 0
|
119
117
|
version: "0"
|
120
118
|
requirements: []
|
121
119
|
|
122
120
|
rubyforge_project:
|
123
|
-
rubygems_version: 1.
|
121
|
+
rubygems_version: 1.8.1
|
124
122
|
signing_key:
|
125
123
|
specification_version: 3
|
126
124
|
summary: Very Extensible HTTP Container For Ruby
|