lockdown 0.4.5 → 0.4.6

Sign up to get free protection for your applications and to get access to all the features.
data/History.txt CHANGED
@@ -1,3 +1,6 @@
1
+ == 0.4.6 2008-05-08
2
+ * Fixed: link_to destroy/show conditionals were in wrong order and therefore not working.
3
+
1
4
  == 0.4.5 2008-05-08
2
5
  * Rubyforge having an issue with the gem, I'm getting 404 errors trying to install 0.4.4 so I'm deploying a new version. no code changes.
3
6
 
@@ -317,7 +317,6 @@ module Lockdown
317
317
  # We'll see how it works...
318
318
  #
319
319
  def sync_with_db
320
- return unless database_configured?
321
320
  # Create permissions not found in the database
322
321
  get_permissions.each do |key|
323
322
  next if permission_assigned_automatically?(key)
@@ -359,13 +358,8 @@ module Lockdown
359
358
  end
360
359
  end
361
360
  end
362
- end
363
-
364
- def database_configured?
365
- return unless const_defined?("Permission") && const_defined?("UserGroup")
366
-
367
- Lockdown.database_table_exists?(Permission) &&
368
- Lockdown.database_table_exists?(UserGroup)
361
+ rescue Exception => e
362
+ puts ">> Lockdown sync failed: #{e}"
369
363
  end
370
364
  end # class block
371
365
  end # System class
@@ -2,7 +2,7 @@ module Lockdown #:nodoc:
2
2
  module VERSION #:nodoc:
3
3
  MAJOR = 0
4
4
  MINOR = 4
5
- TINY = 5
5
+ TINY = 6
6
6
 
7
7
  STRING = [MAJOR, MINOR, TINY].join('.')
8
8
  end
data/lib/lockdown/view.rb CHANGED
@@ -63,10 +63,10 @@ module Lockdown
63
63
  private
64
64
 
65
65
  def test_path(url, html_options)
66
- if url.split("/").last =~ /\A\d+\z/
67
- url += "/show"
68
- elsif html_options.is_a?(Hash) && html_options[:method] == :delete
66
+ if html_options.is_a?(Hash) && html_options[:method] == :delete
69
67
  url += "/destroy"
68
+ elsif url.split("/").last =~ /\A\d+\z/
69
+ url += "/show"
70
70
  end
71
71
  url
72
72
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: lockdown
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.5
4
+ version: 0.4.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Andrew Stone