docurium 0.2.1 → 0.2.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: 71812ecb30297e3f3daff81995d8b13c54649865
4
+ data.tar.gz: cd1dfe89589e3db6b00ef97abb5aa9da622e42cc
5
+ SHA512:
6
+ metadata.gz: eaa4734cffba5765d08f3d4fbdfebb22398664b7f9b8a5e0fb4ee988ef81b8f2576b9776a06210c4ccb43a1b0a1177c2fec1f52bf53c05f0774047440b50b6fe
7
+ data.tar.gz: 05ebf8712479b3c8f7fa87d6d52bb3df9bdff1e062010dd4292ffad5f08c0fcef7c2373df87ba32460ad03411af5273cd95ee77a0340ff9fc31c0f62b23ab3be
data/docurium.gemspec CHANGED
@@ -16,10 +16,10 @@ Gem::Specification.new do |s|
16
16
 
17
17
  s.add_dependency "version_sorter", "~>1.1.0"
18
18
  s.add_dependency "mustache", ">= 0.99.4"
19
- s.add_dependency "rocco", "= 0.7.0"
19
+ s.add_dependency "rocco", "~>0.8"
20
20
  s.add_dependency "gli", "~>2.5"
21
- s.add_dependency "rugged", "~>0.18.b1"
22
- s.add_dependency "redcarpet", "~>2.2.2"
21
+ s.add_dependency "rugged", "~>0.19"
22
+ s.add_dependency "redcarpet", "~>3.0"
23
23
  s.add_development_dependency "bundler", "~>1.0"
24
24
 
25
25
  s.files = `git ls-files`.split("\n")
data/lib/docurium.rb CHANGED
@@ -9,6 +9,10 @@ require 'pp'
9
9
  require 'rugged'
10
10
  require 'redcarpet'
11
11
 
12
+ # Markdown expects the old redcarpet compat API, so let's tell it what
13
+ # to use
14
+ Rocco::Markdown = RedcarpetCompat
15
+
12
16
  class Docurium
13
17
  attr_accessor :branch, :output_dir, :data
14
18
 
@@ -339,7 +343,12 @@ class Docurium
339
343
  when :define, :macro
340
344
  @data[:globals][r[:decl]] ||= {}
341
345
  wanted[:globals].each do |k|
342
- @data[:globals][r[:decl]][k] = r[k] if r.has_key?(k)
346
+ next unless r.has_key? k
347
+ if k == :description || k == :comments
348
+ @data[:globals][r[:decl]][k] = md.render r[k]
349
+ else
350
+ @data[:globals][r[:decl]][k] = r[k]
351
+ end
343
352
  end
344
353
 
345
354
  when :file
@@ -353,7 +362,7 @@ class Docurium
353
362
  r[:decl].each do |n|
354
363
  @data[:globals][n] ||= {
355
364
  :file => r[:file], :line => r[:line],
356
- :value => "", :comments => r[:comments],
365
+ :value => "", :comments => md.render(r[:comments]),
357
366
  }
358
367
  m = /#{Regexp.quote(n)}/.match(r[:body])
359
368
  if m
@@ -363,10 +372,16 @@ class Docurium
363
372
  end
364
373
  end
365
374
  end
366
- else
375
+ else # enum has name
367
376
  @data[:types][r[:name]] ||= {}
368
377
  wanted[:types].each do |k|
369
- @data[:types][r[:name]][k] = r[k] if r.has_key?(k)
378
+ next unless r.has_key? k
379
+ if k == :comments
380
+ contents = md.render r[k]
381
+ else
382
+ contents = r[k]
383
+ end
384
+ @data[:types][r[:name]][k] = contents
370
385
  end
371
386
  end
372
387
 
@@ -374,7 +389,12 @@ class Docurium
374
389
  @data[:types][r[:name]] ||= {}
375
390
  r[:value] ||= r[:name]
376
391
  wanted[:types].each do |k|
377
- @data[:types][r[:name]][k] = r[k] if r.has_key?(k)
392
+ next unless r.has_key? k
393
+ if k == :comments
394
+ @data[:types][r[:name]][k] = md.render r[k]
395
+ else
396
+ @data[:types][r[:name]][k] = r[k]
397
+ end
378
398
  end
