navGATE 0.1.3.2 → 0.1.3.3
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 +4 -4
- data/Rakefile +1 -1
- data/lib/navgate.rb +1 -1
- data/lib/navgate/main.rb +5 -11
- data/navGATE.gemspec +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 8c28ffd59a008b747f95432fe63f54a31e9a0ee9
|
|
4
|
+
data.tar.gz: fbd59fbe5a934964e8c7185c19aaea6dc59bfbaf
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 06057a8235243c77200bfcd680644a99c650890dae3008364120163cccbbcf8273486a025caff30a754a7ab9c2c24cfbb2e653021cb9e6095731b784df8bc68a
|
|
7
|
+
data.tar.gz: 82481d30dcedf43df2bd75a5be1e6faf93f17b61e8760f3006bdd9fe185dc9ad27d7b3656e53057aae3674fc2c0fffdc497d68b7e278f5ccd464454e7537ec18
|
data/Rakefile
CHANGED
|
@@ -3,7 +3,7 @@ require 'rake'
|
|
|
3
3
|
require 'echoe'
|
|
4
4
|
|
|
5
5
|
|
|
6
|
-
Echoe.new('navGATE','0.1.3.
|
|
6
|
+
Echoe.new('navGATE','0.1.3.3') do |p|
|
|
7
7
|
p.summary = "Allows the easy creation of navigation with config files"
|
|
8
8
|
p.description = "Can create navigation from objects using the nav builder,from database tables or from a yaml file"
|
|
9
9
|
p.url = "https://github.com/Thermatix/navGATE"
|
data/lib/navgate.rb
CHANGED
data/lib/navgate/main.rb
CHANGED
|
@@ -1,10 +1,6 @@
|
|
|
1
1
|
module NavGate
|
|
2
2
|
class Navigation
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
def select selection, controller
|
|
7
|
-
|
|
3
|
+
def self.select selection, controller
|
|
8
4
|
split_controller = controller.split('/').last
|
|
9
5
|
if selection
|
|
10
6
|
selection
|
|
@@ -17,9 +13,7 @@ module NavGate
|
|
|
17
13
|
end
|
|
18
14
|
end
|
|
19
15
|
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
def render_nav selection, controller, options
|
|
16
|
+
def self.render_nav selection, controller, options
|
|
23
17
|
split_controller = controller.split('/').last
|
|
24
18
|
if config.ignoring.include?(split_controller)
|
|
25
19
|
nil
|
|
@@ -31,11 +25,11 @@ module NavGate
|
|
|
31
25
|
|
|
32
26
|
private
|
|
33
27
|
|
|
34
|
-
def config
|
|
28
|
+
def self.config
|
|
35
29
|
NavGate.configuration
|
|
36
30
|
end
|
|
37
31
|
|
|
38
|
-
def nav_cache controller
|
|
32
|
+
def self.nav_cache controller
|
|
39
33
|
if @selected_nav
|
|
40
34
|
if @selected_nav.controller.is_a?(Array)
|
|
41
35
|
return @selected_nav if @selected_nav.controller.include?(controller)
|
|
@@ -49,7 +43,7 @@ module NavGate
|
|
|
49
43
|
end
|
|
50
44
|
end
|
|
51
45
|
|
|
52
|
-
def select_nav controller
|
|
46
|
+
def self.select_nav controller
|
|
53
47
|
nav_to_return = nil
|
|
54
48
|
config.navs.each do |nav|
|
|
55
49
|
if nav.controller.is_a?(String)
|
data/navGATE.gemspec
CHANGED