dslh 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/dslh.rb +2 -1
- data/lib/dslh/version.rb +1 -1
- data/spec/dslh_spec.rb +43 -0
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 630bd38fc0b9b3ea7888b3848ee2d4d624096c1e
|
4
|
+
data.tar.gz: c8ad565a5705c9a5bdf74eb7748139cb4e651198
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3816de53acef37f05ce31531d6238494fb7d12d5672b7eebda49f03914d08f132a2aec6bad558b4868790e2f247c9144142e49ff442f3bfa4731722f62fb10a6
|
7
|
+
data.tar.gz: a71302974f181b5560d94d1787cb38b230aebaf1d30d0733259c2ad203e4fe631509780adc739240863ca7f29b129f93eadc832621f8518f3d3a40abf83dbf72
|
data/lib/dslh.rb
CHANGED
data/lib/dslh/version.rb
CHANGED
data/spec/dslh_spec.rb
CHANGED
@@ -2633,4 +2633,47 @@ glossary do
|
|
2633
2633
|
end
|
2634
2634
|
EOS
|
2635
2635
|
end
|
2636
|
+
|
2637
|
+
it 'should convert hash to dsl (initial_depth: 1)' do
|
2638
|
+
h = {:glossary=>
|
2639
|
+
{:title=>"example glossary",
|
2640
|
+
:GlossDiv=>
|
2641
|
+
{:title=>"S",
|
2642
|
+
:GlossList=>
|
2643
|
+
{:GlossEntry=>
|
2644
|
+
{:ID=>"SGML",
|
2645
|
+
:SortAs=>"SGML",
|
2646
|
+
:GlossTerm=>"Standard Generalized Markup Language",
|
2647
|
+
:Acronym=>"SGML",
|
2648
|
+
:Abbrev=>"ISO 8879:1986",
|
2649
|
+
:GlossDef=>
|
2650
|
+
{:para=>
|
2651
|
+
"A meta-markup language, used to create markup languages such as DocBook.",
|
2652
|
+
:GlossSeeAlso=>["GML", "XML"]},
|
2653
|
+
:GlossSee=>"markup"}}}}}
|
2654
|
+
|
2655
|
+
dsl = Dslh.deval(h, :initial_depth => 1)
|
2656
|
+
expect(dsl).to eq(<<-EOS)
|
2657
|
+
glossary do
|
2658
|
+
title "example glossary"
|
2659
|
+
GlossDiv do
|
2660
|
+
title "S"
|
2661
|
+
GlossList do
|
2662
|
+
GlossEntry do
|
2663
|
+
ID "SGML"
|
2664
|
+
SortAs "SGML"
|
2665
|
+
GlossTerm "Standard Generalized Markup Language"
|
2666
|
+
Acronym "SGML"
|
2667
|
+
Abbrev "ISO 8879:1986"
|
2668
|
+
GlossDef do
|
2669
|
+
para "A meta-markup language, used to create markup languages such as DocBook."
|
2670
|
+
GlossSeeAlso "GML", "XML"
|
2671
|
+
end
|
2672
|
+
GlossSee "markup"
|
2673
|
+
end
|
2674
|
+
end
|
2675
|
+
end
|
2676
|
+
end
|
2677
|
+
EOS
|
2678
|
+
end
|
2636
2679
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: dslh
|
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
|
- Genki Sugawara
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-05-
|
11
|
+
date: 2016-05-22 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|