simple-hd-graph 0.3.2 → 0.3.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/simple-hd-graph/node.rb +3 -1
- data/lib/simple-hd-graph/parser.rb +1 -1
- data/lib/simple-hd-graph/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1ea0d42c32d8bd212ceaa306f4374b267c4f4158fdf9e9110e0c8f323ca6b729
|
4
|
+
data.tar.gz: cfad1721bc08d8a441093db14df1cff803520618d74c7a4087ab563d6878bfca
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 05ded502c1824bcccf27573c9a19135e176067b4db942999b4d53fc58b422043a9c339307bbb99f1af7ea91f91fac6ec1deb702b6d9221e04e47f2a4eae21bff
|
7
|
+
data.tar.gz: d48005f46fca5e2f5cf836c676fce9d2b43d4a4be2bc4af1e1bed8e06518daac7e1dd89e7146f861fca2d804ae286ef7486765e87e46aab41638d05867dc1f3f
|
data/lib/simple-hd-graph/node.rb
CHANGED
@@ -13,6 +13,8 @@ module SimpleHdGraph
|
|
13
13
|
end
|
14
14
|
end
|
15
15
|
|
16
|
+
CAMELIZE_SEPARATOR = ' ,.、。'
|
17
|
+
|
16
18
|
def initialize
|
17
19
|
@inflector = Dry::Inflector.new
|
18
20
|
end
|
@@ -50,7 +52,7 @@ module SimpleHdGraph
|
|
50
52
|
# @return [String]
|
51
53
|
#
|
52
54
|
def camelize(str)
|
53
|
-
@inflector.camelize(@inflector.underscore(str.gsub(/
|
55
|
+
@inflector.camelize(@inflector.underscore(str.gsub(/[#{CAMELIZE_SEPARATOR}]/, '_')))
|
54
56
|
end
|
55
57
|
end
|
56
58
|
end
|
@@ -83,7 +83,7 @@ module SimpleHdGraph
|
|
83
83
|
contexts.map { |context|
|
84
84
|
if context.depends
|
85
85
|
regularized = context.depends.map { |dependee|
|
86
|
-
{ context.id => dependee }
|
86
|
+
{ context.id => contexts.select { |c| c.alias == dependee }.first.id }
|
87
87
|
}
|
88
88
|
context.set_depends regularized
|
89
89
|
else
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: simple-hd-graph
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.3.
|
4
|
+
version: 0.3.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- wtnabe
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-04-
|
11
|
+
date: 2021-04-19 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: dry-inflector
|