jsduck 3.4.0 → 3.4.1
Sign up to get free protection for your applications and to get access to all the features.
- data/jsduck.gemspec +1 -1
- data/lib/jsduck/class_formatter.rb +9 -5
- data/lib/jsduck/meta_tag.rb +6 -0
- data/lib/jsduck/options.rb +1 -1
- data/lib/jsduck/tag/deprecated.rb +1 -1
- metadata +43 -19
data/jsduck.gemspec
CHANGED
@@ -2,7 +2,7 @@ Gem::Specification.new do |s|
|
|
2
2
|
s.required_rubygems_version = ">= 1.3.5"
|
3
3
|
|
4
4
|
s.name = 'jsduck'
|
5
|
-
s.version = '3.4.
|
5
|
+
s.version = '3.4.1'
|
6
6
|
s.date = '2012-01-30'
|
7
7
|
s.summary = "Simple JavaScript Duckumentation generator"
|
8
8
|
s.description = "Documentation generator for Sencha JS frameworks"
|
@@ -31,7 +31,7 @@ module JsDuck
|
|
31
31
|
cls[group][type] = members.map {|m| format_member(m) }
|
32
32
|
end
|
33
33
|
end
|
34
|
-
cls[:html_meta] = format_meta_data(cls
|
34
|
+
cls[:html_meta] = format_meta_data(cls)
|
35
35
|
cls
|
36
36
|
end
|
37
37
|
|
@@ -49,7 +49,7 @@ module JsDuck
|
|
49
49
|
m[:params] = m[:params].map {|p| format_item(p, is_css_tag) } if m[:params]
|
50
50
|
m[:return] = format_item(m[:return], is_css_tag) if m[:return]
|
51
51
|
m[:properties] = m[:properties].map {|b| format_item(b, is_css_tag) } if m[:properties]
|
52
|
-
m[:html_meta] = format_meta_data(m
|
52
|
+
m[:html_meta] = format_meta_data(m)
|
53
53
|
m
|
54
54
|
end
|
55
55
|
|
@@ -79,10 +79,14 @@ module JsDuck
|
|
79
79
|
end
|
80
80
|
end
|
81
81
|
|
82
|
-
def format_meta_data(
|
82
|
+
def format_meta_data(context)
|
83
83
|
result = {}
|
84
|
-
|
85
|
-
|
84
|
+
context[:meta].each_pair do |key, value|
|
85
|
+
if value
|
86
|
+
tag = MetaTagRegistry.instance[key]
|
87
|
+
tag.context = context
|
88
|
+
result[key] = tag.to_html(value)
|
89
|
+
end
|
86
90
|
end
|
87
91
|
result
|
88
92
|
end
|
data/lib/jsduck/meta_tag.rb
CHANGED
@@ -26,6 +26,12 @@ module JsDuck
|
|
26
26
|
# existance of the tag.
|
27
27
|
attr_reader :boolean
|
28
28
|
|
29
|
+
# Here the appropriate class or member will be injected,
|
30
|
+
# so the to_value and to_html methods can for produce
|
31
|
+
# different output based on whether the tag is inside class,
|
32
|
+
# method, event, etc.
|
33
|
+
attr_accessor :context
|
34
|
+
|
29
35
|
# It gets passed an array of contents gathered from all meta-tags
|
30
36
|
# of given type. It should return the value to be stored for this
|
31
37
|
# meta-tag at :key. The returned value is also passed to #to_html
|
data/lib/jsduck/options.rb
CHANGED
@@ -23,7 +23,7 @@ module JsDuck::Tag
|
|
23
23
|
v = depr[:version] ? "since " + depr[:version] : ""
|
24
24
|
<<-EOHTML
|
25
25
|
<div class='signature-box deprecated'>
|
26
|
-
<p>This
|
26
|
+
<p>This #{@context[:tagname]} has been <strong>deprecated</strong> #{v}</p>
|
27
27
|
#{format(depr[:text])}
|
28
28
|
</div>
|
29
29
|
EOHTML
|
metadata
CHANGED
@@ -1,7 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: jsduck
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
|
4
|
+
hash: 21
|
5
|
+
prerelease:
|
6
|
+
segments:
|
7
|
+
- 3
|
8
|
+
- 4
|
9
|
+
- 1
|
10
|
+
version: 3.4.1
|
5
11
|
platform: ruby
|
6
12
|
authors:
|
7
13
|
- Rene Saarsoo
|
@@ -10,39 +16,50 @@ autorequire:
|
|
10
16
|
bindir: bin
|
11
17
|
cert_chain: []
|
12
18
|
|
13
|
-
date: 2012-01-30 00:00:00
|
14
|
-
default_executable:
|
19
|
+
date: 2012-01-30 00:00:00 Z
|
15
20
|
dependencies:
|
16
21
|
- !ruby/object:Gem::Dependency
|
17
22
|
name: rdiscount
|
18
|
-
|
19
|
-
|
20
|
-
|
23
|
+
prerelease: false
|
24
|
+
requirement: &id001 !ruby/object:Gem::Requirement
|
25
|
+
none: false
|
21
26
|
requirements:
|
22
27
|
- - ">="
|
23
28
|
- !ruby/object:Gem::Version
|
29
|
+
hash: 3
|
30
|
+
segments:
|
31
|
+
- 0
|
24
32
|
version: "0"
|
25
|
-
|
33
|
+
type: :runtime
|
34
|
+
version_requirements: *id001
|
26
35
|
- !ruby/object:Gem::Dependency
|
27
36
|
name: json
|
28
|
-
|
29
|
-
|
30
|
-
|
37
|
+
prerelease: false
|
38
|
+
requirement: &id002 !ruby/object:Gem::Requirement
|
39
|
+
none: false
|
31
40
|
requirements:
|
32
41
|
- - ">="
|
33
42
|
- !ruby/object:Gem::Version
|
43
|
+
hash: 3
|
44
|
+
segments:
|
45
|
+
- 0
|
34
46
|
version: "0"
|
35
|
-
|
47
|
+
type: :runtime
|
48
|
+
version_requirements: *id002
|
36
49
|
- !ruby/object:Gem::Dependency
|
37
50
|
name: parallel
|
38
|
-
|
39
|
-
|
40
|
-
|
51
|
+
prerelease: false
|
52
|
+
requirement: &id003 !ruby/object:Gem::Requirement
|
53
|
+
none: false
|
41
54
|
requirements:
|
42
55
|
- - ">="
|
43
56
|
- !ruby/object:Gem::Version
|
57
|
+
hash: 3
|
58
|
+
segments:
|
59
|
+
- 0
|
44
60
|
version: "0"
|
45
|
-
|
61
|
+
type: :runtime
|
62
|
+
version_requirements: *id003
|
46
63
|
description: Documentation generator for Sencha JS frameworks
|
47
64
|
email: rene.saarsoo@sencha.com
|
48
65
|
executables:
|
@@ -556,7 +573,6 @@ files:
|
|
556
573
|
- template-min/resources/prettify/prettify.css
|
557
574
|
- template-min/resources/prettify/prettify.js
|
558
575
|
- template-min/template.html
|
559
|
-
has_rdoc: true
|
560
576
|
homepage: https://github.com/senchalabs/jsduck
|
561
577
|
licenses: []
|
562
578
|
|
@@ -566,21 +582,29 @@ rdoc_options: []
|
|
566
582
|
require_paths:
|
567
583
|
- lib
|
568
584
|
required_ruby_version: !ruby/object:Gem::Requirement
|
585
|
+
none: false
|
569
586
|
requirements:
|
570
587
|
- - ">="
|
571
588
|
- !ruby/object:Gem::Version
|
589
|
+
hash: 3
|
590
|
+
segments:
|
591
|
+
- 0
|
572
592
|
version: "0"
|
573
|
-
version:
|
574
593
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
594
|
+
none: false
|
575
595
|
requirements:
|
576
596
|
- - ">="
|
577
597
|
- !ruby/object:Gem::Version
|
598
|
+
hash: 17
|
599
|
+
segments:
|
600
|
+
- 1
|
601
|
+
- 3
|
602
|
+
- 5
|
578
603
|
version: 1.3.5
|
579
|
-
version:
|
580
604
|
requirements: []
|
581
605
|
|
582
606
|
rubyforge_project: jsduck
|
583
|
-
rubygems_version: 1.
|
607
|
+
rubygems_version: 1.8.15
|
584
608
|
signing_key:
|
585
609
|
specification_version: 3
|
586
610
|
summary: Simple JavaScript Duckumentation generator
|