mymedia-pages 0.1.10 → 0.1.11

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 97a5fb21abe6ce38a3c9b87d4bea745cfbde6fc8
4
- data.tar.gz: fdc9c040bfc4c0636106c72a0d60d0a238c260bd
3
+ metadata.gz: 2083d3ecbfabed426b2a51c6c14e6f316d58d764
4
+ data.tar.gz: 6ae058366224dc5ccd950b5815d5f5c9ea04ec22
5
5
  SHA512:
6
- metadata.gz: f1899d92364397153a4f119e2e2181282313bb37907b6dc3935a453d24e88178971d48f71861565f2b3edfa6e818b89ad73d47394676850a1c7e1810c842be63
7
- data.tar.gz: dc421afb14749f8966f569ab0843ad2dae1fd635785e5b932ed0056acc1d6814230c91d815a344391c8d4b7f8347cc01d981f02220e9a88b945168de33387e67
6
+ metadata.gz: ebf0ff08940ec12b24f9d3a6fadfbf92400e29d840b3759d37728d9383b31e4929a17c9b1863eb4701be7efbad5f9c8a45ad59fbb72fa2001d653938bb1efdba
7
+ data.tar.gz: 7f1d8692143bc2e4404899d152e2eb1025e629cec54cab8f5a54c50bbede523c70639520a8c10363848012ccbb332928afa37caf99cbf150d06aa84d233d6afb
checksums.yaml.gz.sig CHANGED
Binary file
data.tar.gz.sig CHANGED
Binary file
data/lib/mymedia-pages.rb CHANGED
@@ -39,6 +39,7 @@ class MyMediaPages < MyMedia::Base
39
39
  dest_xml = destination.sub(/html$/,'xml')
40
40
  x_destination = raw_destination.sub(/\.html$/,ext)
41
41
 
42
+
42
43
  FileUtils.cp src_path, x_destination
43
44
 
44
45
  source = x_destination[/\/r\/#{@public_type}.*/]
@@ -55,10 +56,16 @@ class MyMediaPages < MyMedia::Base
55
56
 
56
57
  File.write destination, xsltproc("#{@home}/#{@www}/xsl/#{@public_type}.xsl", dest_xml)
57
58
 
58
- html_filename = File.basename(src_path).sub(/(?:md|txt)$/,'html')
59
+ html_filename = basename(@media_src, src_path).sub(/(?:md|txt)$/,'html')
60
+
61
+
59
62
  xml_filename = html_filename.sub(/html$/,'xml')
60
- FileUtils.cp destination, File.dirname(destination) + html_filename
61
- FileUtils.cp dest_xml, File.dirname(dest_xml) + xml_filename
63
+
64
+ FileUtils.mkdir_p File.dirname(File.join(File.dirname(destination), html_filename))
65
+ FileUtils.cp destination, File.join(File.dirname(destination), html_filename)
66
+
67
+ FileUtils.mkdir_p File.dirname( File.join(File.dirname(dest_xml), xml_filename))
68
+ FileUtils.cp dest_xml, File.join(File.dirname(dest_xml), xml_filename)
62
69
 
63
70
  tags = doc.root.xpath('summary/tags/tag/text()')
64
71
  raw_msg = "%s %s" % [doc.root.text('summary/title'),
@@ -67,7 +74,12 @@ class MyMediaPages < MyMedia::Base
67
74
 
68
75
  else
69
76
 
70
- html_filename = File.basename(src_path)
77
+ html_filename = basename(@media_src, src_path)
78
+
79
+ if html_filename =~ /\// then
80
+ FileUtils.mkdir_p File.dirname(html_filename)
81
+ end
82
+
71
83
  FileUtils.cp src_path, destination
72
84
  FileUtils.cp src_path, raw_destination
73
85
 
@@ -76,6 +88,7 @@ class MyMediaPages < MyMedia::Base
76
88
 
77
89
  if not File.basename(src_path)[/[a-z]\d{6}T\d{4}\.(?:html|md|txt)/] then
78
90
 
91
+ FileUtils.mkdir_p File.dirname(@home + "/#{@public_type}/" + html_filename)
79
92
  FileUtils.cp destination, @home + "/#{@public_type}/" + html_filename
80
93
 
81
94
  if xml_filename then
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.1.10
4
+ version: 0.1.11
5
5
  platform: ruby
6
6
  authors:
7
7
  - James Robertson
@@ -31,7 +31,7 @@ cert_chain:
31
31
  R8qQYTqUH5uyN1gXTamDXNnXrSWNIRgATqBFU0Rk4ia1O2X6/oMnJctbKR+A3n78
32
32
  zZLvJwXE0u524g==
33
33
  -----END CERTIFICATE-----
34
- date: 2015-05-09 00:00:00.000000000 Z
34
+ date: 2015-08-15 00:00:00.000000000 Z
35
35
  dependencies:
36
36
  - !ruby/object:Gem::Dependency
37
37
  name: mymedia
@@ -100,7 +100,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
100
100
  version: '0'
101
101
  requirements: []
102
102
  rubyforge_project:
103
- rubygems_version: 2.4.6
103
+ rubygems_version: 2.4.8
104
104
  signing_key:
105
105
  specification_version: 4
106
106
  summary: A MyMedia gem to publish a basic web page
metadata.gz.sig CHANGED
Binary file