public
Description: a collection of thor commands for merb
Clone URL: git://github.com/jackdempsey/merb-thor.git
Search Repo:
use more concise block forms
jackdempsey (author)
Tue Jul 15 22:00:31 -0700 2008
commit  914495b415b6a16f288ee7ca1f4332e307ce8a93
tree    7b6dac2a19293a040541992087d9db3896d529e1
parent  27ae1c1effbb1e4da63134e1c8718a0e4aedac0c
...
23
24
25
26
27
28
29
30
 
 
 
 
 
31
32
33
...
55
56
57
58
59
60
61
62
63
64
65
66
 
67
68
69
70
71
72
73
 
74
75
76
77
78
79
80
 
81
82
83
 
84
...
23
24
25
 
 
 
 
 
26
27
28
29
30
31
32
33
...
55
56
57
 
58
59
60
61
62
 
 
 
63
64
65
66
67
 
 
 
68
69
70
71
72
 
 
 
73
74
75
 
76
77
0
@@ -23,11 +23,11 @@ class Merb < Thor
0
       end
0
     end
0
     MERB_REPOS.each do |r|
0
- FileUtils.cd(r)
0
- system("git fetch")
0
- system("git checkout master")
0
- system("git rebase origin/master")
0
- FileUtils.cd("..")
0
+ FileUtils.cd(r) do
0
+ system("git fetch")
0
+ system("git checkout master")
0
+ system("git rebase origin/master")
0
+ end
0
     end
0
   end
0
   
0
@@ -55,29 +55,22 @@ class Merb < Thor
0
       merb.update
0
       merb.install
0
     end
0
-
0
   end
0
 
0
   class Install < Thor
0
     desc 'core', 'Install merb-core'
0
     def core
0
- FileUtils.cd("merb-core")
0
- system("rake install")
0
- FileUtils.cd("..")
0
+ FileUtils.cd("merb-core") { system("rake install") }
0
     end
0
     
0
     desc 'more', 'Install merb-more'
0
     def more
0
- FileUtils.cd("merb-more")
0
- system("rake install")
0
- FileUtils.cd("..")
0
+ FileUtils.cd("merb-more") { system("rake install") }
0
     end
0
     
0
     desc 'plugins', 'Install merb-plugins'
0
     def plugins
0
- FileUtils.cd("merb-plugins")
0
- system("rake install")
0
- FileUtils.cd("..")
0
+ FileUtils.cd("merb-plugins") { system("rake install") }
0
     end
0
   end
0
-end
0
+end
0
\ No newline at end of file

Comments

    No one has commented yet.