dynarex-blog 0.3.9 → 0.3.10
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/dynarex-blog.rb +3 -4
- metadata +11 -1
data/lib/dynarex-blog.rb
CHANGED
@@ -123,19 +123,19 @@ class DynarexBlog
|
|
123
123
|
result = @hc_result.read(lookup + number.to_s) do
|
124
124
|
|
125
125
|
if (number == 1) and (lookup == '_entry_lookup.xml') and (@index.records.length == 10) then
|
126
|
-
doc = @hc_lookup.
|
126
|
+
doc = @hc_lookup.read(@current_lookup)
|
127
127
|
r = Document.new(File.open(@file_path + 'index.xml','r').read)
|
128
128
|
else
|
129
129
|
doc = @hc_lookup.read(lookup) { Document.new File.open(@file_path + lookup,'r').read }
|
130
130
|
r = select_page(doc, number)
|
131
|
-
@hc_lookup.refresh(
|
131
|
+
@hc_lookup.refresh(@current_lookup) # refresh to maintain @current_lookup in the cache
|
132
132
|
end
|
133
133
|
|
134
134
|
[
|
135
135
|
['total_records', XPath.first(doc.root, 'count(records/entry)')],
|
136
136
|
['page_number', number]
|
137
137
|
].each do |name, text|
|
138
|
-
r.root.elements['summary'].add Element.new(name).add_text(text)
|
138
|
+
r.root.elements['summary'].add Element.new(name).add_text(text.to_s)
|
139
139
|
end
|
140
140
|
|
141
141
|
r
|
@@ -193,7 +193,6 @@ class DynarexBlog
|
|
193
193
|
|
194
194
|
result
|
195
195
|
|
196
|
-
|
197
196
|
end
|
198
197
|
|
199
198
|
def new_blog_file(filename)
|
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.3.
|
4
|
+
version: 0.3.10
|
5
5
|
platform: ruby
|
6
6
|
authors: []
|
7
7
|
|
@@ -32,6 +32,16 @@ dependencies:
|
|
32
32
|
- !ruby/object:Gem::Version
|
33
33
|
version: "0"
|
34
34
|
version:
|
35
|
+
- !ruby/object:Gem::Dependency
|
36
|
+
name: hashcache
|
37
|
+
type: :runtime
|
38
|
+
version_requirement:
|
39
|
+
version_requirements: !ruby/object:Gem::Requirement
|
40
|
+
requirements:
|
41
|
+
- - ">="
|
42
|
+
- !ruby/object:Gem::Version
|
43
|
+
version: "0"
|
44
|
+
version:
|
35
45
|
description:
|
36
46
|
email:
|
37
47
|
executables: []
|