navGATE 0.1.08 → 0.1.09.1

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: 9b26ae709b4597d50421cf3055f65fe31d447312
4
- data.tar.gz: 674abf588d84a3fa2a79e293195bb6a833c3681b
3
+ metadata.gz: abaeaa3dc78a47c962d5960c71cfc334d8788a63
4
+ data.tar.gz: fad4de942712038782d6377748a6982361b8c262
5
5
  SHA512:
6
- metadata.gz: d3d98b92d2ccfabc90036fadd952f8e91f7df1085cf80bc7ae3deec7e9afac55a2b24682f75855e2b3d8ce8c8869fb16d1da68627c6655ed84a750857fa1ed65
7
- data.tar.gz: b24768f38eb22aa1a27ed38163c588970a00a718922d3269fa29610c1556eaef7efba41419131ca873a76530e5d2325693a526571809883a1d640eff652c587d
6
+ metadata.gz: 337d06a572b0b81a662aa2c514c34ab00394f68920655b13e1b65a9f1dc4beac8060119bb3d70435d760732943d4ec101daa3c522319b85bca77382fba99d7df
7
+ data.tar.gz: d952047b11e3221e5721d52d64d05b0f6c935e7311cf238ee759149c7d27c99b96661fb3d92528600cc1f955865dc6d85c6488e530c4c1bd819f98cb5a0cdd5e
data/Rakefile CHANGED
@@ -3,7 +3,7 @@ require 'rake'
3
3
  require 'echoe'
4
4
 
5
5
 
6
- Echoe.new('navGATE','0.1.08') do |p|
6
+ Echoe.new('navGATE','0.1.09.1') 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
@@ -64,7 +64,7 @@ class Navgate
64
64
 
65
65
  def styling options
66
66
  if options
67
- return "<br>" if options[:styling] == :verticle
67
+ return "<br>" if options[:styling] == :vertical
68
68
  return options[:styling] if options[:styling]
69
69
  end
70
70
  " "
data/lib/readme.rdoc CHANGED
@@ -1,12 +1,11 @@
1
1
  = navGATE
2
2
 
3
- This gem is provided as is, please read through the intializer file "build_menu.rb" for examples on how you can use this gem to build a nav menu.
3
+ This gem is provided as is, please read through the initializer file "build_menu.rb" for examples on how you can use this gem to build a nav menu.
4
4
 
5
5
  This gem was built with Rails in mind.
6
6
 
7
- note: this is my first gem, I am still trying to set it up, so be carefull when downloading this.
8
- Also I've included the extra files needed to get it working in there respective directories, eg, the code in 'Applicationhelper' needs to go in 'Applicationhelper'.
9
- I've tried to to make it easy to install but I'm still not sure how to get those things into the right files automaticly, if some one could point me in the right direction, I'd be happy to make the needed changes.
7
+ note: this is my first gem, I am still trying to set it up, so be careful when downloading this.
8
+
10
9
  lastly the gem is up on rubygems.org
11
10
  ==Building the menus
12
11
 
@@ -17,20 +16,20 @@ There are several options you can pass through, if you are building the menu wit
17
16
  Also note, you can pass multiple Navgate::builders as you need, just match them to there controllers and they should render properly.
18
17
  ===Options
19
18
 
20
- selection: This is used to build the menu options.
19
+ <b>selection</b>: This is used to build the menu options.
21
20
  There are two ways to use this, the first is to use an array of strings containing the menu options a person can select; the second is to pull from a database table, to do this pass a hash with the key being the name of the model and it's value being the field containing it's name
22
21
 
23
- default: This is used to give the menu a default selection for when the user has not selected anything. Pass a string containing the name of the defualt selection, if no string is passed then the first item from selection is used.
22
+ <b>Default</b>: This is used to give the menu a default selection for when the user has not selected anything. Pass a string containing the name of the default selection, if no string is passed then the first item from selection is used.
24
23
 
