nydp-html 0.0.9 → 0.0.10
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/lisp/html-020-help.nydp +13 -9
- data/lib/lisp/tests/help-examples.nydp +15 -0
- data/lib/nydp/html/version.rb +1 -1
- data/nydp-html.gemspec +1 -1
- metadata +10 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: efe785a4c0d281f715707c1e447ee9aff63378b7
|
4
|
+
data.tar.gz: 457052e4687cf673789cbf8ff35b0c1be17a03d4
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7bce3993bf2d5cfa2e63b02084843b7f5df1d456b3733133afbe96614c8f902413ee76d82c1a2441c3d30a4fe0f2801eb357886fbd7fbc84aeb97a0f0342607f
|
7
|
+
data.tar.gz: 4835a0b63d77e3df682fdb70d90a1ec4b4d41cd9768b4044999c1deb122c886f50745778afac9e18cf31c0bed16f27b2143efe4fb8d45e7c78e36ce82843bfcd
|
data/lib/lisp/html-020-help.nydp
CHANGED
@@ -8,20 +8,24 @@
|
|
8
8
|
'object
|
9
9
|
type))))
|
10
10
|
|
11
|
+
(def helpful/keys (thing)
|
12
|
+
; return a string with one line per key
|
13
|
+
; to describe the corresponding value
|
14
|
+
(map (fn (k) (%div.keyhelp
|
15
|
+
(%div.key k)
|
16
|
+
"->"
|
17
|
+
(%div.keyvalue (helpful/type thing.,k))))
|
18
|
+
(hash-keys thing)))
|
19
|
+
|
11
20
|
(def helpful/info (thing)
|
12
|
-
; tries to say something useful about the
|
21
|
+
; tries to say something useful about the thing
|
13
22
|
(if (no thing)
|
14
23
|
"nil"
|
15
24
|
(pair? thing)
|
16
25
|
"list with ~(len thing) elements, first is a ~(helpful/type:car thing)"
|
17
|
-
(
|
18
|
-
|
19
|
-
|
20
|
-
(eq? mytype 'object))
|
21
|
-
(joinstr "\n"
|
22
|
-
(map λk(joinstr " -> " k (helpful/type thing.,k))
|
23
|
-
(hash-keys thing)))
|
24
|
-
"~(inspect thing) is a ~(helpful/type thing)"))))
|
26
|
+
(with (mytype (helpful/type thing)
|
27
|
+
mykeys (hash-keys thing))
|
28
|
+
"~(pp thing) is a ~|mytype|~(helpful/keys thing)")))
|
25
29
|
|
26
30
|
(def helpful/index ()
|
27
31
|
; return the names and types of all the things that are documented
|
@@ -9,6 +9,21 @@
|
|
9
9
|
101))
|
10
10
|
|
11
11
|
(examples-for help
|
12
|
+
("describes its argument when it's a number"
|
13
|
+
help:22
|
14
|
+
"<pre class='helpful'>22 : 22 is a number\n\n</pre>")
|
15
|
+
|
16
|
+
("describes its argument when it's a string"
|
17
|
+
(help "hello world")
|
18
|
+
"<pre class='helpful'>\"hello world\" : \"hello world\" is a string\n\n</pre>")
|
19
|
+
|
20
|
+
("describes its argument when it's a hash"
|
21
|
+
(let paris { a 1 b 2 c { x 9 y 8 z 7 } }
|
22
|
+
(help paris))
|
23
|
+
"<pre class='helpful'>paris : {a=>1, b=>2, c=>{x=>9, y=>8, z=>7}} is a hash<div class='keyhelp'><div class='key'>a</div>-><div class='keyvalue'>number</div></div><div class='keyhelp'><div class='key'>b</div>-><div class='keyvalue'>number</div></div><div class='keyhelp'><div class='key'>c</div>-><div class='keyvalue'>hash</div></div>
|
24
|
+
|
25
|
+
</pre>")
|
26
|
+
|
12
27
|
("returns dox and examples for the given name"
|
13
28
|
help:test-example-f
|
14
29
|
"<pre class='helpful'>Function : test-example-f
|
data/lib/nydp/html/version.rb
CHANGED
data/nydp-html.gemspec
CHANGED
@@ -24,7 +24,7 @@ Gem::Specification.new do |spec|
|
|
24
24
|
spec.add_development_dependency 'rspec', '~> 2.9'
|
25
25
|
spec.add_development_dependency 'rspec_numbering_formatter'
|
26
26
|
|
27
|
-
spec.add_dependency 'nydp', '~> 0.1.
|
27
|
+
spec.add_dependency 'nydp', ['~> 0.1', '>= 0.1.7']
|
28
28
|
spec.add_dependency 'haml', '~> 4.0'
|
29
29
|
spec.add_dependency 'RedCloth'
|
30
30
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: nydp-html
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.10
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Conan Dalton
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-11-
|
11
|
+
date: 2015-11-14 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -72,14 +72,20 @@ dependencies:
|
|
72
72
|
requirements:
|
73
73
|
- - "~>"
|
74
74
|
- !ruby/object:Gem::Version
|
75
|
-
version: 0.1
|
75
|
+
version: '0.1'
|
76
|
+
- - ">="
|
77
|
+
- !ruby/object:Gem::Version
|
78
|
+
version: 0.1.7
|
76
79
|
type: :runtime
|
77
80
|
prerelease: false
|
78
81
|
version_requirements: !ruby/object:Gem::Requirement
|
79
82
|
requirements:
|
80
83
|
- - "~>"
|
81
84
|
- !ruby/object:Gem::Version
|
82
|
-
version: 0.1
|
85
|
+
version: '0.1'
|
86
|
+
- - ">="
|
87
|
+
- !ruby/object:Gem::Version
|
88
|
+
version: 0.1.7
|
83
89
|
- !ruby/object:Gem::Dependency
|
84
90
|
name: haml
|
85
91
|
requirement: !ruby/object:Gem::Requirement
|