nutmeg 0.0.11 → 0.0.12

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: e37875ea673b1b17788595a4498cf49a225ccd9a
4
- data.tar.gz: 0ed69982fee93ef14494a6b2c3ba36468cd7abb5
3
+ metadata.gz: 01d9358ba42bddb88797cfdfe9edce96d2ca6712
4
+ data.tar.gz: 44cb3bb56af26416f0922d73b2bf094a2b1b16dc
5
5
  SHA512:
6
- metadata.gz: 9b21a83abfbb1905df9e9a207c816a0015324ff0d441e2fe24f75f1fa72ad96f66f5af42649e8c64ec93d01b9e3f0c032da471e1f7ea1ed4b84c8b5a860c7716
7
- data.tar.gz: 578e03eccafb6f30dba1ff7a5ea3e69be552c3b840a5125feeb2a139dd603350b202860a291aa084a6e966e3d7240a94669e833bbebf442800a25231ab0fb0f2
6
+ metadata.gz: a9d7f2cb69971c3f4c92ec48ea01789a022d91add83962b6345198ff3facfc5ae491921c4490f1560cca9dcf38bc670a02248c79c40070e32bbeae812adc5888
7
+ data.tar.gz: fd29f4dccda4d9a6ebb881e9d61063adbb5ae04c35e7533255cc2e46235f2b70dbb6c05d256777f4d44af2b3f7c666a782cbc0492ca5839eb0486eeff6e84581
@@ -13,18 +13,21 @@ module Nutmeg
13
13
  end
14
14
  end
15
15
 
16
- def get_paths(tags_given)
16
+ def get_paths(tags_given, strict = false)
17
17
  start_nodes = @original.children.select{|l| tags_given.include?(l.content[:slug])}
18
18
  end_nodes = @original.each_leaf.select{|l| tags_given.include?(l.content[:slug])}
19
19
 
20
- end_nodes.select do |end_node|
20
+ result = end_nodes.select do |end_node|
21
21
  (end_node.parentage & start_nodes).count >= 1
22
22
  end.collect do |leaf|
23
23
  ([leaf] + leaf.parentage).reverse
24
24
  end.select do |path|
25
- # we always include the 'root' tag
26
- (path.map{|tag| tag.content[:slug] } - tags_given).count == 1
25
+ (path.map{|tag| tag.content[:slug] } & tags_given).count >= 1
27
26
  end
27
+
28
+ result.sort_by! do |path|
29
+ ((path.map{|tag| tag.content[:slug] } & tags_given).count)
30
+ end.reverse!
28
31
  end
29
32
 
30
33
  def get_paths_eager(tags_given)
@@ -23,6 +23,7 @@ module Nutmeg
23
23
  end
24
24
 
25
25
  def node_html(node, active, leaf, content, extra_html = nil)
26
+
26
27
  "<li class='level_#{node.level}#{leaf ? ' leaf' : ''}#{active ? ' active' : ''}'> <a #{(leaf) ? "href=\'#{prepend_path}#{node_path(node)}#{append_path}\'" : ''}>#{content}</a>#{extra_html && active && leaf ? extra_html : ''}"
27
28
  end
28
29
 
@@ -1,3 +1,3 @@
1
1
  module Nutmeg
2
- VERSION = "0.0.11"
2
+ VERSION = "0.0.12"
3
3
  end
