denied 0.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: b94163c06da89e4067fb3b83d0141d3205461dba
4
+ data.tar.gz: d630061324ba20cba1c060d3ef3e62d5ce8bed49
5
+ SHA512:
6
+ metadata.gz: 6f6ab2449c746a7932aa91db6b60f1fae2ba00f7cdb042aa7cb7bf278275c2945b195a934cd0bde747534e60a21468b3cc84bc383c73dd2769cb795f4c930827
7
+ data.tar.gz: 39c519ff2f631a0ec99c4b1d175f07410400e2a2fd26b041239ebd4269246cc4abf4f2c0cff45c406602920aa9c063cf30af847827af649afc03e78876790bce
data/.gitignore ADDED
@@ -0,0 +1,17 @@
1
+ *.gem
2
+ *.rbc
3
+ .bundle
4
+ .config
5
+ .yardoc
6
+ Gemfile.lock
7
+ InstalledFiles
8
+ _yardoc
9
+ coverage
10
+ doc/
11
+ lib/bundler/man
12
+ pkg
13
+ rdoc
14
+ spec/reports
15
+ test/tmp
16
+ test/version_tmp
17
+ tmp
data/.rspec ADDED
@@ -0,0 +1 @@
1
+ --color
data/.travis.yml ADDED
@@ -0,0 +1,12 @@
1
+ rvm:
2
+ - 1.9.3
3
+ - 2.0.0
4
+ - 2.1.0
5
+ - 2.1.1
6
+
7
+ script: 'bundle exec rake spec'
8
+
9
+ notifications:
10
+ disabled: false
11
+ recipients:
12
+ - johannes.opper@gmail.com
data/CHANGELOG.md ADDED
@@ -0,0 +1,3 @@
1
+ 2014-08-21 Initial import
2
+ * Includes plain and conditional restrictions
3
+ * ..and RSpec matcher
data/Gemfile ADDED
@@ -0,0 +1,4 @@
1
+ source 'https://rubygems.org'
2
+
3
+ # Specify your gem's dependencies in denied.gemspec
4
+ gemspec
data/LICENSE.txt ADDED
@@ -0,0 +1,13 @@
1
+ DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
2
+ Version 2, December 2004
3
+
4
+ Copyright (C) 2014 Johannes Opper <johannes.opper@gmail.com>
5
+
6
+ Everyone is permitted to copy and distribute verbatim or modified
7
+ copies of this license document, and changing it is allowed as long
8
+ as the name is changed.
9
+
10
+ DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
11
+ TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
12
+
13
+ 0. You just DO WHAT THE FUCK YOU WANT TO.
data/README.md ADDED
@@ -0,0 +1,29 @@
1
+ # Denied
2
+
3
+ TODO: Write a gem description
4
+
5
+ ## Installation
6
+
7
+ Add this line to your application's Gemfile:
8
+
9
+ gem 'denied'
10
+
11
+ And then execute:
12
+
13
+ $ bundle
14
+
15
+ Or install it yourself as:
16
+
17
+ $ gem install denied
18
+
19
+ ## Usage
20
+
21
+ TODO: Write usage instructions here
22
+
23
+ ## Contributing
24
+
25
+ 1. Fork it ( http://github.com/<my-github-username>/denied/fork )
26
+ 2. Create your feature branch (`git checkout -b my-new-feature`)
27
+ 3. Commit your changes (`git commit -am 'Add some feature'`)
28
+ 4. Push to the branch (`git push origin my-new-feature`)
29
+ 5. Create new Pull Request
data/Rakefile ADDED
@@ -0,0 +1,10 @@
1
+ require "bundler/gem_tasks"
2
+
3
+ require 'rspec/core/rake_task'
4
+ RSpec::Core::RakeTask.new(:spec)
5
+ task :default => :spec
6
+
7
+ desc "Open an irb session preloaded with this library"
8
+ task :console do
9
+ sh "irb -rubygems -I lib -r denied.rb"
10
+ end
data/denied.gemspec ADDED
@@ -0,0 +1,29 @@
1
+ # coding: utf-8
2
+ lib = File.expand_path('../lib', __FILE__)
3
+ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
+ require 'denied/version'
5
+
6
+ Gem::Specification.new do |spec|
7
+ spec.name = "denied"
8
+ spec.version = Denied::VERSION
9
+ spec.authors = ["Johannes Opper"]
10
+ spec.email = ["johannes.opper@gmail.com"]
11
+ spec.summary = %q{Simple access control dsl for controllers.}
12
+ spec.description = %q{Simple access control dsl for controllers}
13
+ spec.homepage = "https://github.com/xijo/denied"
14
+ spec.license = "WTFPL"
15
+
16
+ spec.files = `git ls-files`.split($/)
17
+ spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
18
+ spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
19
+ spec.require_paths = ["lib"]
20
+
21
+ spec.add_dependency 'rails', '> 3.0'
22
+
23
+ spec.add_development_dependency 'bundler', '~> 1.5'
24
+ spec.add_development_dependency 'rspec'
25
+ spec.add_development_dependency 'simplecov'
26
+ spec.add_development_dependency 'rake'
27
+ spec.add_development_dependency 'byebug'
28
+ spec.add_development_dependency 'codeclimate-test-reporter'
29
+ end
@@ -0,0 +1,4 @@
1
+ module Denied
2
+ class AccessDenied < Error
3
+ end
4
+ end
@@ -0,0 +1,4 @@
1
+ module Denied
2
+ class Error < StandardError
3
+ end
4
+ end
@@ -0,0 +1,27 @@
1
+ module Denied
2
+ class Gatekeeper
3
+ def eye(controller)
4
+ restriction = current_restriction(controller)
5
+ restriction and handle_restriction(restriction, controller)
6
+ end
7
+
8
+ private
9
+
10
+ def handle_restriction(restriction, controller)
11
+ controller.current_user or raise Denied::LoginRequired
12
+
13
+ if restriction.allow_if
14
+ unless controller.__send__(restriction.allow_if)
15
+ raise Denied::AccessDenied, reason: restriction
16
+ end
17
+ end
18
+ end
19
+
20
+ def current_restriction(controller)
21
+ controller.restrictions or return
22
+ controller.restrictions.find do |restriction|
23
+ restriction.restricts?(controller.action_name)
24
+ end
25
+ end
26
+ end
27
+ end
@@ -0,0 +1,4 @@
1
+ module Denied
2
+ class LoginRequired < Error
3
+ end
4
+ end
@@ -0,0 +1,26 @@
1
+ module Denied
2
+ module Rails
3
+ module Controller
4
+ extend ActiveSupport::Concern
5
+
6
+ included do
7
+ cattr_accessor :restrictions
8
+ self.restrictions ||= []
9
+ before_filter :invoke_gatekeeper
10
+ end
11
+
12
+ module ClassMethods
13
+ def restrict(*args)
14
+ self.restrictions ||= []
15
+ restrictions << Denied::Restriction.new(*args)
16
+ end
17
+ end
18
+
19
+ private
20
+
21
+ def invoke_gatekeeper
22
+ Denied::Gatekeeper.new.eye(self)
23
+ end
24
+ end
25
+ end
26
+ end
@@ -0,0 +1,17 @@
1
+ module Denied
2
+ class Restriction
3
+ attr_accessor :actions, :role, :allow_if
4
+
5
+ def initialize(*args)
6
+ options = args.extract_options!
7
+ @role = options[:role]
8
+ @allow_if = options[:allow_if]
9
+ @actions = args
10
+ actions.empty? and raise ArgumentError, "expected actions to restrict, but got #{actions.inspect}"
11
+ end
12
+
13
+ def restricts?(action_name)
14
+ actions.include?(action_name.to_sym)
15
+ end
16
+ end
17
+ end
@@ -0,0 +1,44 @@
1
+ RSpec::Matchers.define :have_restriction_on do |given_action_name|
2
+ match do |given_controller|
3
+ @given_action_name = given_action_name
4
+ @given_controller = given_controller
5
+
6
+ @restriction = given_controller.restrictions.find do |restriction|
7
+ restriction.restricts?(given_action_name)
8
+ end
9
+
10
+ if @restriction
11
+ if @given_allow_if
12
+ @restriction.allow_if == @given_allow_if
13
+ else
14
+ true
15
+ end
16
+ else
17
+ false
18
+ end
19
+ end
20
+
21
+ chain :with_allow_if do |given_allow_if|
22
+ @given_allow_if = given_allow_if
23
+ end
24
+
25
+ failure_message do |actual|
26
+ if @restriction && @given_allow_if
27
+ "Expected restriction to call #{@given_allow_if.inspect}, but calls #{@restriction.allow_if.inspect}"
28
+ else
29
+ "Expected to have restriction on #{@given_action_name}, but was not found in #{@given_controller.restrictions.inspect}"
30
+ end
31
+ end
32
+
33
+ failure_message_when_negated do |actual|
34
+ if @given_allow_if
35
+ "Expected restriction not to call #{@given_allow_if.inspect}, but calls #{@restriction.allow_if.inspect}"
36
+ else
37
+ "Expected not to have restriction on #{@given_action_name}, but was found in #{@given_controller.restrictions.inspect}"
38
+ end
39
+ end
40
+
41
+ def description
42
+ "Checks if a restriction for a given action is defined on the controller"
43
+ end
44
+ end
@@ -0,0 +1,3 @@
1
+ module Denied
2
+ VERSION = "0.0.1"
3
+ end
data/lib/denied.rb ADDED
@@ -0,0 +1,13 @@
1
+ require 'active_support'
2
+
3
+ require 'denied/version'
4
+ require 'denied/error'
5
+ require 'denied/login_required'
6
+ require 'denied/access_denied'
7
+ require 'denied/restriction'
8
+ require 'denied/gatekeeper'
9
+ require 'denied/rails/controller'
10
+
11
+ module Denied
12
+ # Your code goes here...
13
+ end
@@ -0,0 +1,67 @@
1
+ require 'spec_helper'
2
+
3
+ describe Denied::Gatekeeper do
4
+
5
+ let(:gatekeeper) { Denied::Gatekeeper.new }
6
+ let(:controller) { ExampleController.new }
7
+ let(:user) { FakeUser.new }
8
+
9
+ before { controller.action_name = 'edit' }
10
+
11
+ describe '#eye' do
12
+ context 'without restriction' do
13
+ it 'grants anonymous access' do
14
+ expect { gatekeeper.eye(controller) }.not_to raise_error
15
+ end
16
+
17
+ it 'grants user access' do
18
+ controller.current_user = user
19
+ expect { gatekeeper.eye(controller) }.not_to raise_error
20
+ end
21
+ end
22
+
23
+ context 'with plain restriction' do
24
+ before { controller.class.restrict :edit }
25
+
26
+ it 'denies anonymous access' do
27
+ expect { gatekeeper.eye(controller) }.to raise_error(Denied::LoginRequired)
28
+ end
29
+
30
+ it 'grants user access' do
31
+ controller.current_user = user
32
+ expect { gatekeeper.eye(controller) }.not_to raise_error
33
+ end
34
+ end
35
+
36
+ context 'with conditional restriction' do
37
+ before do
38
+ controller.class.restrict :action1, allow_if: :missing
39
+ controller.class.restrict :action2, allow_if: :falsy
40
+ controller.class.restrict :action3, allow_if: :truthy
41
+ end
42
+
43
+ it 'raises on missing method' do
44
+ controller.current_user = user
45
+ controller.action_name = 'action1'
46
+ expect { gatekeeper.eye(controller) }.to raise_error(NoMethodError)
47
+ end
48
+
49
+ it 'denies anonymous access' do
50
+ controller.action_name = 'action1'
51
+ expect { gatekeeper.eye(controller) }.to raise_error(Denied::LoginRequired)
52
+ end
53
+
54
+ it 'denies access on falsy return value' do
55
+ controller.current_user = user
56
+ controller.action_name = 'action2'
57
+ expect { gatekeeper.eye(controller) }.to raise_error(Denied::AccessDenied)
58
+ end
59
+
60
+ it 'grants access on truthy return value' do
61
+ controller.current_user = user
62
+ controller.action_name = 'action3'
63
+ expect { gatekeeper.eye(controller) }.not_to raise_error
64
+ end
65
+ end
66
+ end
67
+ end
@@ -0,0 +1,35 @@
1
+ require 'spec_helper'
2
+
3
+ describe Denied::Rails::Controller do
4
+
5
+ let(:controller) { ExampleController.new }
6
+
7
+ before do
8
+ controller.class.restrict :index
9
+ controller.class.restrict :show, allow_if: :access_allowed?
10
+ end
11
+
12
+ describe '#restrict' do
13
+ it 'builds and adds a plain restriction' do
14
+ expect(controller).to have_restriction_on(:index)
15
+ end
16
+
17
+ it 'builds and adds a conditional restriction' do
18
+ expect(controller).to have_restriction_on(:show).with_allow_if(:access_allowed?)
19
+ end
20
+ end
21
+
22
+ describe '#included' do
23
+ it 'adds the before filter' do
24
+ expect(controller.before_filters).to include :invoke_gatekeeper
25
+ end
26
+ end
27
+
28
+ describe '#invoke_gatekeeper' do
29
+ it 'builds and calls a gatekeeper for the controller' do
30
+ expect_any_instance_of(Denied::Gatekeeper).to receive(:eye).with(controller)
31
+ controller.__send__ :invoke_gatekeeper
32
+ end
33
+ end
34
+
35
+ end
@@ -0,0 +1,36 @@
1
+ require 'spec_helper'
2
+
3
+ describe Denied::Restriction do
4
+ let(:restriction) { Denied::Restriction.new(:show, :edit, role: :manager) }
5
+
6
+ describe '#initialize' do
7
+ it 'knows about its actions' do
8
+ expect(restriction.actions).to eq [:show, :edit]
9
+ end
10
+
11
+ it 'raises an error if no actions were given' do
12
+ expect { Denied::Restriction.new }.to raise_error(ArgumentError)
13
+ end
14
+ end
15
+
16
+ describe '#restricts?' do
17
+ it 'returns true if the given action is contained' do
18
+ expect(restriction).to be_restricts(:show)
19
+ end
20
+
21
+ it 'returns false if the given action name is not contained' do
22
+ expect(restriction).not_to be_restricts(:index)
23
+ end
24
+ end
25
+
26
+ describe '#role' do
27
+ it 'returns the role name if given' do
28
+ expect(restriction.role).to eq :manager
29
+ end
30
+
31
+ it 'returns nil if non was given' do
32
+ expect(Denied::Restriction.new(:foo).role).to be_nil
33
+ end
34
+ end
35
+
36
+ end
@@ -0,0 +1,84 @@
1
+ require 'spec_helper'
2
+
3
+ describe 'have_restriction_on' do
4
+ let(:controller) { ExampleController.new }
5
+
6
+ # before do
7
+ # controller.class.restrict :index
8
+ # controller.class.restrict :show, allow_if: :access_allowed?
9
+ # end
10
+
11
+
12
+ context 'without restrictions' do
13
+ it 'matcher fails' do
14
+ expect {
15
+ expect(controller).to have_restriction_on(:show)
16
+ }.to raise_error RSpec::Expectations::ExpectationNotMetError
17
+ end
18
+
19
+ it 'negated matcher passes' do
20
+ expect(controller).not_to have_restriction_on(:show)
21
+ end
22
+ end
23
+
24
+ context 'with plain restriction' do
25
+ before { controller.class.restrict :show }
26
+
27
+ it 'matcher passes' do
28
+ expect(controller).to have_restriction_on(:show)
29
+ end
30
+
31
+ it 'wrong matcher fails' do
32
+ expect {
33
+ expect(controller).to have_restriction_on(:index)
34
+ }.to raise_error RSpec::Expectations::ExpectationNotMetError
35
+ end
36
+
37
+ it 'negated matcher fails' do
38
+ expect {
39
+ expect(controller).not_to have_restriction_on(:show)
40
+ }.to raise_error RSpec::Expectations::ExpectationNotMetError
41
+ end
42
+
43
+ it 'matcher conditional chain fails' do
44
+ expect {
45
+ expect(controller).to have_restriction_on(:show).with_allow_if(:something)
46
+ }.to raise_error RSpec::Expectations::ExpectationNotMetError
47
+ end
48
+
49
+ it 'negated matcher with conditional chain passes' do
50
+ expect(controller).not_to have_restriction_on(:show).with_allow_if(:something)
51
+ end
52
+ end
53
+
54
+ context 'with conditional restriction' do
55
+ before { controller.class.restrict :show, allow_if: :something }
56
+
57
+ it 'matcher passes' do
58
+ expect(controller).to have_restriction_on(:show)
59
+ end
60
+
61
+ it 'wrong matcher fails' do
62
+ expect {
63
+ expect(controller).to have_restriction_on(:index)
64
+ }.to raise_error RSpec::Expectations::ExpectationNotMetError
65
+ end
66
+
67
+ it 'negated matcher fails' do
68
+ expect {
69
+ expect(controller).not_to have_restriction_on(:show)
70
+ }.to raise_error RSpec::Expectations::ExpectationNotMetError
71
+ end
72
+
73
+ it 'matcher conditional chain passes' do
74
+ expect(controller).to have_restriction_on(:show).with_allow_if(:something)
75
+ end
76
+
77
+ it 'negated matcher with conditional chain passes' do
78
+ expect {
79
+ expect(controller).not_to have_restriction_on(:show).with_allow_if(:something)
80
+ }.to raise_error RSpec::Expectations::ExpectationNotMetError
81
+ end
82
+ end
83
+
84
+ end
@@ -0,0 +1,46 @@
1
+ require 'codeclimate-test-reporter'
2
+ CodeClimate::TestReporter.start
3
+
4
+ require 'simplecov'
5
+ require 'byebug'
6
+
7
+ SimpleCov.profiles.define 'gem' do
8
+ add_filter '/spec/'
9
+ add_filter '/autotest/'
10
+ add_group 'Libraries', '/lib/'
11
+ end
12
+ SimpleCov.start 'gem'
13
+
14
+ require 'denied'
15
+ require 'denied/rspec/matcher'
16
+
17
+ RSpec.configure do |config|
18
+ config.after do
19
+ ExampleController.restrictions = []
20
+ end
21
+ end
22
+
23
+ # Mimics the behavior of ActionController::Base
24
+ class FakeController
25
+ attr_accessor :action_name, :current_user
26
+ cattr_accessor :before_filters
27
+
28
+ def self.before_filter(filter)
29
+ self.before_filters ||= []
30
+ before_filters << filter
31
+ end
32
+ end
33
+
34
+ FakeUser = Struct.new(:foo)
35
+
36
+ class ExampleController < FakeController
37
+ include Denied::Rails::Controller
38
+
39
+ def falsy
40
+ false
41
+ end
42
+
43
+ def truthy
44
+ true
45
+ end
46
+ end
metadata ADDED
@@ -0,0 +1,170 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: denied
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.0.1
5
+ platform: ruby
6
+ authors:
7
+ - Johannes Opper
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2014-08-21 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: rails
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - ">"
18
+ - !ruby/object:Gem::Version
19
+ version: '3.0'
20
+ type: :runtime
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - ">"
25
+ - !ruby/object:Gem::Version
26
+ version: '3.0'
27
+ - !ruby/object:Gem::Dependency
28
+ name: bundler
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - "~>"
32
+ - !ruby/object:Gem::Version
33
+ version: '1.5'
34
+ type: :development
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - "~>"
39
+ - !ruby/object:Gem::Version
40
+ version: '1.5'
41
+ - !ruby/object:Gem::Dependency
42
+ name: rspec
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: rake
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
+ - !ruby/object:Gem::Dependency
84
+ name: byebug
85
+ requirement: !ruby/object:Gem::Requirement
86
+ requirements:
87
+ - - ">="
88
+ - !ruby/object:Gem::Version
89
+ version: '0'
90
+ type: :development
91
+ prerelease: false
92
+ version_requirements: !ruby/object:Gem::Requirement
93
+ requirements:
94
+ - - ">="
95
+ - !ruby/object:Gem::Version
96
+ version: '0'
97
+ - !ruby/object:Gem::Dependency
98
+ name: codeclimate-test-reporter
99
+ requirement: !ruby/object:Gem::Requirement
100
+ requirements:
101
+ - - ">="
102
+ - !ruby/object:Gem::Version
103
+ version: '0'
104
+ type: :development
105
+ prerelease: false
106
+ version_requirements: !ruby/object:Gem::Requirement
107
+ requirements:
108
+ - - ">="
109
+ - !ruby/object:Gem::Version
110
+ version: '0'
111
+ description: Simple access control dsl for controllers
112
+ email:
113
+ - johannes.opper@gmail.com
114
+ executables: []
115
+ extensions: []
116
+ extra_rdoc_files: []
117
+ files:
118
+ - ".gitignore"
119
+ - ".rspec"
120
+ - ".travis.yml"
121
+ - CHANGELOG.md
122
+ - Gemfile
123
+ - LICENSE.txt
124
+ - README.md
125
+ - Rakefile
126
+ - denied.gemspec
127
+ - lib/denied.rb
128
+ - lib/denied/access_denied.rb
129
+ - lib/denied/error.rb
130
+ - lib/denied/gatekeeper.rb
131
+ - lib/denied/login_required.rb
132
+ - lib/denied/rails/controller.rb
133
+ - lib/denied/restriction.rb
134
+ - lib/denied/rspec/matcher.rb
135
+ - lib/denied/version.rb
136
+ - spec/lib/denied/gatekeeper_spec.rb
137
+ - spec/lib/denied/rails/controller_spec.rb
138
+ - spec/lib/denied/restriction_spec.rb
139
+ - spec/lib/denied/rspec/matcher_spec.rb
140
+ - spec/spec_helper.rb
141
+ homepage: https://github.com/xijo/denied
142
+ licenses:
143
+ - WTFPL
144
+ metadata: {}
145
+ post_install_message:
146
+ rdoc_options: []
147
+ require_paths:
148
+ - lib
149
+ required_ruby_version: !ruby/object:Gem::Requirement
150
+ requirements:
151
+ - - ">="
152
+ - !ruby/object:Gem::Version
153
+ version: '0'
154
+ required_rubygems_version: !ruby/object:Gem::Requirement
155
+ requirements:
156
+ - - ">="
157
+ - !ruby/object:Gem::Version
158
+ version: '0'
159
+ requirements: []
160
+ rubyforge_project:
161
+ rubygems_version: 2.2.2
162
+ signing_key:
163
+ specification_version: 4
164
+ summary: Simple access control dsl for controllers.
165
+ test_files:
166
+ - spec/lib/denied/gatekeeper_spec.rb
167
+ - spec/lib/denied/rails/controller_spec.rb
168
+ - spec/lib/denied/restriction_spec.rb
169
+ - spec/lib/denied/rspec/matcher_spec.rb
170
+ - spec/spec_helper.rb