mymedia-kvx 0.2.0 → 0.2.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- checksums.yaml.gz.sig +0 -0
- data/lib/mymedia-kvx.rb +11 -4
- data.tar.gz.sig +0 -0
- metadata +1 -1
- metadata.gz.sig +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: dfd302542de5394b130d108785afe9c42e94badf
|
4
|
+
data.tar.gz: a3f18e8cc7e2611e719377dc91451568c8622c78
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 72d545ad82de933c07bb18b4e60c0ce91fa31aa342129652783781cc78dd5a1eda68a1e52c4c51fb05e48ad604719368f14556c9635a4cea7d74b308a8e1372b
|
7
|
+
data.tar.gz: d3fcdff70227e23e42b1f4c61515ca564e271e1c87e16d79b1af31a480f8aaf42a98c3dbc15cdf4376d3f50e014f3ba0a72048909ec02074199fb4cdeabb0307
|
checksums.yaml.gz.sig
CHANGED
Binary file
|
data/lib/mymedia-kvx.rb
CHANGED
@@ -9,8 +9,8 @@ class MyMediaKvx < MyMedia::Base
|
|
9
9
|
|
10
10
|
attr_reader :kvx
|
11
11
|
|
12
|
-
def initialize(
|
13
|
-
|
12
|
+
def initialize(public_type: 'kvx', media_type: public_type,
|
13
|
+
config: nil, ext: '.txt', xsl: nil)
|
14
14
|
|
15
15
|
@public_type = public_type
|
16
16
|
super(media_type: media_type, public_type: public_type, config: config)
|
@@ -21,6 +21,7 @@ class MyMediaKvx < MyMedia::Base
|
|
21
21
|
|
22
22
|
@media_type = media_type
|
23
23
|
@ext = ext
|
24
|
+
@xsl = xsl
|
24
25
|
|
25
26
|
end
|
26
27
|
|
@@ -54,6 +55,7 @@ class MyMediaKvx < MyMedia::Base
|
|
54
55
|
kvx.summary[:original_source] = File.basename(src_path)
|
55
56
|
|
56
57
|
File.write dest_xml, kvx.to_s
|
58
|
+
File.write raw_dest_xml, kvx.to_s
|
57
59
|
|
58
60
|
end
|
59
61
|
|
@@ -106,9 +108,14 @@ class MyMediaKvx < MyMedia::Base
|
|
106
108
|
raw_msg = ("%s %s" % [title, tags]).strip
|
107
109
|
|
108
110
|
kvx.summary[:original_source] = File.basename(src_path)
|
109
|
-
|
111
|
+
|
112
|
+
source = txt_destination[/\/#{@public_type}.*/]
|
113
|
+
relative_path = '/r' + source
|
110
114
|
|
111
|
-
kvx.summary[:
|
115
|
+
kvx.summary[:source_url] = relative_path
|
116
|
+
kvx.summary[:source_file] = File.basename(txt_destination)
|
117
|
+
kvx.summary[:published] = Time.now.strftime("%d-%m-%Y %H:%M")
|
118
|
+
kvx.summary[:xslt] = @xsl unless kvx.summary[:xslt]
|
112
119
|
File.write destination, kvx.to_xml
|
113
120
|
|
114
121
|
[kvx, raw_msg]
|
data.tar.gz.sig
CHANGED
Binary file
|
metadata
CHANGED
metadata.gz.sig
CHANGED
Binary file
|