@@ -0,0 +1 @@
1
+ [{"id":"j1_1","text":"North","icon":true,"li_attr":{"id":"j1_1"},"a_attr":{"href":"#"},"data":{"deleted":false,"description":null,"id":2044,"name":"North","pressroom_id":46193,"slug":"north","tag_image_content_type":null,"tag_image_file_name":null,"tag_image_file_size":null,"tag_image_updated_at":null,"tag_image":{"url":null,"original":{"url":null},"moodbanner":{"url":null},"thumbnail":{"url":null}}},"children":[{"id":"j1_7","text":"Men's Collection","icon":true,"li_attr":{"id":"j1_7"},"a_attr":{"href":"#"},"data":{"deleted":false,"description":"","id":2050,"name":"Men's Collection","pressroom_id":46193,"slug":"men-s-collection","tag_image_content_type":null,"tag_image_file_name":null,"tag_image_file_size":null,"tag_image_updated_at":null,"tag_image":{"url":null,"original":{"url":null},"moodbanner":{"url":null},"thumbnail":{"url":null}}},"children":[{"id":"j1_67","text":"2014 Winter","icon":true,"li_attr":{"id":"j1_67"},"a_attr":{"href":"#"},"data":{"deleted":false,"description":null,"id":2080,"name":"2014 Winter","pressroom_id":46193,"slug":"2014-winter","tag_image_content_type":null,"tag_image_file_name":null,"tag_image_file_size":null,"tag_image_updated_at":null,"tag_image":{"url":null,"original":{"url":null},"moodbanner":{"url":null},"thumbnail":{"url":null}}},"children":[{"id":"j1_73","text":"Press Releases","icon":true,"li_attr":{"id":"j1_73"},"a_attr":{"href":"#"},"data":{"deleted":false,"description":null,"id":2084,"name":"Press Releases","pressroom_id":46193,"slug":"press-releases","tag_image_content_type":null,"tag_image_file_name":null,"tag_image_file_size":null,"tag_image_updated_at":null,"tag_image":{"url":null,"original":{"url":null},"moodbanner":{"url":null},"thumbnail":{"url":null}}},"children":[],"type":"tag"},{"id":"j1_74","text":"Looks","icon":true,"li_attr":{"id":"j1_74"},"a_attr":{"href":"#"},"data":{"deleted":false,"description":null,"id":2085,"name":"Looks","pressroom_id":46193,"slug":"looks","tag_image_content_type":null,"tag_image_file_name":null,"tag_image_file_size":null,"tag_image_updated_at":null,"tag_image":{"url":null,"original":{"url":null},"moodbanner":{"url":null},"thumbnail":{"url":null}}},"children":[],"type":"tag"},{"id":"j1_75","text":"Product Shots","icon":true,"li_attr":{"id":"j1_75"},"a_attr":{"href":"#"},"data":{"deleted":false,"description":null,"id":2086,"name":"Product Shots","pressroom_id":46193,"slug":"product-shots","tag_image_content_type":null,"tag_image_file_name":null,"tag_image_file_size":null,"tag_image_updated_at":null,"tag_image":{"url":null,"original":{"url":null},"moodbanner":{"url":null},"thumbnail":{"url":null}}},"children":[],"type":"tag"},{"id":"j1_76","text":"Videos","icon":true,"li_attr":{"id":"j1_76"},"a_attr":{"href":"#"},"data":{"deleted":false,"description":null,"id":2087,"name":"Videos","pressroom_id":46193,"slug":"videos","tag_image_content_type":null,"tag_image_file_name":null,"tag_image_file_size":null,"tag_image_updated_at":null,"tag_image":{"url":null,"original":{"url":null},"moodbanner":{"url":null},"thumbnail":{"url":null}}},"children":[],"type":"tag"}],"type":"tag"},{"id":"j1_65","text":"2014 Winter Marc Newson","icon":true,"li_attr":{"id":"j1_65"},"a_attr":{"href":"#"},"data":{"deleted":false,"description":"","id":2081,"name":"2014 Winter Marc Newson","pressroom_id":46193,"slug":"2014-winter-marc-newson","tag_image_content_type":null,"tag_image_file_name":null,"tag_image_file_size":null,"tag_image_updated_at":null,"tag_image":{"url":null,"original":{"url":null},"moodbanner":{"url":null},"thumbnail":{"url":null}}},"children":[{"id":"j1_92","text":"Press Releases","icon":true,"li_attr":{"id":"j1_92"},"a_attr":{"href":"#"},"data":{"deleted":false,"description":null,"id":2084,"name":"Press Releases","pressroom_id":46193,"slug":"press-releases","tag_image_content_type":null,"tag_image_file_name":null,"tag_image_file_size":null,"tag_image_updated_at":null,"tag_image":{"url":null,"original":{"url":null},"moodbanner":{"url":null},"thumbnail":{"url":null}}},"children":[],"type":"tag"},{"id":"j1_93","text":"Looks","icon":true,"li_attr":{"id":"j1_93"},"a_attr":{"href":"#"},"data":{"deleted":false,"description":null,"id":2085,"name":"Looks","pressroom_id":46193,"slug":"looks","tag_image_content_type":null,"tag_image_file_name":null,"tag_image_file_size":null,"tag_image_updated_at":null,"tag_image":{"url":null,"original":{"url":null},"moodbanner":{"url":null},"thumbnail":{"url":null}}},"children":[],"type":"tag"},{"id":"j1_94","text":"Product Shots","icon":true,"li_attr":{"id":"j1_94"},"a_attr":{"href":"#"},"data":{"deleted":false,"description":null,"id":2086,"name":"Product Shots","pressroom_id":46193,"slug":"product-shots","tag_image_content_type":null,"tag_image_file_name":null,"tag_image_file_size":null,"tag_image_updated_at":null,"tag_image":{"url":null,"original":{"url":null},"moodbanner":{"url":null},"thumbnail":{"url":null}}},"children":[],"type":"tag"},{"id":"j1_95","text":"Videos","icon":true,"li_attr":{"id":"j1_95"},"a_attr":{"href":"#"},"data":{"deleted":false,"description":null,"id":2087,"name":"Videos","pressroom_id":46193,"slug":"videos","tag_image_content_type":null,"tag_image_file_name":null,"tag_image_file_size":null,"tag_image_updated_at":null,"tag_image":{"url":null,"original":{"url":null},"moodbanner":{"url":null},"thumbnail":{"url":null}}},"children":[],"type":"tag"}],"type":"tag"},{"id":"j1_64","text":"2014 Autumn / Winter","icon":true,"li_attr":{"id":"j1_64"},"a_attr":{"href":"#"},"data":{"deleted":false,"description":null,"id":2067,"name":"2014 Autumn / Winter","pressroom_id":46193,"slug":"2014-autumn-winter","tag_image_content_type":null,"tag_image_file_name":null,"tag_image_file_size":null,"tag_image_updated_at":null,"tag_image":{"url":null,"original":{"url":null},"moodbanner":{"url":null},"thumbnail":{"url":null}}},"children":[{"id":"j1_96","text":"Press Releases","icon":true,"li_attr":{"id":"j1_96"},"a_attr":{"href":"#"},"data":{"deleted":false,"description":null,"id":2084,"name":"Press Releases","pressroom_id":46193,"slug":"press-releases","tag_image_content_type":null,"tag_image_file_name":null,"tag_image_file_size":null,"tag_image_updated_at":null,"tag_image":{"url":null,"original":{"url":null},"moodbanner":{"url":null},"thumbnail":{"url":null}}},"children":[],"type":"tag"},{"id":"j1_97","text":"Looks","icon":true,"li_attr":{"id":"j1_97"},"a_attr":{"href":"#"},"data":{"deleted":false,"description":null,"id":2085,"name":"Looks","pressroom_id":46193,"slug":"looks","tag_image_content_type":null,"tag_image_file_name":null,"tag_image_file_size":null,"tag_image_updated_at":null,"tag_image":{"url":null,"original":{"url":null},"moodbanner":{"url":null},"thumbnail":{"url":null}}},"children":[],"type":"tag"},{"id":"j1_98","text":"Product Shots","icon":true,"li_attr":{"id":"j1_98"},"a_attr":{"href":"#"},"data":{"deleted":false,"description":null,"id":2086,"name":"Product Shots","pressroom_id":46193,"slug":"product-shots","tag_image_content_type":null,"tag_image_file_name":null,"tag_image_file_size":null,"tag_image_updated_at":null,"tag_image":{"url":null,"original":{"url":null},"moodbanner":{"url":null},"thumbnail":{"url":null}}},"children":[],"type":"tag"},{"id":"j1_99","text":"Videos","icon":true,"li_attr":{"id":"j1_99"},"a_attr":{"href":"#"},"data":{"deleted":false,"description":null,"id":2087,"name":"Videos","pressroom_id":46193,"slug":"videos","tag_image_content_type":null,"tag_image_file_name":null,"tag_image_file_size":null,"tag_image_updated_at":null,"tag_image":{"url":null,"original":{"url":null},"moodbanner":{"url":null},"thumbnail":{"url":null}}},"children":[],"type":"tag"}],"type":"tag"},{"id":"j1_62","text":"2014 Summer","icon":true,"li_attr":{"id":"j1_62"},"a_attr":{"href":"#"},"data":{"deleted":false,"description":null,"id":2082,"name":"2014 Summer","pressroom_id":46193,"slug":"2014-summer","tag_image_content_type":null,"tag_image_file_name":null,"tag_image_file_size":null,"tag_image_updated_at":null,"tag_image":{"url":null,"original":{"url":null},"moodbanner":{"url":null},"thumbnail":{"url":null}}},"children":[{"id":"j1_100","text":"Press Releases","icon":true,"li_attr":{"id":"j1_100"},"a_attr":{"href":"#"},"data":{"deleted":false,"description":null,"id":2084,"name":"Press Releases","pressroom_id":46193,"slug":"press-releases","tag_image_content_type":null,"tag_image_file_name":null,"tag_image_file_size":null,"tag_image_updated_at":null,"tag_image":{"url":null,"original":{"url":null},"moodbanner":{"url":null},"thumbnail":{"url":null}}},"children":[],"type":"tag"},{"id":"j1_101","text":"Looks","icon":true,"li_attr":{"id":"j1_101"},"a_attr":{"href":"#"},"data":{"deleted":false,"description":null,"id":2085,"name":"Looks","pressroom_id":46193,"slug":"looks","tag_image_content_type":null,"tag_image_file_name":null,"tag_image_file_size":null,"tag_image_updated_at":null,"tag_image":{"url":null,"original":{"url":null},"moodbanner":{"url":null},"thumbnail":{"url":null}}},"children":[],"type":"tag"},{"id":"j1_102","text":"Product Shots","icon":true,"li_attr":{"id":"j1_102"},"a_attr":{"href":"#"},"data":{"deleted":false,"description":null,"id":2086,"name":"Product Shots","pressroom_id":46193,"slug":"product-shots","tag_image_content_type":null,"tag_image_file_name":null,"tag_image_file_size":null,"tag_image_updated_at":null,"tag_image":{"url":null,"original":{"url":null},"moodbanner":{"url":null},"thumbnail":{"url":null}}},"children":[],"type":"tag"},{"id":"j1_103","text":"Videos","icon":true,"li_attr":{"id":"j1_103"},"a_attr":{"href":"#"},"data":{"deleted":false,"description":null,"id":2087,"name":"Videos","pressroom_id":46193,"slug":"videos","tag_image_content_type":null,"tag_image_file_name":null,"tag_image_file_size":null,"tag_image_updated_at":null,"tag_image":{"url":null,"original":{"url":null},"moodbanner":{"url":null},"thumbnail":{"url":null}}},"children":[],"type":"tag"}],"type":"tag"},{"id":"j1_60","text":"2014 Summer Marc Newson","icon":true,"li_attr":{"id":"j1_60"},"a_attr":{"href":"#"},"data":{"deleted":false,"description":"","id":2083,"name":"2014 Summer Marc Newson","pressroom_id":46193,"slug":"2014-summer-marc-newson","tag_image_content_type":null,"tag_image_file_name":null,"tag_image_file_size":null,"tag_image_updated_at":null,"tag_image":{"url":null,"original":{"url":null},"moodbanner":{"url":null},"thumbnail":{"url":null}}},"children":[{"id":"j1_104","text":"Press Releases","icon":true,"li_attr":{"id":"j1_104"},"a_attr":{"href":"#"},"data":{"deleted":false,"description":null,"id":2084,"name":"Press Releases","pressroom_id":46193,"slug":"press-releases","tag_image_content_type":null,"tag_image_file_name":null,"tag_image_file_size":null,"tag_image_updated_at":null,"tag_image":{"url":null,"original":{"url":null},"moodbanner":{"url":null},"thumbnail":{"url":null}}},"children":[],"type":"tag"},{"id":"j1_105","text":"Looks","icon":true,"li_attr":{"id":"j1_105"},"a_attr":{"href":"#"},"data":{"deleted":false,"description":null,"id":2085,"name":"Looks","pressroom_id":46193,"slug":"looks","tag_image_content_type":null,"tag_image_file_name":null,"tag_image_file_size":null,"tag_image_updated_at":null,"tag_image":{"url":null,"original":{"url":null},"moodbanner":{"url":null},"thumbnail":{"url":null}}},"children":[],"type":"tag"},{"id":"j1_106","text":"Product Shots","icon":true,"li_attr":{"id":"j1_106"},"a_attr":{"href":"#"},"data":{"deleted":false,"description":null,"id":2086,"name":"Product Shots","pressroom_id":46193,"slug":"product-shots","tag_image_content_type":null,"tag_image_file_name":null,"tag_image_file_size":null,"tag_image_updated_at":null,"tag_image":{"url":null,"original":{"url":null},"moodbanner":{"url":null},"thumbnail":{"url":null}}},"children":[],"type":"tag"},{"id":"j1_107","text":"Videos","icon":true,"li_attr":{"id":"j1_107"},"a_attr":{"href":"#"},"data":{"deleted":false,"description":null,"id":2087,"name":"Videos","pressroom_id":46193,"slug":"videos","tag_image_content_type":null,"tag_image_file_name":null,"tag_image_file_size":null,"tag_image_updated_at":null,"tag_image":{"url":null,"original":{"url":null},"moodbanner":{"url":null},"thumbnail":{"url":null}}},"children":[],"type":"tag"}],"type":"tag"},{"id":"j1_59","text":"2014 Spring / Summer","icon":true,"li_attr":{"id":"j1_59"},"a_attr":{"href":"#"},"data":{"deleted":false,"description":null,"id":2068,"name":"2014 Spring / Summer","pressroom_id":46193,"slug":"2014-spring-summer","tag_image_content_type":null,"tag_image_file_name":null,"tag_image_file_size":null,"tag_image_updated_at":null,"tag_image":{"url":null,"original":{"url":null},"moodbanner":{"url":null},"thumbnail":{"url":null}}},"children":[{"id":"j1_108","text":"Press Releases","icon":true,"li_attr":{"id":"j1_108"},"a_attr":{"href":"#"},"data":{"deleted":false,"description":null,"id":2084,"name":"Press Releases","pressroom_id":46193,"slug":"press-releases","tag_image_content_type":null,"tag_image_file_name":null,"tag_image_file_size":null,"tag_image_updated_at":null,"tag_image":{"url":null,"original":{"url":null},"moodbanner":{"url":null},"thumbnail":{"url":null}}},"children":[],"type":"tag"},{"id":"j1_109","text":"Looks","icon":true,"li_attr":{"id":"j1_109"},"a_attr":{"href":"#"},"data":{"deleted":false,"description":null,"id":2085,"name":"Looks","pressroom_id":46193,"slug":"looks","tag_image_content_type":null,"tag_image_file_name":null,"tag_image_file_size":null,"tag_image_updated_at":null,"tag_image":{"url":null,"original":{"url":null},"moodbanner":{"url":null},"thumbnail":{"url":null}}},"children":[],"type":"tag"},{"id":"j1_110","text":"Product Shots","icon":true,"li_attr":{"id":"j1_110"},"a_attr":{"href":"#"},"data":{"deleted":false,"description":null,"id":2086,"name":"Product Shots","pressroom_id":46193,"slug":"product-shots","tag_image_content_type":null,"tag_image_file_name":null,"tag_image_file_size":null,"tag_image_updated_at":null,"tag_image":{"url":null,"original":{"url":null},"moodbanner":{"url":null},"thumbnail":{"url":null}}},"children":[],"type":"tag"},{"id":"j1_111","text":"Videos","icon":true,"li_attr":{"id":"j1_111"},"a_attr":{"href":"#"},"data":{"deleted":false,"description":null,"id":2087,"name":"Videos","pressroom_id":46193,"slug":"videos","tag_image_content_type":null,"tag_image_file_name":null,"tag_image_file_size":null,"tag_image_updated_at":null,"tag_image":{"url":null,"original":{"url":null},"moodbanner":{"url":null},"thumbnail":{"url":null}}},"children":[],"type":"tag"}],"type":"tag"}],"type":"tag"},{"id":"j1_9","text":"Women's Collection","icon":true,"li_attr":{"id":"j1_9"},"a_attr":{"href":"#"},"data":{"deleted":false,"description":"","id":2051,"name":"Women's Collection","pressroom_id":46193,"slug":"women-s-collection","tag_image_content_type":null,"tag_image_file_name":null,"tag_image_file_size":null,"tag_image_updated_at":null,"tag_image":{"url":null,"original":{"url":null},"moodbanner":{"url":null},"thumbnail":{"url":null}}},"children":[{"id":"j1_66","text":"2014 Winter","icon":true,"li_attr":{"id":"j1_66"},"a_attr":{"href":"#"},"data":{"deleted":false,"description":null,"id":2080,"name":"2014 Winter","pressroom_id":46193,"slug":"2014-winter","tag_image_content_type":null,"tag_image_file_name":null,"tag_image_file_size":null,"tag_image_updated_at":null,"tag_image":{"url":null,"original":{"url":null},"moodbanner":{"url":null},"thumbnail":{"url":null}}},"children":[{"id":"j1_77","text":"Press Releases","icon":true,"li_attr":{"id":"j1_77"},"a_attr":{"href":"#"},"data":{"deleted":false,"description":null,"id":2084,"name":"Press Releases","pressroom_id":46193,"slug":"press-releases","tag_image_content_type":null,"tag_image_file_name":null,"tag_image_file_size":null,"tag_image_updated_at":null,"tag_image":{"url":null,"original":{"url":null},"moodbanner":{"url":null},"thumbnail":{"url":null}}},"children":[],"type":"tag"},{"id":"j1_78","text":"Looks","icon":true,"li_attr":{"id":"j1_78"},"a_attr":{"href":"#"},"data":{"deleted":false,"description":null,"id":2085,"name":"Looks","pressroom_id":46193,"slug":"looks","tag_image_content_type":null,"tag_image_file_name":null,"tag_image_file_size":null,"tag_image_updated_at":null,"tag_image":{"url":null,"original":{"url":null},"moodbanner":{"url":null},"thumbnail":{"url":null}}},"children":[],"type":"tag"},{"id":"j1_79","text":"Product Shots","icon":true,"li_attr":{"id":"j1_79"},"a_attr":{"href":"#"},"data":{"deleted":false,"description":null,"id":2086,"name":"Product Shots","pressroom_id":46193,"slug":"product-shots","tag_image_content_type":null,"tag_image_file_name":null,"tag_image_file_size":null,"tag_image_updated_at":null,"tag_image":{"url":null,"original":{"url":null},"moodbanner":{"url":null},"thumbnail":{"url":null}}},"children":[],"type":"tag"},{"id":"j1_80","text":"Videos","icon":true,"li_attr":{"id":"j1_80"},"a_attr":{"href":"#"},"data":{"deleted":false,"description":null,"id":2087,"name":"Videos","pressroom_id":46193,"slug":"videos","tag_image_content_type":null,"tag_image_file_name":null,"tag_image_file_size":null,"tag_image_updated_at":null,"tag_image":{"url":null,"original":{"url":null},"moodbanner":{"url":null},"thumbnail":{"url":null}}},"children":[],"type":"tag"}],"type":"tag"},{"id":"j1_63","text":"2014 Autumn / Winter","icon":true,"li_attr":{"id":"j1_63"},"a_attr":{"href":"#"},"data":{"deleted":false,"description":null,"id":2067,"name":"2014 Autumn / Winter","pressroom_id":46193,"slug":"2014-autumn-winter","tag_image_content_type":null,"tag_image_file_name":null,"tag_image_file_size":null,"tag_image_updated_at":null,"tag_image":{"url":null,"original":{"url":null},"moodbanner":{"url":null},"thumbnail":{"url":null}}},"children":[{"id":"j1_122","text":"Press Releases","icon":true,"li_attr":{"id":"j1_122"},"a_attr":{"href":"#"},"data":{"deleted":false,"description":null,"id":2084,"name":"Press Releases","pressroom_id":46193,"slug":"press-releases","tag_image_content_type":null,"tag_image_file_name":null,"tag_image_file_size":null,"tag_image_updated_at":null,"tag_image":{"url":null,"original":{"url":null},"moodbanner":{"url":null},"thumbnail":{"url":null}}},"children":[],"type":"tag"},{"id":"j1_123","text":"Looks","icon":true,"li_attr":{"id":"j1_123"},"a_attr":{"href":"#"},"data":{"deleted":false,"description":null,"id":2085,"name":"Looks","pressroom_id":46193,"slug":"looks","tag_image_content_type":null,"tag_image_file_name":null,"tag_image_file_size":null,"tag_image_updated_at":null,"tag_image":{"url":null,"original":{"url":null},"moodbanner":{"url":null},"thumbnail":{"url":null}}},"children":[],"type":"tag"},{"id":"j1_124","text":"Product Shots","icon":true,"li_attr":{"id":"j1_124"},"a_attr":{"href":"#"},"data":{"deleted":false,"description":null,"id":2086,"name":"Product Shots","pressroom_id":46193,"slug":"product-shots","tag_image_content_type":null,"tag_image_file_name":null,"tag_image_file_size":null,"tag_image_updated_at":null,"tag_image":{"url":null,"original":{"url":null},"moodbanner":{"url":null},"thumbnail":{"url":null}}},"children":[],"type":"tag"},{"id":"j1_125","text":"Videos","icon":true,"li_attr":{"id":"j1_125"},"a_attr":{"href":"#"},"data":{"deleted":false,"description":null,"id":2087,"name":"Videos","pressroom_id":46193,"slug":"videos","tag_image_content_type":null,"tag_image_file_name":null,"tag_image_file_size":null,"tag_image_updated_at":null,"tag_image":{"url":null,"original":{"url":null},"moodbanner":{"url":null},"thumbnail":{"url":null}}},"children":[],"type":"tag"}],"type":"tag"},{"id":"j1_61","text":"2014 Summer","icon":true,"li_attr":{"id":"j1_61"},"a_attr":{"href":"#"},"data":{"deleted":false,"description":null,"id":2082,"name":"2014 Summer","pressroom_id":46193,"slug":"2014-summer","tag_image_content_type":null,"tag_image_file_name":null,"tag_image_file_size":null,"tag_image_updated_at":null,"tag_image":{"url":null,"original":{"url":null},"moodbanner":{"url":null},"thumbnail":{"url":null}}},"children":[{"id":"j1_126","text":"Press Releases","icon":true,"li_attr":{"id":"j1_126"},"a_attr":{"href":"#"},"data":{"deleted":false,"description":null,"id":2084,"name":"Press Releases","pressroom_id":46193,"slug":"press-releases","tag_image_content_type":null,"tag_image_file_name":null,"tag_image_file_size":null,"tag_image_updated_at":null,"tag_image":{"url":null,"original":{"url":null},"moodbanner":{"url":null},"thumbnail":{"url":null}}},"children":[],"type":"tag"},{"id":"j1_127","text":"Looks","icon":true,"li_attr":{"id":"j1_127"},"a_attr":{"href":"#"},"data":{"deleted":false,"description":null,"id":2085,"name":"Looks","pressroom_id":46193,"slug":"looks","tag_image_content_type":null,"tag_image_file_name":null,"tag_image_file_size":null,"tag_image_updated_at":null,"tag_image":{"url":null,"original":{"url":null},"moodbanner":{"url":null},"thumbnail":{"url":null}}},"children":[],"type":"tag"},{"id":"j1_128","text":"Product Shots","icon":true,"li_attr":{"id":"j1_128"},"a_attr":{"href":"#"},"data":{"deleted":false,"description":null,"id":2086,"name":"Product Shots","pressroom_id":46193,"slug":"product-shots","tag_image_content_type":null,"tag_image_file_name":null,"tag_image_file_size":null,"tag_image_updated_at":null,"tag_image":{"url":null,"original":{"url":null},"moodbanner":{"url":null},"thumbnail":{"url":null}}},"children":[],"type":"tag"},{"id":"j1_129","text":"Videos","icon":true,"li_attr":{"id":"j1_129"},"a_attr":{"href":"#"},"data":{"deleted":false,"description":null,"id":2087,"name":"Videos","pressroom_id":46193,"slug":"videos","tag_image_content_type":null,"tag_image_file_name":null,"tag_image_file_size":null,"tag_image_updated_at":null,"tag_image":{"url":null,"original":{"url":null},"moodbanner":{"url":null},"thumbnail":{"url":null}}},"children":[],"type":"tag"}],"type":"tag"},{"id":"j1_58","text":"2014 Spring / Summer","icon":true,"li_attr":{"id":"j1_58"},"a_attr":{"href":"#"},"data":{"deleted":false,"description":null,"id":2068,"name":"2014 Spring / Summer","pressroom_id":46193,"slug":"2014-spring-summer","tag_image_content_type":null,"tag_image_file_name":null,"tag_image_file_size":null,"tag_image_updated_at":null,"tag_image":{"url":null,"original":{"url":null},"moodbanner":{"url":null},"thumbnail":{"url":null}}},"children":[{"id":"j1_130","text":"Press Releases","icon":true,"li_attr":{"id":"j1_130"},"a_attr":{"href":"#"},"data":{"deleted":false,"description":null,"id":2084,"name":"Press Releases","pressroom_id":46193,"slug":"press-releases","tag_image_content_type":null,"tag_image_file_name":null,"tag_image_file_size":null,"tag_image_updated_at":null,"tag_image":{"url":null,"original":{"url":null},"moodbanner":{"url":null},"thumbnail":{"url":null}}},"children":[],"type":"tag"},{"id":"j1_131","text":"Looks","icon":true,"li_attr":{"id":"j1_131"},"a_attr":{"href":"#"},"data":{"deleted":false,"description":null,"id":2085,"name":"Looks","pressroom_id":46193,"slug":"looks","tag_image_content_type":null,"tag_image_file_name":null,"tag_image_file_size":null,"tag_image_updated_at":null,"tag_image":{"url":null,"original":{"url":null},"moodbanner":{"url":null},"thumbnail":{"url":null}}},"children":[],"type":"tag"},{"id":"j1_132","text":"Product Shots","icon":true,"li_attr":{"id":"j1_132"},"a_attr":{"href":"#"},"data":{"deleted":false,"description":null,"id":2086,"name":"Product Shots","pressroom_id":46193,"slug":"product-shots","tag_image_content_type":null,"tag_image_file_name":null,"tag_image_file_size":null,"tag_image_updated_at":null,"tag_image":{"url":null,"original":{"url":null},"moodbanner":{"url":null},"thumbnail":{"url":null}}},"children":[],"type":"tag"},{"id":"j1_133","text":"Videos","icon":true,"li_attr":{"id":"j1_133"},"a_attr":{"href":"#"},"data":{"deleted":false,"description":null,"id":2087,"name":"Videos","pressroom_id":46193,"slug":"videos","tag_image_content_type":null,"tag_image_file_name":null,"tag_image_file_size":null,"tag_image_updated_at":null,"tag_image":{"url":null,"original":{"url":null},"moodbanner":{"url":null},"thumbnail":{"url":null}}},"children":[],"type":"tag"}],"type":"tag"}],"type":"tag"},{"id":"j1_11","text":"Collaborations","icon":true,"li_attr":{"id":"j1_11"},"a_attr":{"href":"#"},"data":{"deleted":false,"description":null,"id":2057,"name":"Collaborations","pressroom_id":46193,"slug":"collaborations","tag_image_content_type":null,"tag_image_file_name":null,"tag_image_file_size":null,"tag_image_updated_at":null,"tag_image":{"url":null,"original":{"url":null},"moodbanner":{"url":null},"thumbnail":{"url":null}}},"children":[{"id":"j1_42","text":"Afrojack","icon":true,"li_attr":{"id":"j1_42"},"a_attr":{"href":"#"},"data":{"deleted":false,"description":null,"id":2069,"name":"Afrojack","pressroom_id":46193,"slug":"afrojack","tag_image_content_type":null,"tag_image_file_name":null,"tag_image_file_size":null,"tag_image_updated_at":null,"tag_image":{"url":null,"original":{"url":null},"moodbanner":{"url":null},"thumbnail":{"url":null}}},"children":[],"type":"tag"},{"id":"j1_43","text":"Marc Newson","icon":true,"li_attr":{"id":"j1_43"},"a_attr":{"href":"#"},"data":{"deleted":false,"description":null,"id":2070,"name":"Marc Newson","pressroom_id":46193,"slug":"marc-newson","tag_image_content_type":null,"tag_image_file_name":null,"tag_image_file_size":null,"tag_image_updated_at":null,"tag_image":{"url":null,"original":{"url":null},"moodbanner":{"url":null},"thumbnail":{"url":null}}},"children":[],"type":"tag"},{"id":"j1_44","text":"Pouvre I","icon":true,"li_attr":{"id":"j1_44"},"a_attr":{"href":"#"},"data":{"deleted":false,"description":null,"id":2071,"name":"Pouvre I","pressroom_id":46193,"slug":"pouvre-i","tag_image_content_type":null,"tag_image_file_name":null,"tag_image_file_size":null,"tag_image_updated_at":null,"tag_image":{"url":null,"original":{"url":null},"moodbanner":{"url":null},"thumbnail":{"url":null}}},"children":[],"type":"tag"},{"id":"j1_45","text":"Pouvre II","icon":true,"li_attr":{"id":"j1_45"},"a_attr":{"href":"#"},"data":{"deleted":false,"description":null,"id":2072,"name":"Pouvre II","pressroom_id":46193,"slug":"pouvre-ii","tag_image_content_type":null,"tag_image_file_name":null,"tag_image_file_size":null,"tag_image_updated_at":null,"tag_image":{"url":null,"original":{"url":null},"moodbanner":{"url":null},"thumbnail":{"url":null}}},"children":[],"type":"tag"},{"id":"j1_46","text":"RAW Cannondale","icon":true,"li_attr":{"id":"j1_46"},"a_attr":{"href":"#"},"data":{"deleted":false,"description":null,"id":2073,"name":"RAW Cannondale","pressroom_id":46193,"slug":"raw-cannondale","tag_image_content_type":null,"tag_image_file_name":null,"tag_image_file_size":null,"tag_image_updated_at":null,"tag_image":{"url":null,"original":{"url":null},"moodbanner":{"url":null},"thumbnail":{"url":null}}},"children":[],"type":"tag"},{"id":"j1_47","text":"RAW Defender","icon":true,"li_attr":{"id":"j1_47"},"a_attr":{"href":"#"},"data":{"deleted":false,"description":null,"id":2074,"name":"RAW Defender","pressroom_id":46193,"slug":"raw-defender","tag_image_content_type":null,"tag_image_file_name":null,"tag_image_file_size":null,"tag_image_updated_at":null,"tag_image":{"url":null,"original":{"url":null},"moodbanner":{"url":null},"thumbnail":{"url":null}}},"children":[],"type":"tag"},{"id":"j1_48","text":"RAW Ferry","icon":true,"li_attr":{"id":"j1_48"},"a_attr":{"href":"#"},"data":{"deleted":false,"description":null,"id":2075,"name":"RAW Ferry","pressroom_id":46193,"slug":"raw-ferry","tag_image_content_type":null,"tag_image_file_name":null,"tag_image_file_size":null,"tag_image_updated_at":null,"tag_image":{"url":null,"original":{"url":null},"moodbanner":{"url":null},"thumbnail":{"url":null}}},"children":[],"type":"tag"},{"id":"j1_49","text":"RAW for the Oceans","icon":true,"li_attr":{"id":"j1_49"},"a_attr":{"href":"#"},"data":{"deleted":false,"description":null,"id":2076,"name":"RAW for the Oceans","pressroom_id":46193,"slug":"raw-for-the-oceans","tag_image_content_type":null,"tag_image_file_name":null,"tag_image_file_size":null,"tag_image_updated_at":null,"tag_image":{"url":null,"original":{"url":null},"moodbanner":{"url":null},"thumbnail":{"url":null}}},"children":[],"type":"tag"},{"id":"j1_50","text":"RAW Leica","icon":true,"li_attr":{"id":"j1_50"},"a_attr":{"href":"#"},"data":{"deleted":false,"description":null,"id":2077,"name":"RAW Leica","pressroom_id":46193,"slug":"raw-leica","tag_image_content_type":null,"tag_image_file_name":null,"tag_image_file_size":null,"tag_image_updated_at":null,"tag_image":{"url":null,"original":{"url":null},"moodbanner":{"url":null},"thumbnail":{"url":null}}},"children":[],"type":"tag"},{"id":"j1_51","text":"RAW Utility","icon":true,"li_attr":{"id":"j1_51"},"a_attr":{"href":"#"},"data":{"deleted":false,"description":null,"id":2078,"name":"RAW Utility","pressroom_id":46193,"slug":"raw-utility","tag_image_content_type":null,"tag_image_file_name":null,"tag_image_file_size":null,"tag_image_updated_at":null,"tag_image":{"url":null,"original":{"url":null},"moodbanner":{"url":null},"thumbnail":{"url":null}}},"children":[],"type":"tag"},{"id":"j1_52","text":"Skrillex","icon":true,"li_attr":{"id":"j1_52"},"a_attr":{"href":"#"},"data":{"deleted":false,"description":null,"id":2079,"name":"Skrillex","pressroom_id":46193,"slug":"skrillex","tag_image_content_type":null,"tag_image_file_name":null,"tag_image_file_size":null,"tag_image_updated_at":null,"tag_image":{"url":null,"original":{"url":null},"moodbanner":{"url":null},"thumbnail":{"url":null}}},"children":[],"type":"tag"}],"type":"tag"},{"id":"j1_12","text":"Campaigns","icon":true,"li_attr":{"id":"j1_12"},"a_attr":{"href":"#"},"data":{"deleted":false,"description":null,"id":2058,"name":"Campaigns","pressroom_id":46193,"slug":"campaigns","tag_image_content_type":null,"tag_image_file_name":null,"tag_image_file_size":null,"tag_image_updated_at":null,"tag_image":{"url":null,"original":{"url":null},"moodbanner":{"url":null},"thumbnail":{"url":null}}},"children":[{"id":"j1_37","text":"2014 Autumn / Winter","icon":true,"li_attr":{"id":"j1_37"},"a_attr":{"href":"#"},"data":{"deleted":false,"description":null,"id":2067,"name":"2014 Autumn / Winter","pressroom_id":46193,"slug":"2014-autumn-winter","tag_image_content_type":null,"tag_image_file_name":null,"tag_image_file_size":null,"tag_image_updated_at":null,"tag_image":{"url":null,"original":{"url":null},"moodbanner":{"url":null},"thumbnail":{"url":null}}},"children":[{"id":"j1_81","text":"Press Conference","icon":true,"li_attr":{"id":"j1_81"},"a_attr":{"href":"#"},"data":{"deleted":false,"description":null,"id":2088,"name":"Press Conference","pressroom_id":46193,"slug":"press-conference","tag_image_content_type":null,"tag_image_file_name":null,"tag_image_file_size":null,"tag_image_updated_at":null,"tag_image":{"url":null,"original":{"url":null},"moodbanner":{"url":null},"thumbnail":{"url":null}}},"children":[],"type":"tag"},{"id":"j1_82","text":"Behind the Scene","icon":true,"li_attr":{"id":"j1_82"},"a_attr":{"href":"#"},"data":{"deleted":false,"description":null,"id":2089,"name":"Behind the Scene","pressroom_id":46193,"slug":"behind-the-scene","tag_image_content_type":null,"tag_image_file_name":null,"tag_image_file_size":null,"tag_image_updated_at":null,"tag_image":{"url":null,"original":{"url":null},"moodbanner":{"url":null},"thumbnail":{"url":null}}},"children":[],"type":"tag"}],"type":"tag"},{"id":"j1_39","text":"2014 Spring / Summer","icon":true,"li_attr":{"id":"j1_39"},"a_attr":{"href":"#"},"data":{"deleted":false,"description":null,"id":2068,"name":"2014 Spring / Summer","pressroom_id":46193,"slug":"2014-spring-summer","tag_image_content_type":null,"tag_image_file_name":null,"tag_image_file_size":null,"tag_image_updated_at":null,"tag_image":{"url":null,"original":{"url":null},"moodbanner":{"url":null},"thumbnail":{"url":null}}},"children":[{"id":"j1_90","text":"Press Conference","icon":true,"li_attr":{"id":"j1_90"},"a_attr":{"href":"#"},"data":{"deleted":false,"description":null,"id":2088,"name":"Press Conference","pressroom_id":46193,"slug":"press-conference","tag_image_content_type":null,"tag_image_file_name":null,"tag_image_file_size":null,"tag_image_updated_at":null,"tag_image":{"url":null,"original":{"url":null},"moodbanner":{"url":null},"thumbnail":{"url":null}}},"children":[],"type":"tag"},{"id":"j1_91","text":"Behind the Scene","icon":true,"li_attr":{"id":"j1_91"},"a_attr":{"href":"#"},"data":{"deleted":false,"description":null,"id":2089,"name":"Behind the Scene","pressroom_id":46193,"slug":"behind-the-scene","tag_image_content_type":null,"tag_image_file_name":null,"tag_image_file_size":null,"tag_image_updated_at":null,"tag_image":{"url":null,"original":{"url":null},"moodbanner":{"url":null},"thumbnail":{"url":null}}},"children":[],"type":"tag"}],"type":"tag"}],"type":"tag"},{"id":"j1_13","text":"Events","icon":true,"li_attr":{"id":"j1_13"},"a_attr":{"href":"#"},"data":{"deleted":false,"description":null,"id":2059,"name":"Events","pressroom_id":46193,"slug":"events","tag_image_content_type":null,"tag_image_file_name":null,"tag_image_file_size":null,"tag_image_updated_at":null,"tag_image":{"url":null,"original":{"url":null},"moodbanner":{"url":null},"thumbnail":{"url":null}}},"children":[{"id":"j1_36","text":"2014","icon":true,"li_attr":{"id":"j1_36"},"a_attr":{"href":"#"},"data":{"deleted":false,"description":null,"id":2065,"name":"2014","pressroom_id":46193,"slug":"2014","tag_image_content_type":null,"tag_image_file_name":null,"tag_image_file_size":null,"tag_image_updated_at":null,"tag_image":{"url":null,"original":{"url":null},"moodbanner":{"url":null},"thumbnail":{"url":null}}},"children":[],"type":"tag"}],"type":"tag"},{"id":"j1_14","text":"Eyewear","icon":true,"li_attr":{"id":"j1_14"},"a_attr":{"href":"#"},"data":{"deleted":false,"description":null,"id":2060,"name":"Eyewear","pressroom_id":46193,"slug":"eyewear","tag_image_content_type":null,"tag_image_file_name":null,"tag_image_file_size":null,"tag_image_updated_at":null,"tag_image":{"url":null,"original":{"url":null},"moodbanner":{"url":null},"thumbnail":{"url":null}}},"children":[{"id":"j1_35","text":"2014 Autumn / Winter","icon":true,"li_attr":{"id":"j1_35"},"a_attr":{"href":"#"},"data":{"deleted":false,"description":null,"id":2067,"name":"2014 Autumn / Winter","pressroom_id":46193,"slug":"2014-autumn-winter","tag_image_content_type":null,"tag_image_file_name":null,"tag_image_file_size":null,"tag_image_updated_at":null,"tag_image":{"url":null,"original":{"url":null},"moodbanner":{"url":null},"thumbnail":{"url":null}}},"children":[],"type":"tag"},{"id":"j1_33","text":"2014 Spring / Summer","icon":true,"li_attr":{"id":"j1_33"},"a_attr":{"href":"#"},"data":{"deleted":false,"description":null,"id":2068,"name":"2014 Spring / Summer","pressroom_id":46193,"slug":"2014-spring-summer","tag_image_content_type":null,"tag_image_file_name":null,"tag_image_file_size":null,"tag_image_updated_at":null,"tag_image":{"url":null,"original":{"url":null},"moodbanner":{"url":null},"thumbnail":{"url":null}}},"children":[],"type":"tag"}],"type":"tag"},{"id":"j1_15","text":"Footwear","icon":true,"li_attr":{"id":"j1_15"},"a_attr":{"href":"#"},"data":{"deleted":false,"description":null,"id":2061,"name":"Footwear","pressroom_id":46193,"slug":"footwear","tag_image_content_type":null,"tag_image_file_name":null,"tag_image_file_size":null,"tag_image_updated_at":null,"tag_image":{"url":null,"original":{"url":null},"moodbanner":{"url":null},"thumbnail":{"url":null}}},"children":[{"id":"j1_34","text":"2014 Autumn / Winter","icon":true,"li_attr":{"id":"j1_34"},"a_attr":{"href":"#"},"data":{"deleted":false,"description":null,"id":2067,"name":"2014 Autumn / Winter","pressroom_id":46193,"slug":"2014-autumn-winter","tag_image_content_type":null,"tag_image_file_name":null,"tag_image_file_size":null,"tag_image_updated_at":null,"tag_image":{"url":null,"original":{"url":null},"moodbanner":{"url":null},"thumbnail":{"url":null}}},"children":[],"type":"tag"},{"id":"j1_31","text":"2014 Spring / Summer","icon":true,"li_attr":{"id":"j1_31"},"a_attr":{"href":"#"},"data":{"deleted":false,"description":null,"id":2068,"name":"2014 Spring / Summer","pressroom_id":46193,"slug":"2014-spring-summer","tag_image_content_type":null,"tag_image_file_name":null,"tag_image_file_size":null,"tag_image_updated_at":null,"tag_image":{"url":null,"original":{"url":null},"moodbanner":{"url":null},"thumbnail":{"url":null}}},"children":[],"type":"tag"}],"type":"tag"},{"id":"j1_16","text":"About","icon":true,"li_attr":{"id":"j1_16"},"a_attr":{"href":"#"},"data":{"deleted":false,"description":null,"id":2062,"name":"About","pressroom_id":46193,"slug":"about","tag_image_content_type":null,"tag_image_file_name":null,"tag_image_file_size":null,"tag_image_updated_at":null,"tag_image":{"url":null,"original":{"url":null},"moodbanner":{"url":null},"thumbnail":{"url":null}}},"children":[{"id":"j1_23","text":"Factsheets","icon":true,"li_attr":{"id":"j1_23"},"a_attr":{"href":"#"},"data":{"deleted":false,"description":null,"id":2064,"name":"Factsheets","pressroom_id":46193,"slug":"factsheets","tag_image_content_type":null,"tag_image_file_name":null,"tag_image_file_size":null,"tag_image_updated_at":null,"tag_image":{"url":null,"original":{"url":null},"moodbanner":{"url":null},"thumbnail":{"url":null}}},"children":[{"id":"j1_25","text":"2014","icon":true,"li_attr":{"id":"j1_25"},"a_attr":{"href":"#"},"data":{"deleted":false,"description":null,"id":2065,"name":"2014","pressroom_id":46193,"slug":"2014","tag_image_content_type":null,"tag_image_file_name":null,"tag_image_file_size":null,"tag_image_updated_at":null,"tag_image":{"url":null,"original":{"url":null},"moodbanner":{"url":null},"thumbnail":{"url":null}}},"children":[],"type":"tag"}],"type":"tag"},{"id":"j1_24","text":"Milestones","icon":true,"li_attr":{"id":"j1_24"},"a_attr":{"href":"#"},"data":{"deleted":false,"description":null,"id":2066,"name":"Milestones","pressroom_id":46193,"slug":"milestones","tag_image_content_type":null,"tag_image_file_name":null,"tag_image_file_size":null,"tag_image_updated_at":null,"tag_image":{"url":null,"original":{"url":null},"moodbanner":{"url":null},"thumbnail":{"url":null}}},"children":[{"id":"j1_26","text":"2014","icon":true,"li_attr":{"id":"j1_26"},"a_attr":{"href":"#"},"data":{"deleted":false,"description":null,"id":2065,"name":"2014","pressroom_id":46193,"slug":"2014","tag_image_content_type":null,"tag_image_file_name":null,"tag_image_file_size":null,"tag_image_updated_at":null,"tag_image":{"url":null,"original":{"url":null},"moodbanner":{"url":null},"thumbnail":{"url":null}}},"children":[],"type":"tag"}],"type":"tag"}],"type":"tag"},{"id":"j1_17","text":"General","icon":true,"li_attr":{"id":"j1_17"},"a_attr":{"href":"#"},"data":{"deleted":false,"description":null,"id":2063,"name":"General","pressroom_id":46193,"slug":"general","tag_image_content_type":null,"tag_image_file_name":null,"tag_image_file_size":null,"tag_image_updated_at":null,"tag_image":{"url":null,"original":{"url":null},"moodbanner":{"url":null},"thumbnail":{"url":null}}},"children":[{"id":"j1_22","text":"2014","icon":true,"li_attr":{"id":"j1_22"},"a_attr":{"href":"#"},"data":{"deleted":false,"description":null,"id":2065,"name":"2014","pressroom_id":46193,"slug":"2014","tag_image_content_type":null,"tag_image_file_name":null,"tag_image_file_size":null,"tag_image_updated_at":null,"tag_image":{"url":null,"original":{"url":null},"moodbanner":{"url":null},"thumbnail":{"url":null}}},"children":[],"type":"tag"}],"type":"tag"}],"type":"root"},{"id":"j1_2","text":"South","icon":true,"li_attr":{"id":"j1_2"},"a_attr":{"href":"#"},"data":{"deleted":false,"description":null,"id":2045,"name":"South","pressroom_id":46193,"slug":"south","tag_image_content_type":null,"tag_image_file_name":null,"tag_image_file_size":null,"tag_image_updated_at":null,"tag_image":{"url":null,"original":{"url":null},"moodbanner":{"url":null},"thumbnail":{"url":null}}},"children":[],"type":"tag"},{"id":"j1_3","text":"QuickLinks","icon":true,"li_attr":{"id":"j1_3"},"a_attr":{"href":"#"},"data":{"deleted":false,"description":null,"id":2046,"name":"QuickLinks","pressroom_id":46193,"slug":"quicklinks","tag_image_content_type":null,"tag_image_file_name":null,"tag_image_file_size":null,"tag_image_updated_at":null,"tag_image":{"url":null,"original":{"url":null},"moodbanner":{"url":null},"thumbnail":{"url":null}}},"children":[],"type":"tag"},{"id":"j1_4","text":"Countries","icon":true,"li_attr":{"id":"j1_4"},"a_attr":{"href":"#"},"data":{"deleted":false,"description":null,"id":2047,"name":"Countries","pressroom_id":46193,"slug":"countries","tag_image_content_type":null,"tag_image_file_name":null,"tag_image_file_size":null,"tag_image_updated_at":null,"tag_image":{"url":null,"original":{"url":null},"moodbanner":{"url":null},"thumbnail":{"url":null}}},"children":[{"id":"j1_6","text":"The Netherlands","icon":true,"li_attr":{"id":"j1_6"},"a_attr":{"href":"#"},"data":{"deleted":false,"description":null,"id":2049,"name":"The Netherlands","pressroom_id":46193,"slug":"the-netherlands","tag_image_content_type":null,"tag_image_file_name":null,"tag_image_file_size":null,"tag_image_updated_at":null,"tag_image":{"url":null,"original":{"url":null},"moodbanner":{"url":null},"thumbnail":{"url":null}}},"children":[],"type":"tag"}],"type":"tag"}]
@@ -42,6 +42,18 @@ describe Nutmeg::TagTreeHelper do
42
42
  end
