mymedia-pages 0.5.6 → 0.6.0
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
- checksums.yaml.gz.sig +0 -0
- data/lib/mymedia-pages.rb +77 -0
- data.tar.gz.sig +0 -0
- metadata +8 -8
- metadata.gz.sig +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 0030ca25c7cd349733b8dce14aa5305c277847cf348fbac301802ef781b93d90
|
4
|
+
data.tar.gz: 52da1b2a29051d4a2bc9a5104e1dde3472d0c5421e75404b0a31a6f5b63fd27e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2ffa05fc30a5c69b2c5a8960eacaf3f1cf63d35a4096670033c7fcb297984b0a07d3493b23567dcb2ba63aa52ed6701ad822bbe944c82f758782d6867782b46f
|
7
|
+
data.tar.gz: aa385bdafe4d7d79a42a3d0fe1010d65dd60b6ddf3f3dc23d692e7d852335f91c7fc56537c6dfab930ea066ea64ff45585b880ed0fb96bc1381148ba615c2829
|
checksums.yaml.gz.sig
CHANGED
Binary file
|
data/lib/mymedia-pages.rb
CHANGED
@@ -324,3 +324,80 @@ class MyMediaPages < MyMedia::Base
|
|
324
324
|
.transform(Nokogiri::XML(FileX.read(xmlpath))).to_xhtml(indent: 0)
|
325
325
|
end
|
326
326
|
end
|
327
|
+
|
328
|
+
module PagesTestSetup
|
329
|
+
include RXFileIOModule
|
330
|
+
|
331
|
+
def set_paths(cur_dir, www_dir, media_dir)
|
332
|
+
|
333
|
+
@cur_dir = cur_dir
|
334
|
+
@dir, @www_dir, @media_dir = @public_type, www_dir, media_dir
|
335
|
+
|
336
|
+
end
|
337
|
+
|
338
|
+
def cleanup()
|
339
|
+
|
340
|
+
# remove the previous test files
|
341
|
+
#
|
342
|
+
FileX.rm_r @www_dir + '/*', force: true
|
343
|
+
puts "Previous #{@www_dir} files now removed!"
|
344
|
+
|
345
|
+
FileX.rm_r @media_dir + '/*', force: true
|
346
|
+
puts "Previous #{@media_dir} files now removed!"
|
347
|
+
|
348
|
+
end
|
349
|
+
|
350
|
+
def prep()
|
351
|
+
|
352
|
+
# create the template files and directories
|
353
|
+
#
|
354
|
+
xsl_file = @public_type + '.xsl'
|
355
|
+
xsl_src = File.join(@cur_dir, @public_type + '.xsl')
|
356
|
+
|
357
|
+
www_dest = File.join(@www_dir, 'xsl', xsl_file)
|
358
|
+
r_dest = File.join(@www_dir, 'r', 'xsl', xsl_file)
|
359
|
+
index_dest = File.join(@www_dir, @public_type, 'index-template.html')
|
360
|
+
|
361
|
+
FileX.mkdir_p File.dirname(www_dest)
|
362
|
+
FileX.cp xsl_src, www_dest
|
363
|
+
|
364
|
+
FileX.mkdir_p File.dirname(r_dest)
|
365
|
+
FileX.cp xsl_src, r_dest
|
366
|
+
|
367
|
+
FileX.mkdir_p File.dirname(index_dest)
|
368
|
+
FileX.cp File.join(@cur_dir, 'index-template.html'), index_dest
|
369
|
+
|
370
|
+
FileUtils.mkdir_p File.join(@media_dir, @dir)
|
371
|
+
|
372
|
+
end
|
373
|
+
|
374
|
+
# create the input file
|
375
|
+
#
|
376
|
+
def write(filename: '', content: '')
|
377
|
+
|
378
|
+
File.write File.join(@media_dir, @dir, filename), content
|
379
|
+
puts 'debug: filename: ' + filename.inspect
|
380
|
+
|
381
|
+
end
|
382
|
+
|
383
|
+
end
|
384
|
+
|
385
|
+
|
386
|
+
class PagesTester23 < MyMediaPages
|
387
|
+
|
388
|
+
include PagesTestSetup
|
389
|
+
|
390
|
+
# it is assumed this class will be executed from a test directory
|
391
|
+
# containing the following auxillary files:
|
392
|
+
# - pages.xsl
|
393
|
+
# - index-template.html
|
394
|
+
|
395
|
+
def initialize(config: '', cur_dir: '', www_dir: '/tmp/www',
|
396
|
+
media_dir: '/tmp/media', debug: false)
|
397
|
+
|
398
|
+
super(config: config, debug: debug)
|
399
|
+
set_paths(cur_dir, www_dir, media_dir)
|
400
|
+
|
401
|
+
end
|
402
|
+
|
403
|
+
end
|
data.tar.gz.sig
CHANGED
Binary file
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: mymedia-pages
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.6.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- James Robertson
|
@@ -36,7 +36,7 @@ cert_chain:
|
|
36
36
|
ngT+/RQQOTNmhN3XBRq8VfcVGUw+w5jm4emNDe1pzTATNmzyadOHF0Rokv0B2T4u
|
37
37
|
txMWqrBuLISsGTO4DRqpDmR09caoN5dRM6k=
|
38
38
|
-----END CERTIFICATE-----
|
39
|
-
date: 2023-02-
|
39
|
+
date: 2023-02-25 00:00:00.000000000 Z
|
40
40
|
dependencies:
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
42
|
name: mymedia
|
@@ -47,7 +47,7 @@ dependencies:
|
|
47
47
|
version: '0.5'
|
48
48
|
- - ">="
|
49
49
|
- !ruby/object:Gem::Version
|
50
|
-
version: 0.5.
|
50
|
+
version: 0.5.6
|
51
51
|
type: :runtime
|
52
52
|
prerelease: false
|
53
53
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -57,27 +57,27 @@ dependencies:
|
|
57
57
|
version: '0.5'
|
58
58
|
- - ">="
|
59
59
|
- !ruby/object:Gem::Version
|
60
|
-
version: 0.5.
|
60
|
+
version: 0.5.6
|
61
61
|
- !ruby/object:Gem::Dependency
|
62
62
|
name: martile
|
63
63
|
requirement: !ruby/object:Gem::Requirement
|
64
64
|
requirements:
|
65
65
|
- - "~>"
|
66
66
|
- !ruby/object:Gem::Version
|
67
|
-
version: '1.
|
67
|
+
version: '1.7'
|
68
68
|
- - ">="
|
69
69
|
- !ruby/object:Gem::Version
|
70
|
-
version: 1.
|
70
|
+
version: 1.7.0
|
71
71
|
type: :runtime
|
72
72
|
prerelease: false
|
73
73
|
version_requirements: !ruby/object:Gem::Requirement
|
74
74
|
requirements:
|
75
75
|
- - "~>"
|
76
76
|
- !ruby/object:Gem::Version
|
77
|
-
version: '1.
|
77
|
+
version: '1.7'
|
78
78
|
- - ">="
|
79
79
|
- !ruby/object:Gem::Version
|
80
|
-
version: 1.
|
80
|
+
version: 1.7.0
|
81
81
|
- !ruby/object:Gem::Dependency
|
82
82
|
name: kramdown
|
83
83
|
requirement: !ruby/object:Gem::Requirement
|
metadata.gz.sig
CHANGED
Binary file
|