eaco 0.8.1 → 0.8.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 536f9a37ebe0f8c16425d643a8cb91c119d5f61c
4
- data.tar.gz: 0e9c61eeddaca078398925b397e39795f7b8247b
3
+ metadata.gz: 91f235834d2378f29b46f54e433898e4d8e7b34f
4
+ data.tar.gz: 094515fb0e0c0da6354262e3a0c0f8b50cfce099
5
5
  SHA512:
6
- metadata.gz: 9780bf31341fde6cce7a5046c83d667e2ec09b6595b3806a4ed3d42ca3d67264eaa13d44d61d6e0d65e3acf4911f899088986bf72cf01f5640e1b8d4d5e4c8d3
7
- data.tar.gz: ee7f5cf26bce90db25812ae255409b0b938119678ff3a1f08b278eda2b53b5457c383835c4700f6e5a84d402b64368af01043ebff87515a70f946e52d002eacd
6
+ metadata.gz: 84abe5ac3ef02b6433d2d2dfbd399c032250a480d8fafecdbb38fd662f49c7a48c591bd7baf755feac9eac2e7b649d25aface3e7dbf5f2e5a5f5470908b296d4
7
+ data.tar.gz: bba9437ebbda22bc5e04752b1a4af8d6898ac3def1d1bb326dbd65dba8e062cd40af967a27630a55d60155b7c543ad87bbd95952bd8851fb24ba8adf91e21c91
@@ -9,6 +9,11 @@ gemfile:
9
9
  - gemfiles/rails_4.1.gemfile
10
10
  - gemfiles/rails_4.2.gemfile
11
11
 
12
+ sudo: false
13
+
14
+ language: ruby
15
+ cache: bundler
16
+
12
17
  addons:
13
18
  postgresql: "9.4"
14
19
 
@@ -30,4 +30,6 @@ Gem::Specification.new do |spec|
30
30
  spec.add_development_dependency "yard-cucumber"
31
31
  spec.add_development_dependency "coveralls"
32
32
  spec.add_development_dependency "guard-shell"
33
+ spec.add_development_dependency "rails"
34
+ spec.add_development_dependency "pg"
33
35
  end
@@ -31,6 +31,8 @@ module Eaco
31
31
  def self.included(base)
32
32
  Compatibility.new(base).check!
33
33
 
34
+ return unless base.table_exists?
35
+
34
36
  column = base.columns_hash.fetch('acl', nil)
35
37
 
36
38
  unless column
@@ -27,7 +27,9 @@ module Eaco
27
27
 
28
28
  designators = actor.designators.map {|d| quote_value(d, nil) }
29
29
 
30
- where("acl ?| array[#{designators.join(',')}]::varchar[]")
30
+ column = "#{connection.quote_table_name(table_name)}.acl"
31
+
32
+ where("#{column} ?| array[#{designators.join(',')}]::varchar[]")
31
33
  end
32
34
  end
33
35
 
@@ -50,7 +50,7 @@ module Eaco
50
50
  #
51
51
  def define_acl_subclass
52
52
  target_eval do
53
- remove_const(:ACL) if constants.include?(:ACL)
53
+ remove_const(:ACL) if const_defined?(:ACL, false)
54
54
 
55
55
  Class.new(Eaco::ACL).tap do |acl_class|
56
56
  define_singleton_method(:acl) { acl_class }
@@ -2,6 +2,6 @@ module Eaco
2
2
 
3
3
  # Current version
4
4
  #
5
- VERSION = '0.8.1'
5
+ VERSION = '0.8.2'
6
6
 
7
7
  end
@@ -171,6 +171,8 @@ RSpec.describe Eaco::ACL do
171
171
  end
172
172
 
173
173
  describe '#pretty_inspect' do
174
+ require 'pp'
175
+
174
176
  let(:acl) { described_class.new('foo' => :bar) }
175
177
 
176
178
  subject { acl.pretty_inspect }
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: eaco
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.8.1
4
+ version: 0.8.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Marcello Barnaba
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-02-28 00:00:00.000000000 Z
11
+ date: 2015-11-16 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -192,6 +192,34 @@ dependencies:
192
192
  - - ">="
193
193
  - !ruby/object:Gem::Version
194
194
  version: '0'
195
+ - !ruby/object:Gem::Dependency
196
+ name: rails
197
+ requirement: !ruby/object:Gem::Requirement
198
+ requirements:
199
+ - - ">="
200
+ - !ruby/object:Gem::Version
201
+ version: '0'
202
+ type: :development
203
+ prerelease: false
204
+ version_requirements: !ruby/object:Gem::Requirement
205
+ requirements:
206
+ - - ">="
207
+ - !ruby/object:Gem::Version
208
+ version: '0'
209
+ - !ruby/object:Gem::Dependency
210
+ name: pg
211
+ requirement: !ruby/object:Gem::Requirement
212
+ requirements:
213
+ - - ">="
214
+ - !ruby/object:Gem::Version
215
+ version: '0'
216
+ type: :development
217
+ prerelease: false
218
+ version_requirements: !ruby/object:Gem::Requirement
219
+ requirements:
220
+ - - ">="
221
+ - !ruby/object:Gem::Version
222
+ version: '0'
195
223
  description:
196
224
  email:
197
225
  - vjt@openssl.it