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 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[klass.module_name] = klass
28
+ @descendants << klass
29
29
  end
30
30
 
31
31
  def detect_name(klass)
@@ -1,3 +1,3 @@
1
1
  class Pakada
2
- VERSION = "0.2.0"
2
+ VERSION = "0.2.1"
3
3
  end
data/lib/pakada.rb CHANGED
@@ -43,7 +43,7 @@ class Pakada
43
43
  end
44
44
 
45
45
  def load_modules
46
- @modules = Pakada::Module.descendants.values.inject({}) do |h, m|
46
+ @modules = Pakada::Module.descendants.inject({}) do |h, m|
47
47
  h[m.module_name] = m.new; h
48
48
  end
49
49
  end
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[:some_module].should == klass
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) { {:foo => modcls} }
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.0
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-04-20 00:00:00 +02:00
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: 895770369
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: 895770369
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.6.2
121
+ rubygems_version: 1.8.1
124
122
  signing_key:
125
123
  specification_version: 3
126
124
  summary: Very Extensible HTTP Container For Ruby