omnidocx 0.1.1 → 0.1.2

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
  SHA1:
3
- metadata.gz: ac6b7499a7340d31a4bc8d7cf0822f3689a5ef46
4
- data.tar.gz: 8a64bde3a4d61307644152be2015d72906937add
3
+ metadata.gz: 02ce6fcf18a2fed5a782906ddc88086c2a17f468
4
+ data.tar.gz: 0d9bce7af42f738c9bccadfc50b1c23e5db96f2e
5
5
  SHA512:
6
- metadata.gz: 1c2444a9ac325b474d8a1ebe2a36f203674b71fc4ae81b98b050b49d0612809e9f52752a5c414bd0e7020ca29b2f9bbf1e084b4baeb99675b4bd33eb8aa091c7
7
- data.tar.gz: 07e6663af64dc943711996c7298e4a6151e50740fcd178e673227418ce129213348aaa377e910f179f5ad228a663bf004d4c816bed31588d3c00a03fc6e3cfae
6
+ metadata.gz: 2850e26980b32160c47a1ebee5878b3160b91408263d6a07bcccb12d68ec7a9546405f839b076bd73ab6092519f87a7152ea7b381c8671b53d86a6c7ddc53c5d
7
+ data.tar.gz: 2e6eab4c57522baafdfa9a6496ac81799bbbc334e34f324f9c9b6355143b22b462c52be2137498dd180c917bdb3883d3294afe55897fc406c16f9d62b869b420
@@ -94,11 +94,12 @@ module Omnidocx
94
94
 
95
95
  #if image path is readable
96
96
  if !data.empty?
97
- extension = File.extname(img[:path]).split(".").last
97
+ img_url_no_params = img[:path].gsub(/\?.*/,'')
98
+ extension = File.extname(img_url_no_params).split(".").last
98
99
 
99
100
  if !media_content_type_hash.keys.include?(extension.split(".").last)
100
101
  #making an entry for a new media type
101
- media_content_type_hash["#{extension}"] = MIME::Types.type_for(img[:path])[0].to_s
102
+ media_content_type_hash["#{extension}"] = MIME::Types.type_for(img_url_no_params)[0].to_s
102
103
  end
103
104
 
104
105
  zos.put_next_entry("word/media/image#{cnt}.#{extension}")
@@ -535,5 +536,6 @@ module Omnidocx
535
536
  #moving the temporary docx file to the final_path specified by the user
536
537
  FileUtils.mv(temp_file.path, final_path)
537
538
  end
539
+
538
540
  end
539
541
  end
@@ -1,3 +1,3 @@
1
1
  module Omnidocx
2
- VERSION = "0.1.1"
2
+ VERSION = "0.1.2"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: omnidocx
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Parth Nagori
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2017-02-07 00:00:00.000000000 Z
11
+ date: 2017-03-07 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: nokogiri