ae_declarative_authorization 0.7.0 → 0.7.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (50) hide show
  1. checksums.yaml +4 -4
  2. data/Appraisals +21 -21
  3. data/CHANGELOG +189 -189
  4. data/Gemfile +7 -7
  5. data/Gemfile.lock +45 -45
  6. data/LICENSE.txt +20 -20
  7. data/README.md +620 -620
  8. data/README.rdoc +597 -597
  9. data/Rakefile +33 -33
  10. data/authorization_rules.dist.rb +20 -20
  11. data/declarative_authorization.gemspec +24 -24
  12. data/gemfiles/rails4252.gemfile +10 -10
  13. data/gemfiles/rails4271.gemfile +10 -10
  14. data/gemfiles/rails507.gemfile +11 -11
  15. data/init.rb +5 -5
  16. data/lib/declarative_authorization.rb +18 -18
  17. data/lib/declarative_authorization/authorization.rb +821 -821
  18. data/lib/declarative_authorization/helper.rb +78 -78
  19. data/lib/declarative_authorization/in_controller.rb +713 -713
  20. data/lib/declarative_authorization/in_model.rb +156 -156
  21. data/lib/declarative_authorization/maintenance.rb +215 -215
  22. data/lib/declarative_authorization/obligation_scope.rb +345 -345
  23. data/lib/declarative_authorization/railsengine.rb +5 -5
  24. data/lib/declarative_authorization/reader.rb +549 -549
  25. data/lib/declarative_authorization/test/helpers.rb +261 -261
  26. data/lib/declarative_authorization/version.rb +3 -3
  27. data/lib/generators/authorization/install/install_generator.rb +77 -77
  28. data/lib/generators/authorization/rules/rules_generator.rb +13 -13
  29. data/lib/generators/authorization/rules/templates/authorization_rules.rb +27 -27
  30. data/lib/tasks/authorization_tasks.rake +89 -89
  31. data/test/authorization_test.rb +1121 -1121
  32. data/test/controller_filter_resource_access_test.rb +573 -573
  33. data/test/controller_test.rb +478 -478
  34. data/test/database.yml +3 -3
  35. data/test/dsl_reader_test.rb +178 -178
  36. data/test/functional/filter_access_to_with_id_in_scope_test.rb +88 -88
  37. data/test/functional/no_filter_access_to_test.rb +79 -79
  38. data/test/functional/params_block_arity_test.rb +39 -39
  39. data/test/helper_test.rb +248 -248
  40. data/test/maintenance_test.rb +46 -46
  41. data/test/model_test.rb +1840 -1840
  42. data/test/schema.sql +60 -60
  43. data/test/test_helper.rb +174 -174
  44. data/test/test_support/minitest_compatibility.rb +26 -26
  45. metadata +3 -9
  46. data/gemfiles/rails4252.gemfile.lock +0 -126
  47. data/gemfiles/rails4271.gemfile.lock +0 -126
  48. data/gemfiles/rails507.gemfile.lock +0 -136
  49. data/log/test.log +0 -34715
  50. data/test/profiles/access_checking +0 -46
