docmago_client 0.2.2 → 0.2.3

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: bf0ba4327176dea161aada8b4c35c2d3e73519b5
4
- data.tar.gz: 454d787c6fdd8ebca061768657c028c95ecc78c7
3
+ metadata.gz: bd6d48c101e5c4d6f4e4bff7e744ca18a1864d5f
4
+ data.tar.gz: 4b720f936170d548c2128bdb72d7736d8ba7b481
5
5
  SHA512:
6
- metadata.gz: b02971a6f6a4d630a60e09037803a23efaf4269a64a3208e79aa96b49b7fbbf45da4f8ff2e16b7dd9036f6993b90993e7c8e462c2e9515835ab66794ed29d49c
7
- data.tar.gz: 638c8ed252c5c9076e7897b2f73482e2961d699a38640270c67150b6a19972b88503de93e6b77b1841505408d878b201efe79ebb6906040c9dd67c8baae6a935
6
+ metadata.gz: f19959e38dd442ed00feec70619929a9a205c39e6b67faffc4dd990bbba152373618a988cf5154db5023d9565c48397c8d33102ee0947ab9763775b0c6d6bbf8
7
+ data.tar.gz: 3c49d6eedc8503318598e23c71493fb245d649a9a950cb0d0c127a4424e31a0d452b40c5fe72e5cd2247474c825a6bbf22713ff61ca20d10145bd4c0a039686a
@@ -13,10 +13,11 @@ module DocmagoClient
13
13
  def create_zip(file_path)
14
14
  Zip::File.open(file_path, Zip::File::CREATE) do |zipfile|
15
15
  zipfile.get_output_stream("document.html") { |f| f.write @html }
16
-
16
+
17
17
  fetch_uris.each do |uri|
18
18
  if File.exists?(resolve_uri(uri))
19
- zipfile.get_output_stream(normalize_uri(uri)) { |f| f.write(File.read(resolve_uri(uri))) }
19
+ path = normalize_uri(uri).start_with?('/') ? normalize_uri(uri)[1..-1] : normalize_uri(uri)
20
+ zipfile.get_output_stream(path) { |f| f.write(File.read(resolve_uri(uri))) }
20
21
  end
21
22
  end
22
23
  end
@@ -1,3 +1,3 @@
1
1
  module DocmagoClient
2
- VERSION = "0.2.2"
2
+ VERSION = "0.2.3"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: docmago_client
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.2
4
+ version: 0.2.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jan Habermann
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2013-09-09 00:00:00.000000000 Z
11
+ date: 2013-09-11 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: httparty