mymedia 0.1.6 → 0.2.0
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 +16 -6
- data.tar.gz.sig +0 -0
- metadata +6 -6
- 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: 181a0859c00cf3841fd5a0d43a9e0ec4e6ab88e5
|
|
4
|
+
data.tar.gz: c3528e7c17ec0172e4ef127325cf6688a8808255
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 624e69f14868bd1663e11f0882d30a70393cd1f63c7b92cf23207090c69f834e58477c56d307f1dccf2e6df89bf25ffe1c9d0d2d8bd9d761ebe2e27171a24ffb
|
|
7
|
+
data.tar.gz: ba2d25df22247f2df59918996a73850325efc6d0fb0a6ba1ba97ffc0edb10b5894db7bbc155cf21b16416b3f7c7f21c9fda4684c18bb4a7251a26b7bb9d16bd6
|
checksums.yaml.gz.sig
CHANGED
|
Binary file
|
data/lib/mymedia.rb
CHANGED
|
@@ -75,8 +75,8 @@ module MyMedia
|
|
|
75
75
|
@logger = Logger.new('/tmp/mymedia.log','daily')
|
|
76
76
|
|
|
77
77
|
raise BaseException, "no config found" if config.nil?
|
|
78
|
-
|
|
79
|
-
c = SimpleConfig.new(config)
|
|
78
|
+
|
|
79
|
+
c = SimpleConfig.new(config).to_h
|
|
80
80
|
|
|
81
81
|
@home = c[:home]
|
|
82
82
|
@website = c[:website]
|
|
@@ -232,11 +232,19 @@ module MyMedia
|
|
|
232
232
|
|
|
233
233
|
end
|
|
234
234
|
|
|
235
|
+
|
|
236
|
+
class FrontpageException < Exception
|
|
237
|
+
end
|
|
238
|
+
|
|
235
239
|
class Frontpage < Publisher
|
|
236
240
|
|
|
237
|
-
def initialize(
|
|
238
|
-
|
|
239
|
-
|
|
241
|
+
def initialize(config: nil, public_type: '', rss: nil)
|
|
242
|
+
|
|
243
|
+
raise FrontpageException, "no config found" if config.nil?
|
|
244
|
+
|
|
245
|
+
c = SimpleConfig.new(config).to_h
|
|
246
|
+
|
|
247
|
+
@home = c[:home]
|
|
240
248
|
@public_type = public_type
|
|
241
249
|
@rss = rss
|
|
242
250
|
|
|
@@ -260,6 +268,7 @@ module MyMedia
|
|
|
260
268
|
|
|
261
269
|
publish_dynarex(dynarex_filepath, record, {rss: @rss || false})
|
|
262
270
|
publish_dynarex(raw_dynarex_filepath, record, {rss: @rss || false})
|
|
271
|
+
|
|
263
272
|
publish_timeline(raw_msg, static_url, target_url)
|
|
264
273
|
|
|
265
274
|
end
|
|
@@ -268,7 +277,8 @@ module MyMedia
|
|
|
268
277
|
def publish_timeline(raw_msg, static_url, target_url='')
|
|
269
278
|
|
|
270
279
|
timeline_filepath = "%s/timeline/dynarex.xml" % @home
|
|
271
|
-
|
|
280
|
+
|
|
281
|
+
record = Dynarex.new(@home + '/dynarex/main-directory.xml').find_by_title(@public_type)
|
|
272
282
|
thumbnail, subject_url = record.thumbnail, record.url
|
|
273
283
|
|
|
274
284
|
content = {
|
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.
|
|
4
|
+
version: 0.2.0
|
|
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:
|
|
34
|
+
date: 2015-01-01 00:00:00.000000000 Z
|
|
35
35
|
dependencies:
|
|
36
36
|
- !ruby/object:Gem::Dependency
|
|
37
37
|
name: dynarex
|
|
@@ -42,7 +42,7 @@ dependencies:
|
|
|
42
42
|
version: '1.2'
|
|
43
43
|
- - ">="
|
|
44
44
|
- !ruby/object:Gem::Version
|
|
45
|
-
version: 1.
|
|
45
|
+
version: 1.3.1
|
|
46
46
|
type: :runtime
|
|
47
47
|
prerelease: false
|
|
48
48
|
version_requirements: !ruby/object:Gem::Requirement
|
|
@@ -52,7 +52,7 @@ dependencies:
|
|
|
52
52
|
version: '1.2'
|
|
53
53
|
- - ">="
|
|
54
54
|
- !ruby/object:Gem::Version
|
|
55
|
-
version: 1.
|
|
55
|
+
version: 1.3.1
|
|
56
56
|
- !ruby/object:Gem::Dependency
|
|
57
57
|
name: sps-pub
|
|
58
58
|
requirement: !ruby/object:Gem::Requirement
|
|
@@ -142,7 +142,7 @@ dependencies:
|
|
|
142
142
|
version: '0.2'
|
|
143
143
|
- - ">="
|
|
144
144
|
- !ruby/object:Gem::Version
|
|
145
|
-
version: 0.2.
|
|
145
|
+
version: 0.2.1
|
|
146
146
|
type: :runtime
|
|
147
147
|
prerelease: false
|
|
148
148
|
version_requirements: !ruby/object:Gem::Requirement
|
|
@@ -152,7 +152,7 @@ dependencies:
|
|
|
152
152
|
version: '0.2'
|
|
153
153
|
- - ">="
|
|
154
154
|
- !ruby/object:Gem::Version
|
|
155
|
-
version: 0.2.
|
|
155
|
+
version: 0.2.1
|
|
156
156
|
description:
|
|
157
157
|
email: james@r0bertson.co.uk
|
|
158
158
|
executables: []
|
metadata.gz.sig
CHANGED
|
Binary file
|