perm 0.0.1

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: 080272d1ed540e83d52c7648bf23896347c590e2
4
+ data.tar.gz: 2f8ec937d059ef5d5631531d97769ff5e9efd37d
5
+ SHA512:
6
+ metadata.gz: 2a270c390c4c6b6fbce1cabedcfc1a63274b8cac495129c0682bca75357be7877e81f99e4b7821daf647617d7ad1ec5f58df6885ccb1c7cd09811fb1a69b7e72
7
+ data.tar.gz: a18dcb8f283bb94a41f30c7cd5561f9f2f51184a1d0f9eb3b4b84651bc41297fe5b99e5c7a65af533d43f9390e0b97a13be8977f6903dfdcf8ae35cce0871f1b
@@ -0,0 +1,6 @@
1
+ require "roleup"
2
+ require_relative "perm/version"
3
+ require_relative "perm/authorizer"
4
+
5
+ module Perm
6
+ end
@@ -0,0 +1,27 @@
1
+ require "delegate"
2
+
3
+ module Perm
4
+ class Authorizer < SimpleDelegator
5
+ attr_reader :user
6
+
7
+ def initialize(user)
8
+ super @user = user
9
+ end
10
+
11
+ def method_missing(name, *args)
12
+ return false if can_method?(name)
13
+ super
14
+ end
15
+
16
+ def respond_to?(name)
17
+ return true if can_method?(name)
18
+ super
19
+ end
20
+
21
+ protected
22
+
23
+ def can_method?(name)
24
+ !!(name.to_s =~ /\Acan_.+\?\z/)
25
+ end
26
+ end
27
+ end
@@ -0,0 +1,3 @@
1
+ module Perm
2
+ VERSION = "0.0.1"
3
+ end
metadata ADDED
@@ -0,0 +1,117 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: perm
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.0.1
5
+ platform: ruby
6
+ authors:
7
+ - Nathan Hopkins
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2014-11-09 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: roleup
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - ">="
18
+ - !ruby/object:Gem::Version
19
+ version: '0'
20
+ type: :runtime
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - ">="
25
+ - !ruby/object:Gem::Version
26
+ version: '0'
27
+ - !ruby/object:Gem::Dependency
28
+ name: rake
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - ">="
32
+ - !ruby/object:Gem::Version
33
+ version: '0'
34
+ type: :development
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - ">="
39
+ - !ruby/object:Gem::Version
40
+ version: '0'
41
+ - !ruby/object:Gem::Dependency
42
+ name: micro_test
43
+ requirement: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - ">="
46
+ - !ruby/object:Gem::Version
47
+ version: '0'
48
+ type: :development
49
+ prerelease: false
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - ">="
53
+ - !ruby/object:Gem::Version
54
+ version: '0'
55
+ - !ruby/object:Gem::Dependency
56
+ name: simplecov
57
+ requirement: !ruby/object:Gem::Requirement
58
+ requirements:
59
+ - - ">="
60
+ - !ruby/object:Gem::Version
61
+ version: '0'
62
+ type: :development
63
+ prerelease: false
64
+ version_requirements: !ruby/object:Gem::Requirement
65
+ requirements:
66
+ - - ">="
67
+ - !ruby/object:Gem::Version
68
+ version: '0'
69
+ - !ruby/object:Gem::Dependency
70
+ name: coveralls
71
+ requirement: !ruby/object:Gem::Requirement
72
+ requirements:
73
+ - - ">="
74
+ - !ruby/object:Gem::Version
75
+ version: '0'
76
+ type: :development
77
+ prerelease: false
78
+ version_requirements: !ruby/object:Gem::Requirement
79
+ requirements:
80
+ - - ">="
81
+ - !ruby/object:Gem::Version
82
+ version: '0'
83
+ description: Simple permission management
84
+ email:
85
+ - natehop@gmail.com
86
+ executables: []
87
+ extensions: []
88
+ extra_rdoc_files: []
89
+ files:
90
+ - lib/perm.rb
91
+ - lib/perm/authorizer.rb
92
+ - lib/perm/version.rb
93
+ homepage: https://github.com/hopsoft/perm
94
+ licenses:
95
+ - MIT
96
+ metadata: {}
97
+ post_install_message:
98
+ rdoc_options: []
99
+ require_paths:
100
+ - lib
101
+ required_ruby_version: !ruby/object:Gem::Requirement
102
+ requirements:
103
+ - - ">="
104
+ - !ruby/object:Gem::Version
105
+ version: '0'
106
+ required_rubygems_version: !ruby/object:Gem::Requirement
107
+ requirements:
108
+ - - ">="
109
+ - !ruby/object:Gem::Version
110
+ version: '0'
111
+ requirements: []
112
+ rubyforge_project:
113
+ rubygems_version: 2.2.2
114
+ signing_key:
115
+ specification_version: 4
116
+ summary: Simple permission management
117
+ test_files: []