public
Rubygem
Description: Merb plugin that provides forgery protection against css attacks
Clone URL: git://github.com/bchiu/merb_forgery_protection.git
updated rakefile
bchiu (author)
Mon Jun 02 22:00:58 -0700 2008
commit  349dab1ed95e498f9b2801349966bd08e3b53fc1
tree    bb800d0290efcef2ea3325a1bac0f166c01fcc83
parent  00b034c3b88b5a8bb4a9964dd57f8585d36eb2ca
...
1
2
3
 
 
 
4
5
6
...
37
38
39
 
40
41
 
 
 
 
 
42
43
44
...
1
 
2
3
4
5
6
7
8
...
39
40
41
42
43
 
44
45
46
47
48
49
50
51
0
@@ -1,6 +1,8 @@
0
 require 'rubygems'
0
-require 'rake/gempackagetask'
0
 require 'rubygems/specification'
0
+require 'rake/gempackagetask'
0
+require 'spec/rake/spectask'
0
+require 'merb-core/test/tasks/spectasks'
0
 require 'date'
0
 require 'merb_rake_helper'
0
 
0
@@ -37,8 +39,13 @@ task :install => [:package] do
0
   sh %{#{sudo} #{gemx} install pkg/#{NAME}-#{GEM_VERSION} --local --no-update-sources}
0
 end
0
 
0
+desc "install frozen (source must be located somewhere inside main frozen gems folder)"
0
 task :install_frozen => [:package] do
0
- sh %{#{sudo} #{gemx} install pkg/#{NAME}-#{GEM_VERSION} -i ../../ --local --no-update-sources}
0
+ if !path = gems_path
0
+ puts "source must be located somewhere inside main frozen gems folder"
0
+ else
0
+ sh %{#{sudo} #{gemx} install pkg/#{NAME}-#{GEM_VERSION} -i #{path} --local --no-update-sources}
0
+ end
0
 end
0
 
0
 desc "create a gemspec file"
...
13
14
15
 
 
 
 
 
 
 
 
 
16
...
13
14
15
16
17
18
19
20
21
22
23
24
25
0
@@ -13,3 +13,12 @@ def rakex
0
   win32 = (PLATFORM =~ /win32/) rescue nil
0
   win32 ? 'rake.bat' : 'rake'
0
 end
0
+
0
+def gems_path
0
+ d, cwd = nil, Dir.pwd
0
+ 3.times do
0
+ Dir.chdir('..')
0
+ d = Dir.pwd and break if Dir.pwd =~ /\/gems$/i
0
+ end
0
+ Dir.chdir(cwd) and d
0
+end
0
\ No newline at end of file

Comments

    No one has commented yet.