xlsxrb 0.1.12 → 0.1.13

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.
Files changed (153) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +59 -42
  3. data/README.md +26 -22
  4. data/lib/xlsxrb/dsl_helpers.rb +59 -0
  5. data/lib/xlsxrb/elements/workbook.rb +11 -0
  6. data/lib/xlsxrb/ooxml/shared_strings_parser.rb +3 -5
  7. data/lib/xlsxrb/ooxml/workbook_writer.rb +5 -7
  8. data/lib/xlsxrb/ooxml/worksheet_parser.rb +172 -9
  9. data/lib/xlsxrb/ooxml/writer.rb +2 -1
  10. data/lib/xlsxrb/ooxml/xml_builder.rb +20 -0
  11. data/lib/xlsxrb/ooxml/zip_reader.rb +364 -78
  12. data/lib/xlsxrb/ooxml/zip_writer.rb +32 -5
  13. data/lib/xlsxrb/stream_sheet.rb +94 -6
  14. data/lib/xlsxrb/stream_writer.rb +33 -66
  15. data/lib/xlsxrb/version.rb +1 -1
  16. data/lib/xlsxrb/workbook_builder.rb +1 -1
  17. data/lib/xlsxrb/worksheet_builder.rb +3 -31
  18. data/lib/xlsxrb.rb +448 -171
  19. data/sig/generated/xlsxrb/dsl_helpers.rbs +32 -0
  20. data/sig/generated/xlsxrb/elements/workbook.rbs +7 -0
  21. data/sig/generated/xlsxrb/ooxml/shared_strings_parser.rbs +0 -2
  22. data/sig/generated/xlsxrb/ooxml/worksheet_parser.rbs +5 -4
  23. data/sig/generated/xlsxrb/ooxml/xml_builder.rbs +11 -0
  24. data/sig/generated/xlsxrb/ooxml/zip_reader.rbs +96 -8
  25. data/sig/generated/xlsxrb/ooxml/zip_writer.rbs +5 -1
  26. data/sig/generated/xlsxrb/stream_sheet.rbs +43 -3
  27. data/sig/generated/xlsxrb.rbs +18 -11
  28. metadata +6 -146
  29. data/.devcontainer/Dockerfile +0 -65
  30. data/.devcontainer/devcontainer.json +0 -17
  31. data/.gem_rbs_collection/ast/2.4/.rbs_meta.yaml +0 -9
  32. data/.gem_rbs_collection/ast/2.4/ast.rbs +0 -73
  33. data/.gem_rbs_collection/concurrent-ruby/1.1/.rbs_meta.yaml +0 -9
  34. data/.gem_rbs_collection/concurrent-ruby/1.1/array.rbs +0 -4
  35. data/.gem_rbs_collection/concurrent-ruby/1.1/atomic_reference.rbs +0 -16
  36. data/.gem_rbs_collection/concurrent-ruby/1.1/executor.rbs +0 -96
  37. data/.gem_rbs_collection/concurrent-ruby/1.1/hash.rbs +0 -4
  38. data/.gem_rbs_collection/concurrent-ruby/1.1/map.rbs +0 -68
  39. data/.gem_rbs_collection/concurrent-ruby/1.1/promises.rbs +0 -249
  40. data/.gem_rbs_collection/concurrent-ruby/1.1/set.rbs +0 -4
  41. data/.gem_rbs_collection/concurrent-ruby/1.1/timer_task.rbs +0 -47
  42. data/.gem_rbs_collection/concurrent-ruby/1.1/utility/processor_counter.rbs +0 -5
  43. data/.gem_rbs_collection/csv/3.3/.rbs_meta.yaml +0 -9
  44. data/.gem_rbs_collection/csv/3.3/csv.rbs +0 -3871
  45. data/.gem_rbs_collection/csv/3.3/manifest.yaml +0 -3
  46. data/.gem_rbs_collection/lint_roller/1.1/.rbs_meta.yaml +0 -9
  47. data/.gem_rbs_collection/lint_roller/1.1/lint_roller.rbs +0 -48
  48. data/.gem_rbs_collection/listen/3.9/.rbs_meta.yaml +0 -9
  49. data/.gem_rbs_collection/listen/3.9/listen.rbs +0 -25
  50. data/.gem_rbs_collection/listen/3.9/listener.rbs +0 -24
  51. data/.gem_rbs_collection/logger/1.7/.rbs_meta.yaml +0 -9
  52. data/.gem_rbs_collection/logger/1.7/formatter.rbs +0 -45
  53. data/.gem_rbs_collection/logger/1.7/log_device.rbs +0 -100
  54. data/.gem_rbs_collection/logger/1.7/logger.rbs +0 -796
  55. data/.gem_rbs_collection/logger/1.7/manifest.yaml +0 -2
  56. data/.gem_rbs_collection/logger/1.7/period.rbs +0 -17
  57. data/.gem_rbs_collection/logger/1.7/severity.rbs +0 -34
  58. data/.gem_rbs_collection/nokogiri/1.11/.rbs_meta.yaml +0 -9
  59. data/.gem_rbs_collection/nokogiri/1.11/nokogiri.rbs +0 -2332
  60. data/.gem_rbs_collection/nokogiri/1.11/patch.rbs +0 -4
  61. data/.gem_rbs_collection/parallel/1.20/.rbs_meta.yaml +0 -9
  62. data/.gem_rbs_collection/parallel/1.20/parallel.rbs +0 -86
  63. data/.gem_rbs_collection/parser/3.2/.rbs_meta.yaml +0 -9
  64. data/.gem_rbs_collection/parser/3.2/manifest.yaml +0 -7
  65. data/.gem_rbs_collection/parser/3.2/parser.rbs +0 -194
  66. data/.gem_rbs_collection/parser/3.2/polyfill.rbs +0 -4
  67. data/.gem_rbs_collection/rainbow/3.0/.rbs_meta.yaml +0 -9
  68. data/.gem_rbs_collection/rainbow/3.0/global.rbs +0 -7
  69. data/.gem_rbs_collection/rainbow/3.0/presenter.rbs +0 -209
  70. data/.gem_rbs_collection/rainbow/3.0/rainbow.rbs +0 -5
  71. data/.gem_rbs_collection/rake/13.0/.rbs_meta.yaml +0 -9
  72. data/.gem_rbs_collection/rake/13.0/manifest.yaml +0 -2
  73. data/.gem_rbs_collection/rake/13.0/rake.rbs +0 -39
  74. data/.gem_rbs_collection/regexp_parser/2.8/.rbs_meta.yaml +0 -9
  75. data/.gem_rbs_collection/regexp_parser/2.8/regexp_parser.rbs +0 -17
  76. data/.gem_rbs_collection/rubocop/1.57/.rbs_meta.yaml +0 -9
  77. data/.gem_rbs_collection/rubocop/1.57/rubocop.rbs +0 -208
  78. data/.gem_rbs_collection/rubocop-ast/1.46/.rbs_meta.yaml +0 -9
  79. data/.gem_rbs_collection/rubocop-ast/1.46/rubocop-ast.rbs +0 -903
  80. data/.gem_rbs_collection/rubyzip/3.2/.rbs_meta.yaml +0 -9
  81. data/.gem_rbs_collection/rubyzip/3.2/manifest.yaml +0 -8
  82. data/.gem_rbs_collection/rubyzip/3.2/zip/central_directory.rbs +0 -42
  83. data/.gem_rbs_collection/rubyzip/3.2/zip/compressor.rbs +0 -5
  84. data/.gem_rbs_collection/rubyzip/3.2/zip/constants.rbs +0 -47
  85. data/.gem_rbs_collection/rubyzip/3.2/zip/crypto/aes_encryption.rbs +0 -30
  86. data/.gem_rbs_collection/rubyzip/3.2/zip/crypto/decrypted_io.rbs +0 -9
  87. data/.gem_rbs_collection/rubyzip/3.2/zip/crypto/encryption.rbs +0 -7
  88. data/.gem_rbs_collection/rubyzip/3.2/zip/crypto/null_encryption.rbs +0 -19
  89. data/.gem_rbs_collection/rubyzip/3.2/zip/crypto/traditional_encryption.rbs +0 -31
  90. data/.gem_rbs_collection/rubyzip/3.2/zip/decompressor.rbs +0 -18
  91. data/.gem_rbs_collection/rubyzip/3.2/zip/deflater.rbs +0 -12
  92. data/.gem_rbs_collection/rubyzip/3.2/zip/dirtyable.rbs +0 -11
  93. data/.gem_rbs_collection/rubyzip/3.2/zip/dos_time.rbs +0 -13
  94. data/.gem_rbs_collection/rubyzip/3.2/zip/entry.rbs +0 -95
  95. data/.gem_rbs_collection/rubyzip/3.2/zip/entry_set.rbs +0 -31
  96. data/.gem_rbs_collection/rubyzip/3.2/zip/errors.rbs +0 -58
  97. data/.gem_rbs_collection/rubyzip/3.2/zip/extra_field/aes.rbs +0 -24
  98. data/.gem_rbs_collection/rubyzip/3.2/zip/extra_field/generic.rbs +0 -17
  99. data/.gem_rbs_collection/rubyzip/3.2/zip/extra_field/ntfs.rbs +0 -23
  100. data/.gem_rbs_collection/rubyzip/3.2/zip/extra_field/old_unix.rbs +0 -22
  101. data/.gem_rbs_collection/rubyzip/3.2/zip/extra_field/universal_time.rbs +0 -30
  102. data/.gem_rbs_collection/rubyzip/3.2/zip/extra_field/unix.rbs +0 -20
  103. data/.gem_rbs_collection/rubyzip/3.2/zip/extra_field/unknown.rbs +0 -15
  104. data/.gem_rbs_collection/rubyzip/3.2/zip/extra_field/zip64.rbs +0 -26
  105. data/.gem_rbs_collection/rubyzip/3.2/zip/extra_field.rbs +0 -21
  106. data/.gem_rbs_collection/rubyzip/3.2/zip/file.rbs +0 -131
  107. data/.gem_rbs_collection/rubyzip/3.2/zip/file_split.rbs +0 -14
  108. data/.gem_rbs_collection/rubyzip/3.2/zip/filesystem/dir.rbs +0 -33
  109. data/.gem_rbs_collection/rubyzip/3.2/zip/filesystem/directory_iterator.rbs +0 -21
  110. data/.gem_rbs_collection/rubyzip/3.2/zip/filesystem/file.rbs +0 -63
  111. data/.gem_rbs_collection/rubyzip/3.2/zip/filesystem/file_stat.rbs +0 -55
  112. data/.gem_rbs_collection/rubyzip/3.2/zip/filesystem/zip_file_name_mapper.rbs +0 -35
  113. data/.gem_rbs_collection/rubyzip/3.2/zip/filesystem.rbs +0 -7
  114. data/.gem_rbs_collection/rubyzip/3.2/zip/inflater.rbs +0 -10
  115. data/.gem_rbs_collection/rubyzip/3.2/zip/input_stream.rbs +0 -22
  116. data/.gem_rbs_collection/rubyzip/3.2/zip/ioextras/abstract_input_stream.rbs +0 -29
  117. data/.gem_rbs_collection/rubyzip/3.2/zip/ioextras/abstract_output_stream.rbs +0 -17
  118. data/.gem_rbs_collection/rubyzip/3.2/zip/ioextras.rbs +0 -13
  119. data/.gem_rbs_collection/rubyzip/3.2/zip/null_compressor.rbs +0 -10
  120. data/.gem_rbs_collection/rubyzip/3.2/zip/null_decompressor.rbs +0 -8
  121. data/.gem_rbs_collection/rubyzip/3.2/zip/null_input_stream.rbs +0 -6
  122. data/.gem_rbs_collection/rubyzip/3.2/zip/output_stream.rbs +0 -30
  123. data/.gem_rbs_collection/rubyzip/3.2/zip/pass_thru_compressor.rbs +0 -10
  124. data/.gem_rbs_collection/rubyzip/3.2/zip/pass_thru_decompressor.rbs +0 -10
  125. data/.gem_rbs_collection/rubyzip/3.2/zip/streamable_directory.rbs +0 -5
  126. data/.gem_rbs_collection/rubyzip/3.2/zip/streamable_stream.rbs +0 -15
  127. data/.gem_rbs_collection/rubyzip/3.2/zip/version.rbs +0 -3
  128. data/.gem_rbs_collection/rubyzip/3.2/zip.rbs +0 -40
  129. data/.mutant.yml +0 -8
  130. data/Rakefile +0 -633
  131. data/Steepfile +0 -18
  132. data/benchmark.rb +0 -406
  133. data/docs/ARCHITECTURE.md +0 -514
  134. data/docs/DEVELOPMENT.md +0 -137
  135. data/docs/MUTATION_TESTING.md +0 -52
  136. data/docs/PEER_LIBRARIES.md +0 -121
  137. data/docs/QUALITY_ASSURANCE.md +0 -26
  138. data/docs/SPEC_SOURCES.md +0 -48
  139. data/docs/assets/benchmark_results.svg +0 -144
  140. data/docs/assets/lsp_autocompletion.png +0 -0
  141. data/docs/assets/playground_preview.png +0 -0
  142. data/docs/coi-serviceworker.js +0 -82
  143. data/docs/office_thread.js +0 -77
  144. data/docs/preview.html +0 -719
  145. data/docs/visual/VisualGallery.md +0 -4683
  146. data/docs/wasm/ruby.wasm +0 -0
  147. data/docs/wasm/wasm_doc_helper.css +0 -351
  148. data/docs/wasm/wasm_doc_helper.js +0 -439
  149. data/docs/zeta.js +0 -1107
  150. data/rbs_collection.lock.yaml +0 -252
  151. data/rbs_collection.yaml +0 -19
  152. data/vendor/sdk_runner/Program.cs +0 -93
  153. data/vendor/sdk_runner/sdk_runner.csproj +0 -13