@@ -1,27 +1,27 @@
1
- require 'minitest/assertions'
2
-
3
- module Minitest
4
- module Assertions
5
-
6
- # test/unit backwards compatibility methods
7
- alias :assert_raise :assert_raises
8
- alias :assert_not_empty :refute_empty
9
- alias :assert_not_equal :refute_equal
10
- alias :assert_not_in_delta :refute_in_delta
11
- alias :assert_not_in_epsilon :refute_in_epsilon
12
- alias :assert_not_includes :refute_includes
13
- alias :assert_not_instance_of :refute_instance_of
14
- alias :assert_not_kind_of :refute_kind_of
15
- alias :assert_no_match :refute_match
16
- alias :assert_not_nil :refute_nil
17
- alias :assert_not_operator :refute_operator
18
- alias :assert_not_predicate :refute_predicate
19
- alias :assert_not_respond_to :refute_respond_to
20
- alias :assert_not_same :refute_same
21
-
22
- def assert_nothing_raised(*)
23
- yield
24
- end
25
-
26
- end
1
+ require 'minitest/assertions'
2
+
3
+ module Minitest
4
+ module Assertions
5
+
6
+ # test/unit backwards compatibility methods
7
+ alias :assert_raise :assert_raises
8
+ alias :assert_not_empty :refute_empty
9
+ alias :assert_not_equal :refute_equal
10
+ alias :assert_not_in_delta :refute_in_delta
11
+ alias :assert_not_in_epsilon :refute_in_epsilon
12
+ alias :assert_not_includes :refute_includes
13
+ alias :assert_not_instance_of :refute_instance_of
14
+ alias :assert_not_kind_of :refute_kind_of
15
+ alias :assert_no_match :refute_match
16
+ alias :assert_not_nil :refute_nil
17
+ alias :assert_not_operator :refute_operator
18
+ alias :assert_not_predicate :refute_predicate
19
+ alias :assert_not_respond_to :refute_respond_to
20
+ alias :assert_not_same :refute_same
21
+
22
+ def assert_nothing_raised(*)
23
+ yield
24
+ end
25
+
26
+ end
27
27
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ae_declarative_authorization
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.7.0
4
+ version: 0.7.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - AppFolio
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2018-06-21 00:00:00.000000000 Z
12
+ date: 2018-07-16 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: blockenspiel
@@ -63,11 +63,8 @@ files:
63
63
  - authorization_rules.dist.rb
64
64
  - declarative_authorization.gemspec
65
65
  - gemfiles/rails4252.gemfile
66
- - gemfiles/rails4252.gemfile.lock
67
66
  - gemfiles/rails4271.gemfile
68
- - gemfiles/rails4271.gemfile.lock
69
67
  - gemfiles/rails507.gemfile
70
- - gemfiles/rails507.gemfile.lock
71
68
  - init.rb
72
69
  - lib/declarative_authorization.rb
73
70
  - lib/declarative_authorization/authorization.rb
@@ -84,7 +81,6 @@ files:
84
81
  - lib/generators/authorization/rules/rules_generator.rb
85
82
  - lib/generators/authorization/rules/templates/authorization_rules.rb
86
83
  - lib/tasks/authorization_tasks.rake
87
- - log/test.log
88
84
  - test/authorization_test.rb
89
85
  - test/controller_filter_resource_access_test.rb
90
86
  - test/controller_test.rb
@@ -96,7 +92,6 @@ files:
96
92
  - test/helper_test.rb
97
93
  - test/maintenance_test.rb
98
94
  - test/model_test.rb
99
- - test/profiles/access_checking
100
95
  - test/schema.sql
101
96
  - test/test_helper.rb
102
97
  - test/test_support/minitest_compatibility.rb
@@ -120,7 +115,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
120
115
  version: '0'
121
116
  requirements: []
122
117
  rubyforge_project:
123
- rubygems_version: 2.6.14
118
+ rubygems_version: 2.5.2
124
119
  signing_key:
125
120
  specification_version: 4
126
121
  summary: ae_declarative_authorization is a Rails gem for maintainable authorization
@@ -137,7 +132,6 @@ test_files:
137
132
  - test/helper_test.rb
138
133
  - test/maintenance_test.rb
139
134
  - test/model_test.rb
140
- - test/profiles/access_checking
141
135
  - test/schema.sql
142
136
  - test/test_helper.rb
143
137
  - test/test_support/minitest_compatibility.rb
