rex-ole 0.1.1 → 0.1.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: bc27ce56ab010e58bb5b5821e4c5f779c3c12288
4
- data.tar.gz: c187167ec97972ef745fa80ab584308eb8fc1a05
3
+ metadata.gz: beb7b3024bd0d9479efc9e3f31d7ef8d89a9e3a7
4
+ data.tar.gz: 0d69d7cd4fd7058379a490c7db52e077efd3710f
5
5
  SHA512:
6
- metadata.gz: d45001f55683783a74ae1dd58d255f53a3e6338f1558ab0a6eefe7fc23219f418467bcab2dce89ade96cf4aa44974b1ffa33ded873c695daeb9f6db4abee22fe
7
- data.tar.gz: 06931a4acb8fe7ad6816d52a56813501ed4f90c06c3e91724fc14593b759a29054ee954955e78b533a0dc4a4c3cb44a95f8f7a3e69107edb86f9b6c742706c50
6
+ metadata.gz: 351da48d0716cb5537a5787bdd2958e03d40715c5836d71459e1c881e0725ae05c2a9094ba8a91eeafd0a2167007ffbd00267793122fa8839a8c6a4517ee5155
7
+ data.tar.gz: f56ccb022ecf49cfcb0a3550dc46e908f1e51c76e4903da0b60d853d7277e1b4c0168314fa3f726813cad9a381542a6e2d6959789449f68f167b974ca1ee0cf3
Binary file
data.tar.gz.sig CHANGED
Binary file
@@ -51,20 +51,20 @@ class Directory < DirEntry
51
51
  # link item to siblings and/or parent
52
52
  if (parent._sidChild == DIR_NOSTREAM)
53
53
  parent._sidChild = child.sid
54
- dlog("Linking #{child.name} as THE child of #{parent.name} as sid #{child.sid}", 'rex', LEV_3)
54
+ # Linking 'child' as THE child of 'parent', sid is child.sid...
55
55
  else
56
56
  sib = nil
57
57
  parent.each { |el|
58
58
  if (el._sidLeftSib == DIR_NOSTREAM)
59
59
  sib = el
60
60
  el._sidLeftSib = child.sid
61
- dlog("Linking #{child.name} as the LEFT sibling of #{sib.name} as sid #{child.sid}", 'rex', LEV_3)
61
+ # Linking 'child' as the LEFT sibling of 'sib', sid is child.sid...
62
62
  break
63
63
  end
64
64
  if (el._sidRightSib == DIR_NOSTREAM)
65
65
  sib = el
66
66
  el._sidRightSib = child.sid
67
- dlog("Linking #{child.name} as the RIGHT sibling of #{sib.name} as sid #{child.sid}", 'rex', LEV_3)
67
+ # Linking 'child' as the RIGHT sibling of 'sib', sid is child.sid...
68
68
  break
69
69
  end
70
70
  }
@@ -152,7 +152,6 @@ class Directory < DirEntry
152
152
  # recursively add entries to their proper parents :)
153
153
  def populate_children(entries, parent, sid)
154
154
  node = entries[sid]
155
- dlog("populate_children(entries, \"#{parent.name}\", #{sid}) - node: #{node.name}", 'rex', LEV_3)
156
155
  parent << node
157
156
  if (node.type == STGTY_STORAGE) and (node._sidChild != DIR_NOSTREAM)
158
157
  populate_children(entries, node, node._sidChild)
@@ -178,7 +177,6 @@ class Directory < DirEntry
178
177
  # flatten the directory again
179
178
  entries = []
180
179
  flatten_tree(entries, self)
181
- dlog("flattened tree has #{entries.length} entries...", 'rex', LEV_3)
182
180
 
183
181
  # count directory sectors
184
182
  ds_count = entries.length / 4
@@ -198,7 +196,7 @@ class Directory < DirEntry
198
196
  next if (de.type == STGTY_ROOT)
199
197
 
200
198
  dir = de.pack
201
- dlog("writing dir entry #{de.name}", 'rex', LEV_3)
199
+ # Writing dir entry de...
202
200
  sbuf << dir
203
201
 
204
202
  if (sbuf.length == @stg.header.sector_size)
@@ -126,7 +126,7 @@ class Storage
126
126
  stm = Stream.new self
127
127
  stm.name = name
128
128
  parent_stg ||= @directory
129
- dlog("Adding stream #{name} to storage #{parent_stg.name}", 'rex', LEV_3)
129
+ # Adding stream 'name' to storage parent_stg...
130
130
  @directory.link_item(parent_stg, stm)
