strong_actions 0.1.1 → 0.2.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 21f8df7f5da3f22a38a230856be16d079cd99c111340c7cdbe3fc60c811f45f7
4
- data.tar.gz: 84d61d9f12809f59f169ea6e2310d97795f37644c8ea119c51d798db394f28f5
3
+ metadata.gz: 7bdd35b69f1ee82ffd7fb5022f2d59a94390e8ba9b8ca4bd881dbd6d60486a2d
4
+ data.tar.gz: aa37b1047e0c46e03ff01dad490af01b58a072060217285b8b01ad3c32b2c509
5
5
  SHA512:
6
- metadata.gz: 3a7cdfc5032e92717356d8a8ece7057b356ec879f2ffe8968f3377e1213efb56dba649dafbddfc40a5929fe3f555ea2142406cf121e034f2ee15de2f9c210e85
7
- data.tar.gz: 9f516dbf357e79c389c10fbf9ffd6d0bd09bc100ea183cbac582b81a6c25f602e29382774946dde522fc955a73bcd787a042903122d7e0290fd0f0d84b3e936f
6
+ metadata.gz: '095093bb09ea741d7567ca9c71d3d1c1c86b945abffe03c43e3ae344779d6bd06aaba2deb2ff9908c47b1b9dc06c39c81e19bfa39b498b49b014f4763b6f284c'
7
+ data.tar.gz: 39b9ef118c80455a605c9da9bb1146877347a9ef58a6c1261e4f4c708dd3eb77eac19b5f806518ec07ca2777be4d7b48ce758a9443e98e7862cbbcb2b1d15a39
@@ -2,8 +2,8 @@ sudo: false
2
2
  language: ruby
3
3
  cache: bundler
4
4
  rvm:
5
- - 2.4.0
6
- - 2.3.3
7
- - 2.2.6
5
+ - 2.5.0
6
+ - 2.4.3
7
+ - 2.3.7
8
8
  script:
9
9
  - bundle exec rake test
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- strong_actions (0.1.1)
4
+ strong_actions (0.2.0)
5
5
  actionpack (>= 4.2, < 6)
6
6
  activesupport (>= 4.2, < 6)
7
7
  railties (>= 4.2, < 6)
@@ -9,54 +9,54 @@ PATH
9
9
  GEM
10
10
  remote: https://rubygems.org/
11
11
  specs:
12
- actionpack (5.2.0)
13
- actionview (= 5.2.0)
14
- activesupport (= 5.2.0)
12
+ actionpack (5.2.3)
13
+ actionview (= 5.2.3)
14
+ activesupport (= 5.2.3)
15
15
  rack (~> 2.0)
16
16
  rack-test (>= 0.6.3)
17
17
  rails-dom-testing (~> 2.0)
18
18
  rails-html-sanitizer (~> 1.0, >= 1.0.2)
19
- actionview (5.2.0)
20
- activesupport (= 5.2.0)
19
+ actionview (5.2.3)
20
+ activesupport (= 5.2.3)
21
21
  builder (~> 3.1)
22
22
  erubi (~> 1.4)
23
23
  rails-dom-testing (~> 2.0)
24
24
  rails-html-sanitizer (~> 1.0, >= 1.0.3)
25
- activesupport (5.2.0)
25
+ activesupport (5.2.3)
26
26
  concurrent-ruby (~> 1.0, >= 1.0.2)
27
27
  i18n (>= 0.7, < 2)
28
28
  minitest (~> 5.1)
29
29
  tzinfo (~> 1.1)
30
30
  builder (3.2.3)
31
- concurrent-ruby (1.0.5)
32
- crass (1.0.4)
33
- erubi (1.7.1)
34
- i18n (1.0.1)
31
+ concurrent-ruby (1.1.5)
32
+ crass (1.0.5)
33
+ erubi (1.9.0)
34
+ i18n (1.7.0)
35
35
  concurrent-ruby (~> 1.0)
36
- loofah (2.2.2)
36
+ loofah (2.3.1)
37
37
  crass (~> 1.0.2)
38
38
  nokogiri (>= 1.5.9)
39
- method_source (0.9.0)
40
- mini_portile2 (2.3.0)
41
- minitest (5.11.3)
42
- nokogiri (1.8.2)
43
- mini_portile2 (~> 2.3.0)
44
- rack (2.0.5)
45
- rack-test (1.0.0)
39
+ method_source (0.9.2)
40
+ mini_portile2 (2.4.0)
41
+ minitest (5.13.0)
42
+ nokogiri (1.10.5)
43
+ mini_portile2 (~> 2.4.0)
44
+ rack (2.0.7)
45
+ rack-test (1.1.0)
46
46
  rack (>= 1.0, < 3)
