docurium 0.4.1 → 0.7.0

Sign up to get free protection for your applications and to get access to all the features.
metadata CHANGED
@@ -1,15 +1,15 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: docurium
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.1
4
+ version: 0.7.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Carlos Martín Nieto
8
8
  - Scott Chacon
9
- autorequire:
9
+ autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2015-03-18 00:00:00.000000000 Z
12
+ date: 2022-02-09 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: version_sorter
@@ -17,28 +17,28 @@ dependencies:
17
17
  requirements:
18
18
  - - "~>"
19
19
  - !ruby/object:Gem::Version
20
- version: '1.1'
20
+ version: '2.0'
21
21
  type: :runtime
22
22
  prerelease: false
23
23
  version_requirements: !ruby/object:Gem::Requirement
24
24
  requirements:
25
25
  - - "~>"
26
26
  - !ruby/object:Gem::Version
27
- version: '1.1'
27
+ version: '2.0'
28
28
  - !ruby/object:Gem::Dependency
29
29
  name: mustache
30
30
  requirement: !ruby/object:Gem::Requirement
31
31
  requirements:
32
32
  - - "~>"
33
33
  - !ruby/object:Gem::Version
34
- version: '0.99'
34
+ version: '1.1'
35
35
  type: :runtime
36
36
  prerelease: false
37
37
  version_requirements: !ruby/object:Gem::Requirement
38
38
  requirements:
39
39
  - - "~>"
40
40
  - !ruby/object:Gem::Version
41
- version: '0.99'
41
+ version: '1.1'
42
42
  - !ruby/object:Gem::Dependency
43
43
  name: rocco
44
44
  requirement: !ruby/object:Gem::Requirement
@@ -73,14 +73,14 @@ dependencies:
73
73
  requirements:
74
74
  - - "~>"
75
75
  - !ruby/object:Gem::Version
76
- version: '0.21'
76
+ version: '1.1'
77
77
  type: :runtime
78
78
  prerelease: false
79
79
  version_requirements: !ruby/object:Gem::Requirement
80
80
  requirements:
81
81
  - - "~>"
82
82
  - !ruby/object:Gem::Version
83
- version: '0.21'
83
+ version: '1.1'
84
84
  - !ruby/object:Gem::Dependency
85
85
  name: redcarpet
86
86
  requirement: !ruby/object:Gem::Requirement
@@ -101,42 +101,56 @@ dependencies:
101
101
  requirements:
102
102
  - - "~>"
103
103
  - !ruby/object:Gem::Version
104
- version: '0.2'
104
+ version: '0.5'
105
105
  type: :runtime
106
106
  prerelease: false
107
107
  version_requirements: !ruby/object:Gem::Requirement
108
108
  requirements:
109
109
  - - "~>"
110
110
  - !ruby/object:Gem::Version
111
- version: '0.2'
111
+ version: '0.5'
112
112
  - !ruby/object:Gem::Dependency
113
- name: bundler
113
+ name: parallel
114
114
  requirement: !ruby/object:Gem::Requirement
115
115
  requirements:
116
116
  - - "~>"
117
117
  - !ruby/object:Gem::Version
118
- version: '1.0'
119
- type: :development
118
+ version: '1.20'
119
+ type: :runtime
120
120
  prerelease: false
121
121
  version_requirements: !ruby/object:Gem::Requirement
122
122
  requirements:
123
123
  - - "~>"
124
124
  - !ruby/object:Gem::Version
125
- version: '1.0'
125
+ version: '1.20'
126
126
  - !ruby/object:Gem::Dependency
127
127
  name: rake
128
128
  requirement: !ruby/object:Gem::Requirement
129
129
  requirements:
130
130
  - - "~>"
131
131
  - !ruby/object:Gem::Version
132
- version: '10.1'
132
+ version: '13'
133
+ type: :development
134
+ prerelease: false
135
+ version_requirements: !ruby/object:Gem::Requirement
136
+ requirements:
137
+ - - "~>"
138
+ - !ruby/object:Gem::Version
139
+ version: '13'
140
+ - !ruby/object:Gem::Dependency
141
+ name: minitest
142
+ requirement: !ruby/object:Gem::Requirement
143
+ requirements:
144
+ - - "~>"
145
+ - !ruby/object:Gem::Version
146
+ version: '5.11'
133
147
  type: :development
134
148
  prerelease: false
135
149
  version_requirements: !ruby/object:Gem::Requirement
136
150
  requirements:
137
151
  - - "~>"
138
152
  - !ruby/object:Gem::Version