43
43
  end
44
44
 
45
+
46
+ context "Big tree with complex structure" do
47
+ it "returns the correct html" do
48
+ data = File.open([Dir.pwd, "/spec/files/big_tree.json"].join)
49
+ @tree_from_json = Nutmeg::TreeFromJson.new(data)
50
+ subtree = @tree_from_json.tree.subtree("north")
51
+ tree_html = Nutmeg::TagTreeHelper.new(subtree).print_html(["north", "about", "milestones", "2014", "the-netherlands"], true)
52
+ expect(tree_html).to include("<a >About</a><ul><li class='level_2'> <a >Factsheets</a>")
53
+ expect(tree_html).not_to include("<a >About</a><ul><li class='level_2 active'> <a >Factsheets</a>")
54
+ expect(tree_html).to include("<li class='level_2 active'> <a >Milestones</a><ul><li class='level_3 leaf active'> <a href='/north/about/milestones/2014'>2014</a></li></ul></li>")
55
+ end
56
+ end
45
57
  end
46
58
 
47
59
  end
@@ -32,4 +32,15 @@ describe Nutmeg::TagTree do
32
32
  expect(@tag_tree.get_paths_formatted(["base", "child"]).first).to eq("base/child")
33
33
  end
34
34
  end
35
+
36
+ context "Order paths by relevance" do
37
+ describe "#get_paths_formatted" do
38
+ it "returns paths in the right order" do
39
+ data = File.open([Dir.pwd, "/spec/files/big_tree.json"].join)
40
+ @tree_from_json = Nutmeg::TreeFromJson.new(data)
41
+ subtree = @tree_from_json.tree.subtree("north")
42
+ expect(subtree.get_paths_formatted(["north", "about", "milestones", "2014", "the-netherlands"])).to eq(["north/about/milestones/2014", "north/about/factsheets/2014"])
43
+ end
44
+ end
45
+ end
35
46
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: nutmeg
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.11
4
+ version: 0.0.12
5
5
  platform: ruby
6
6
  authors:
7
7
  - Dennis van der Vliet
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-11-12 00:00:00.000000000 Z
11
+ date: 2014-12-03 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rubytree
@@ -87,6 +87,7 @@ files:
87
87
  - lib/nutmeg/tree_from_yaml.rb
88
88
  - lib/nutmeg/version.rb
89
89
  - nutmeg.gemspec
90
+ - spec/files/big_tree.json
90
91
  - spec/files/tree.json
91
92
  - spec/files/tree.yml
92
93
  - spec/nutmeg_spec.rb
@@ -116,11 +117,12 @@ required_rubygems_version: !ruby/object:Gem::Requirement
116
117
  version: '0'
117
118
  requirements: []
118
119
  rubyforge_project:
119
- rubygems_version: 2.1.9
120
+ rubygems_version: 2.4.4
120
121
  signing_key:
121
122
  specification_version: 4
122
123
  summary: Easy trees in rails
123
124
  test_files:
125
+ - spec/files/big_tree.json
124
126
  - spec/files/tree.json
125
127
  - spec/files/tree.yml
126
128
  - spec/nutmeg_spec.rb