dynarex-blog 0.1.4 → 0.1.5
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/dynarex-blog.rb +4 -4
- metadata +1 -1
data/lib/dynarex-blog.rb
CHANGED
@@ -175,7 +175,7 @@ class DynarexBlog
|
|
175
175
|
def create_record(record, id, name, type)
|
176
176
|
|
177
177
|
entry_count = @entities.xpath "records/section[summary/name='#{type}']/records/entity/summary[name='#{name}']/count"
|
178
|
-
|
178
|
+
lookup_file = "%s_lookup.xml" % name
|
179
179
|
|
180
180
|
if entry_count.nil?
|
181
181
|
@entities.id('tags').create.entity(name: name, count: '1')
|
@@ -188,7 +188,7 @@ class DynarexBlog
|
|
188
188
|
dynarex_path = @file_path + name + '1.xml'
|
189
189
|
dynarex.save dynarex_path
|
190
190
|
|
191
|
-
new_lookup_file
|
191
|
+
new_lookup_file lookup_file
|
192
192
|
|
193
193
|
end
|
194
194
|
|
@@ -201,9 +201,9 @@ class DynarexBlog
|
|
201
201
|
|
202
202
|
# add the record to lookup
|
203
203
|
|
204
|
-
lookup = Dynarex.new
|
204
|
+
lookup = Dynarex.new @file_path + lookup_file
|
205
205
|
lookup.create id: id, file: entry_file, year: Time.now.strftime("%Y"), month: Time.now.strftime("%m"), uri: record[:title].gsub(/\s/,'-')
|
206
|
-
lookup.save
|
206
|
+
lookup.save @file_path + lookup_file
|
207
207
|
|
208
208
|
# if there is 15 items create a new entries file
|
209
209
|
if dynarex.records.length >= 15 then
|