dynarex-blog 0.6.2 → 0.6.3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (2) hide show
  1. data/lib/dynarex-blog.rb +4 -3
  2. metadata +1 -1
data/lib/dynarex-blog.rb CHANGED
@@ -159,8 +159,7 @@ class DynarexBlog
159
159
  doc = @hc_lookup.read(lookup)
160
160
  r = Document.new(File.open(@file_path + 'index.xml','r').read)
161
161
  else
162
- doc = @hc_lookup.read(lookup) { Document.new File.open(@file_path + lookup,'r').read }
163
- r = select_page(doc, number)
162
+ r = select_page(lookup, number)
164
163
  @current_lookup = '_entry_lookup.xml'
165
164
 
166
165
  # refresh to maintain _entry_lookup in the cache
@@ -239,9 +238,10 @@ class DynarexBlog
239
238
  @hc_lookup.delete(lookup_filename)
240
239
  end
241
240
 
242
- def select_page(doc, number)
241
+ def select_page(lookup, number)
243
242
 
244
243
  #doc = Document.new File.open(@file_path + lookup,'r').read
244
+ doc = @hc_lookup.read(lookup) { Document.new File.open(@file_path + lookup,'r').read }
245
245
 
246
246
  x1 = (number - 1) * 10
247
247
  x2 = x1 + 9
@@ -335,6 +335,7 @@ class DynarexBlog
335
335
  node_records.parent.delete node_records
336
336
  records = Element.new 'records'
337
337
 
338
+ @hc-lookup.delete('_entry_lookup.xml')
338
339
  new_records = select_page('_entry_lookup.xml', 1)
339
340
  new_records.each {|record| records.add record}
340
341
  doc.root.add records
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: dynarex-blog
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.6.2
4
+ version: 0.6.3
5
5
  platform: ruby
6
6
  authors: []
7
7