public
Rubygem
Description: Merb Core: All you need. None you don't.
Homepage: http://www.merbivore.com
Clone URL: git://github.com/wycats/merb-core.git
Search Repo:
A bunch of little syntax errors and a rake task for checking syntax
wycats (author)
Sat Jan 12 23:25:37 -0800 2008
commit  91fd22403178475fe75fa564bdbbe0bdcb7ddaae
tree    d441c4689c0526ef567586b93dd5084157839a2d
parent  52247584630bc51b036149fb1736ee2a32e17cb3
...
17
18
19
20
 
21
22
23
...
47
48
49
50
 
51
52
53
...
174
175
176
 
 
 
 
 
 
 
 
 
177
178
179
...
17
18
19
 
20
21
22
23
...
47
48
49
 
50
51
52
53
...
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
0
@@ -17,7 +17,7 @@ include FileUtils
0
 
0
 NAME = "merb"
0
 
0
-require "lib/merb/version"
0
+require "lib/merb_core/version"
0
 
0
 ##############################################################################
0
 # Packaging & Installation
0
@@ -47,7 +47,7 @@ spec = Gem::Specification.new do |s|
0
   s.description = s.summary
0
   s.executables = %w( merb )
0
   s.require_path = "lib"
0
- s.files = %w( LICENSE README Rakefile TODO ) + [Merb.svn_revision_filename] + Dir["{bin,spec,lib,examples,app_generators,merb_generators,merb_default_generators,rspec_generators,test_unit_generators,script}/**/*"]
0
+ s.files = %w( LICENSE README Rakefile TODO ) + Dir["{bin,spec,lib,examples,app_generators,merb_generators,merb_default_generators,rspec_generators,test_unit_generators,script}/**/*"]
0
 
0
   # rdoc
0
   s.has_rdoc = true
0
@@ -174,6 +174,15 @@ task :release => :package do
0
 end
0
 
0
 ##############################################################################
0
+# SYNTAX CHECKING
0
+##############################################################################
0
+
0
+task :check_syntax do
0
+ `find . -name "*.rb" |xargs -n1 ruby -c |grep -v "Syntax OK"`
0
+ puts "* Done"
0
+end
0
+
0
+##############################################################################
0
 # SVN
0
 ##############################################################################
0
 namespace :repo do
...
7
8
9
10
 
 
11
12
13
14
15
16
17
 
 
 
18
19
20
...
23
24
25
26
 
27
28
29
30
 
31
32
33
34
 
35
36
37
...
49
50
51
52
 
53
54
55
56
 
 
 
57
58
59
...
7
8
9
 
10
11
12
13
14
15
 
 
 
16
17
18
19
20
21
...
24
25
26
 
27
28
29
30
 
31
32
33
34
 
35
36
37
38
...
50
51
52
 
53
54
 
 
 
55
56
57
58
59
60
0
@@ -7,14 +7,15 @@ module Merb
0
   class BootLoader
0
     
0
     cattr_accessor :subclasses
0
- class_inheritable_accessor :after, :before
0
+ self.subclasses = []
0
+ class_inheritable_accessor :_after, :_before
0
     
0
     class << self
0
       
0
       def inherited(klass)
0
- unless klass.before || klass.after
0
- subclasses << klass.to_s
0
- elsif klass.before
0
+ if !klass._before && !klass._after
0
+ subclasses << klass
0
+ elsif klass._before
0
           subclasses.insert(subclasses.index(klass.before), klass)
0
         else
0
           subclasses.insert(subclasses.index(klass.before) + 1, klass)
0
@@ -23,15 +24,15 @@ module Merb
0
       end
0
       
0
       def run
0
- subclasses.each {|klass| klass.new.run! }
0
+ subclasses.each {|klass| klass.new.run }
0
       end
0
       
0
       def after(klass)
0
- after = klass
0
+ self.after = klass
0
       end
0
       
0
       def before(klass)
0
- before = klass
0
+ self.before = klass
0
       end
0
       
0
     end
0
@@ -49,11 +50,11 @@ class Merb::BootLoader::BuildFramework < Merb::BootLoader
0
   # framework structure
0
   def build_framework
0
     %[view model controller helper mailer part].each do |component|
0
- Merb.push_path(component.to_sym, Merb.root_path "app/#{component}s")
0
+ Merb.push_path(component.to_sym, Merb.root_path("app/#{component}s"))
0
     end
0
- Merb.push_path(:app_controller, Merb.root_path "app/controllers", "application_controller.rb")
0
- Merb.push_path(:config, Merb.root_path "config", "router.rb")
0
- Merb.push_path(:lib, Merb.root_path "lib")
0
+ Merb.push_path(:app_controller, Merb.root_path("app/controllers", "application_controller.rb"))
0
+ Merb.push_path(:config, Merb.root_path("config", "router.rb"))
0
+ Merb.push_path(:lib, Merb.root_path("lib"))
0
   end
0
 end
0
 
...
166
167
168
 
 
169
170
171
...
166
167
168
169
170
171
172
173
0
@@ -166,6 +166,8 @@ class Merb::AbstractController
0
         case filter
0
         when Symbol, String then send(filter)
0
         when Proc then self.instance_eval(&filter)
0
+ end
0
+ end
0
     end
0
     return :filter_chain_completed
0
   end
...
33
34
35
36
 
37
38
39
...
33
34
35
 
36
37
38
39
0
@@ -33,7 +33,7 @@ class Merb::Controller < AbstractController
0
     # ==== Parameters
0
     # *names<~to-s>:: Actions that should be added to the list
0
     def hide_action(*names)
0
- _hidden_actions = _hidden_actions | names.collect { |n| n.to_s })
0
+ _hidden_actions = _hidden_actions | names.collect { |n| n.to_s }
0
     end
0
     
0
     # Build a new controller.
...
1
 
 
 
...
 
1
2
3
0
@@ -1 +1,3 @@
0
-Merb::VERSION = '0.9' unless defined?(Merb::VERSION)
0
+module Merb
0
+ VERSION = '0.9' unless defined?(Merb::VERSION)
0
+end

Comments

    No one has commented yet.