mymedia 0.1.1 → 0.1.2
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.rb +12 -5
- data.tar.gz.sig +0 -0
- metadata +2 -2
- metadata.gz.sig +1 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 4db5a8c0bce783423f76cd26adc1eac237be9392
|
|
4
|
+
data.tar.gz: 7d5384200234b14a87d97e3855cf35bde5ac6a34
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: fadb987db98997118ec2b6678ff190d9bbbbd76cb3e2d83a17967ecb2dd97565de2424ce2a18eb08549a68362690e51f787833922b8bf30182010c4444e595ec
|
|
7
|
+
data.tar.gz: fe5510e9e6cb11428478f69c81cb8d757899c5ce7caf28f73328c79d0a6411f6b9330533c1a05eb6fd688437dce657be7eee266c854f1b5640cec1943f220629
|
checksums.yaml.gz.sig
CHANGED
|
Binary file
|
data/lib/mymedia.rb
CHANGED
|
@@ -16,6 +16,10 @@ module MyMedia
|
|
|
16
16
|
|
|
17
17
|
class Publisher
|
|
18
18
|
|
|
19
|
+
def initialize()
|
|
20
|
+
@index_page = true
|
|
21
|
+
end
|
|
22
|
+
|
|
19
23
|
def publish_dynarex(dynarex_filepath='', \
|
|
20
24
|
record={title: '',url: '', raw_url: ''}, options={})
|
|
21
25
|
|
|
@@ -29,7 +33,8 @@ module MyMedia
|
|
|
29
33
|
|
|
30
34
|
dynarex.create record, opt[:id]
|
|
31
35
|
dynarex.save dynarex_filepath
|
|
32
|
-
|
|
36
|
+
|
|
37
|
+
publish_html(dynarex_filepath) if @index_page == true
|
|
33
38
|
|
|
34
39
|
|
|
35
40
|
if opt[:rss] == true then
|
|
@@ -42,7 +47,8 @@ module MyMedia
|
|
|
42
47
|
end
|
|
43
48
|
|
|
44
49
|
def publish_html(filepath)
|
|
45
|
-
|
|
50
|
+
|
|
51
|
+
return unless @index_page == true
|
|
46
52
|
path2 = File.dirname(filepath)
|
|
47
53
|
|
|
48
54
|
dataisland = DataIsland.new(path2 + '/index-template.html')
|
|
@@ -76,6 +82,7 @@ module MyMedia
|
|
|
76
82
|
'item(title:title,link:url)'
|
|
77
83
|
@ext = ext
|
|
78
84
|
@rss = false
|
|
85
|
+
|
|
79
86
|
Dir.chdir @home
|
|
80
87
|
end
|
|
81
88
|
|
|
@@ -106,8 +113,8 @@ module MyMedia
|
|
|
106
113
|
private
|
|
107
114
|
|
|
108
115
|
def file_publish(src_path, raw_msg='')
|
|
109
|
-
|
|
110
|
-
raise @logger.debug("source file not found") unless File.exists? src_path
|
|
116
|
+
|
|
117
|
+
raise @logger.debug("source file '%s' not found" % src_path) unless File.exists? src_path
|
|
111
118
|
ext = File.extname(src_path)
|
|
112
119
|
@target_ext ||= ext
|
|
113
120
|
|
|
@@ -262,4 +269,4 @@ module MyMedia
|
|
|
262
269
|
|
|
263
270
|
end
|
|
264
271
|
end
|
|
265
|
-
end
|
|
272
|
+
end
|
data.tar.gz.sig
CHANGED
|
Binary file
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: mymedia
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.1.
|
|
4
|
+
version: 0.1.2
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- James Robertson
|
|
@@ -31,7 +31,7 @@ cert_chain:
|
|
|
31
31
|
AuNecS7mQYhxSVKaAH8VGzIiea4rbybYlYRsOllgAkcmCFTQW39mbtmMPtDedk1N
|
|
32
32
|
ZQNJr93cq0mf/Q==
|
|
33
33
|
-----END CERTIFICATE-----
|
|
34
|
-
date: 2014-10-
|
|
34
|
+
date: 2014-10-14 00:00:00.000000000 Z
|
|
35
35
|
dependencies:
|
|
36
36
|
- !ruby/object:Gem::Dependency
|
|
37
37
|
name: dynarex
|
metadata.gz.sig
CHANGED
|
@@ -1,2 +1 @@
|
|
|
1
|
-
|
|
2
|
-
d
|
|
1
|
+
9/@�8�i���H���oH�@헀�ʬ7}���<�z�7�|h@�v���O�yÎ?��{N�z�n�[�Vu��N��[�@����ȍ���$�h��|�Q/��'�n$ z;d�5�/���ă>�����FV�}@��\5���,5hsLaA����7Ϩ~gU:2Hs�c�<���H'9�?�fG�!j�2fJ��}�S���P��F��i��Cѻ��l~dY�����*]$��g�ݘ�eM�
|