| Age | Commit message (Collapse) | Author |
|
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
```
|
|
|
|
|
|
|
|
Also fixes performance offences in non-production code
|
|
|
|
|
|
|
|
- Lint/AmbiguousBlockAssociation
- Lint/AmbiguousOperatorPrecedence
- Lint/EmptyBlock
- Lint/RedundantSplatExpansion
- Lint/RedundantStringCoercion
- Lint/SymbolConversion
- Lint/UnusedBlockArgument
- Style/BlockDelimiters
- Style/CommentAnnotation
- Style/EachForSimpleLoop
- Style/EmptyMethod
- Style/ExpandPathArguments
- Style/FileWrite
- Style/GlobalStdStream (UNSAFE)
- Style/HashEachMethods (UNSAFE)
- Style/NestedParenthesizedCalls
- Style/NilComparison
- Style/NumericLiteralPrefix (manually fixed)
- Style/ParallelAssignment
- Style/PreferredHashMethods (UNSAFE)
- Style/RedundantInterpolation (UNSAFE)
- Style/RedundantParentheses (UNSAFE)
- Style/RegexpLiteral
- Style/RescueStandardError
- Style/SpecialGlobalVars (UNSAFE)
- Style/SymbolProc (UNSAFE)
- Style/ZeroLengthPredicate (UNSAFE)
|
|
```
rubocop --only Layout/LeadingCommentSpace -a
```
|
|
- Layout/SpaceAfterComma
- Layout/SpaceAroundEqualsInParameterDefault
- Layout/SpaceAroundOperators
- Layout/SpaceBeforeBlockBraces
- Layout/SpaceInsideBlockBraces
- Layout/SpaceInsideHashLiteralBraces
- Layout/SpaceInsideParens
|
|
|
|
```
rubocop --only Layout/EmptyLines -a
```
|
|
```
rubocop --only Style/Encoding -a
```
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Mimemagic requires users to download or install additional files.
Rails used Marcel as an abstration layer on this library. Marcel
was updated to another file matching database. Following Rails in
this matter will remove the need for users to do additional work,
just to use caxlsx.
|
|
Deprecate using `#serialize` with boolean argument
|
|
Split examples into separate markdown files, each containing a description, sample code, and a screenshot of the resulting xlsx document.
The script `generate.rb` is provided to actually generate the example documents by executing the sample code contained in the markdown files.
|
|
|
|
|
|
Previously we tested that either rubyzip or shelling out to zip produced
the expected xlsx file, but we never explicitly checked whether rubyzip
or shell zip was used. I noticed that rubyzip always sets a far future
date, whereas `zip` uses today's date. I'm using this as a heuristic to
determine which zip method was used.
|
|
|
|
|
|
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).
|
|
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
|
|
Back in `1e5388ce`, a rescue block was added to `#test_serialization` to
prevent the test from breaking on boxes where the file system is not
writable. This extra protection doesn't seem necessary anymore, so we
are removing the protection in favor of letting the test error in this
case.
|
|
Also cacle only ids, not entire instances.
|
|
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.*
|
|
|
|
|
|
9999 is too big
|
|
|
|
This integrates workbook views and sheet state into serialization.
I also noticed that we were populating defined names during
serialization. While it is good to delay this as late as possible
as there is always the chance that some conditional programming
by the consumer adds, and then removes an autofilter, I am
choosing to risk it at this point for cleaner code.
|
|
|
|
|
|
|
|
|
|
package.
This is necessary to make serialization idempotent (i.e. make sure that Relationship instances are generated with the same IDs everytime the package is serialized). It also fixes a memory leak if Axlsx is used in a long running server process (eg a Rails app).
|
|
in identical zip files.
This improves the possibilites for caching and/or consolidating the generated zip (xlsx) files.
Up to now, serializing the same package at different times resulted in different zip files because of the timestamp in the zip entry metadata.
Note: To generate identical packages (and thus identical zip files), you'll have set Core#created explicitly, eg. with `Package.new(created_at: Time.local(2013, 1, 1)`.
|
|
Can be specified as option to Package#new:
```
Axlsx::Package.new :created_at => time
```
If omitted, the current time at the moment the document is serialized will be used. This change is therefore fully backward compatible.
|
|
|
|
worksheet#outline_rows
worksheet#outline_columns
|
|
This fixes https://github.com/randym/axlsx/issues/150
|
|
Seems the validation crashes on this, and it should not.
Need to dig in and work it out.
|