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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 9072543e9d73bf1cba1b4a1d3e8a948986afa2cb
4
- data.tar.gz: 63bcce7beddc22b819218a1d09a66c7d15904c88
3
+ metadata.gz: efe785a4c0d281f715707c1e447ee9aff63378b7
4
+ data.tar.gz: 457052e4687cf673789cbf8ff35b0c1be17a03d4
5
5
  SHA512:
6
- metadata.gz: 5afdc105df1bcb48d34e124a60ab930456df57fef490698d3f12c4265e04153b357a62e73c6d9d826d9d19c1f1ffea2dbe1b166873434e69331a54c0c06aea09
7
- data.tar.gz: 227ad74bf6660d041e1b24e468c294d1222d817e52aeb93415912bbaa390c4b9fd45b335ee0af84f8fb81371d1e60239b331a59de818e443071aef1cdaad69df
6
+ metadata.gz: 7bce3993bf2d5cfa2e63b02084843b7f5df1d456b3733133afbe96614c8f902413ee76d82c1a2441c3d30a4fe0f2801eb357886fbd7fbc84aeb97a0f0342607f
7
+ data.tar.gz: 4835a0b63d77e3df682fdb70d90a1ec4b4d41cd9768b4044999c1deb122c886f50745778afac9e18cf31c0bed16f27b2143efe4fb8d45e7c78e36ce82843bfcd
@@ -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 'thing
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
- (let mytype (helpful/type thing)
18
- (if (or (eq? mytype 'hash)
19
- (eq? mytype 'ruby-hash)
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>-&gt;<div class='keyvalue'>number</div></div><div class='keyhelp'><div class='key'>b</div>-&gt;<div class='keyvalue'>number</div></div><div class='keyhelp'><div class='key'>c</div>-&gt;<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
@@ -1,5 +1,5 @@
1
1
  module Nydp
2
2
  module Html
3
- VERSION = "0.0.9"
3
+ VERSION = "0.0.10"
4
4
  end
5
5
  end
@@ -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.4'
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.9
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-09 00:00:00.000000000 Z
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.4
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.4
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