131
131
  @modified = true
132
132
  stm
@@ -150,7 +150,7 @@ class Storage
150
150
  stg = SubStorage.new self
151
151
  stg.name = name
152
152
  parent_stg ||= @directory
153
- dlog("Adding storage #{name} to storage #{parent_stg.name}", 'rex', LEV_3)
153
+ # Adding storage 'name' to storage parent_stg...
154
154
  @directory.link_item(parent_stg, stg)
155
155
  stg
156
156
  end
@@ -209,7 +209,7 @@ class Storage
209
209
  end
210
210
 
211
211
  def write_sector_raw(sect, sbuf)
212
- dlog("Writing sector 0x%02x" % sect, 'rex', LEV_3)
212
+ # Writing sector 'sect'...
213
213
  @fd.seek((sect + 1) * @header.sector_size, ::IO::SEEK_SET)
214
214
  @fd.write(sbuf)
215
215
  end
@@ -236,7 +236,7 @@ class Storage
236
236
  end
237
237
 
238
238
  def write_mini_sector_raw(sect, sbuf)
239
- dlog("Writing mini sector 0x%02x" % sect, 'rex', LEV_3)
239
+ # Writing mini sector 'sect'...
240
240
  @ministream << sbuf
241
241
  end
242
242
 
@@ -257,7 +257,7 @@ class Storage
257
257
  end
258
258
 
259
259
  def write_stream(stm)
260
- dlog("Writing \"%s\" to regular stream" % stm.name, 'rex', LEV_3)
260
+ # Writing 'stm.name' to regular stream...
261
261
  stm_start = nil
262
262
  prev_sect = nil
263
263
  stm.seek(0)
@@ -270,7 +270,7 @@ class Storage
270
270
  end
271
271
 
272
272
  def write_mini_stream(stm)
273
- dlog("Writing \"%s\" to mini stream" % stm.name, 'rex', LEV_3)
273
+ # Writing 'stm.name' to mini stream...
274
274
  prev_sect = nil
275
275
  stm.seek(0)
276
276
  while (sbuf = stm.read(@header.mini_sector_size))
@@ -306,7 +306,7 @@ class Storage
306
306
  block = left if (block > left)
307
307
 
308
308
  # read it.
309
- dlog("read_data - reading 0x%x bytes" % block, 'rex', LEV_3)
309
+ # Reading 'block' number of bytes...
310
310
  buf = read_sector(sect, block)
311
311
  ret << buf
312
312
  left -= buf.length
@@ -335,7 +335,7 @@ class Storage
335
335
  block = left if (block > left)
336
336
 
337
337
  # read it.
338
- dlog("read_data_mini - reading 0x%x bytes" % block, 'rex', LEV_3)
338
+ # Reading 'block' number of bytes...
339
339
  buf = read_mini_sector(sect, block)
340
340
  ret << buf
341
341
  left -= buf.length
@@ -373,9 +373,9 @@ class Storage
373
373
 
374
374
 
375
375
  def read_mini_sector(sect, len)
376
- dlog("Reading mini sector 0x%x" % sect, 'rex', LEV_3)
376
+ # Reading mini sector 'sect'...
377
377
  off = (@header.mini_sector_size * sect)
378
- dlog("Reading from offset 0x%x of ministream" % off, 'rex', LEV_3)
378
+ # Reading from offset 'off' of ministream...
379
379
  @ministream.seek(off)
380
380
  data = @ministream.read(len)
381
381
  data
@@ -1,5 +1,5 @@
1
1
  module Rex
2
2
  module OLE
3
- VERSION = "0.1.1"
3
+ VERSION = "0.1.2"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rex-ole
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
  - Pearce Barry
@@ -85,7 +85,7 @@ cert_chain:
85
85
  2SpuQH+SWteq3NXkAmFEEqvLJQ4sbptZt8OP8ghL3pVAvZNFmww/YVszSkShSzcg
86
86
  QdihYCSEL2drS2cFd50jBeq71sxUtxbv82DUa2b+
87
87
  -----END CERTIFICATE-----
88
- date: 2016-07-21 00:00:00.000000000 Z
88
+ date: 2016-07-25 00:00:00.000000000 Z
89
89
  dependencies:
90
90
  - !ruby/object:Gem::Dependency
91
91
  name: bundler
metadata.gz.sig CHANGED
Binary file