summaryrefslogtreecommitdiffhomepage
path: root/lib
diff options
context:
space:
mode:
authorrandym <[email protected]>2018-02-06 20:39:41 +0900
committerrandym <[email protected]>2018-02-06 20:39:41 +0900
commita981ae5afffb6b0dfe411820e3df1a44f5cbd63f (patch)
tree78e54619d650326f022867e21f06d5bc95603ff5 /lib
parent64038e6af1db608daae2aad49874071070285eac (diff)
parent5063753d373abe475dd7b170cb2e6d4420ed8ee9 (diff)
downloadcaxlsx-a981ae5afffb6b0dfe411820e3df1a44f5cbd63f.tar.gz
caxlsx-a981ae5afffb6b0dfe411820e3df1a44f5cbd63f.zip
Merge branch 'master' into release-3.0.0
Diffstat (limited to 'lib')
-rw-r--r--lib/axlsx/package.rb6
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/axlsx/package.rb b/lib/axlsx/package.rb
index 8a4f29dc..5b5ea14a 100644
--- a/lib/axlsx/package.rb
+++ b/lib/axlsx/package.rb
@@ -1,4 +1,4 @@
-# encoding: UTF-8
+# encoding: utf-8
module Axlsx
# Package is responsible for managing all the bits and peices that Open Office XML requires to make a valid
# xlsx document including valdation and serialization.
@@ -253,7 +253,9 @@ module Axlsx
parts << {:entry => "xl/#{sheet.rels_pn}", :doc => sheet.relationships, :schema => RELS_XSD}
parts << {:entry => "xl/#{sheet.pn}", :doc => sheet, :schema => SML_XSD}
end
- parts
+
+ # Sort parts for correct MIME detection
+ parts.sort_by { |part| part[:entry] }
end
# Performs xsd validation for a signle document