public
Rubygem
Description: Merb plugin that provides forgery protection against css attacks
Clone URL: git://github.com/bchiu/merb_forgery_protection.git
changed some constants to avoid collision, added install_frozen to rake 
tasks
bchiu (author)
Sun Jun 01 17:34:31 -0700 2008
commit  ae248739d5af999febf59d2596dd898c29bbcdd4
tree    93301c654431999b2f4c4960df2abd8722f70cd8
parent  b4fcdd82b158f5453f672d3c81adaf3c5e4c5743
...
37
38
39
 
 
 
 
40
41
42
...
37
38
39
40
41
42
43
44
45
46
0
@@ -37,6 +37,10 @@ task :install => [:package] do
0
   sh %{#{sudo} #{gemx} install pkg/#{NAME}-#{GEM_VERSION} --local --no-update-sources}
0
 end
0
 
0
+task :install_frozen => [:package] do
0
+ sh %{#{sudo} #{gemx} install pkg/#{NAME}-#{GEM_VERSION} -i ../../ --local --no-update-sources}
0
+end
0
+
0
 desc "create a gemspec file"
0
 task :make_spec do
0
   File.open("#{NAME}.gemspec", "w") do |file|
...
2
3
4
5
 
6
7
8
9
10
11
12
 
13
14
15
...
2
3
4
 
5
6
7
8
9
10
11
 
12
13
14
15
0
@@ -2,14 +2,14 @@ if defined?(Merb::Plugins)
0
   require 'merb_forgery_protection/forgery_protection'
0
   require 'merb_forgery_protection/form_helpers'
0
 
0
- DEFAULT_CONFIG = {
0
+ FORGERY_PROTECTION_CONFIG = {
0
     :secret => Merb::Config[:session_secret_key],
0
     :enable => true,
0
     :digest => 'SHA1',
0
     :token_name => :authenticity_token
0
   }
0
 
0
- Merb::Plugins.config[:merb_forgery_protection] = DEFAULT_CONFIG.update(
0
+ Merb::Plugins.config[:merb_forgery_protection] = FORGERY_PROTECTION_CONFIG.update(
0
     Merb::Plugins.config[:merb_forgery_protection]||{}
0
   )
0
 

Comments

    No one has commented yet.