cancancan-squeel 0.1.0

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: 2e54134fb57f78cfd282b96b03b2bc49cf164468
4
+ data.tar.gz: 1c5b7a4a8f1aeea3cca907c7755a8a3fc9f4d13c
5
+ SHA512:
6
+ metadata.gz: 0b03fa5bfafc638b66de73e42856e3047de0450898f2f6b31b0b4c2f514b4ffbeec719b6b6a35e8d03c09f129351a21c97729d41ecdb1c414e64891ff9901fbb
7
+ data.tar.gz: 9b2cee5e00ea453850b5065b826ae5917ebfbd9dd0017bd5870f7770f5802797ece8169f8652af4a33b11bcb219af4af1af4fd925b78dd9175ab52160bdf7c9d
data/.gitignore ADDED
@@ -0,0 +1,16 @@
1
+ /.bundle/
2
+ /.yardoc
3
+ /Gemfile.lock
4
+ /_yardoc/
5
+ /coverage/
6
+ /doc/
7
+ /pkg/
8
+ /spec/reports/
9
+ /tmp/
10
+
11
+ # Ignore generated code coverage information
12
+ /spec/coverage/*
13
+ /coverage/*
14
+
15
+ # Ignore RSpec state
16
+ /spec/examples.txt
data/.hound.yml ADDED
@@ -0,0 +1,2 @@
1
+ ruby:
2
+ config_file: .rubocop.yml
@@ -0,0 +1,11 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <module type="RUBY_MODULE" version="4">
3
+ <component name="NewModuleRootManager" inherit-compiler-output="true">
4
+ <exclude-output />
5
+ <content url="file://$MODULE_DIR$">
6
+ <excludeFolder url="file://$MODULE_DIR$/.bundle" />
7
+ </content>
8
+ <orderEntry type="inheritedJdk" />
9
+ <orderEntry type="sourceFolder" forTests="false" />
10
+ </component>
11
+ </module>
data/.rspec ADDED
@@ -0,0 +1,2 @@
1
+ --color
2
+ --require spec_helper
@@ -0,0 +1,109 @@
1
+ Style/CollectionMethods:
2
+ Enabled: true
3
+ PreferredMethods:
4
+ reduce:
5
+ inject: 'reduce'
6
+ find:
7
+ detect: 'find'
8
+
9
+ Style/FileName:
10
+ Enabled: true
11
+
12
+ Style/GuardClause:
13
+ Enabled: true
14
+
15
+ Style/IfUnlessModifier:
16
+ Enabled: true
17
+
18
+ Style/PercentLiteralDelimiters:
19
+ Enabled: true
20
+
21
+ Style/SignalException:
22
+ Enabled: true
23
+
24
+ Style/SingleLineBlockParams:
25
+ Enabled: true
26
+
27
+ Style/SingleLineMethods:
28
+ Enabled: true
29
+
30
+ Style/TrailingCommaInArguments:
31
+ Enabled: true
32
+
33
+ Style/TrailingCommaInLiteral:
34
+ Enabled: true
35
+
36
+ Metrics/AbcSize:
37
+ Enabled: true
38
+
39
+ Metrics/ClassLength:
40
+ Enabled: true
41
+
42
+ Metrics/ModuleLength:
43
+ Enabled: true
44
+
45
+ Metrics/CyclomaticComplexity:
46
+ Enabled: true
47
+
48
+ Metrics/MethodLength:
49
+ Enabled: true
50
+
51
+ Metrics/ParameterLists:
52
+ Enabled: true
53
+
54
+ Metrics/PerceivedComplexity:
55
+ Enabled: true
56
+
57
+ Lint/AssignmentInCondition:
58
+ Enabled: true
59
+
60
+ Style/AccessorMethodName:
61
+ Enabled: true
62
+
63
+ Style/Alias:
64
+ Enabled: true
65
+ EnforcedStyle: prefer_alias_method
66
+
67
+ Style/Documentation:
68
+ Enabled: true
69
+
70
+ Style/DoubleNegation:
71
+ Enabled: true
72
+
73
+ Style/EachWithObject:
74
+ Enabled: true
75
+
76
+ Style/EmptyLiteral:
77
+ Enabled: true
78
+
79
+ Style/ModuleFunction:
80
+ Enabled: true
81
+
82
+ Style/OneLineConditional:
83
+ Enabled: true
84
+
85
+ Style/PerlBackrefs:
86
+ Enabled: true
87
+
88
+ Style/SpecialGlobalVars:
89
+ Enabled: true
90
+
91
+ Style/VariableInterpolation:
92
+ Enabled: true
93
+
94
+ Style/WhenThen:
95
+ Enabled: true
96
+
97
+ Lint/EachWithObjectArgument:
98
+ Enabled: true
99
+
100
+ Lint/HandleExceptions:
101
+ Enabled: true
102
+
103
+ Lint/LiteralInCondition:
104
+ Description: Checks of literals used in conditions.
105
+ Enabled: true
106
+
107
+ Lint/LiteralInInterpolation:
108
+ Description: Checks for literals used in interpolation.
109
+ Enabled: true
data/.rubocop.yml ADDED
@@ -0,0 +1,46 @@
1
+ inherit_from:
2
+ - .rubocop.unhound.yml
3
+
4
+ AllCops:
5
+ Include:
6
+ - '**/Gemfile'
7
+ - '**/Rakefile'
8
+ Exclude:
9
+ - 'vendor/bundle/**/*'
10
+ TargetRubyVersion: 2.1
11
+
12
+ Metrics/LineLength:
13
+ Max: 100
14
+
15
+ Style/ClassAndModuleChildren:
16
+ EnforcedStyle: compact
17
+
18
+ Style/DotPosition:
19
+ EnforcedStyle: trailing
20
+
21
+ Style/Documentation:
22
+ Enabled: false
23
+
24
+ Style/IndentHash:
25
+ EnforcedStyle: consistent
26
+
27
+ Style/IfUnlessModifier:
28
+ MaxLineLength: 100
29
+
30
+ Style/ParallelAssignment:
31
+ Enabled: false
32
+
33
+ Style/StringLiterals:
34
+ EnforcedStyle: single_quotes
35
+
36
+ Style/WhileUntilModifier:
37
+ MaxLineLength: 100
38
+
39
+ Style/WordArray:
40
+ Enabled: false
41
+
42
+ Style/RegexpLiteral:
43
+ AllowInnerSlashes: true
44
+
45
+ Style/ClassAndModuleChildren:
46
+ EnforcedStyle: compact
data/.travis.yml ADDED
@@ -0,0 +1,14 @@
1
+ language: ruby
2
+ rvm:
3
+ - 2.1.7
4
+ - 2.2.3
5
+ - 2.3.0
6
+ - ruby-head
7
+ matrix:
8
+ allow_failures:
9
+ - rvm: ruby-head
10
+ bundler_args: "--jobs=3 --retry=3"
11
+ cache: bundler
12
+
13
+ before_install:
14
+ - gem update bundler
data/Gemfile ADDED
@@ -0,0 +1,4 @@
1
+ source 'https://rubygems.org'
2
+
3
+ # Specify your gem's dependencies in cancancan-squeel.gemspec
4
+ gemspec
data/README.md ADDED
@@ -0,0 +1,13 @@
1
+ # CanCanCan-Squeel [![Build Status](https://travis-ci.org/lowjoel/cancancan-squeel.svg?branch=master)](https://travis-ci.org/lowjoel/cancancan-squeel)
2
+ [![Code Climate](https://codeclimate.com/github/lowjoel/cancancan-squeel/badges/gpa.svg)] (https://codeclimate.com/github/lowjoel/cancancan-squeel) [![Coverage Status](https://coveralls.io/repos/github/lowjoel/cancancan-squeel/badge.svg?branch=master)](https://coveralls.io/github/lowjoel/cancancan-squeel?branch=master) [![security](https://hakiri.io/github/lowjoel/cancancan-squeel/master.svg)](https://hakiri.io/github/lowjoel/cancancan-squeel/master) [![Inline docs](http://inch-ci.org/github/lowjoel/cancancan-squeel.svg?branch=master)](http://inch-ci.org/github/lowjoel/cancancan-squeel)
3
+
4
+ This is an adapter for the [CanCanCan](https://github.com/CanCanCommunity/cancancan) authorisation
5
+ library to automatically generate SQL queries from ability rules.
6
+
7
+ This differs from the default ActiveRecord implementation in that it uses
8
+ [squeel](https://github.com/activerecord-hackery/squeel) to generate SQL queries. This no longer
9
+ uses
10
+ - `includes` (which incurs eager loading overhead)
11
+ - `WHERE` fragments, joined lexically using `OR` or `AND` or `NOT`.
12
+
13
+ As a side effect of using `squeel`, this allows self-joins in rule definitions.
data/Rakefile ADDED
@@ -0,0 +1,6 @@
1
+ require 'bundler/gem_tasks'
2
+ require 'rspec/core/rake_task'
3
+
4
+ RSpec::Core::RakeTask.new(:spec)
5
+
6
+ task default: :spec
@@ -0,0 +1,34 @@
1
+ # coding: utf-8
2
+ lib = File.expand_path('../lib', __FILE__)
3
+ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
+ require 'cancancan/squeel/version'
5
+
6
+ Gem::Specification.new do |spec|
7
+ spec.name = 'cancancan-squeel'
8
+ spec.version = CanCanCan::Squeel::VERSION
9
+ spec.authors = ['Joel Low']
10
+ spec.email = ['joel@joelsplace.sg']
11
+
12
+ spec.summary = 'Squeel database adapter for CanCanCan.'
13
+ spec.description = "Implements CanCanCan's rule-based record fetching using Squeel."
14
+ spec.homepage = 'https://github.com/lowjoel/cancancan-squeel'
15
+
16
+ spec.files = `git ls-files -z`.split("\x0").
17
+ reject { |f| f.match(/^(test|spec|features)\//) }
18
+ spec.bindir = 'bin'
19
+ spec.executables = spec.files.grep(/^bin\//) { |f| File.basename(f) }
20
+ spec.require_paths = ['lib']
21
+
22
+ spec.add_development_dependency 'bundler', '~> 1.11'
23
+ spec.add_development_dependency 'rake'
24
+ spec.add_development_dependency 'rspec', '~> 3.0'
25
+ spec.add_development_dependency 'simplecov'
26
+ spec.add_development_dependency 'coveralls'
27
+ spec.add_development_dependency 'codeclimate-test-reporter'
28
+
29
+ spec.add_development_dependency 'sqlite3'
30
+
31
+ spec.add_dependency 'activerecord', '>= 4.1'
32
+ spec.add_dependency 'cancancan', '~> 1.10'
33
+ spec.add_dependency 'squeel', '~> 1.2'
34
+ end
@@ -0,0 +1,8 @@
1
+ require 'active_record'
2
+ require 'cancancan'
3
+ require 'squeel'
4
+
5
+ require 'cancancan/squeel/version'
6
+ require 'cancancan/squeel/active_record_disabler'
7
+ require 'cancancan/squeel/squeel_adapter'
8
+
@@ -0,0 +1,7 @@
1
+ class CanCanCan::Squeel::ActiveRecordDisabler
2
+ ::CanCan::ModelAdapters::ActiveRecord4Adapter.class_eval do
3
+ def self.for_class?(_)
4
+ false
5
+ end
6
+ end
7
+ end
@@ -0,0 +1,195 @@
1
+ class CanCanCan::Squeel::SqueelAdapter < CanCan::ModelAdapters::AbstractAdapter
2
+ def self.for_class?(model_class)
3
+ model_class <= ActiveRecord::Base
4
+ end
5
+
6
+ def self.override_condition_matching?(subject, name, _)
7
+ return false unless subject.class.respond_to?(:defined_enums)
8
+
9
+ subject.class.defined_enums.include?(name.to_s)
10
+ end
11
+
12
+ def self.matches_condition?(subject, name, value)
13
+ # Get the mapping from enum strings to values.
14
+ enum = subject.class.public_send(name.to_s.pluralize)
15
+
16
+ # Get the value of the attribute as an integer.
17
+ attribute = enum[subject.public_send(name)]
18
+
19
+ # Check to see if the value matches the condition.
20
+ value.is_a?(Enumerable) ? value.include?(attribute) : attribute == value
21
+ end
22
+
23
+ def database_records
24
+ # TODO: Handle overridden scopes.
25
+ relation.distinct
26
+ end
27
+
28
+ private
29
+
30
+ # Builds a relation that expresses the set of provided rules.
31
+ #
32
+ # This first joins all the tables specified in the rules, then builds the corresponding Squeel
33
+ # expression for the conditions.
34
+ def relation
35
+ join_scope = @rules.reduce(@model_class.where(nil)) do |scope, rule|
36
+ add_joins_to_scope(scope, build_join_list(rule.conditions))
37
+ end
38
+
39
+ add_conditions_to_scope(join_scope)
40
+ end
41
+
42
+ # Builds an array of joins for the given conditions hash.
43
+ #
44
+ # For example:
45
+ #
46
+ # a: { b: { c: 3 }, d: { e: 4 }} => [[:a, :b], [:a, :d]]
47
+ #
48
+ # @param [Hash] conditions The conditions to build the joins.
49
+ # @return [Array<Array<Symbol>>] The joins needed to satisfy the given conditions
50
+ def build_join_list(conditions)
51
+ conditions.flat_map do |key, value|
52
+ if value.is_a?(Hash)
53
+ [[key]].concat(build_join_list(value).map { |join| Array(join).unshift(key) })
54
+ else
55
+ []
56
+ end
57
+ end
58
+ end
59
+
60
+ # Builds a relation, outer joined on the provided associations.
61
+ #
62
+ # @param [ActiveRecord::Relation] scope The current scope to add the joins to.
63
+ # @param [Array<Array<Symbol>>] joins The set of associations to outer join with.
64
+ # @return [ActiveRecord::Relation] The built relation.
65
+ def add_joins_to_scope(scope, joins)
66
+ joins.reduce(scope) do |result, join|
67
+ result.joins do
68
+ join.reduce(self) do |relation, association|
69
+ relation.__send__(association).outer
70
+ end
71
+ end
72
+ end
73
+ end
74
+
75
+ # Adds the rule conditions to the scope.
76
+ #
77
+ # This builds Squeel expression for each rule, and combines the expression with those to the left
78
+ # using a fold-left.
79
+ #
80
+ # @param [ActiveRecord::Relation] scope The scope to add the rule conditions to.
81
+ def add_conditions_to_scope(scope)
82
+ adapter = self
83
+ rules = @rules
84
+
85
+ # default n
86
+ scope.where do
87
+ rules.reduce(nil) do |left_expression, rule|
88
+ combined_rule = adapter.send(:combine_expression_with_rule, self, left_expression, rule)
89
+ break if combined_rule.nil?
90
+
91
+ combined_rule
92
+ end
93
+ end
94
+ end
95
+
96
+ # Combines the given expression with the new rule.
97
+ #
98
+ # @param squeel The Squeel scope.
99
+ # @param left_expression The Squeel expression for all preceding rules.
100
+ # @param [CanCan::Rule] rule The rule being added.
101
+ # @return [Squeel::Nodes::Node] If the rule has an expression.
102
+ # @return [NilClass] If the rule is unconditional.
103
+ def combine_expression_with_rule(squeel, left_expression, rule)
104
+ right_expression = build_expression_from_rule(squeel, rule)
105
+ return right_expression if right_expression.nil? || !left_expression
106
+
107
+ if rule.base_behavior
108
+ left_expression | right_expression
109
+ else
110
+ left_expression & right_expression
111
+ end
112
+ end
113
+
114
+ # Builds a Squeel expression representing the rule's conditions.
115
+ #
116
+ # @param squeel The Squeel scope.
117
+ # @param [CanCan::Rule] rule The rule being built.
118
+ def build_expression_from_rule(squeel, rule)
119
+ comparator = rule.base_behavior ? :== : :!=
120
+ build_expression_node(squeel, @model_class, comparator, rule.conditions, true)
121
+ end
122
+
123
+ # Builds a new Squeel expression node.
124
+ #
125
+ # @param node The parent node context.
126
+ # @param [Class] model_class The model class which the conditions reference.
127
+ # @param [Symbol] comparator The comparator to use when generating the comparison.
128
+ # @param [Hash] conditions The values to compare the given node's attributes against.
129
+ # @param [Boolean] root True if the node being built is from the root. The root node is special
130
+ # because it does not mutate itself; all other nodes do.
131
+ def build_expression_node(node, model_class, comparator, conditions, root = false)
132
+ conditions.reduce(nil) do |left_expression, (key, value)|
133
+ comparison_node = build_comparison_node(root ? node : node.dup, model_class, key,
134
+ comparator, value)
135
+ if left_expression
136
+ left_expression & comparison_node
137
+ else
138
+ comparison_node
139
+ end
140
+ end
141
+ end
142
+
143
+ # Builds a comparison node for the given key and value.
144
+ #
145
+ # @param node The node context to build the comparison.
146
+ # @param [Class] model_class The model class which the conditions reference.
147
+ # @param [Symbol] key The column to compare against.
148
+ # @param [Symbol] comparator The comparator to compare the column against the value.
149
+ # @param value The value to compare the column against.
150
+ def build_comparison_node(node, model_class, key, comparator, value)
151
+ if value.is_a?(Hash)
152
+ reflection = model_class.reflect_on_association(key)
153
+ build_expression_node(node.__send__(key), reflection.klass, comparator, value)
154
+ else
155
+ key, comparator, value = squeel_comparison_for(model_class, key, comparator, value)
156
+ node.__send__(key).public_send(comparator, value)
157
+ end
158
+ end
159
+
160
+ # Picks the appropriate column, comparator, and value to use in the Squeel expression.
161
+ #
162
+ # This checks for association references: this will use the appropriate column name.
163
+ #
164
+ # Array values are interpreted as alternative choices allowed or disallowed.
165
+ #
166
+ # @param [Class] model_class The model class which the key references.
167
+ # @param [Symbol] key The column being compared.
168
+ # @param [Symbol] comparator The comparator to get the appropriate Squeel comparator for.
169
+ # @param value The value to be comparing against.
170
+ # @return [Array<(Symbol, Symbol, Object)>] A triple containing the column to compare with, the
171
+ # comparator to use, and the value to compare with.
172
+ def squeel_comparison_for(model_class, key, comparator, value)
173
+ if (association = model_class.reflect_on_association(key))
174
+ key = association.foreign_key
175
+ end
176
+
177
+ comparator = squeel_comparator_for(comparator, value)
178
+ [key, comparator, value]
179
+ end
180
+
181
+ # Maps the given comparator to a comparator appropriate for the given value.
182
+ #
183
+ # Array values are interpreted as alternative choices allowed or disallowed.
184
+ #
185
+ # @param [Symbol] comparator The comparator to get the appropriate Squeel comparator for.
186
+ # @param value The value to be comparing against.
187
+ # @return [Symbol] The comparator for the desired effect, suitable for the given type.
188
+ def squeel_comparator_for(comparator, value)
189
+ case [comparator, value]
190
+ when :==, Array then :>>
191
+ when :!=, Array then :<<
192
+ else comparator
193
+ end
194
+ end
195
+ end
@@ -0,0 +1,4 @@
1
+ module CanCanCan; end
2
+ module CanCanCan::Squeel
3
+ VERSION = '0.1.0'.freeze
4
+ end
metadata ADDED
@@ -0,0 +1,198 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: cancancan-squeel
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.1.0
5
+ platform: ruby
6
+ authors:
7
+ - Joel Low
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2016-03-29 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: bundler
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - "~>"
18
+ - !ruby/object:Gem::Version
19
+ version: '1.11'
20
+ type: :development
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - "~>"
25
+ - !ruby/object:Gem::Version
26
+ version: '1.11'
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: rspec
43
+ requirement: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - "~>"
46
+ - !ruby/object:Gem::Version
47
+ version: '3.0'
48
+ type: :development
49
+ prerelease: false
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - "~>"
53
+ - !ruby/object:Gem::Version
54
+ version: '3.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
+ - !ruby/object:Gem::Dependency
84
+ name: codeclimate-test-reporter
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: sqlite3
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
+ - !ruby/object:Gem::Dependency
112
+ name: activerecord
113
+ requirement: !ruby/object:Gem::Requirement
114
+ requirements:
115
+ - - ">="
116
+ - !ruby/object:Gem::Version
117
+ version: '4.1'
118
+ type: :runtime
119
+ prerelease: false
120
+ version_requirements: !ruby/object:Gem::Requirement
121
+ requirements:
122
+ - - ">="
123
+ - !ruby/object:Gem::Version
124
+ version: '4.1'
125
+ - !ruby/object:Gem::Dependency
126
+ name: cancancan
127
+ requirement: !ruby/object:Gem::Requirement
128
+ requirements:
129
+ - - "~>"
130
+ - !ruby/object:Gem::Version
131
+ version: '1.10'
132
+ type: :runtime
133
+ prerelease: false
134
+ version_requirements: !ruby/object:Gem::Requirement
135
+ requirements:
136
+ - - "~>"
137
+ - !ruby/object:Gem::Version
138
+ version: '1.10'
139
+ - !ruby/object:Gem::Dependency
140
+ name: squeel
141
+ requirement: !ruby/object:Gem::Requirement
142
+ requirements:
143
+ - - "~>"
144
+ - !ruby/object:Gem::Version
145
+ version: '1.2'
146
+ type: :runtime
147
+ prerelease: false
148
+ version_requirements: !ruby/object:Gem::Requirement
149
+ requirements:
150
+ - - "~>"
151
+ - !ruby/object:Gem::Version
152
+ version: '1.2'
153
+ description: Implements CanCanCan's rule-based record fetching using Squeel.
154
+ email:
155
+ - joel@joelsplace.sg
156
+ executables: []
157
+ extensions: []
158
+ extra_rdoc_files: []
159
+ files:
160
+ - ".gitignore"
161
+ - ".hound.yml"
162
+ - ".idea/cancancan-squeel.iml"
163
+ - ".rspec"
164
+ - ".rubocop.unhound.yml"
165
+ - ".rubocop.yml"
166
+ - ".travis.yml"
167
+ - Gemfile
168
+ - README.md
169
+ - Rakefile
170
+ - cancancan-squeel.gemspec
171
+ - lib/cancancan/squeel.rb
172
+ - lib/cancancan/squeel/active_record_disabler.rb
173
+ - lib/cancancan/squeel/squeel_adapter.rb
174
+ - lib/cancancan/squeel/version.rb
175
+ homepage: https://github.com/lowjoel/cancancan-squeel
176
+ licenses: []
177
+ metadata: {}
178
+ post_install_message:
179
+ rdoc_options: []
180
+ require_paths:
181
+ - lib
182
+ required_ruby_version: !ruby/object:Gem::Requirement
183
+ requirements:
184
+ - - ">="
185
+ - !ruby/object:Gem::Version
186
+ version: '0'
187
+ required_rubygems_version: !ruby/object:Gem::Requirement
188
+ requirements:
189
+ - - ">="
190
+ - !ruby/object:Gem::Version
191
+ version: '0'
192
+ requirements: []
193
+ rubyforge_project:
194
+ rubygems_version: 2.5.1
195
+ signing_key:
196
+ specification_version: 4
197
+ summary: Squeel database adapter for CanCanCan.
198
+ test_files: []