379
399
  if r[:type] == :fnptr
380
400
  @data[:types][r[:name]][:type] = "function pointer"
@@ -3,7 +3,7 @@
3
3
  <head>
4
4
  <meta http-equiv="content-type" content="text/html;charset=utf-8">
5
5
  <title>{{ title }}</title>
6
- <link rel="stylesheet" href="https://raw.github.com/jashkenas/docco/c640fda9b0b1d09d2b7236f655b3663dc06c63d6/resources/docco.css">
6
+ <link rel="stylesheet" href="http://jashkenas.github.io/docco/resources/linear/docco.css">
7
7
  <style type="text/css">
8
8
  a.fnlink {text-decoration: none}
9
9
  a.fnlink:hover {text-decoration: underline}
@@ -1,3 +1,3 @@
1
1
  class Docurium
2
- Version = VERSION = '0.2.1'
2
+ Version = VERSION = '0.2.2'
3
3
  end
data/site/js/docurium.js CHANGED
@@ -116,6 +116,7 @@ $(function() {
116
116
  gname = group[0]
117
117
  functions = group[1]
118
118
 
119
+ document.body.scrollTop = document.documentElement.scrollTop = 0;
119
120
  content = $('.content')
120
121
  content.empty()
121
122
 
@@ -301,12 +302,18 @@ $(function() {
301
302
  data = tdata[1]
302
303
 
303
304
  ws.navigate(typeLink(tname))
305
+ document.body.scrollTop = document.documentElement.scrollTop = 0;
304
306
 
305
307
  content = $('.content')
306
308
  content.empty()
307
309
  content.append($('<h1>').addClass('funcTitle').append(tname).append($("<small>").append(data.type)))
308
310
 
309
311
  content.append($('<p>').append(data.value))
312
+
313
+ if(data.comments) {
314
+ content.append($('<div>').append(data.comments))
315
+ }
316
+
310
317
  if(data.block) {
311
318
  content.append($('<pre>').append(data.block))
312
319
  }
@@ -354,6 +361,7 @@ $(function() {
354
361
  gname = group[0]
355
362
 
356
363
  ws.navigate(groupLink(gname));
364
+ document.body.scrollTop = document.documentElement.scrollTop = 0;
357
365
 
358
366
  functions = group[1]
359
367
  $('.content').empty()
metadata CHANGED
@@ -1,8 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: docurium
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.1
5
- prerelease:
4
+ version: 0.2.2
6
5
  platform: ruby
7
6
  authors:
8
7
  - Carlos Martín Nieto
@@ -10,12 +9,11 @@ authors:
10
9
  autorequire:
11
10
  bindir: bin
12
11
  cert_chain: []
13
- date: 2013-07-27 00:00:00.000000000 Z
12
+ date: 2013-11-20 00:00:00.000000000 Z
14
13
  dependencies:
15
14
  - !ruby/object:Gem::Dependency
16
15
  name: version_sorter
17
16
  requirement: !ruby/object:Gem::Requirement
18
- none: false
19
17
  requirements:
20
18
  - - ~>
21
19
  - !ruby/object:Gem::Version
@@ -23,7 +21,6 @@ dependencies:
23
21
  type: :runtime
24
22
  prerelease: false
25
23
  version_requirements: !ruby/object:Gem::Requirement
26
- none: false
27
24
  requirements:
28
25
  - - ~>
29
26
  - !ruby/object:Gem::Version
@@ -31,39 +28,34 @@ dependencies:
31
28
  - !ruby/object:Gem::Dependency
32
29
  name: mustache
33
30
  requirement: !ruby/object:Gem::Requirement
34
- none: false
35
31
  requirements:
36
- - - ! '>='
32
+ - - '>='
37
33
  - !ruby/object:Gem::Version
38
34
  version: 0.99.4
39
35
  type: :runtime
40
36
  prerelease: false
41
37
  version_requirements: !ruby/object:Gem::Requirement
42
- none: false
43
38
  requirements:
44
- - - ! '>='
39
+ - - '>='
45
40
  - !ruby/object:Gem::Version
46
41
  version: 0.99.4
47
42
  - !ruby/object:Gem::Dependency
48
43
  name: rocco
49
44
  requirement: !ruby/object:Gem::Requirement
50
- none: false
51
45
  requirements:
52
- - - '='
46
+ - - ~>
53
47
  - !ruby/object:Gem::Version
54
- version: 0.7.0
48
+ version: '0.8'
55
49
  type: :runtime
56
50
  prerelease: false
57
51
  version_requirements: !ruby/object:Gem::Requirement
58
- none: false
59
52
  requirements:
60
- - - '='
53
+ - - ~>
61
54
  - !ruby/object:Gem::Version
62
- version: 0.7.0
55
+ version: '0.8'
63
56
  - !ruby/object:Gem::Dependency
64
57
  name: gli
65
58
  requirement: !ruby/object:Gem::Requirement
66
- none: false
67
59
  requirements:
68
60
  - - ~>
69
61
  - !ruby/object:Gem::Version
@@ -71,7 +63,6 @@ dependencies:
71
63
  type: :runtime
72
64
  prerelease: false
73
65
  version_requirements: !ruby/object:Gem::Requirement
74
- none: false
75
66
  requirements:
76
67
  - - ~>
77
68
  - !ruby/object:Gem::Version
@@ -79,39 +70,34 @@ dependencies:
79
70
  - !ruby/object:Gem::Dependency
80
71
  name: rugged
81
72
  requirement: !ruby/object:Gem::Requirement
82
- none: false
83
73
  requirements:
84
74
  - - ~>
85
75
  - !ruby/object:Gem::Version
86
- version: 0.18.b1
76
+ version: '0.19'
87
77
  type: :runtime
88
78
  prerelease: false
89
79
  version_requirements: !ruby/object:Gem::Requirement
90
- none: false
91
80
  requirements:
92
81
  - - ~>
93
82
  - !ruby/object:Gem::Version
94
- version: 0.18.b1
83
+ version: '0.19'
95
84
  - !ruby/object:Gem::Dependency
96
85
  name: redcarpet
97
86
  requirement: !ruby/object:Gem::Requirement
98
- none: false
99
87
  requirements:
100
88
  - - ~>
101
89
  - !ruby/object:Gem::Version
102
- version: 2.2.2
90
+ version: '3.0'
103
91
  type: :runtime
104
92
  prerelease: false
105
93
  version_requirements: !ruby/object:Gem::Requirement
106
- none: false
107
94
  requirements:
108
95
  - - ~>
109
96
  - !ruby/object:Gem::Version
110
- version: 2.2.2
97
+ version: '3.0'
111
98
  - !ruby/object:Gem::Dependency
112
99
  name: bundler
113
100
  requirement: !ruby/object:Gem::Requirement
114
- none: false
115
101
  requirements:
116
102
  - - ~>
117
103
  - !ruby/object:Gem::Version
@@ -119,7 +105,6 @@ dependencies:
119
105
  type: :development
120
106
  prerelease: false
121
107
  version_requirements: !ruby/object:Gem::Requirement
122
- none: false
123
108
  requirements:
124
109
  - - ~>
125
110
  - !ruby/object:Gem::Version
@@ -189,26 +174,25 @@ files:
189
174
  - test/test_helper.rb
190
175
  homepage: https://github.com/libgit2/docurium
191
176
  licenses: []
177
+ metadata: {}
192
178
  post_install_message:
193
179
  rdoc_options: []
194
180
  require_paths:
195
181
  - lib
196
182
  required_ruby_version: !ruby/object:Gem::Requirement
197
- none: false
198
183
  requirements:
199
- - - ! '>='
184
+ - - '>='
200
185
  - !ruby/object:Gem::Version
201
186
  version: '0'
202
187
  required_rubygems_version: !ruby/object:Gem::Requirement
203
- none: false
204
188
  requirements:
205
- - - ! '>='
189
+ - - '>='
206
190
  - !ruby/object:Gem::Version
207
191
  version: '0'
208
192
  requirements: []
209
193
  rubyforge_project: docurium
210
- rubygems_version: 1.8.23
194
+ rubygems_version: 2.0.13
211
195
  signing_key:
212
- specification_version: 3
196
+ specification_version: 4
213
197
  summary: A simpler, prettier Doxygen replacement.
214
198
  test_files: []