rggen-markdown 0.12.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA256:
3
+ metadata.gz: e37ce6b6ceb51b9f258addcb2b0e2da82fed605d7f9a6ee6eb10076d787e4a1c
4
+ data.tar.gz: a661202f51802d780d79b509e080000d0bbd54f4eacff83c4166c00143aa1674
5
+ SHA512:
6
+ metadata.gz: bf6363005392ef3383d5eb2f921770a0c496aa313a560c5984e3a0639bcf069522d60e54a9e22880243cf807d301bac2126f6f6c005c657501ab463d686abcbe
7
+ data.tar.gz: 3e07be2a53d52fda1d23fc4c7a3419d42666b7a67e0437de6e2144615d1f64295177e6f338c31cc6fac8fb887ef5d1a74ce0de238faa19eccc64704dfa7453ad
data/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ The MIT License (MIT)
2
+
3
+ Copyright (c) 2019 Taichi Ishitani
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in
13
+ all copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21
+ THE SOFTWARE.
data/README.md ADDED
@@ -0,0 +1,44 @@
1
+ [![Gem Version](https://badge.fury.io/rb/rggen-markdown.svg)](https://badge.fury.io/rb/rggen-markdown)
2
+ [![Build Status](https://travis-ci.com/rggen/rggen-markdown.svg?branch=master)](https://travis-ci.com/rggen/rggen-markdown)
3
+ [![Maintainability](https://api.codeclimate.com/v1/badges/5bbd7d84fefb30c5ee9a/maintainability)](https://codeclimate.com/github/rggen/rggen-markdown/maintainability)
4
+ [![codecov](https://codecov.io/gh/rggen/rggen-markdown/branch/master/graph/badge.svg)](https://codecov.io/gh/rggen/rggen-markdown)
5
+ [![Quality Gate Status](https://sonarcloud.io/api/project_badges/measure?project=rggen_rggen-markdown&metric=alert_status)](https://sonarcloud.io/dashboard?id=rggen_rggen-markdown)
6
+ [![Gitter](https://badges.gitter.im/rggen/rggen.svg)](https://gitter.im/rggen/rggen?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge)
7
+
8
+ # RgGen::Markdown
9
+
10
+ RgGen::Markdown provides features listed below:
11
+
12
+ * Structure of Markdown writer for RgGen
13
+ * Convinience APIs for Markdown code
14
+
15
+ ## Installation
16
+
17
+ During RgGen installation, RgGen::Markdown will also be installed automatically.
18
+
19
+ ```
20
+ $ gem install rggen
21
+ ```
22
+
23
+ If you to install RgGen::Markdown only, use the command below:
24
+
25
+ ```
26
+ $ gem install rggen-markdown
27
+ ```
28
+
29
+ ## Contact
30
+
31
+ Feedbacks, bug reports, questions and etc. are wellcome! You can post them by using following ways:
32
+
33
+ * [GitHub Issue Tracker](https://github.com/rggen/rggen-markdown/issues)
34
+ * [Chat Room](https://gitter.im/rggen/rggen)
35
+ * [Mailing List](https://groups.google.com/d/forum/rggen)
36
+ * [Mail](mailto:rggen@googlegroups.com)
37
+
38
+ ## Copyright & License
39
+
40
+ Copyright © 2019 Taichi Ishitani. RgGen::Markdown is licensed under the [MIT License](https://opensource.org/licenses/MIT), see [LICENSE](LICENSE) for futher details.
41
+
42
+ ## Code of Conduct
43
+
44
+ Everyone interacting in the RgGen project’s codebases, issue trackers, chat rooms and mailing lists is expected to follow the [code of conduct](https://github.com/rggen/rggen-markdown/blob/master/CODE_OF_CONDUCT.md).
@@ -0,0 +1,28 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'ruport'
4
+ require 'ruport/wiki_table_formatter'
5
+
6
+ require_relative 'markdown/version'
7
+ require_relative 'markdown/utility/source_file'
8
+ require_relative 'markdown/utility'
9
+ require_relative 'markdown/component'
10
+ require_relative 'markdown/feature'
11
+ require_relative 'markdown/factories'
12
+
13
+ module RgGen
14
+ module Markdown
15
+ def self.setup(builder)
16
+ builder.output_component_registry(:markdown) do
17
+ register_component [
18
+ :register_map, :register_block, :register, :bit_field
19
+ ] do |category|
20
+ component Component, ComponentFactory
21
+ feature Feature, FeatureFactory if category != :register_map
22
+ end
23
+ end
24
+ end
25
+ end
26
+
27
+ setup :markdown, Markdown
28
+ end
@@ -0,0 +1,8 @@
1
+ # frozen_string_literal: true
2
+
3
+ module RgGen
4
+ module Markdown
5
+ class Component < Core::OutputBase::Component
6
+ end
7
+ end
8
+ end
@@ -0,0 +1,11 @@
1
+ # frozen_string_literal: true
2
+
3
+ module RgGen
4
+ module Markdown
5
+ class ComponentFactory < Core::OutputBase::ComponentFactory
6
+ end
7
+
8
+ class FeatureFactory < Core::OutputBase::FeatureFactory
9
+ end
10
+ end
11
+ end
@@ -0,0 +1,10 @@
1
+ # frozen_string_literal: true
2
+
3
+ module RgGen
4
+ module Markdown
5
+ class Feature < Core::OutputBase::Feature
6
+ include Utility
7
+ template_engine Core::OutputBase::ERBEngine
8
+ end
9
+ end
10
+ end
@@ -0,0 +1,30 @@
1
+ # frozen_string_literal: true
2
+
3
+ module RgGen
4
+ module Markdown
5
+ module Utility
6
+ include Core::Utility::CodeUtility
7
+
8
+ def create_blank_file(path)
9
+ SourceFile.new(path)
10
+ end
11
+
12
+ private
13
+
14
+ def anchor(id)
15
+ "<div id=\"#{id}\"></div>"
16
+ end
17
+
18
+ def anchor_link(text, id)
19
+ "[#{text}](##{id})"
20
+ end
21
+
22
+ def table(column_names, rows)
23
+ table = Ruport.Table(column_names) do |t|
24
+ rows.each { |row| t << row }
25
+ end
26
+ table.to_markdown(io: +'').chomp
27
+ end
28
+ end
29
+ end
30
+ end
@@ -0,0 +1,13 @@
1
+ # frozen_string_literal: true
2
+
3
+ module RgGen
4
+ module Markdown
5
+ module Utility
6
+ class SourceFile < Core::Utility::CodeUtility::SourceFile
7
+ undef_method :include_guard
8
+ undef_method :include_files
9
+ undef_method :include_file
10
+ end
11
+ end
12
+ end
13
+ end
@@ -0,0 +1,7 @@
1
+ # frozen_string_literal: true
2
+
3
+ module RgGen
4
+ module Markdown
5
+ VERSION = '0.12.0'
6
+ end
7
+ end
metadata ADDED
@@ -0,0 +1,100 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: rggen-markdown
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.12.0
5
+ platform: ruby
6
+ authors:
7
+ - Taichi Ishitani
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2019-08-19 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: ruport
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - ">="
18
+ - !ruby/object:Gem::Version
19
+ version: '1.7'
20
+ type: :runtime
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - ">="
25
+ - !ruby/object:Gem::Version
26
+ version: '1.7'
27
+ - !ruby/object:Gem::Dependency
28
+ name: ruport-wiki-table-formatter
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - ">="
32
+ - !ruby/object:Gem::Version
33
+ version: '0.2'
34
+ type: :runtime
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - ">="
39
+ - !ruby/object:Gem::Version
40
+ version: '0.2'
41
+ - !ruby/object:Gem::Dependency
42
+ name: bundler
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
+ description: 'Structure of Markdown writer for RgGen
56
+
57
+ '
58
+ email:
59
+ - rggen@googlegroups.com
60
+ executables: []
61
+ extensions: []
62
+ extra_rdoc_files: []
63
+ files:
64
+ - LICENSE
65
+ - README.md
66
+ - lib/rggen/markdown.rb
67
+ - lib/rggen/markdown/component.rb
68
+ - lib/rggen/markdown/factories.rb
69
+ - lib/rggen/markdown/feature.rb
70
+ - lib/rggen/markdown/utility.rb
71
+ - lib/rggen/markdown/utility/source_file.rb
72
+ - lib/rggen/markdown/version.rb
73
+ homepage: https://github.com/rggen/rggen-markdown
74
+ licenses:
75
+ - MIT
76
+ metadata:
77
+ bug_tracker_uri: https://github.com/rggen/rggen-markdown/issues
78
+ mailing_list_uri: https://groups.google.com/d/forum/rggen
79
+ source_code_uri: https://github.com/rggen/rggen-markdown
80
+ wiki_uri: https://github.com/rggen/rggen/wiki
81
+ post_install_message:
82
+ rdoc_options: []
83
+ require_paths:
84
+ - lib
85
+ required_ruby_version: !ruby/object:Gem::Requirement
86
+ requirements:
87
+ - - ">="
88
+ - !ruby/object:Gem::Version
89
+ version: '2.3'
90
+ required_rubygems_version: !ruby/object:Gem::Requirement
91
+ requirements:
92
+ - - ">="
93
+ - !ruby/object:Gem::Version
94
+ version: '0'
95
+ requirements: []
96
+ rubygems_version: 3.0.3
97
+ signing_key:
98
+ specification_version: 4
99
+ summary: rggen-markdown-0.12.0
100
+ test_files: []