rggen-markdown 0.20.0 → 0.23.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: b0e5ece9dd3d244671164701253d739352b8a73a5d3536f4e2f96e9754cef2b1
4
- data.tar.gz: 21527d0a2bcb0246ba75dbcc73e5011edbfd7db9918847252c30f36018cde9c9
3
+ metadata.gz: b80423dd457da00191f9c0623535ced32b9cfffc0a4e0234104a97bc34d30c5c
4
+ data.tar.gz: 54fafa2f584f8174d00ebdc7a82f5e6b56d81b55db1e592e094869ad76cecf87
5
5
  SHA512:
6
- metadata.gz: 5873b9da35b8827ac46945bd7220fb9a5a8fcddc9d93347ef65a8436d078a69eec35ca3ea64eefc8907472fc7729c8e3b9c6abebec7253ee0bfd36f55e43c0e1
7
- data.tar.gz: 77b2792a66ea7636ae2b02144dfd4d9e213565972d9e794bf9cbf0728cf6f6359af08acb1d1b1b332a0dff3c24696107399c7d19b6fdd52b95b6b32014e3666f
6
+ metadata.gz: 00d46912a2f44aef4edf37d4e8f4e6deba65f386a1a6b6e0f2985029e3bad879bcadfdc917423d67d1a1cd7905492e0991f21af2ecad2216679054416df7cae8
7
+ data.tar.gz: aafec148dc87ae5c66a463dfed54301258307604dcf9a507f98a7402cc37a5ee4fc8de4f1ef11cb5d51f8a8c93c173180f13011e630d5c8dfa960608dac956fc
data/LICENSE CHANGED
@@ -1,6 +1,6 @@
1
1
  The MIT License (MIT)
2
2
 
3
- Copyright (c) 2019-2021 Taichi Ishitani
3
+ Copyright (c) 2019-2022 Taichi Ishitani
4
4
 
5
5
  Permission is hereby granted, free of charge, to any person obtaining a copy
6
6
  of this software and associated documentation files (the "Software"), to deal
data/README.md CHANGED
@@ -17,7 +17,7 @@ During RgGen installation, RgGen::Markdown will also be installed automatically.
17
17
  $ gem install rggen
18
18
  ```
19
19
 
20
- If you to install RgGen::Markdown only, use the command below:
20
+ If you want to install RgGen::Markdown only, use the command below:
21
21
 
22
22
  ```
23
23
  $ gem install rggen-markdown
@@ -27,14 +27,15 @@ $ gem install rggen-markdown
27
27
 
28
28
  Feedbacks, bug reports, questions and etc. are wellcome! You can post them by using following ways:
29
29
 
