macrocosm 0.1.3 → 0.1.5

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
  SHA256:
3
- metadata.gz: fa9b95a6db23f5e85ea6156382e9fe448fe898c33623c272288686b0cabcb007
4
- data.tar.gz: 2434dc283af804ae9799bb4b8717c9ae4b0cd32144a648406abf38bd77536bd7
3
+ metadata.gz: 4e69ec0db56b0ec932ab3578ab04f0c587327b4b9722746179a1b2e57e54653c
4
+ data.tar.gz: e23c4c4907c678ee1e22b665a842235d6c59d2596f3aa3a3a0b9f4d8878685bb
5
5
  SHA512:
6
- metadata.gz: ab97f2ee1d9e311c59e361ee448060cc82ba6cc84bc3040d574342d75b06af8e6bfaef79a62e154062a7544efdcae64689248e1721f6a95634be9204c40d2b26
7
- data.tar.gz: 8b593f9b15552a24e5162b1ce6adcbc8ebbffde3158d27e1ce5e1d026e83a6753a8fb165905504d0c5964659dd1af465e9b69ea278246eab4f39d80bcfe97898
6
+ metadata.gz: 3e2451dfd40be9647ee4369eecc0e9a5480763a9bfb06e8598a680aea22aa013649ca004271828fc000add6d129f92745d024162d3c1092b93c7045311d7e1c0
7
+ data.tar.gz: ea2b6f1aacca148b9758d20b3d1314f367a7b52aa1b601fcfa761c69579d3332c60ad097d35bb3c6ea6d9175e50bc3035d4687384cee1afa0f438bdfce0b1fbb
@@ -1,3 +1,3 @@
1
1
  class Macrocosm
2
- VERSION = "0.1.3"
2
+ VERSION = "0.1.5"
3
3
  end
data/lib/macrocosm.rb CHANGED
@@ -18,7 +18,7 @@ class Macrocosm
18
18
  end
19
19
 
20
20
  def add_node(name, category = nil)
21
- category ||= NoCategory
21
+ category = (category || NoCategory).to_s
22
22
  idx = @categories[category]
23
23
  @nodes << {
24
24
  name: name,
@@ -47,7 +47,7 @@ class Macrocosm
47
47
  JSON.pretty_generate({
48
48
  nodes: @nodes,
49
49
  links: @links,
50
- categories: @categories.keys.map{ |name| {name: name} }
50
+ categories: @categories.keys.sort!.map{ |name| {name: name} }
51
51
  })
52
52
  end
53
53
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: macrocosm
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.3
4
+ version: 0.1.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - ken