nutmeg 0.0.3 → 0.0.4

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: b68dde6b721ba5628dd4c0f11b27baf1088a9a73
4
- data.tar.gz: 07ec3c8770abb0d8083f73750669fbdd42ecbfee
3
+ metadata.gz: 64792747c20d528aad471a074795da5f4b0cb1e0
4
+ data.tar.gz: f2747248945f3bef7a1612ae021c5093a0d09fca
5
5
  SHA512:
6
- metadata.gz: fb84459fa571a321194c60b9286bd319aa88a03d66081ccbf42dd827fdb51f8f3b7b6a71adb577c3d71ba9a8801486a8c7b105d412959f296ca886661304e4b0
7
- data.tar.gz: 50d53ebfb824495c3bdfcb382f6cc44c67431c090517f45963d0026ff588f48e9500bed9f5de9f54456f92b178a0122b6051462a38452afb8b15b5cf37716f92
6
+ metadata.gz: 619287a46f89bca279088a8d3bd6218c570796c252feb9b926affad11f93fa7d8e5b123a93642680fd8f4f8d8a998b0658f1d1fc83030fb4fc5a6c718813493c
7
+ data.tar.gz: b250abcb7edb60b1a71c6a2982f762c00a067213332cbd52c2344666c1828eca7f1410872259218081acd656454c12fa72957758a7d1797d9474c60d19bee66e
@@ -7,9 +7,9 @@ module Nutmeg
7
7
  @original = tree
8
8
  end
9
9
 
10
- def subtree(id)
10
+ def subtree(slug)
11
11
  @original.each do |node|
12
- return Nutmeg::TagTree.new(node.detached_subtree_copy) if node.content[:tag_id] == id
12
+ return Nutmeg::TagTree.new(node.detached_subtree_copy) if node.content[:slug] == slug
13
13
  end
14
14
  end
15
15
 
@@ -1,3 +1,3 @@
1
1
  module Nutmeg
2
- VERSION = "0.0.3"
2
+ VERSION = "0.0.4"
3
3
  end
@@ -15,9 +15,9 @@ describe Nutmeg::TagTree do
15
15
  end
16
16
 
17
17
  describe "#subtree" do
18
- it "returns a subtree starting at tag with tag_id 1" do
18
+ it "returns a subtree starting at tag with slug 'base'" do
19
19
  expect(@tag_tree.original.size).to eq(3)
20
- expect(@tag_tree.subtree(1).original.size).to eq(2)
20
+ expect(@tag_tree.subtree("base").original.size).to eq(2)
21
21
  end
22
22
  end
23
23
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: nutmeg
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.3
4
+ version: 0.0.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Dennis van der Vliet