30
- * [GitHub Issue Tracker](https://github.com/rggen/rggen-markdown/issues)
30
+ * [GitHub Issue Tracker](https://github.com/rggen/rggen/issues)
31
+ * [GitHub Discussions](https://github.com/rggen/rggen/discussions)
31
32
  * [Chat Room](https://gitter.im/rggen/rggen)
32
33
  * [Mailing List](https://groups.google.com/d/forum/rggen)
33
34
  * [Mail](mailto:rggen@googlegroups.com)
34
35
 
35
36
  ## Copyright & License
36
37
 
37
- Copyright © 2019-2021 Taichi Ishitani. RgGen::Markdown is licensed under the [MIT License](https://opensource.org/licenses/MIT), see [LICENSE](LICENSE) for futher details.
38
+ Copyright © 2019-2022 Taichi Ishitani. RgGen::Markdown is licensed under the [MIT License](https://opensource.org/licenses/MIT), see [LICENSE](LICENSE) for futher details.
38
39
 
39
40
  ## Code of Conduct
40
41
 
@@ -2,7 +2,7 @@
2
2
 
3
3
  module RgGen
4
4
  module Markdown
5
- class ComponentFactory < Core::OutputBase::ComponentFactory
5
+ class ComponentFactory < Core::OutputBase::DocumentComponentFactory
6
6
  end
7
7
 
8
8
  class FeatureFactory < Core::OutputBase::FeatureFactory
@@ -16,9 +16,7 @@ RgGen.define_simple_feature(:register, :markdown) do
16
16
  end
17
17
 
18
18
  def register_printables
19
- register.printables
20
- .reject { |key, _| [:name, :layer_name].include?(key) }
21
- .compact
19
+ register.printables.except(:name, :layer_name).compact
22
20
  end
23
21
 
24
22
  def bit_field_table
@@ -21,13 +21,11 @@ RgGen.define_simple_feature(:register_block, :markdown) do
21
21
  end
22
22
 
23
23
  def register_block_printables
24
- register_block.printables
25
- .reject { |key, _| key == :name }
26
- .compact
24
+ register_block.printables.except(:name).compact
27
25
  end
28
26
 
29
27
  def register_table
30
- table([:name], table_rows)
28
+ table([:name, :offset_address], table_rows)
31
29
  end
32
30
 
33
31
  def table_rows
@@ -37,7 +35,8 @@ RgGen.define_simple_feature(:register_block, :markdown) do
37
35
  def table_row(register)
38
36
  name = register.printables[:layer_name]
39
37
  id = register.anchor_id
40
- [anchor_link(name, id)]
38
+ offset_address = register.printables[:offset_address].join("\n")
39
+ [anchor_link(name, id), offset_address]
41
40
  end
42
41
  end
43
42
  end
@@ -18,11 +18,9 @@ module RgGen
18
18
  private
19
19
 
20
20
  def build_md_lines(labels, table)
21
- lines = []
22
- build_md_line(lines, labels)
23
- build_md_line(lines, alignment_marks(labels.size))
24
- table.each { |row| build_md_line(lines, row) }
25
- lines
21
+ [
22
+ labels, alignment_marks(labels.size), *table
23
+ ].each_with_object([]) { |row, lines| build_md_line(lines, row) }
26
24
  end
27
25
 
28
26
  def build_md_line(lines, row)
@@ -2,6 +2,6 @@
2
2
 
3
3
  module RgGen
4
4
  module Markdown
5
- VERSION = '0.20.0'
5
+ VERSION = '0.23.0'
6
6
  end
7
7
  end
@@ -8,20 +8,18 @@ require_relative 'markdown/component'
8
8
  require_relative 'markdown/feature'
9
9
  require_relative 'markdown/factories'
10
10
 
11
- module RgGen
12
- module Markdown
13
- extend Core::Plugin
11
+ RgGen.setup_plugin :'rggen-markdown' do |plugin|
12
+ plugin.version RgGen::Markdown::VERSION
14
13
 
15
- setup_plugin :'rggen-markdown' do |plugin|
16
- plugin.register_component :markdown do
17
- component Component, ComponentFactory
18
- feature Feature, FeatureFactory
19
- end
20
-
21
- plugin.files [
22
- 'markdown/register/markdown',
23
- 'markdown/register_block/markdown'
24
- ]
25
- end
14
+ plugin.register_component :markdown do
15
+ component RgGen::Markdown::Component,
16
+ RgGen::Markdown::ComponentFactory
17
+ feature RgGen::Markdown::Feature,
18
+ RgGen::Markdown::FeatureFactory
26
19
  end
20
+
21
+ plugin.files [
22
+ 'markdown/register_block/markdown',
23
+ 'markdown/register/markdown'
24
+ ]
27
25
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rggen-markdown
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.20.0
4
+ version: 0.23.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Taichi Ishitani
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-01-20 00:00:00.000000000 Z
11
+ date: 2022-07-05 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -43,7 +43,6 @@ files:
43
43
  - lib/rggen/markdown/register/markdown.rb
44
44
  - lib/rggen/markdown/register_block/markdown.erb
45
45
  - lib/rggen/markdown/register_block/markdown.rb
46
- - lib/rggen/markdown/setup.rb
47
46
  - lib/rggen/markdown/utility.rb
48
47
  - lib/rggen/markdown/utility/source_file.rb
49
48
  - lib/rggen/markdown/utility/table_formatter.rb
@@ -52,8 +51,9 @@ homepage: https://github.com/rggen/rggen-markdown
52
51
  licenses:
53
52
  - MIT
54
53
  metadata:
55
- bug_tracker_uri: https://github.com/rggen/rggen-markdown/issues
54
+ bug_tracker_uri: https://github.com/rggen/rggen/issues
56
55
  mailing_list_uri: https://groups.google.com/d/forum/rggen
56
+ rubygems_mfa_required: 'true'
57
57
  source_code_uri: https://github.com/rggen/rggen-markdown
58
58
  wiki_uri: https://github.com/rggen/rggen/wiki
59
59
  post_install_message:
@@ -64,15 +64,15 @@ required_ruby_version: !ruby/object:Gem::Requirement
64
64
  requirements:
65
65
  - - ">="
66
66
  - !ruby/object:Gem::Version
67
- version: '2.4'
67
+ version: '2.6'
68
68
  required_rubygems_version: !ruby/object:Gem::Requirement
69
69
  requirements:
70
70
  - - ">="
71
71
  - !ruby/object:Gem::Version
72
72
  version: '0'
73
73
  requirements: []
74
- rubygems_version: 3.2.3
74
+ rubygems_version: 3.3.3
75
75
  signing_key:
76
76
  specification_version: 4
77
- summary: rggen-markdown-0.20.0
77
+ summary: rggen-markdown-0.23.0
78
78
  test_files: []
@@ -1,8 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- require 'rggen/markdown'
4
-
5
- RgGen.register_plugin RgGen::Markdown do |builder|
6
- builder.enable :register_block, [:markdown]
7
- builder.enable :register, [:markdown]
8
- end