thwart 0.0.1 → 0.0.2

Sign up to get free protection for your applications and to get access to all the features.
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.0.0
1
+ 0.0.2
@@ -14,7 +14,7 @@ module Thwart
14
14
  #
15
15
  # @param [Symbol] able_method The name of the [action-able]_by? method to check for.
16
16
  def has_able?(able)
17
- self.actions.has_value?(able)
17
+ self.actions.has_value?(able.to_sym)
18
18
  end
19
19
 
20
20
  # Returns true if Thwart is providing methods for the can_[action]? style action
@@ -22,14 +22,14 @@ module Thwart
22
22
  #
23
23
  # @param [Symbol] able_method The name of the can_[action]? method to check for.
24
24
  def has_can?(can)
25
- self.actions.has_key?(can)
25
+ self.actions.has_key?(can.to_sym)
26
26
  end
27
27
 
28
28
  # Finds the corresponding can from an able.
29
29
  #
30
30
  # @param [Symbol] able_method The name of the [action-able]_by? method.
31
31
  def can_from_able(able)
32
- self.actions.key(able)
32
+ self.actions.key(able.to_sym)
33
33
  end
34
34
 
35
35
  # Adds an action to actions and the correct methods to can and able modules.
data/lib/thwart.rb CHANGED
@@ -30,7 +30,7 @@ module Thwart
30
30
  # autoload :Dsl, 'thwart/dsl'
31
31
 
32
32
  # The default can => able methods for CRUD
33
- CrudActions = {:create => :creatable, :view => :viewable, :update => :updatable, :destroy => :destroyable}
33
+ CrudActions = {:create => :creatable, :show => :shoew, :update => :updatable, :destroy => :destroyable}
34
34
 
35
35
  Actions = ActionsStore.new
36
36
  Roles = RoleRegistry.new
data/thwart.gemspec CHANGED
@@ -5,7 +5,7 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{thwart}
8
- s.version = "0.0.1"
8
+ s.version = "0.0.2"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Harry Brundage"]
metadata CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
5
5
  segments:
6
6
  - 0
7
7
  - 0
8
- - 1
9
- version: 0.0.1
8
+ - 2
9
+ version: 0.0.2
10
10
  platform: ruby
11
11
  authors:
12
12
  - Harry Brundage