checkin 0.5.0 → 0.5.1

Sign up to get free protection for your applications and to get access to all the features.
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.5.0
1
+ 0.5.1
@@ -5,11 +5,11 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = "checkin"
8
- s.version = "0.5.0"
8
+ s.version = "0.5.1"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["mcasimir"]
12
- s.date = "2012-08-04"
12
+ s.date = "2012-08-22"
13
13
  s.description = "Checkin is an authorization gem for Ruby on Rails"
14
14
  s.email = "maurizio.cas@gmail.com"
15
15
  s.extra_rdoc_files = [
@@ -12,6 +12,7 @@ module Checkin
12
12
  # })
13
13
 
14
14
  def checkin(opts = {})
15
+
15
16
  opts.symbolize_keys!
16
17
  from_subject = :"#{(opts[:subject] || :user_subject)}"
17
18
  subject_name = :"#{(opts[:as] || :subject)}"
@@ -37,11 +38,12 @@ module Checkin
37
38
  rescue_from Checkin::AccessDenied, :with => :rescue_from_checkin_access_denied
38
39
  end
39
40
 
40
- opts[:resourceful] ||= true
41
+ opts[:resourceful] = true if opts[:resourceful].nil?
42
+
41
43
  if opts[:resourceful] && !opts[:skip_authorization]
42
44
  define_method :"#{object_method}" do
43
45
 
44
- if params[:id]
46
+ if params[:id]
45
47
  model_class = self.controller_name.singularize.camelize.constantize
46
48
  singular_name = :"#{model_class.name.underscore.singularize}"
47
49
  if !instance_variable_get("@#{singular_name}")
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: checkin
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.0
4
+ version: 0.5.1
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-08-04 00:00:00.000000000 Z
12
+ date: 2012-08-22 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: jeweler
@@ -70,7 +70,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
70
70
  version: '0'
71
71
  segments:
72
72
  - 0
73
- hash: 1410408469614774106
73
+ hash: -2756048828848553577
74
74
  required_rubygems_version: !ruby/object:Gem::Requirement
75
75
  none: false
76
76
  requirements: