zerofetcher 0.0.25 → 0.0.26
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 +4 -4
- data/lib/zerofetcher.rb +53 -0
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 23d39b15175b5284d8c9250d26f85cb6157d7498
|
4
|
+
data.tar.gz: 783a940ccf0730ec116a499b3fa3c950a274863d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d3b19da414ba00f834e71bf6e16ae7e889c8db6b6d70bb39f48210b314c365bbb20df08778dac0849221bf18821baa84db3f5859e08ebff21ca5982a7a3ed913
|
7
|
+
data.tar.gz: 07cec3f503302e5654d6e2c9eb15eddc66ab164baebf71ba04700a23e422dc8bb07d1fab211d8e0c700779ad190414ac18ae74f3b83a3e3e4ef6fcde8afc8416
|
data/lib/zerofetcher.rb
CHANGED
@@ -300,6 +300,59 @@ class ZeroFetcher
|
|
300
300
|
end
|
301
301
|
end
|
302
302
|
|
303
|
+
# Properties
|
304
|
+
if data.key?("properties")
|
305
|
+
# Save Json Data
|
306
|
+
File.write(jekyll_path+'/_data/properties.json', JSON.pretty_generate(data['properties']))
|
307
|
+
|
308
|
+
# Make Dir
|
309
|
+
FileUtils::mkdir_p jekyll_path+'/assets/images/properties'
|
310
|
+
|
311
|
+
# Save Collection Info
|
312
|
+
collection_config[ 'properties' ] = {'output' => true}
|
313
|
+
|
314
|
+
# Directory Check
|
315
|
+
collection_path = jekyll_path+'/_properties'
|
316
|
+
FileUtils::mkdir_p collection_path
|
317
|
+
|
318
|
+
# Create files saved array
|
319
|
+
files_saved = Array.new
|
320
|
+
|
321
|
+
# Save Individual Collection Files
|
322
|
+
data['properties'].each do |row|
|
323
|
+
row_data = row.clone;
|
324
|
+
row_data.delete('id')
|
325
|
+
id_key = 'property_id'
|
326
|
+
row_data[ id_key ] = row['id']
|
327
|
+
|
328
|
+
|
329
|
+
# Save Images
|
330
|
+
if row.key?("images")
|
331
|
+
# Directory Check
|
332
|
+
image_path = jekyll_path+'/assets/images/properties/'+row['id']
|
333
|
+
FileUtils::mkdir_p image_path
|
334
|
+
|
335
|
+
# save images
|
336
|
+
row['images'].each_with_index do |image,idx|
|
337
|
+
|
338
|
+
src_image = end_point + '/media/images/properties/'+row['id']+'/' + image['image']
|
339
|
+
|
340
|
+
row_data['images'][idx]['image'] = self.getAndSaveImages(src_image, image_path+'/' + image['image'])
|
341
|
+
end
|
342
|
+
end
|
343
|
+
|
344
|
+
jfile = JekyllFile.new(collection_path, row_data, 'collection')
|
345
|
+
jfile.savePageFile
|
346
|
+
|
347
|
+
files_saved.push( Pathname.new( jfile.getFileName ).basename.to_s )
|
348
|
+
|
349
|
+
self.log('Saving Property File ' + jfile.getFileName)
|
350
|
+
end
|
351
|
+
|
352
|
+
# Clean up unused collection files
|
353
|
+
self.cleanUpFolder(collection_path, files_saved)
|
354
|
+
end
|
355
|
+
|
303
356
|
# Custom Collections
|
304
357
|
if data.key?("collections")
|
305
358
|
data['collections'].each do |collection_type,collection_data|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: zerofetcher
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.26
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Brian Liccardo
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-05-
|
11
|
+
date: 2017-05-24 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description: Fetches content from zero
|
14
14
|
email: brian@d3corp.com
|