139
- version: '10.1'
153
+ version: '5.11'
140
154
  description: A simpler, prettier Doxygen replacement.
141
155
  email:
142
156
  - cmn@dwim.me
@@ -146,8 +160,8 @@ executables:
146
160
  extensions: []
147
161
  extra_rdoc_files: []
148
162
  files:
163
+ - ".github/workflows/main.yml"
149
164
  - ".gitignore"
150
- - ".travis.yml"
151
165
  - Gemfile
152
166
  - LICENCE
153
167
  - README.md
@@ -159,6 +173,7 @@ files:
159
173
  - lib/docurium/cli.rb
160
174
  - lib/docurium/cparser.rb
161
175
  - lib/docurium/css.css
176
+ - lib/docurium/debug.rb
162
177
  - lib/docurium/docparser.rb
163
178
  - lib/docurium/layout.mustache
164
179
  - lib/docurium/layout.rb
@@ -183,9 +198,11 @@ files:
183
198
  - site/shared/images/next_step_arrow.gif
184
199
  - site/shared/images/qmark.png
185
200
  - site/shared/js/jquery.js
201
+ - test/docurium_test.rb
186
202
  - test/fixtures/git2/api.docurium
187
203
  - test/fixtures/git2/blob.h
188
204
  - test/fixtures/git2/callback.h
205
+ - test/fixtures/git2/cherrypick.h
189
206
  - test/fixtures/git2/commit.h
190
207
  - test/fixtures/git2/common.h
191
208
  - test/fixtures/git2/errors.h
@@ -204,13 +221,12 @@ files:
204
221
  - test/fixtures/git2/types.h
205
222
  - test/gen_test.rb
206
223
  - test/parser_test.rb
207
- - test/repo_test.rb
208
224
  - test/test_helper.rb
209
225
  homepage: https://github.com/libgit2/docurium
210
226
  licenses:
211
227
  - MIT
212
228
  metadata: {}
213
- post_install_message:
229
+ post_install_message:
214
230
  rdoc_options: []
215
231
  require_paths:
216
232
  - lib
@@ -225,9 +241,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
225
241
  - !ruby/object:Gem::Version
226
242
  version: '0'
227
243
  requirements: []
228
- rubyforge_project:
229
- rubygems_version: 2.2.2
230
- signing_key:
244
+ rubygems_version: 3.2.32
245
+ signing_key:
231
246
  specification_version: 4
232
247
  summary: A simpler, prettier Doxygen replacement.
233
248
  test_files: []