@@ -1,208 +0,0 @@
1
- module RuboCop
2
- class CommentConfig
3
- attr_reader processed_source: ProcessedSource
4
-
5
- def initialize: (ProcessedSource processed_source) -> void
6
- end
7
-
8
- class ConfigLoader
9
- def self.debug?: () -> boolish
10
- def self.merge_with_default: (Config, String) -> Config
11
- end
12
-
13
- class Config
14
- def initialize: (?Hash[untyped, untyped] hash, ?String loaded_path) -> void
15
- def for_cop: (String cop) -> Hash[String, untyped]
16
- def for_enabled_cop: (String cop) -> Hash[String, untyped]
17
- end
18
-
19
- class ConfigStore
20
- def options_config=: (String options_config) -> void
21
- end
22
-
23
- module Cop
24
- class Base
25
- extend AST::NodePattern::Macros
26
- include Util
27
- include IgnoredNode
28
- include AutocorrectLogic
29
-
30
- def self.exclude_from_registry: () -> void
31
- def self.department: () -> Symbol
32
- def self.cop_name: () -> String
33
- def self.documentation_url: (?Config?) -> String
34
- def self.requires_gem: (String gem_name, *String version_requirements) -> void
35
-
36
- attr_reader config: Config
37
-
38
- def on_new_investigation: () -> void
39
- def on_investigation_end: () -> void
40
- def on_other_file: () -> void
41
- def add_offense: (untyped node, ?message: String, ?severity: Symbol) -> void
42
- | (untyped node, ?message: String, ?severity: Symbol) { (Corrector) -> void } -> void
43
- def cop_config: () -> Hash[String, untyped]
44
- def target_ruby_version: () -> Float
45
- def processed_source: () -> AST::ProcessedSource
46
- def target_gem_version: (String gem_name) -> Gem::Version
47
- end
48
-
49
- module AutocorrectLogic
50
- def autocorrect?: () -> bool
51
- def autocorrect_with_disable_uncorrectable?: () -> bool
52
- def autocorrect_requested?: () -> bool
53
- def correctable?: () -> bool
54
- def disable_uncorrectable?: () -> bool
55
- def safe_autocorrect?: () -> bool
56
- def autocorrect_enabled?: () -> bool
57
- end
58
-
59
- class Corrector < Parser::Source::TreeRewriter
60
- def replace: ((Parser::Source::Range | RuboCop::AST::Node) range, String content) -> self
61
- def wrap: ((Parser::Source::Range | RuboCop::AST::Node) range, String? insert_before, String? insert_after) -> self
62
- def remove: ((Parser::Source::Range | RuboCop::AST::Node) range) -> self
63
- def insert_before: ((Parser::Source::Range | RuboCop::AST::Node) range, String content) -> self
64
- def insert_after: ((Parser::Source::Range | RuboCop::AST::Node) range, String content) -> self
65
- def remove_preceding: ((Parser::Source::Range | RuboCop::AST::Node) node_or_range, Integer size) -> self
66
- def remove_leading: ((Parser::Source::Range | RuboCop::AST::Node) node_or_range, Integer size) -> self
67
- def remove_trailing: ((Parser::Source::Range | RuboCop::AST::Node) node_or_range, Integer size) -> self
68
- def swap: ((Parser::Source::Range | RuboCop::AST::Node) node_or_range1, (Parser::Source::Range | RuboCop::AST::Node) node_or_range2) -> self
69
- end
70
-
71
- module Alignment
72
- def configured_indentation_width: () -> Integer
73
- def indentation: (RuboCop::AST::Node node) -> String
74
- def offset: (RuboCop::AST::Node node) -> String
75
- end
76
-
77
- module ConfigurableEnforcedStyle
78
- def opposite_style_detected: () -> void
79
- def correct_style_detected: () -> void
80
- def unexpected_style_detected: (Symbol unexpected) -> void
81
- def ambiguous_style_detected: (*Symbol possibilities) -> void
82
- def style_detected: (Symbol detected) -> void
83
- def style: () -> Symbol
84
- end
85
-
86
- module CommentsHelp
87
- def source_range_with_comment: (RuboCop::AST::Node node) -> Parser::Source::Range
88
- def contains_comments?: (RuboCop::AST::Node node) -> bool
89
- def comments_in_range: (RuboCop::AST::Node node) -> Array[Parser::Source::Comment]
90
- def comments_contain_disables?: (RuboCop::AST::Node node, String cop_name) -> bool
91
- end
92
-
93
- class Offense
94
- attr_reader severity: Severity
95
- attr_reader location: Parser::Source::Range
96
- attr_reader message: String
97
- attr_reader cop_name: String
98
-
99
- def line: () -> Integer
100
- def column: () -> Integer
101
- end
102
-
103
- module RangeHelp
104
- def source_range: (Parser::Source::Buffer source_buffer, Integer line_number, Integer column, ?Integer length) -> Parser::Source::Range
105
- def range_between: (Integer start_pos, Integer end_pos) -> Parser::Source::Range
106
- def range_with_surrounding_space: (?Parser::Source::Range range_positional,
107
- ?range: Parser::Source::Range, ?side: Symbol, ?newlines: bool,
108
- ?whitespace: bool, ?continuations: bool,
109
- ?buffer: Parser::Source::Buffer) -> Parser::Source::Range
110
- def range_by_whole_lines: (Parser::Source::Range range,
111
- ?include_final_newline: bool,
112
- ?buffer: Parser::Source::Buffer) -> Parser::Source::Range
113
- end
114
-
115
- class Registry
116
- end
117
-
118
- module IgnoredNode
119
- def ignore_node: (RuboCop::AST::Node node) -> void
120
- def part_of_ignored_node?: (RuboCop::AST::Node node) -> bool
121
- def ignored_node?: (RuboCop::AST::Node node) -> bool
122
- end
123
-
124
- class Severity
125
- type t = :info | :refactor | :convention | :warning | :error | :fatal
126
-
127
- attr_reader name: t
128
-
129
- def code: () -> String
130
- def level: () -> Integer
131
- end
132
-
133
- module TargetRubyVersion
134
- def minimum_target_ruby_version: (Float) -> void
135
- def maximum_target_ruby_version: (Float) -> void
136
- end
137
-
138
- module Util
139
- include PathUtil
140
- def line_range: (RuboCop::AST::Node node) -> ::Range[Integer]
141
- def parentheses?: (RuboCop::AST::Node node) -> bool
142
- def add_parentheses: (RuboCop::AST::Node node, Corrector corrector) -> void
143
- def any_descendant?: (RuboCop::AST::Node node, *Symbol types) -> bool
144
- def args_begin: (RuboCop::AST::Node node) -> Parser::Source::Range
145
- def args_end: (RuboCop::AST::Node node) -> Parser::Source::Range
146
- def begins_its_line?: (Parser::Source::Range range) -> bool
147
- def first_part_of_call_chain: (RuboCop::AST::Node node) -> RuboCop::AST::Node
148
- def double_quotes_required?: (String string) -> bool
149
- def needs_escaping?: (String string) -> bool
150
- def escape_string: (String string) -> String
151
- def to_string_literal: (String string) -> String
152
- def trim_string_interpolation_escape_character: (String str) -> String
153
- def interpret_string_escapes: (String string) -> String
154
- def line: ((RuboCop::AST::Node | Parser::Source::Range) node_or_range) -> Integer
155
- def same_line?: ((RuboCop::AST::Node | Parser::Source::Range) node1, (RuboCop::AST::Node | Parser::Source::Range) node2) -> bool
156
- def indent: (RuboCop::AST::Node node, ?offset: Integer) -> String
157
- end
158
- end
159
-
160
- module Ext
161
- module Comment
162
- def source: () -> String
163
- def source_range: () -> Parser::Source::Range
164
- end
165
-
166
- module ProcessedSource
167
- attr_accessor registry: Cop::Registry
168
- attr_accessor config: Config
169
-
170
- def comment_config: () -> CommentConfig
171
- def disabled_line_ranges: () -> Hash[untyped, untyped]
172
- end
173
- end
174
-
175
- class ProcessedSource = AST::ProcessedSource
176
-
177
- class Runner
178
- type extractorResult = Array[{ offset: Integer, processed_source: ProcessedSource}]?
179
-
180
- interface _Extractor
181
- def call: (ProcessedSource) -> extractorResult
182
- end
183
-
184
- def self.ruby_extractors: () -> Array[_Extractor]
185
- end
186
-
187
- module AutoCorrector
188
- def support_autocorrect?: () -> true
189
- end
190
-
191
- module PathUtil
192
- def smart_path: (String path) -> String
193
- end
194
- end
195
-
196
- # Patch to RuboCop::AST::*
197
-
198
- module RuboCop
199
- module AST
200
- class Comment
201
- include Ext::Comment
202
- end
203
-
204
- class ProcessedSource
205
- include Ext::ProcessedSource
206
- end
207
- end
208
- end
@@ -1,9 +0,0 @@
1
- ---
2
- name: rubocop-ast
3
- version: '1.46'
4
- source:
5
- type: git
6
- name: ruby/gem_rbs_collection
7
- revision: 82762423fc5694b82888ea89a972847cf19838c2
8
- remote: https://github.com/ruby/gem_rbs_collection.git
9
- repo_dir: gems