navigator 0.9.0 → 0.9.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: 2a11b6a19132990de70a6d893a6c07853467cdf7
4
- data.tar.gz: a188cf95ab843f75dd9905ff3a3bc3cbe5acc5aa
3
+ metadata.gz: 60d384bf293eac22d1e2c5bf78a6ee60d12b356b
4
+ data.tar.gz: 74e8cd838420bbfedd50c67078e8104f9efca0d3
5
5
  SHA512:
6
- metadata.gz: 707fc48650e9a14065c432b36728482ff828feeeade12b999f0b5bd6eb2cbba31962172ae0ee19aee9be584cd51cf56e39462c23175fd7bdebc762dd730e5aea
7
- data.tar.gz: bc525f9d29980668aad48cbb10c0a2a751ca6f6f0c325919bab2e32363e9665e2e313a4424a9d60f10840e64ba1633d66caa160fa03420c2d05c0991724ee814
6
+ metadata.gz: 7e854521b42aa636730fa379ff2ee78c5c599ef500b594ec1354f7425cee5a29e043321779ffb8dbf024267b464faf3031b65e49c35246f891c9e270aded533e
7
+ data.tar.gz: 1bc325481997fcb750953197a9a1079ea2139bdfe4ab3ab9555237783dde4d4b407a83d5cc6bc6c111d77d65663ee01c5b8dfac8b418c7a469d21ec3aa06d3f3
Binary file
data.tar.gz.sig CHANGED
@@ -1,2 +1,5 @@
1
- 47���*�hI��G��¬�1 D
2
- ��Z�&���V�������v-��'\<$�O�A�#�,K�~POI"F�;EDC��Ȩ� ne�@$q�X��R�zItx|q�祚�w%�C^߶+1@D�[h�x�$�-F3��zT���ïϴ�?����G����\�����
1
+ {b[lc"d�Nb(d��i�(��4/���N��a�&xjQ��s�B�2�_�OmC��D59�ߝf��'˂�*=
2
+ i���ΌB}�,[~�)��@�h?S��R,�L���m¼; H�ϰ���N
3
+ Us��H���TS�)r��ϋ΀���oVp��*��/a��������6�t��H�˿��x�^�
4
+ ]0C�vF2զܙX���׫c��Q�s�.�M�X��
5
+ �J�!�ap���O�[KH/���
@@ -0,0 +1,17 @@
1
+ module Navigator
2
+ module NavigationHelper
3
+ def navigation tag = "ul", attributes = {}, activator = navigation_activator, &block
4
+ raw Navigator::Menu.new(self, tag, attributes, activator, &block).render
5
+ end
6
+
7
+ module_function
8
+
9
+ def current_path
10
+ request.env["PATH_INFO"]
11
+ end
12
+
13
+ def navigation_activator
14
+ Navigator::TagActivator.new search_value: current_path
15
+ end
16
+ end
17
+ end
@@ -7,14 +7,14 @@ module Navigator
7
7
 
8
8
  def initialize template, tag = "ul", attributes = {}, menu_activator = Navigator::TagActivator.new, &block
9
9
  @template = template
10
- @tag = Tag.new tag, nil, attributes, menu_activator
10
+ @tag = Navigator::Tag.new tag, nil, attributes, menu_activator
11
11
  @menu_activator = menu_activator
12
12
  @items = []
13
13
  instance_eval(&block) if block_given?
14
14
  end
15
15
 
16
16
  def add name, content = nil, attributes = {}, activator = menu_activator, &block
17
- tag = Tag.new name, content, attributes, activator
17
+ tag = Navigator::Tag.new name, content, attributes, activator
18
18
  if block_given?
19
19
  items << tag.prefix
20
20
  items << tag.content
@@ -1,3 +1,3 @@
1
1
  module Navigator
2
- VERSION = "0.9.0"
2
+ VERSION = "0.9.1"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: navigator
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.9.0
4
+ version: 0.9.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Brooke Kuhlmann
@@ -30,7 +30,7 @@ cert_chain:
30
30
  fMlZDUGx3lQarp/vPjK+6XH7DLXjBEKqeIGBIpLthYUvDxJRp23C+T3liGSL32vg
31
31
  mSpxxwmK95GDFuEy2mNPaxnazdkw8c+7DbrSpzd/CnNZkRgitxOavs8=
32
32
  -----END CERTIFICATE-----
33
- date: 2014-07-13 00:00:00.000000000 Z
33
+ date: 2014-07-14 00:00:00.000000000 Z
34
34
  dependencies:
35
35
  - !ruby/object:Gem::Dependency
36
36
  name: pry-byebug
@@ -211,6 +211,7 @@ extra_rdoc_files:
211
211
  files:
212
212
  - LICENSE.md
213
213
  - README.md
214
+ - app/helpers/navigator/navigation_helper.rb
214
215
  - lib/navigator.rb
215
216
  - lib/navigator/engine.rb
216
217
  - lib/navigator/menu.rb
metadata.gz.sig CHANGED
Binary file