incline 0.2.19 → 0.2.20

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: 56411284e4d17a3c8427fcd363ab5a9a06ee7238
4
- data.tar.gz: cadb63efd1172b4de4315f27ffb91313cc6c50f3
3
+ metadata.gz: f8de1c05a56d8fa74b9dc2e62f97e6d29e469e8b
4
+ data.tar.gz: be927fbe2f1b71f7c856bd469ee2cf2f178f82df
5
5
  SHA512:
6
- metadata.gz: 04d13291b6afcfb36c51547322fa707c11776719d4224edc88a36c14f2b637eb77df7be9f55a0d31e60a99c31e3886994a32aa66a32b7c4431bd9baeb0a2627f
7
- data.tar.gz: 606cb3af25ea7278e0fc578edc2aa959c11fd86d9affca6c40d16ad5ee2fe796482b6a285eb1353d40a6c87c8423d34f387210cdf45df3bd96cdd17a7ae3f5f3
6
+ metadata.gz: 0d37abcda2c3b81dffd271e44dc7c0569bde5b3806986ed88d64734b8f9d9f7958fdf1771c4456913f1b711c8f2a1481772971b00d29f014aa54e8296f024736
7
+ data.tar.gz: 984cf5809f336af74ca23a3558433a223f947db3018f8eed2610ca522953c419769e50776bdd8efa8cebbed5c306d685ddf99f0dbda570495ea8e67d69f6b910
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- incline (0.2.19)
4
+ incline (0.2.20)
5
5
  ansi (~> 1.5.0)
6
6
  bcrypt
7
7
  bootstrap-sass
@@ -78,13 +78,13 @@ module Incline
78
78
  # remove all paths and set all items to hidden.
79
79
  Incline::ActionSecurity.update_all(visible: false, path: '#')
80
80
 
81
- ret = Incline
82
- .route_list
83
- .reject{|r| %w(api locate).include?(r[:action]) }
84
- .map do |r|
85
-
81
+ Incline
82
+ .route_list
83
+ .reject{|r| %w(api locate).include?(r[:action]) }
84
+ .each do |r|
85
+
86
86
  item = ActionSecurity.find_or_initialize_by(controller_name: r[:controller], action_name: r[:action])
87
-
87
+
88
88
  # ensure the current path is set to the item.
89
89
  item_path = "#{r[:path]} [#{r[:verb]}]"
90
90
  if item.path == '#' || item.path.blank?
@@ -94,14 +94,15 @@ module Incline
94
94
  elsif !item.path.include?(item_path)
95
95
  item.path += "\n" + item_path
96
96
  end
97
-
97
+
98
98
  # re-sort the path list and make the item visible.
99
99
  item.path = item.path.split("\n").sort.join("\n")
100
100
  item.visible = true
101
-
101
+
102
102
  item.save!
103
- item
104
- end.sort do |a,b|
103
+ end
104
+
105
+ ret = Incline::ActionSecurity.where(visible: true).to_a.sort do |a,b|
105
106
  if a.controller_name == b.controller_name
106
107
  a.action_name <=> b.action_name
107
108
  else
@@ -1,3 +1,3 @@
1
1
  module Incline
2
- VERSION = "0.2.19"
2
+ VERSION = "0.2.20"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: incline
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.19
4
+ version: 0.2.20
5
5
  platform: ruby
6
6
  authors:
7
7
  - Beau Barker