navGATE 0.1.24 → 0.1.26

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.
Files changed (5) hide show
  1. checksums.yaml +4 -4
  2. data/Rakefile +1 -1
  3. data/lib/navgate.rb +19 -13
  4. data/navGATE.gemspec +2 -2
  5. metadata +3 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 4b486930a82ec515b354bdba6204f06d72cf199c
4
- data.tar.gz: f3449613e5c25aeb8da60459e5365043f2412e5f
3
+ metadata.gz: ec7abf7d93fedce8c746c0e9f3ce13b0484849e0
4
+ data.tar.gz: fe1dc5feb0b52e1edf3ddabb57a960bdc4f41402
5
5
  SHA512:
6
- metadata.gz: c8e3d25f36a480c7114c8b35a1de08dc1a4f42deb2b2314ef1d3e1b366c8916f612f792f938881281faf381874676ff0e4a514a5c7abe392de32b314a663de32
7
- data.tar.gz: de7388e3031a146023c896c309933834a333c4a2a795cfda5bd1e66ca6dd614914519c90a6d25b4cb09804095ebfcbd972ef46a74c4ff726efd9ba375c4dafbb
6
+ metadata.gz: f603c2b837012a848730dbedcc7106f08221608f3d3da7c08080e6ee035f485f04ff3f65cc6b2dbdea0b5d7aa3a24b41ece2df3a2d77ae8423977303c38edc39
7
+ data.tar.gz: c980fe5e18d414cd1bb3b0a876e42223d400cac4114fa59a8a430092fd181733de053b849f5d1462bd3f24f8955613da77fda4dd7eb65c9bd139380587a3f5cc
data/Rakefile CHANGED
@@ -3,7 +3,7 @@ require 'rake'
3
3
  require 'echoe'
4
4
 
5
5
 
6
- Echoe.new('navGATE','0.1.24') do |p|
6
+ Echoe.new('navGATE','0.1.26') 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"
@@ -1,5 +1,6 @@
1
1
  require 'navgate/base'
2
2
  require 'navgate/navgatehelpers'
3
+ require 'awesome_print'
3
4
  class Navgate
4
5
  class Builder < Base
5
6
 
@@ -120,28 +121,33 @@ class Navgate
120
121
  end
121
122
  self.navs = temp
122
123
  end
124
+ self.ignoring ||= [""]
123
125
  end
124
126
 
125
127
 
126
128
 
127
- def render_nav selection, controller, options
128
- if ignoring.include?(selection)
129
- nav = nav_cache(controller.split('/').last).render_it_with(options,selection).html_safe
130
- nav
129
+
130
+
131
+ def select selection, controller
132
+ split_controller = controller.split('/').last
133
+ if selection
134
+ selection
131
135
  else
132
- nil
136
+ if ignoring.include?(split_controller)
137
+ nil
138
+ else
139
+ nav_cache(split_controller).default.to_s
140
+ end
133
141
  end
134
142
  end
135
143
 
136
- def select selection, controller
137
- if ignoring.include?(selection)
138
- if selection
139
- selection
140
- else
141
- nav_cache(controller.split('/').last).default.to_s
142
- end
144
+ def render_nav selection, controller, options
145
+ split_controller = controller.split('/').last
146
+ if ignoring.include?(split_controller)
147
+ nil
143
148
  else
144
- nil
149
+ nav = nav_cache(split_controller).render_it_with(options,selection).html_safe
150
+ nav
145
151
  end
146
152
  end
147
153
 
@@ -2,7 +2,7 @@
2
2
 
3
3
  Gem::Specification.new do |s|
4
4
  s.name = "navGATE"
5
- s.version = "0.1.24"
5
+ s.version = "0.1.26"
6
6
 
7
7
  s.required_rubygems_version = Gem::Requirement.new(">= 1.2") if s.respond_to? :required_rubygems_version=
8
8
  s.authors = ["Martin Becker"]
@@ -12,7 +12,7 @@ Gem::Specification.new do |s|
12
12
  s.extra_rdoc_files = ["lib/navgate.rb", "lib/navgate/base.rb", "lib/navgate/navgatehelpers.rb", "lib/readme.rdoc"]
13
13
  s.files = ["Manifest", "Rakefile", "config/build_menu.yml", "config/initializers/build_menu.rb", "init.rb", "lib/navgate.rb", "lib/navgate/base.rb", "lib/navgate/navgatehelpers.rb", "lib/readme.rdoc", "navGATE.gemspec"]
14
14
  s.homepage = "https://github.com/Thermatix/navGATE"
15
- s.rdoc_options = ["--line-numbers", "--inline-source", "--title", "navGATE"]
15
+ s.rdoc_options = ["--line-numbers", "--inline-source", "--title", "navGATE", "--main", "readme.rdoc"]
16
16
  s.require_paths = ["lib"]
17
17
  s.rubyforge_project = "navgate"
18
18
  s.rubygems_version = "2.0.6"
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: navGATE
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.24
4
+ version: 0.1.26
5
5
  platform: ruby
6
6
  authors:
7
7
  - Martin Becker
@@ -40,6 +40,8 @@ rdoc_options:
40
40
  - --inline-source
41
41
  - --title
42
42
  - navGATE
43
+ - --main
44
+ - readme.rdoc
43
45
  require_paths:
44
46
  - lib
45
47
  required_ruby_version: !ruby/object:Gem::Requirement