data/.travis.yml DELETED
@@ -1,13 +0,0 @@
1
- language: ruby
2
- rvm:
3
- - ruby-2.0
4
- - ruby-2.1
5
- - ruby-head
6
- - rbx
7
-
8
- env:
9
- - LLVM_CONFIG=llvm-config-3.3
10
-
11
- before_install:
12
- - sudo apt-get update
13
- - sudo apt-get install libclang-3.3-dev llvm-3.3
data/test/repo_test.rb DELETED
@@ -1,136 +0,0 @@
1
- require 'minitest/autorun'
2
- require 'docurium'
3
- require 'rugged'
4
-
5
- class DocuriumTest < MiniTest::Unit::TestCase
6
-
7
- def setup
8
- @dir = Dir.mktmpdir()
9
-
10
- @repo = Rugged::Repository.init_at(@dir, :bare)
11
-
12
- config = <<END
13
- {
14
- "name": "libgit2",
15
- "github": "libgit2/libgit2",
16
- "prefix": "git_",
17
- "branch": "gh-pages"
18
- }
19
- END
20
-
21
- # Create an index as we would have read from the user's repository
22
- index = Rugged::Index.new
23
- headers = File.dirname(__FILE__) + '/fixtures/git2/'
24
- Dir.entries(headers).each do |rel_path|
25
- path = File.join(headers, rel_path)
26
- next if File.directory? path
27
- id = @repo.write(File.read(path), :blob)
28
- index.add(:path => rel_path, :oid => id, :mode => 0100644)
29
- end
30
-
31
- @path = File.dirname(__FILE__) + '/fixtures/git2/api.docurium'
32
- @doc = Docurium.new(@path, @repo)
33
- @data = @doc.parse_headers(index, 'HEAD')
34
- end
35
-
36
- def teardown
37
- FileUtils.remove_entry(@dir)
38
- end
39
-
40
- def test_can_parse_headers
41
- keys = @data.keys.map { |k| k.to_s }.sort
42
- assert_equal ['callbacks', 'files', 'functions', 'globals', 'groups', 'prefix', 'types'], keys
43
- assert_equal 154, @data[:functions].size
44
- end
45
-
46
- def test_can_extract_enum_from_define
47
- skip("this isn't something we do")
48
- assert_equal 41, @data[:globals].size
49
- idxentry = @data[:types].find { |a| a[0] == 'GIT_IDXENTRY' }
50
- assert idxentry
51
- assert_equal 75, idxentry[1][:lineto]
52
- # this one is on the last doc block
53
- assert idxentry[1][:block].include? 'GIT_IDXENTRY_EXTENDED2'
54
- # from an earlier block, should not get overwritten
55
- assert idxentry[1][:block].include? 'GIT_IDXENTRY_UPDATE'
56
- end
57
-
58
- def test_can_extract_structs_and_enums
59
- skip("we don't auto-create enums, so the number is wrong")
60
- assert_equal 25, @data[:types].size
61
- end
62
-
63
- def test_can_find_type_usage
64
- oid = @data[:types].assoc('git_oid')
65
- assert_equal 10, oid[1][:used][:returns].size
66
- assert_equal 39, oid[1][:used][:needs].size
67
- end
68
-
69
- def test_can_parse_normal_functions
70
- func = @data[:functions]['git_blob_rawcontent']
71
- assert_equal "<p>Get a read-only buffer with the raw content of a blob.</p>\n", func[:description]
72
- assert_equal 'const void *', func[:return][:type]
73
- assert_equal ' the pointer; NULL if the blob has no contents', func[:return][:comment]
74
- assert_equal 84, func[:line]
75
- assert_equal 84, func[:lineto]
76
- assert_equal 'blob.h', func[:file]
77
- assert_equal 'git_blob *blob',func[:argline]
78
- assert_equal 'blob', func[:args][0][:name]
79
- assert_equal 'git_blob *', func[:args][0][:type]
80
- assert_equal 'pointer to the blob', func[:args][0][:comment]
81
- end
82
-
83
- def test_can_parse_defined_functions
84
- func = @data[:functions]['git_tree_lookup']
85
- assert_equal 'int', func[:return][:type]
86
- assert_equal ' 0 on success; error code otherwise', func[:return][:comment]
87
- assert_equal 50, func[:line]
88
- assert_equal 'tree.h', func[:file]
89
- assert_equal 'id', func[:args][2][:name]
90
- assert_equal 'const git_oid *', func[:args][2][:type]
91
- assert_equal 'identity of the tree to locate.', func[:args][2][:comment]
92
- end
93
-
94
- def test_can_parse_function_cast_args
95
- func = @data[:functions]['git_reference_listcb']
96
- assert_equal 'int', func[:return][:type]
97
- assert_equal ' 0 on success; error code otherwise', func[:return][:comment]
98
- assert_equal 321, func[:line]
99
- assert_equal 'refs.h', func[:file]
100
- assert_equal 'repo', func[:args][0][:name]
101
- assert_equal 'git_repository *', func[:args][0][:type]
102
- assert_equal 'list_flags', func[:args][1][:name]
103
- assert_equal 'unsigned int', func[:args][1][:type]
104
- assert_equal 'callback', func[:args][2][:name]
105
- assert_equal 'int (*)(const char *, void *)', func[:args][2][:type]
106
- assert_equal 'Function which will be called for every listed ref', func[:args][2][:comment]
107
- assert_equal 8, func[:comments].split("\n").size
108
- end
109
-
110
- def test_can_get_the_full_description_from_multi_liners
111
- func = @data[:functions]['git_commit_create_o']
112
- desc = "<p>Create a new commit in the repository using <code>git_object</code>\n instances as parameters.</p>\n"
113
- assert_equal desc, func[:description]
114
- end
115
-
116
- def test_can_group_functions
117
- assert_equal 15, @data[:groups].size
118
- group, funcs = @data[:groups].first
119
- assert_equal 'blob', group
120
- assert_equal 6, funcs.size
121
- end
122
-
123
- def test_can_store_mutliple_enum_doc_sections
124
- skip("this isn't something we do")
125
- idxentry = @data[:types].find { |a| a[0] == 'GIT_IDXENTRY' }
126
- assert idxentry, "GIT_IDXENTRY did not get automatically created"
127
- assert_equal 2, idxentry[1][:sections].size
128
- end
129
-
130
- def test_can_parse_callback
131
- cb = @data[:callbacks]['git_callback_do_work']
132
- # we can mostly assume that the rest works as it's the same as for the functions
133
- assert_equal 'int', cb[:return][:type]
134
- end
135
-
136
- end