25
- prefix: This is used when you have a prefix before the target in the url, eg: if your links render out as "host.com/books" without a prefix; with a prefix of 'shelf' it will render out as "host.com/shelf/books". This is not for namespacing, for namespacing see the namespace option.
24
+ <b>prefix</b>: This is used when you have a prefix before the target in the URL, eg: if your links render out as "host.com/books" without a prefix; with a prefix of 'shelf' it will render out as "host.com/shelf/books". This is not for name spacing, for name spacing see the namespace option.
26
25
 
27
- namespace: This is used for when you have namespacing. It works like prefix however unlike prefix it will also search for the controller within the namespace unlike prefix which doesn't.
26
+ <b>namespace</b>: This is used for when you have name spacing. It works like prefix however unlike prefix it will also search for the controller within the namespace unlike prefix, which doesn't.
28
27
 
29
- controller: This is used to match the menu to a controller, when deciding which menu to render, it matches this attribute to the current controller. If you have namespacing, the 'namespace' options MUST be used before the 'controller' option otherwise it won't recognise the namespace
28
+ <b>controller</b>: This is used to match the menu to a controller, when deciding which menu to render, it matches this attribute to the current controller. If you have name spacing, the 'namespace' options <em>MUST</em> be used before the 'controller' option otherwise it won't recognize the namespace
30
29
 
31
- by_id: This is used when you are using a database model to build the menu and you want to link with IDs rather then the selection list. To use it simply set it to true.
30
+ <b>by_id</b>: This is used when you are using a database model to build the menu and you want to link with IDs rather then the selection list. To use it simply set it to true.
32
31
 
33
- css_class: This is used when you want to hard code the CSS class selector into the menu rather then from the view
32
+ <b>css_class</b>: This is used when you want to hard code the CSS class selector into the menu rather then from the view
34
33
 
35
34
  examples:
36
35
 
@@ -62,7 +61,7 @@ Be sure to pass it as {model_name: :field}
62
61
 
63
62
 
64
63
  === Using a yml file to build the menu
65
- There is also a third option to build the menu, you can use a structured yml file, there is an example yaml file in the config dirrectory called "build_menu.yml".
64
+ There is also a third option to build the menu, you can use a structured yml file, there is an example yaml file in the config directory called "build_menu.yml".
66
65
  when using this method you are unable to use a database model to create the menu.
67
66
 
68
67
  ===Building from yaml file,
@@ -87,16 +86,18 @@ The yaml file:
87
86
 
88
87
  ==Rendering the menu
89
88
 
90
- To render the menu use the provided helper "render_navigation(options)"
89
+ To render the menu use the provided helper <tt>render_navigation(options)</tt>;
91
90
  options is a hash that is used to build any html options you might want such as
92
- class, it can also take two extra options, 'styling:' and 'wrap:'.
91
+ 'class='some_css_class', it can also take two extra options, 'styling:' and 'wrap:'.
93
92
 
94
93
  ===Options
95
94
 
96
- Styling: This is how the navigation can be styled it can either be ':verticle' or a character that you wish to use for spacing such as '|' or ':' and so on, it can only be verticle or a spaceing character.
95
+ Styling: This is how the navigation can be styled, it can either be ':vertical’ or a character that you wish to use for spacing such as '|' or ':' and so on, it can only be vertical or a spacing character.
96
+
97
97
  Wrap: This allows you to wrap each link in a html tag, wrap can itself take two differant options, either a string containing the tag's name (without "<>", only the tag name) or an Array containing the tag name and it's class.
98
98
 
99
99
  example:
100
- render_navigation({:class => "'nav button'", styling: :verticle, wrap: ['li','test']}) %>
100
+ render_navigation({:class => "'nav button'", styling: :vertical, wrap: ['li','test']}) %>
101
101
 
102
102
  note: There is no point in passing a class here if you have one set when you first build the menu, it will just be overridden.
103
+
data/navGATE.gemspec CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  Gem::Specification.new do |s|
4
4
  s.name = "navGATE"
5
- s.version = "0.1.08"
5
+ s.version = "0.1.09.1"
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"]
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.08
4
+ version: 0.1.09.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Martin Becker