restrict 0.0.8 → 0.0.9
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 +4 -4
- data/.ruby-version +1 -0
- data/.travis.yml +1 -3
- data/lib/restrict/rspec/shared_example.rb +5 -0
- data/lib/restrict/version.rb +1 -1
- data/restrict.gemspec +0 -1
- data/spec/lib/restrict/rails/controller_spec.rb +2 -0
- data/spec/spec_helper.rb +1 -3
- metadata +5 -18
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c93762926e3f4b9df38b5ef6a4727a2137722b91
|
4
|
+
data.tar.gz: 9e40544b25b8bcf811a4de23cfa5ed3c26fce8d4
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a5d3aebcad7634ed0e4f58b61feccbc2435499f5ba9dedfe38f9dbcc697f975d9b46abcf362e3cea32c78627c133a03744499903210533e03f066be903ebd72c
|
7
|
+
data.tar.gz: 48d33bb786b2bc5d62daa54d680bb373be4dfb8bcbbc9fff957e813b874c32da1157150898ad77ac03c9f6fe298236e3fee4a2bf36bb32082f86bf0f6298b1ce
|
data/.ruby-version
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
2.4.1
|
data/.travis.yml
CHANGED
data/lib/restrict/version.rb
CHANGED
data/restrict.gemspec
CHANGED
@@ -17,6 +17,8 @@ describe Restrict::Rails::Controller do
|
|
17
17
|
it 'builds and adds a conditional restriction' do
|
18
18
|
expect(controller).to have_restriction_on(:show).unless(:access_allowed?)
|
19
19
|
end
|
20
|
+
|
21
|
+
include_examples 'restricts access to', :show, :access_allowed?
|
20
22
|
end
|
21
23
|
|
22
24
|
describe '#included' do
|
data/spec/spec_helper.rb
CHANGED
@@ -1,6 +1,3 @@
|
|
1
|
-
require 'codeclimate-test-reporter'
|
2
|
-
CodeClimate::TestReporter.start
|
3
|
-
|
4
1
|
require 'simplecov'
|
5
2
|
require 'byebug'
|
6
3
|
|
@@ -13,6 +10,7 @@ SimpleCov.start 'gem'
|
|
13
10
|
|
14
11
|
require 'restrict'
|
15
12
|
require 'restrict/rspec/matcher'
|
13
|
+
require 'restrict/rspec/shared_example'
|
16
14
|
|
17
15
|
RSpec.configure do |config|
|
18
16
|
config.after do
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: restrict
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.9
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Johannes Opper
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2017-06-13 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|
@@ -94,20 +94,6 @@ dependencies:
|
|
94
94
|
- - ">="
|
95
95
|
- !ruby/object:Gem::Version
|
96
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
97
|
description: Simple access control dsl for controllers
|
112
98
|
email:
|
113
99
|
- johannes.opper@gmail.com
|
@@ -117,6 +103,7 @@ extra_rdoc_files: []
|
|
117
103
|
files:
|
118
104
|
- ".gitignore"
|
119
105
|
- ".rspec"
|
106
|
+
- ".ruby-version"
|
120
107
|
- ".travis.yml"
|
121
108
|
- CHANGELOG.md
|
122
109
|
- Gemfile
|
@@ -134,6 +121,7 @@ files:
|
|
134
121
|
- lib/restrict/restriction.rb
|
135
122
|
- lib/restrict/rspec/matcher.rb
|
136
123
|
- lib/restrict/rspec/matcher_rspec2.rb
|
124
|
+
- lib/restrict/rspec/shared_example.rb
|
137
125
|
- lib/restrict/version.rb
|
138
126
|
- restrict.gemspec
|
139
127
|
- spec/lib/restrict/configuration_spec.rb
|
@@ -163,7 +151,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
163
151
|
version: '0'
|
164
152
|
requirements: []
|
165
153
|
rubyforge_project:
|
166
|
-
rubygems_version: 2.6.
|
154
|
+
rubygems_version: 2.6.11
|
167
155
|
signing_key:
|
168
156
|
specification_version: 4
|
169
157
|
summary: Simple access control dsl for controllers.
|
@@ -175,4 +163,3 @@ test_files:
|
|
175
163
|
- spec/lib/restrict/rspec/matcher_spec.rb
|
176
164
|
- spec/lib/restrict_spec.rb
|
177
165
|
- spec/spec_helper.rb
|
178
|
-
has_rdoc:
|