taglib-simple 0.1.1

Sign up to get free protection for your applications and to get access to all the features.
data/lib/yard_rice.rb ADDED
@@ -0,0 +1,53 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'yard'
4
+
5
+ # @!visibility private
6
+
7
+ module YARD
8
+ # Custom parser that extracts @!yard blocks from C style comments
9
+ class RiceParser < Parser::Ruby::RubyParser
10
+ attr_reader :contents
11
+
12
+ def initialize(source, filename)
13
+ super(extract_ruby_docs(source), filename)
14
+ end
15
+
16
+ private
17
+
18
+ # rubocop:disable Metrics/AbcSize
19
+ def extract_ruby_docs(source)
20
+ ruby_content = []
21
+ in_parse_block = false
22
+
23
+ source.each_line do |line|
24
+ if line =~ %r{/\*\*\s*@!yard\s*(.*?)(\*/)?$}
25
+ # Block comment
26
+ in_parse_block = !::Regexp.last_match(2)
27
+ ruby_content << ::Regexp.last_match(1) if ::Regexp.last_match(1)
28
+ elsif line =~ %r{//\s*@!yard\s*(.*)$}
29
+ # Single line @!yard
30
+ ruby_content << ::Regexp.last_match(1)
31
+ elsif line =~ %r{^\s*\*?\s*(.*?)\s*\*/\s*$}
32
+ # end block comment
33
+ ruby_content << ::Regexp.last_match(1)
34
+ in_parse_block = false
35
+ elsif in_parse_block
36
+ # Strip leading asterisks and spaces if present
37
+ line = line.sub(/^\s*\*?\s*/, '')
38
+ ruby_content << line.chomp
39
+ else
40
+ # Maintain line numbering
41
+ ruby_content << ''
42
+ end
43
+ end
44
+
45
+ ruby_content.join("\n") # .tap { |t| puts "RICEPARSER\n\n#{t}\n\n" }
46
+ end
47
+ # rubocop:enable Metrics/AbcSize
48
+ end
49
+ end
50
+
51
+ # Register our parser for .hpp files
52
+ YARD::Parser::SourceParser.register_parser_type(:hpp, YARD::RiceParser, %w[hpp h])
53
+ YARD::Handlers::Processor.register_handler_namespace(:hpp, YARD::Handlers::Ruby)
metadata ADDED
@@ -0,0 +1,199 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: taglib-simple
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.1.1
5
+ platform: ruby
6
+ authors:
7
+ - Grant Gardner<grant@lastweekend.com.au>
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2025-01-11 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: minitest
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - ">="
18
+ - !ruby/object:Gem::Version
19
+ version: '0'
20
+ type: :development
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - ">="
25
+ - !ruby/object:Gem::Version
26
+ version: '0'
27
+ - !ruby/object:Gem::Dependency
28
+ name: minitest-reporters
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - ">="
32
+ - !ruby/object:Gem::Version
33
+ version: '0'
34
+ type: :development
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - ">="
39
+ - !ruby/object:Gem::Version
40
+ version: '0'
41
+ - !ruby/object:Gem::Dependency
42
+ name: rake-compiler
43
+ requirement: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - ">="
46
+ - !ruby/object:Gem::Version
47
+ version: '0'
48
+ type: :development
49
+ prerelease: false
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - ">="
53
+ - !ruby/object:Gem::Version
54
+ version: '0'
55
+ - !ruby/object:Gem::Dependency
56
+ name: redcarpet
57
+ requirement: !ruby/object:Gem::Requirement
58
+ requirements:
59
+ - - ">="
60
+ - !ruby/object:Gem::Version
61
+ version: '0'
62
+ type: :development
63
+ prerelease: false
64
+ version_requirements: !ruby/object:Gem::Requirement
65
+ requirements:
66
+ - - ">="
67
+ - !ruby/object:Gem::Version
68
+ version: '0'
69
+ - !ruby/object:Gem::Dependency
70
+ name: rubocop
71
+ requirement: !ruby/object:Gem::Requirement
72
+ requirements:
73
+ - - ">="
74
+ - !ruby/object:Gem::Version
75
+ version: '0'
76
+ type: :development
77
+ prerelease: false
78
+ version_requirements: !ruby/object:Gem::Requirement
79
+ requirements:
80
+ - - ">="
81
+ - !ruby/object:Gem::Version
82
+ version: '0'
83
+ - !ruby/object:Gem::Dependency
84
+ name: rubocop-rake
85
+ requirement: !ruby/object:Gem::Requirement
86
+ requirements:
87
+ - - ">="
88
+ - !ruby/object:Gem::Version
89
+ version: '0'
90
+ type: :development
91
+ prerelease: false
92
+ version_requirements: !ruby/object:Gem::Requirement
93
+ requirements:
94
+ - - ">="
95
+ - !ruby/object:Gem::Version
96
+ version: '0'
97
+ - !ruby/object:Gem::Dependency
98
+ name: yard
99
+ requirement: !ruby/object:Gem::Requirement
100
+ requirements:
101
+ - - ">="
102
+ - !ruby/object:Gem::Version
103
+ version: '0'
104
+ type: :development
105
+ prerelease: false
106
+ version_requirements: !ruby/object:Gem::Requirement
107
+ requirements:
108
+ - - ">="
109
+ - !ruby/object:Gem::Version
110
+ version: '0'
111
+ - !ruby/object:Gem::Dependency
112
+ name: base64
113
+ requirement: !ruby/object:Gem::Requirement
114
+ requirements:
115
+ - - ">="
116
+ - !ruby/object:Gem::Version
117
+ version: '0'
118
+ type: :runtime
119
+ prerelease: false
120
+ version_requirements: !ruby/object:Gem::Requirement
121
+ requirements:
122
+ - - ">="
123
+ - !ruby/object:Gem::Version
124
+ version: '0'
125
+ - !ruby/object:Gem::Dependency
126
+ name: rice
127
+ requirement: !ruby/object:Gem::Requirement
128
+ requirements:
129
+ - - ">="
130
+ - !ruby/object:Gem::Version
131
+ version: '0'
132
+ type: :runtime
133
+ prerelease: false
134
+ version_requirements: !ruby/object:Gem::Requirement
135
+ requirements:
136
+ - - ">="
137
+ - !ruby/object:Gem::Version
138
+ version: '0'
139
+ description: 'Ruby binding to TagLib''s simple abstract APIS for reading and writing
140
+ meta-data (tags) of many audio formats
141
+
142
+ '
143
+ email:
144
+ executables:
145
+ - taglib.rb
146
+ extensions:
147
+ - ext/taglib_simple_fileref/extconf.rb
148
+ extra_rdoc_files: []
149
+ files:
150
+ - ".yardopts"
151
+ - INTERNALS.md
152
+ - LICENSE.txt
153
+ - README.md
154
+ - bin/taglib.rb
155
+ - ext/taglib_simple_fileref/FileRef.cpp
156
+ - ext/taglib_simple_fileref/FileRef.hpp
157
+ - ext/taglib_simple_fileref/IOStream.cpp
158
+ - ext/taglib_simple_fileref/IOStream.hpp
159
+ - ext/taglib_simple_fileref/conversions.h
160
+ - ext/taglib_simple_fileref/convert_ruby_to_taglib.cpp
161
+ - ext/taglib_simple_fileref/convert_taglib_to_ruby.cpp
162
+ - ext/taglib_simple_fileref/extconf.rb
163
+ - ext/taglib_simple_fileref/taglib_simple_fileref.cpp
164
+ - ext/taglib_simple_fileref/taglib_wrap.h
165
+ - lib/taglib_simple.rb
166
+ - lib/taglib_simple/audio_properties.rb
167
+ - lib/taglib_simple/audio_tag.rb
168
+ - lib/taglib_simple/error.rb
169
+ - lib/taglib_simple/media_file.rb
170
+ - lib/taglib_simple/types.rb
171
+ - lib/taglib_simple/version.rb
172
+ - lib/yard_rice.rb
173
+ homepage:
174
+ licenses:
175
+ - MIT
176
+ metadata:
177
+ source_code_uri: https://github.com/lwoggardner/taglib-simple
178
+ rubygems_mfa_required: 'true'
179
+ post_install_message:
180
+ rdoc_options: []
181
+ require_paths:
182
+ - lib
183
+ required_ruby_version: !ruby/object:Gem::Requirement
184
+ requirements:
185
+ - - ">="
186
+ - !ruby/object:Gem::Version
187
+ version: '3.2'
188
+ required_rubygems_version: !ruby/object:Gem::Requirement
189
+ requirements:
190
+ - - ">="
191
+ - !ruby/object:Gem::Version
192
+ version: '0'
193
+ requirements:
194
+ - taglib (libtag1-dev in Debian/Ubuntu, taglib-devel in Fedora/RHEL)
195
+ rubygems_version: 3.4.19
196
+ signing_key:
197
+ specification_version: 4
198
+ summary: Ruby binding to C++ TagLib::FileRef interface
199
+ test_files: []