mymedia 0.2.1 → 0.2.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 +7 -5
- 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: 4c40e63a9ed7b0b2f08ed6afbbb85bd9c15f946c
|
|
4
|
+
data.tar.gz: 08be28c0b16a0d465e98308fe65a62318f55da67
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 7cdd17fb192fa6cf63f1aaf096dcc9d74f37895c2d295444165175bc5d02d99298dd9af2fe0a2993755141ca09a85eb89aafbe8223042e63917cdf33fd7c4c92
|
|
7
|
+
data.tar.gz: 98a0d313e7d6d3bd1bf07f8f50db5651fbdc4e5a479b432eb9bd128b54993986be44c15477b092f2307886e362f31e2129cf190607d6f4259f0d2dca20f3f431
|
checksums.yaml.gz.sig
CHANGED
|
Binary file
|
data/lib/mymedia.rb
CHANGED
|
@@ -21,8 +21,9 @@ module MyMedia
|
|
|
21
21
|
|
|
22
22
|
class Publisher
|
|
23
23
|
|
|
24
|
-
def initialize()
|
|
24
|
+
def initialize(opts={})
|
|
25
25
|
@index_page = true
|
|
26
|
+
@opts = opts
|
|
26
27
|
end
|
|
27
28
|
|
|
28
29
|
def publish_dynarex(dynarex_filepath='', \
|
|
@@ -60,7 +61,7 @@ module MyMedia
|
|
|
60
61
|
raise MyMediaPublisherException, \
|
|
61
62
|
"template path: #{template_path} not found" unless \
|
|
62
63
|
File.exists?(template_path)
|
|
63
|
-
dataisland = DataIsland.new(template_path)
|
|
64
|
+
dataisland = DataIsland.new(template_path, @opts)
|
|
64
65
|
File.open(path2 + '/index.html','w'){|f| f.write dataisland.html_doc.xml pretty: true}
|
|
65
66
|
end
|
|
66
67
|
|
|
@@ -132,7 +133,7 @@ module MyMedia
|
|
|
132
133
|
private
|
|
133
134
|
|
|
134
135
|
def file_publish(src_path, raw_msg='')
|
|
135
|
-
|
|
136
|
+
|
|
136
137
|
raise @logger.debug("source file '%s' not found" % src_path) unless File.exists? src_path
|
|
137
138
|
ext = File.extname(src_path)
|
|
138
139
|
@target_ext ||= ext
|
|
@@ -140,6 +141,7 @@ module MyMedia
|
|
|
140
141
|
public_path = "%s/%s/%shrs%s" % [@public_type, \
|
|
141
142
|
Time.now.strftime('%Y/%b/%d').downcase, Time.now.strftime('%H%M'),
|
|
142
143
|
@target_ext]
|
|
144
|
+
|
|
143
145
|
public_path2 = "%s/%s/%shrs%s%s" % [@public_type, \
|
|
144
146
|
Time.now.strftime('%Y/%b/%d').downcase, Time.now.strftime('%H%M'),
|
|
145
147
|
Time.now.strftime('%S%2N'), @target_ext]
|
|
@@ -254,8 +256,8 @@ module MyMedia
|
|
|
254
256
|
@index_page = c[:index_page] == 'true'
|
|
255
257
|
@public_type = public_type
|
|
256
258
|
@rss = rss
|
|
257
|
-
|
|
258
|
-
|
|
259
|
+
@opts = {username: c[:username], password: c[:password]}
|
|
260
|
+
|
|
259
261
|
@logger = Logger.new('/tmp/mymedia.log','daily')
|
|
260
262
|
end
|
|
261
263
|
|
data.tar.gz.sig
CHANGED
|
Binary file
|
metadata
CHANGED
metadata.gz.sig
CHANGED
|
Binary file
|