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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: d19a4f59dd9034344237d9d34ea2796a94ab11f9
4
- data.tar.gz: 3ca557e9e150dbdf4c9d077e6f520e665bf7f4ef
3
+ metadata.gz: 4c40e63a9ed7b0b2f08ed6afbbb85bd9c15f946c
4
+ data.tar.gz: 08be28c0b16a0d465e98308fe65a62318f55da67
5
5
  SHA512:
6
- metadata.gz: d121a85694dc586bfeb8e8c08b0323bfcde36784dbb98878dc9c4ce115e4c33d8d795ad71492a2668943739e8201f77670b3c1aba0e8e10c329061ca1e0b7af0
7
- data.tar.gz: a0b1c7538d90b7f05115c5ef9913be10a3ff3534f587003ab9a1100e6d2a1b8e3b0bc5bf4cdef3267fb68141783333d451696caafb447099351e0b8c1604a98c
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
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mymedia
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.1
4
+ version: 0.2.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - James Robertson
metadata.gz.sig CHANGED
Binary file