summaryrefslogtreecommitdiffhomepage
path: root/lib/axlsx/package.rb
AgeCommit message (Collapse)Author
2023-06-15Fix redundant self offensesGeremia Taglialatela
No performance gain, this can be seen as a cosmetic change to have shorter lines
2023-06-10Fix safe Style/ColonMethodCall offensesGeremia Taglialatela
Caxlsx is using both `.` and `::`, 220 occurrences vs 280 to invoke methods on `Axlsx` module. This commit standardizes the approach towards `.`, which will also allow shorter lines. Performance is not affected ``` Comparison: Axlsx.validate: 8515252.3 i/s Axlsx::validate: 8512863.7 i/s - same-ish: difference falls within error ```
2023-06-05Merge pull request #274 from tagliala/chore/fix-negated-if-offensesZsolt Kozaroczy
Fix negated if offenses
2023-06-02Fix negated if offensesGeremia Taglialatela
Should also provide a negligible performance improvement, about 3% on Ruby 3.2 and 6% on Ruby 2.6 (M1 Pro)
2023-05-31Remove redundant parenthesesGeremia Taglialatela
- Style/ParenthesesAroundCondition - Style/RedundantParentheses - Style/TernaryParentheses `Style/ParenthesesAroundCondition` may be questionable, but a majority of comparison where not using parentheses, so offenses have been fixed for uniformity across the codebase
2023-05-31Use Ruby 1.9 hash syntaxGeremia Taglialatela
2023-05-24Do not use collection literal in loopsGeremia Taglialatela
Also refactors Page margins to avoid code duplication
2023-05-23Fix Style/LineEndConcatenation offensesGeremia Taglialatela
2023-05-22Merge pull request #243 from tagliala/chore/fix-zero-length-predicate-offensesZsolt Kozaroczy
Fix Style/ZeroLengthPredicate unsafe offenses
2023-05-22Merge pull request #242 from tagliala/chore/fix-minor-safe-offensesZsolt Kozaroczy
Remove minor safe offenses
2023-05-21Improve commentsGeremia Taglialatela
- Use https where possible - Capitalize Excel
2023-05-20Fix Style/ZeroLengthPredicate unsafe offensesGeremia Taglialatela
2023-05-20Remove minor safe offensesGeremia Taglialatela
- Style/RaiseArgs - Style/RedundantCondition - Style/RedundantReturn - Style/SelfAssignment - Style/SoleNestedConditional
2023-05-05Introduce BufferedZipOutputStream to avoid lots of small writes to ↵Paul Kmiec
Zip::OutputStream The BufferedZipOutputStream is a drop-in replacement for Zip::OutputStream similar to ZipCommand.
2023-05-04Enable Style/FrozenStringLiteralComment and autocorrectPaul Kmiec
2023-05-03Fix safe, minor offenses to production codeGeremia Taglialatela
- Lint/RedundantStringCoercion - Style/CommentAnnotation offenses - Style/DefWithParentheses - Style/EvalWithLocation - Style/MethodCallWithoutArgsParentheses - Style/MethodDefParentheses - Style/NilComparison - Style/Semicolon
2023-04-12feat: add support for remote imagesSebastiano
2023-04-12Merge pull request #191 from tagliala/chore/add-rubocopZsolt Kozaroczy
Add RuboCop (and fix simple whitespace, magic comment, trailing comma offenses)
2023-04-10Fix Layout/LeadingCommentSpace offensesGeremia Taglialatela
``` rubocop --only Layout/LeadingCommentSpace -a ```
2023-04-09Fix Layout/ExtraSpacing offensesGeremia Taglialatela
Configure with `AllowBeforeTrailingComments: true`
2023-04-09Fix offenses related to indentation consistencyGeremia Taglialatela
2023-04-09Fix Layout/ArgumentAlignment offensesGeremia Taglialatela
``` rubocop --only Layout/ArgumentAlignment -a ```
2023-04-08Use File.read instead of IO.readGeremia Taglialatela
If argument starts with a pipe character (`'|'`) and the receiver is the `IO` class, a subprocess is created in the same way as `Kernel#open`, and its output is returned. `Kernel#open` may allow unintentional command injection, which is the reason these `IO` methods are a security risk. Consider to use `File.read` to disable the behavior of subprocess invocation. Close #193 Ref: https://www.rubydoc.info/gems/rubocop/RuboCop/Cop/Security/IoMethods
2023-04-08Fix Layout/EmptyLineAfterGuardClause offensesGeremia Taglialatela
``` rubocop --only Layout/EmptyLineAfterGuardClause -a ```
2023-04-08Fix space-related offensesGeremia Taglialatela
- Layout/SpaceAfterComma - Layout/SpaceAroundEqualsInParameterDefault - Layout/SpaceAroundOperators - Layout/SpaceBeforeBlockBraces - Layout/SpaceInsideBlockBraces - Layout/SpaceInsideHashLiteralBraces - Layout/SpaceInsideParens
2023-04-08Fix Layout/MultilineOperationIndentation offensesGeremia Taglialatela
``` rubocop --only Layout/MultilineOperationIndentation -a ```
2023-04-07Fix Layout/SpaceAroundKeyword offensesGeremia Taglialatela
``` rubocop --only Layout/SpaceAroundKeyword -a ```
2023-04-07Fix Layout/FirstArrayElementIndentation offenseGeremia Taglialatela
``` rubocop --only Layout/FirstArrayElementIndentation -a ```
2023-04-06Fix Layout/EmptyLineBetweenDefs offensesGeremia Taglialatela
``` rubocop --only Layout/EmptyLineBetweenDefs -a ```
2023-04-06Fix Layout/EmptyLines offensesGeremia Taglialatela
``` rubocop --only Layout/EmptyLines -a ```
2023-04-06Fix Style/Encoding offensesGeremia Taglialatela
``` rubocop --only Style/Encoding -a ```
2023-04-06Remove Layout/TrailingWhitespace offensesGeremia Taglialatela
``` rubocop --only Layout/TrailingWhitespace -a ```
2022-09-29Merge axlsx_styler gem into caxlsxWeston Ganger
2022-09-26Make sure all examples and docs use binary mode for reading / writing XLSX filesStefan
Not using binary mode can cause encoding issues, see #138.
2022-04-07Sort archive entries for correct MIME detection with file commandytjmt
2021-12-28Return output stream in binmodeDan DeBruler
2020-08-29Update #serialize to accept 3 argumentsRyan Winograd
2020-08-28Update doc to reflect preferred new public interfaceRyan Winograd
2020-08-20Deprecate using `#serialize` with boolean argumentRyan Winograd
Update `Axlsx::Package#serialize` to accept the second argument as a boolean (being deprecated) or an options hash. In order to transition toward using keyword arguments for `Axlsx::Package#serialize`, change the documented method signature to an options hash, while still parsing the second argument as `confirm_valid` if a boolean is provided (in which case we also warn the user that a boolean argument is deprecated).
2020-08-19Add option to `#serialize` with system zip commandRyan Winograd
Add a `:zip_command` option to `Axlsx::Package#serialize` that allows the user to specify an alternate command to use to perform the zip operation on the XLSX file contents. The default zip operation is provided by RubyZip. On large documents users may experience faster zip times using a zip binary. Resolves #55
2020-07-16Binary image read for issue #51Noel Peden
2020-01-28Fix typo in documentation (#42)
2019-12-15Fix typoStefan Daschek
See https://github.com/randym/axlsx/pull/606
2019-12-03Remove unused / stubbed code related to parsing xlsx filesStefan Daschek
This code was added in 3def8f8895 (back in 2011). It has never been worked on further since; `Axlsx::Parser` is not used anywhere in the whole codebase. Currently there are no plans to support parsing xlsx file anytime soon, so let‘s remove all of this dead code.
2019-10-02Cache relationship in Hash rather than in Array.Vladimir Kochnev
Also cacle only ids, not entire instances.
2019-10-02Fix Relationship.instances cache.Vladimir Kochnev
This PR aims to fix several issues with Relationship cache: 1) It's not threadsafe, so I propose to use a TLS variable for this. 2) Memory obtained by cache remains non-freed before the next run of `serialize`. I think it should be freed immediately. 3) Memory should be freed in `ensure` block to prevent memory bloating in case of exception. *There are only two hard things in Computer Science: cache invalidation and naming things.*
2018-02-08chore(coverage) increase coverage and cleanuprandym
2017-05-05Sort archive entries for correct MIME detectionChi-Fung Fan
2015-02-11Fix content types for uppercased image file extensionsEdgars Beigarts
2014-03-17Update to RubyZip 1.1.1Jurriaan Pruis