corral_acl 1.0.0 → 1.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: a289c9b01b924d02bdf094ca573f1c8e8ae1917f
4
- data.tar.gz: 86fc415588a4ed5ce2d7cf48f1c0015ed51740cb
3
+ metadata.gz: 89b43126b844b262ba0577efda421a0ceb2aef44
4
+ data.tar.gz: 531663d8f8ebf5b965206c3d83a2d81191237fbd
5
5
  SHA512:
6
- metadata.gz: dee367be33b2bb073659441663d5f6e7a888256e5956c8562de9fff9b8959328e9d4773f045aa422ae48ed546952430b3222d8ce975a935658dec42d25aa8d70
7
- data.tar.gz: a0fc40f1e740869bda723619d3c24aebfb8c47ae180f5b6f248175ec27625792f7803e79fcc453b8ae795fbbf0186d76b47b5b19f537ee655cfd1f8d615208ba
6
+ metadata.gz: b4c5927d2af7e152a44986cdbcdbd088e2de707b88fd9692e97762038675ddd7575bb112ac77c2bf3fec2269eab8806660a9524fd8c3d1c10e4302e59be5de79
7
+ data.tar.gz: 8fd6f848f4efebf88771777d89a1c4e764057f498265000a7d8552ec630a086f2ee7b3d21654d722a9189d44b3a4b8d16ae039c5f20e9dd35279fc3bdc7aabb5
data/Rakefile CHANGED
@@ -14,11 +14,6 @@ RDoc::Task.new(:rdoc) do |rdoc|
14
14
  rdoc.rdoc_files.include('lib/**/*.rb')
15
15
  end
16
16
 
17
-
18
-
19
-
20
-
21
-
22
17
  require 'bundler/gem_tasks'
23
18
 
24
19
  require 'rake/testtask'
@@ -30,5 +25,4 @@ Rake::TestTask.new(:test) do |t|
30
25
  t.verbose = false
31
26
  end
32
27
 
33
-
34
28
  task default: :test
@@ -13,5 +13,5 @@ Gem::Specification.new do |s|
13
13
 
14
14
  s.files = `git ls-files`.split($/)
15
15
  s.require_paths = ["lib"]
16
- s.add_runtime_dependency 'rails', '~> 4.2', '>= 4.2.0'
16
+ s.add_runtime_dependency "rails", "~> 5.0"
17
17
  end
@@ -5,7 +5,7 @@ module Corral
5
5
  # If neither of these authorization methods are called, a Corral::AuthorizationNotPerformed exception will be raised.
6
6
  # This can be placed in ApplicationController to ensure all controller actions do authorization.
7
7
  def check_authorization(options = {})
8
- self.after_filter(options.slice(:only, :except)) do |controller|
8
+ self.after_action(options.slice(:only, :except)) do |controller|
9
9
  next if controller.instance_variable_defined?(:@_authorized)
10
10
  next if options[:if] && !controller.send(options[:if])
11
11
  next if options[:unless] && controller.send(options[:unless])
@@ -14,9 +14,9 @@ module Corral
14
14
  end
15
15
 
16
16
  # Call this in the class of a controller to skip the check_authorization behavior on the actions.
17
- # Any arguments are passed to the +before_filter+ called.
17
+ # Any arguments are passed to the +before_action+ called.
18
18
  def skip_authorization_check(*args)
19
- self.before_filter(*args) do |controller|
19
+ self.before_action(*args) do |controller|
20
20
  controller.instance_variable_set(:@_authorized, true)
21
21
  end
22
22
  end
@@ -1,3 +1,3 @@
1
1
  module Corral
2
- VERSION = "1.0.0"
2
+ VERSION = "1.0.1"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: corral_acl
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0
4
+ version: 1.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Elliot Speck (Arcaire)
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-08-22 00:00:00.000000000 Z
11
+ date: 2016-10-19 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails
@@ -16,20 +16,14 @@ dependencies:
16
16
  requirements:
17
17
  - - "~>"
18
18
  - !ruby/object:Gem::Version
19
- version: '4.2'
20
- - - ">="
21
- - !ruby/object:Gem::Version
22
- version: 4.2.0
19
+ version: '5.0'
23
20
  type: :runtime
24
21
  prerelease: false
25
22
  version_requirements: !ruby/object:Gem::Requirement
26
23
  requirements:
27
24
  - - "~>"
28
25
  - !ruby/object:Gem::Version
29
- version: '4.2'
30
- - - ">="
31
- - !ruby/object:Gem::Version
32
- version: 4.2.0
26
+ version: '5.0'
33
27
  description: Yet another opinionated ACL framework.
34
28
  email:
35
29
  - rubygems@elliot.pro
@@ -37,12 +31,10 @@ executables: []
37
31
  extensions: []
38
32
  extra_rdoc_files: []
39
33
  files:
40
- - ".gitignore"
41
34
  - Gemfile
42
35
  - LICENSE
43
36
  - README.md
44
37
  - Rakefile
45
- - bin/test
46
38
  - corral.gemspec
47
39
  - lib/corral.rb
48
40
  - lib/corral/ability.rb
data/.gitignore DELETED
@@ -1,7 +0,0 @@
1
- .bundle/
2
- log/*.log
3
- pkg/
4
- test/dummy/db/*.sqlite3
5
- test/dummy/db/*.sqlite3-journal
6
- test/dummy/log/*.log
7
- test/dummy/tmp/
data/bin/test DELETED
@@ -1,9 +0,0 @@
1
- #!/usr/bin/env ruby
2
- $: << File.expand_path(File.expand_path('../../test', __FILE__))
3
-
4
- require 'bundler/setup'
5
- require 'rails/test_unit/minitest_plugin'
6
-
7
- Rails::TestUnitReporter.executable = 'bin/test'
8
-
9
- exit Minitest.run(ARGV)