47
47
  rails-dom-testing (2.0.3)
48
48
  activesupport (>= 4.2.0)
49
49
  nokogiri (>= 1.6)
50
- rails-html-sanitizer (1.0.4)
51
- loofah (~> 2.2, >= 2.2.2)
52
- railties (5.2.0)
53
- actionpack (= 5.2.0)
54
- activesupport (= 5.2.0)
50
+ rails-html-sanitizer (1.3.0)
51
+ loofah (~> 2.3)
52
+ railties (5.2.3)
53
+ actionpack (= 5.2.3)
54
+ activesupport (= 5.2.3)
55
55
  method_source
56
56
  rake (>= 0.8.7)
57
- thor (>= 0.18.1, < 2.0)
58
- rake (12.3.1)
59
- thor (0.20.0)
57
+ thor (>= 0.19.0, < 2.0)
58
+ rake (12.3.3)
59
+ thor (0.20.3)
60
60
  thread_safe (0.3.6)
61
61
  tzinfo (1.2.5)
62
62
  thread_safe (~> 0.1)
@@ -71,4 +71,4 @@ DEPENDENCIES
71
71
  strong_actions!
72
72
 
73
73
  BUNDLED WITH
74
- 1.16.1
74
+ 1.17.3
data/HISTORY.md CHANGED
@@ -1,5 +1,8 @@
1
1
  # History
2
2
 
3
+ ## 0.2.0
4
+ * drop support for ruby-2.3, 2.4
5
+
3
6
  ## 0.1.1
4
7
  * drop support for ruby-2.2
5
8
  * add suport for rails-5.2
data/README.md CHANGED
@@ -35,7 +35,7 @@ current_user:
35
35
  update: admin?
36
36
  destroy: admin?
37
37
  ```
38
- In above case, when a non-admin user try to access new_user_path, StrongActions::ForbiddenAction is thrown.
38
+ In above case, when a non-admin user try to access new_user_path for example, StrongActions::ForbiddenAction will be thrown.
39
39
 
40
40
  if all actions are restricted in the same way, you can make a definition on controller level.
41
41
  ```yaml
@@ -48,7 +48,7 @@ current_user:
48
48
  admin/users: admin?
49
49
  ```
50
50
  if you have multiple controllers under a namespace, namespace can be used.
51
- ending with '/' indicates that is for namespace 'admin' and not controller 'admin'.
51
+ ending with '/' indicates that it is for namespace 'admin' and not controller 'admin'.
52
52
  ```yaml
53
53
  current_user:
54
54
  admin/: admin?
@@ -59,7 +59,7 @@ current_user:
59
59
  In application_controller.rb, the error should be rescued like
60
60
  ```ruby
61
61
  rescue_from StrongActions::ForbiddenAction do
62
- render :file => 'public/403.html', :layout => false, :status => :forbidden
62
+ render file: 'public/403.html', layout: false, status: :forbidden
63
63
  end
64
64
  ```
65
65
  In above case, all the forbidden accesses are handled by public/403.html.
@@ -1,3 +1,3 @@
1
1
  module StrongActions
2
- VERSION = '0.1.1'
2
+ VERSION = '0.2.0'
3
3
  end
@@ -17,7 +17,7 @@ Gem::Specification.new do |spec|
17
17
  spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
18
18
  spec.require_paths = ["lib"]
19
19
 
20
- spec.required_ruby_version = '~> 2.3'
20
+ spec.required_ruby_version = '~> 2.5'
21
21
 
22
22
  spec.add_dependency "activesupport", '>= 4.2', '< 6'
23
23
  spec.add_dependency "actionpack", '>= 4.2', '< 6'
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: strong_actions
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - ichy
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-05-08 00:00:00.000000000 Z
11
+ date: 2019-11-08 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport
@@ -153,15 +153,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
153
153
  requirements:
154
154
  - - "~>"
155
155
  - !ruby/object:Gem::Version
156
- version: '2.3'
156
+ version: '2.5'
157
157
  required_rubygems_version: !ruby/object:Gem::Requirement
158
158
  requirements:
159
159
  - - ">="
160
160
  - !ruby/object:Gem::Version
161
161
  version: '0'
162
162
  requirements: []
163
- rubyforge_project:
164
- rubygems_version: 2.7.6
163
+ rubygems_version: 3.0.3
165
164
  signing_key:
166
165
  specification_version: 4
167
166
  summary: access control for rails controller/action