@@ -1,126 +0,0 @@
1
- PATH
2
- remote: ..
3
- specs:
4
- ae_declarative_authorization (0.6.0)
5
- blockenspiel (~> 0.5.0)
6
- rails (>= 4.2.5.2, < 5.1)
7
-
8
- GEM
9
- remote: http://rubygems.org/
10
- specs:
11
- actionmailer (4.2.5.2)
12
- actionpack (= 4.2.5.2)
13
- actionview (= 4.2.5.2)
14
- activejob (= 4.2.5.2)
15
- mail (~> 2.5, >= 2.5.4)
16
- rails-dom-testing (~> 1.0, >= 1.0.5)
17
- actionpack (4.2.5.2)
18
- actionview (= 4.2.5.2)
19
- activesupport (= 4.2.5.2)
20
- rack (~> 1.6)
21
- rack-test (~> 0.6.2)
22
- rails-dom-testing (~> 1.0, >= 1.0.5)
23
- rails-html-sanitizer (~> 1.0, >= 1.0.2)
24
- actionview (4.2.5.2)
25
- activesupport (= 4.2.5.2)
26
- builder (~> 3.1)
27
- erubis (~> 2.7.0)
28
- rails-dom-testing (~> 1.0, >= 1.0.5)
29
- rails-html-sanitizer (~> 1.0, >= 1.0.2)
30
- activejob (4.2.5.2)
31
- activesupport (= 4.2.5.2)
32
- globalid (>= 0.3.0)
33
- activemodel (4.2.5.2)
34
- activesupport (= 4.2.5.2)
35
- builder (~> 3.1)
36
- activerecord (4.2.5.2)
37
- activemodel (= 4.2.5.2)
38
- activesupport (= 4.2.5.2)
39
- arel (~> 6.0)
40
- activesupport (4.2.5.2)
41
- i18n (~> 0.7)
42
- json (~> 1.7, >= 1.7.7)
43
- minitest (~> 5.1)
44
- thread_safe (~> 0.3, >= 0.3.4)
45
- tzinfo (~> 1.1)
46
- appraisal (2.2.0)
47
- bundler
48
- rake
49
- thor (>= 0.14.0)
50
- arel (6.0.4)
51
- blockenspiel (0.5.0)
52
- builder (3.2.3)
53
- concurrent-ruby (1.0.5)
54
- crass (1.0.4)
55
- erubis (2.7.0)
56
- globalid (0.4.1)
57
- activesupport (>= 4.2.0)
58
- i18n (0.9.5)
59
- concurrent-ruby (~> 1.0)
60
- json (1.8.6)
61
- loofah (2.2.2)
62
- crass (~> 1.0.2)
63
- nokogiri (>= 1.5.9)
64
- mail (2.7.0)
65
- mini_mime (>= 0.1.1)
66
- metaclass (0.0.4)
67
- mini_mime (1.0.0)
68
- mini_portile2 (2.3.0)
69
- minitest (5.11.3)
70
- mocha (1.5.0)
71
- metaclass (~> 0.0.1)
72
- nokogiri (1.8.3)
73
- mini_portile2 (~> 2.3.0)
74
- rack (1.6.10)
75
- rack-test (0.6.3)
76
- rack (>= 1.0)
77
- rails (4.2.5.2)
78
- actionmailer (= 4.2.5.2)
79
- actionpack (= 4.2.5.2)
80
- actionview (= 4.2.5.2)
81
- activejob (= 4.2.5.2)
82
- activemodel (= 4.2.5.2)
83
- activerecord (= 4.2.5.2)
84
- activesupport (= 4.2.5.2)
85
- bundler (>= 1.3.0, < 2.0)
86
- railties (= 4.2.5.2)
87
- sprockets-rails
88
- rails-deprecated_sanitizer (1.0.3)
89
- activesupport (>= 4.2.0.alpha)
90
- rails-dom-testing (1.0.9)
91
- activesupport (>= 4.2.0, < 5.0)
92
- nokogiri (~> 1.6)
93
- rails-deprecated_sanitizer (>= 1.0.1)
94
- rails-html-sanitizer (1.0.4)
95
- loofah (~> 2.2, >= 2.2.2)
96
- railties (4.2.5.2)
97
- actionpack (= 4.2.5.2)
98
- activesupport (= 4.2.5.2)
99
- rake (>= 0.8.7)
100
- thor (>= 0.18.1, < 2.0)
101
- rake (12.3.1)
102
- sprockets (3.7.1)
103
- concurrent-ruby (~> 1.0)
104
- rack (> 1, < 3)
105
- sprockets-rails (3.2.1)
106
- actionpack (>= 4.0)
107
- activesupport (>= 4.0)
108
- sprockets (>= 3.0.0)
109
- sqlite3 (1.3.13)
110
- thor (0.20.0)
111
- thread_safe (0.3.6)
112
- tzinfo (1.2.5)
113
- thread_safe (~> 0.1)
114
-
115
- PLATFORMS
116
- ruby
117
-
118
- DEPENDENCIES
119
- ae_declarative_authorization!
120
- appraisal (~> 2.1)
121
- mocha (~> 1.0)
122
- rails (= 4.2.5.2)
123
- sqlite3
124
-
125
- BUNDLED WITH
126
- 1.16.1
@@ -1,126 +0,0 @@
1
- PATH
2
- remote: ..
3
- specs:
4
- ae_declarative_authorization (0.6.0)
5
- blockenspiel (~> 0.5.0)
6
- rails (>= 4.2.5.2, < 5.1)
7
-
8
- GEM
9
- remote: http://rubygems.org/
10
- specs:
11
- actionmailer (4.2.7.1)
12
- actionpack (= 4.2.7.1)
13
- actionview (= 4.2.7.1)
14
- activejob (= 4.2.7.1)
15
- mail (~> 2.5, >= 2.5.4)
16
- rails-dom-testing (~> 1.0, >= 1.0.5)
17
- actionpack (4.2.7.1)
18
- actionview (= 4.2.7.1)
19
- activesupport (= 4.2.7.1)
20
- rack (~> 1.6)
21
- rack-test (~> 0.6.2)
22
- rails-dom-testing (~> 1.0, >= 1.0.5)
23
- rails-html-sanitizer (~> 1.0, >= 1.0.2)
24
- actionview (4.2.7.1)
25
- activesupport (= 4.2.7.1)
26
- builder (~> 3.1)
27
- erubis (~> 2.7.0)
28
- rails-dom-testing (~> 1.0, >= 1.0.5)
29
- rails-html-sanitizer (~> 1.0, >= 1.0.2)
30
- activejob (4.2.7.1)
31
- activesupport (= 4.2.7.1)
32
- globalid (>= 0.3.0)
33
- activemodel (4.2.7.1)
34
- activesupport (= 4.2.7.1)
35
- builder (~> 3.1)
36
- activerecord (4.2.7.1)
37
- activemodel (= 4.2.7.1)
38
- activesupport (= 4.2.7.1)
39
- arel (~> 6.0)
40
- activesupport (4.2.7.1)
41
- i18n (~> 0.7)
42
- json (~> 1.7, >= 1.7.7)
43
- minitest (~> 5.1)
44
- thread_safe (~> 0.3, >= 0.3.4)
45
- tzinfo (~> 1.1)
46
- appraisal (2.2.0)
47
- bundler
48
- rake
49
- thor (>= 0.14.0)
50
- arel (6.0.4)
51
- blockenspiel (0.5.0)
52
- builder (3.2.3)
53
- concurrent-ruby (1.0.5)
54
- crass (1.0.4)
55
- erubis (2.7.0)
56
- globalid (0.4.1)
57
- activesupport (>= 4.2.0)
58
- i18n (0.9.5)
59
- concurrent-ruby (~> 1.0)
60
- json (1.8.6)
61
- loofah (2.2.2)
62
- crass (~> 1.0.2)
63
- nokogiri (>= 1.5.9)
64
- mail (2.7.0)
65
- mini_mime (>= 0.1.1)
66
- metaclass (0.0.4)
67
- mini_mime (1.0.0)
68
- mini_portile2 (2.3.0)
69
- minitest (5.11.3)
70
- mocha (1.5.0)
71
- metaclass (~> 0.0.1)
72
- nokogiri (1.8.3)
73
- mini_portile2 (~> 2.3.0)
74
- rack (1.6.10)
75
- rack-test (0.6.3)
76
- rack (>= 1.0)
77
- rails (4.2.7.1)
78
- actionmailer (= 4.2.7.1)
79
- actionpack (= 4.2.7.1)
80
- actionview (= 4.2.7.1)
81
- activejob (= 4.2.7.1)
82
- activemodel (= 4.2.7.1)
83
- activerecord (= 4.2.7.1)
84
- activesupport (= 4.2.7.1)
85
- bundler (>= 1.3.0, < 2.0)
86
- railties (= 4.2.7.1)
87
- sprockets-rails
88
- rails-deprecated_sanitizer (1.0.3)
89
- activesupport (>= 4.2.0.alpha)
90
- rails-dom-testing (1.0.9)
91
- activesupport (>= 4.2.0, < 5.0)
92
- nokogiri (~> 1.6)
93
- rails-deprecated_sanitizer (>= 1.0.1)
94
- rails-html-sanitizer (1.0.4)
95
- loofah (~> 2.2, >= 2.2.2)
96
- railties (4.2.7.1)
97
- actionpack (= 4.2.7.1)
98
- activesupport (= 4.2.7.1)
99
- rake (>= 0.8.7)
100
- thor (>= 0.18.1, < 2.0)
101
- rake (12.3.1)
102
- sprockets (3.7.1)
103
- concurrent-ruby (~> 1.0)
104
- rack (> 1, < 3)
105
- sprockets-rails (3.2.1)
106
- actionpack (>= 4.0)
107
- activesupport (>= 4.0)
108
- sprockets (>= 3.0.0)
109
- sqlite3 (1.3.13)
110
- thor (0.20.0)
111
- thread_safe (0.3.6)
112
- tzinfo (1.2.5)
113
- thread_safe (~> 0.1)
114
-
115
- PLATFORMS
116
- ruby
117
-
118
- DEPENDENCIES
119
- ae_declarative_authorization!
120
- appraisal (~> 2.1)
121
- mocha (~> 1.0)
122
- rails (= 4.2.7.1)
123
- sqlite3
124
-
125
- BUNDLED WITH
126
- 1.16.1
@@ -1,136 +0,0 @@
1
- PATH
2
- remote: ..
3
- specs:
4
- ae_declarative_authorization (0.6.0)
5
- blockenspiel (~> 0.5.0)
6
- rails (>= 4.2.5.2, < 5.1)
7
-
8
- GEM
9
- remote: http://rubygems.org/
10
- specs:
11
- actioncable (5.0.7)
12
- actionpack (= 5.0.7)
13
- nio4r (>= 1.2, < 3.0)
14
- websocket-driver (~> 0.6.1)
15
- actionmailer (5.0.7)
16
- actionpack (= 5.0.7)
17
- actionview (= 5.0.7)
18
- activejob (= 5.0.7)
19
- mail (~> 2.5, >= 2.5.4)
20
- rails-dom-testing (~> 2.0)
21
- actionpack (5.0.7)
22
- actionview (= 5.0.7)
23
- activesupport (= 5.0.7)
24
- rack (~> 2.0)
25
- rack-test (~> 0.6.3)
26
- rails-dom-testing (~> 2.0)
27
- rails-html-sanitizer (~> 1.0, >= 1.0.2)
28
- actionview (5.0.7)
29
- activesupport (= 5.0.7)
30
- builder (~> 3.1)
31
- erubis (~> 2.7.0)
32
- rails-dom-testing (~> 2.0)
33
- rails-html-sanitizer (~> 1.0, >= 1.0.3)
34
- activejob (5.0.7)
35
- activesupport (= 5.0.7)
36
- globalid (>= 0.3.6)
37
- activemodel (5.0.7)
38
- activesupport (= 5.0.7)
39
- activerecord (5.0.7)
40
- activemodel (= 5.0.7)
41
- activesupport (= 5.0.7)
42
- arel (~> 7.0)
43
- activesupport (5.0.7)
44
- concurrent-ruby (~> 1.0, >= 1.0.2)
45
- i18n (>= 0.7, < 2)
46
- minitest (~> 5.1)
47
- tzinfo (~> 1.1)
48
- appraisal (2.2.0)
49
- bundler
50
- rake
51
- thor (>= 0.14.0)
52
- arel (7.1.4)
53
- blockenspiel (0.5.0)
54
- builder (3.2.3)
55
- concurrent-ruby (1.0.5)
56
- crass (1.0.4)
57
- erubis (2.7.0)
58
- globalid (0.4.1)
59
- activesupport (>= 4.2.0)
60
- i18n (1.0.1)
61
- concurrent-ruby (~> 1.0)
62
- loofah (2.2.2)
63
- crass (~> 1.0.2)
64
- nokogiri (>= 1.5.9)
65
- mail (2.7.0)
66
- mini_mime (>= 0.1.1)
67
- metaclass (0.0.4)
68
- method_source (0.9.0)
69
- mini_mime (1.0.0)
70
- mini_portile2 (2.3.0)
71
- minitest (5.11.3)
72
- mocha (1.5.0)
73
- metaclass (~> 0.0.1)
74
- nio4r (2.3.1)
75
- nokogiri (1.8.3)
76
- mini_portile2 (~> 2.3.0)
77
- rack (2.0.5)
78
- rack-test (0.6.3)
79
- rack (>= 1.0)
80
- rails (5.0.7)
81
- actioncable (= 5.0.7)
82
- actionmailer (= 5.0.7)
83
- actionpack (= 5.0.7)
84
- actionview (= 5.0.7)
85
- activejob (= 5.0.7)
86
- activemodel (= 5.0.7)
87
- activerecord (= 5.0.7)
88
- activesupport (= 5.0.7)
89
- bundler (>= 1.3.0)
90
- railties (= 5.0.7)
91
- sprockets-rails (>= 2.0.0)
92
- rails-controller-testing (1.0.2)
93
- actionpack (~> 5.x, >= 5.0.1)
94
- actionview (~> 5.x, >= 5.0.1)
95
- activesupport (~> 5.x)
96
- rails-dom-testing (2.0.3)
97
- activesupport (>= 4.2.0)
98
- nokogiri (>= 1.6)
99
- rails-html-sanitizer (1.0.4)
100
- loofah (~> 2.2, >= 2.2.2)
101
- railties (5.0.7)
102
- actionpack (= 5.0.7)
103
- activesupport (= 5.0.7)
104
- method_source
105
- rake (>= 0.8.7)
106
- thor (>= 0.18.1, < 2.0)
107
- rake (12.3.1)
108
- sprockets (3.7.1)
109
- concurrent-ruby (~> 1.0)
110
- rack (> 1, < 3)
111
- sprockets-rails (3.2.1)
112
- actionpack (>= 4.0)
113
- activesupport (>= 4.0)
114
- sprockets (>= 3.0.0)
115
- sqlite3 (1.3.13)
116
- thor (0.20.0)
117
- thread_safe (0.3.6)
118
- tzinfo (1.2.5)
119
- thread_safe (~> 0.1)
120
- websocket-driver (0.6.5)
121
- websocket-extensions (>= 0.1.0)
122
- websocket-extensions (0.1.3)
123
-
124
- PLATFORMS
125
- ruby
126
-
127
- DEPENDENCIES
128
- ae_declarative_authorization!
129
- appraisal (~> 2.1)
130
- mocha (~> 1.0)
131
- rails (= 5.0.7)
132
- rails-controller-testing
133
- sqlite3
134
-
135
- BUNDLED WITH
136
- 1.16.1