mistiq 0.0.923 → 0.0.924

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,15 +1,15 @@
1
1
  ---
2
2
  !binary "U0hBMQ==":
3
3
  metadata.gz: !binary |-
4
- MjI1NzI0N2EwMmFlMDc3NWYyYjc5OGM2ZDliMzBiZTc0NWNiYWU1OQ==
4
+ ZWVlNGJiZTE4YmY2MWUyYjQ5NzkxYjk4ZDEzOTdmNTlkZmIxYmM5Mg==
5
5
  data.tar.gz: !binary |-
6
- OTlhYzc5NWY4ZTc2NmI1ZmY4OGJlZmNmYmJiMTQ1NDUxMmU0NTQ0MA==
6
+ YzdjNGVlYzhlYTc1YzY4ZjA3OWYzNWQxZmZiODdhMzc5MjA1ZjkwOQ==
7
7
  SHA512:
8
8
  metadata.gz: !binary |-
9
- ZTY0NTgxMTJkMWNiZmNlZTQ4ZTMzYTIwN2ViMDcwN2Q0Nzg4MmQ3ZWUxZTQy
10
- ZjhhYzQ4NDkyMmFjOTFhMDU4NzdiYjc0YTI3MTMzMDZkZDY3YWY3Y2U0ZWY0
11
- Njk3OWExMDMwYjE1ZGU4ZDBjMjUwZGY5Njc5NDk3NGQzOGY1YmI=
9
+ ODYzNWU3NTAwODM0MmViNTVlODQxNTFjYjc1NGU4ZWZmYjg3NzRiNDY5NzQ2
10
+ OTI3ODRmMmY3MTcyZGM1MDY2YmVlMDVlYjE1M2MyYWNhOTM4ZDBmMWI4YWZh
11
+ NTRkZGMzZmZjZjUzNWFmNDk4NGRkZWJiYjZhZWI1ZmY3Njc4YWM=
12
12
  data.tar.gz: !binary |-
13
- MzZkZDFmYWIyMDJjNGE2YzY1ODBkZjMwMWJhYjdiMDU4ZmFmYTBmYTBhMTEx
14
- ZmQ3MzU4ZDkxODUwNDhlNzRhZTYyZDk2YjM2ODE0NTk1ZjIyMDMyM2M0N2E0
15
- YmM5MDAzNzc2OGU1NDAzYzMwOTU0MTUwMzY0MDM2MjU2ZTBlODI=
13
+ MGUwYzI3ZjJiYzA3Mjg4YzQ5YWI1NDUzNjk0OGNkMjc3YWIxMTRjNDUyYzk1
14
+ ZjkzNjQ2ZWIwOWU3OTc1NjUyOWYyMWU3NGNhOWE0OGZhMGExY2M2ODYwNDEx
15
+ NDZhNjg2MWMzYTI5NzAyNzkzN2Y0MGNlOWFmYjI5NWEzOWZhMmY=
@@ -39,7 +39,7 @@ module Mistiq
39
39
  if(current_controller == pair_array[0] && current_action == pair_array[1])
40
40
  #if strip_links is true, then
41
41
  #enable link removal
42
- if pair_array[2]
42
+ if pair[2]
43
43
  disable(pair_array[0],pair_array[1])
44
44
  else
45
45
  disable_action(pair_array[0],pair_array[1])
@@ -47,7 +47,7 @@ module Mistiq
47
47
  else
48
48
  #if strip_links is true, then
49
49
  #enable link removal
50
- if pair_array[2]
50
+ if pair[2]
51
51
  remove_links(pair_array[0],pair_array[1])
52
52
  end
53
53
  end
@@ -1,46 +1,46 @@
1
1
  module Mistiq
2
- #disable all 'action' operations across
3
- #the rails application
4
- def disable_action_ops(action)
2
+ #disable all actions for a specific controller
3
+ def disable_controller(controller,strip_links=true)
5
4
  Railtie.get_regex_hash.each {
6
5
  |r,p|
7
- set_guard_rule(true,r) if r.match(/.*#{action}/)
6
+ set_guard_rule(true,r,strip_links) if r.match(/#{controller}.*/)
8
7
  }
9
8
  end
10
9
 
11
- #disable all actions for a specific controller
12
- def disable_controller(controller)
10
+ #disable all 'action' operations across
11
+ #the rails application
12
+ def disable_action_ops(action,strip_links=true)
13
13
  Railtie.get_regex_hash.each {
14
14
  |r,p|
15
- set_guard_rule(true,r) if r.match(/#{controller}.*/)
15
+ set_guard_rule(true,r,strip_links) if r.match(/.*#{action}/)
16
16
  }
17
17
  end
18
18
 
19
19
  #disable all destroy operations across
20
20
  #the rails application
21
- def disable_create_ops()
21
+ def disable_create_ops(strip_links=true)
22
22
  Railtie.get_regex_hash.each {
23
23
  |r,p|
24
- set_guard_rule(true,r) if r.match(/.*#new/) || r.match(/.*#add/)
24
+ set_guard_rule(true,r,strip_links) if r.match(/.*#new/) || r.match(/.*#add/) || r.match(/.*#create/)
25
25
  }
26
26
  end
27
27
 
28
28
  #disable all edit operations across
29
29
  #the rails application
30
- def disable_update_ops()
30
+ def disable_update_ops(strip_links=true)
31
31
  Railtie.get_regex_hash.each {
32
32
  |r,p|
33
- set_guard_rule(true,r) if r.match(/.*#edit/) || r.match(/.*#update/)
33
+ set_guard_rule(true,r,strip_links) if r.match(/.*#edit/) || r.match(/.*#update/)
34
34
  puts p
35
35
  }
36
36
  end
37
37
 
38
38
  #disable all destroy operations across
39
39
  #the rails application
40
- def disable_destroy_ops()
40
+ def disable_destroy_ops(strip_links=true)
41
41
  Railtie.get_regex_hash.each {
42
42
  |r,p|
43
- set_guard_rule(true,r) if r.match(/.*#destroy/) || r.match(/.*#delete/) || r.match(/.*#remove/)
43
+ set_guard_rule(true,r,strip_links) if r.match(/.*#destroy/) || r.match(/.*#delete/) || r.match(/.*#remove/)
44
44
  }
45
45
  end
46
46
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mistiq
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.923
4
+ version: 0.0.924
5
5
  platform: ruby
6
6
  authors:
7
7
  - Andrei Papancea