public
Fork of wycats/merb-core
Description: Merb Core: All you need. None you don't.
Homepage: http://www.merbivore.com
Clone URL: git://github.com/daikini/merb-core.git
Search Repo:
Better usage of merb_rake_helper.rb
fabien (author)
Tue May 27 06:56:03 -0700 2008
commit  b5b270f14c58f832fbfefa2c38775d9c05e872a5
tree    e64de46aa76d2289937b26641d42320bd5b7b887
parent  14999ffc159f654e7a27d61ee55436613e8e166d
...
19
20
21
 
22
23
24
25
26
27
28
29
30
31
32
33
34
35
...
72
73
74
75
 
76
77
78
79
80
 
81
82
83
84
85
 
86
87
88
...
143
144
145
146
 
147
148
149
...
19
20
21
22
23
24
25
26
27
28
 
 
 
 
 
29
30
31
...
68
69
70
 
71
72
73
74
75
 
76
77
78
79
80
 
81
82
83
84
...
139
140
141
 
142
143
144
145
0
@@ -19,17 +19,13 @@ NAME = "merb-core"
0
 
0
 require "lib/merb-core/version"
0
 require "lib/merb-core/test/run_specs"
0
+require 'lib/merb-core/tasks/merb_rake_helper'
0
 
0
 ##############################################################################
0
 # Packaging & Installation
0
 ##############################################################################
0
 CLEAN.include ["**/.*.sw?", "pkg", "lib/*.bundle", "*.gem", "doc/rdoc", ".config", "coverage", "cache"]
0
 
0
-windows = (PLATFORM =~ /win32|cygwin/) rescue nil
0
-install_home = ENV['GEM_HOME'] ? "-i #{ENV['GEM_HOME']}" : ""
0
-
0
-SUDO = windows ? "" : "sudo"
0
-
0
 desc "Packages up Merb."
0
 task :default => :package
0
 
0
@@ -72,17 +68,17 @@ end
0
 
0
 desc "Run :package and install the resulting .gem"
0
 task :install => :package do
0
- sh %{#{SUDO} gem install #{install_home} --local pkg/#{NAME}-#{Merb::VERSION}.gem --no-rdoc --no-ri}
0
+ sh %{#{sudo} gem install #{install_home} --local pkg/#{NAME}-#{Merb::VERSION}.gem --no-rdoc --no-ri}
0
 end
0
 
0
 desc "Run :package and install the resulting .gem with jruby"
0
 task :jinstall => :package do
0
- sh %{#{SUDO} jruby -S gem install #{install_home} pkg/#{NAME}-#{Merb::VERSION}.gem --no-rdoc --no-ri}
0
+ sh %{#{sudo} jruby -S gem install #{install_home} pkg/#{NAME}-#{Merb::VERSION}.gem --no-rdoc --no-ri}
0
 end
0
 
0
 desc "Run :clean and uninstall the .gem"
0
 task :uninstall => :clean do
0
- sh %{#{SUDO} gem uninstall #{NAME}}
0
+ sh %{#{sudo} gem uninstall #{NAME}}
0
 end
0
 
0
 namespace :github do
0
@@ -143,7 +139,7 @@ namespace :doc do
0
   desc "rdoc to rubyforge"
0
   task :rubyforge do
0
     # sh %{rake doc}
0
- sh %{#{SUDO} chmod -R 755 doc} unless windows
0
+ sh %{#{sudo} chmod -R 755 doc} unless windows?
0
     sh %{/usr/bin/scp -r -p doc/rdoc/* ezmobius@rubyforge.org:/var/www/gforge-projects/merb}
0
   end
0
 
...
1
2
 
3
...
 
 
1
2
0
@@ -1,2 +1 @@
0
-Dir[File.dirname(__FILE__) / '*.rake'].each { |ext| load ext }
0
-
0
+Dir[File.dirname(__FILE__) / '*.rake'].each { |ext| load ext }
0
\ No newline at end of file
...
1
2
3
4
 
 
 
 
 
 
 
 
 
5
6
...
1
 
2
 
3
4
5
6
7
8
9
10
11
12
13
0
@@ -1,5 +1,12 @@
0
 def sudo
0
- windows = (PLATFORM =~ /win32|cygwin/) rescue nil
0
   ENV['MERB_SUDO'] ||= "sudo"
0
- sudo = windows ? "" : ENV['MERB_SUDO']
0
+ sudo = windows? ? "" : ENV['MERB_SUDO']
0
+end
0
+
0
+def windows?
0
+ (PLATFORM =~ /win32|cygwin/) rescue nil
0
+end
0
+
0
+def install_home
0
+ ENV['GEM_HOME'] ? "-i #{ENV['GEM_HOME']}" : ""
0
 end
0
\ No newline at end of file

Comments

    No one has commented yet.