mymedia 0.1.6 → 0.2.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: e365a107e2cec0e571a693a00271d08e3ac23c66
4
- data.tar.gz: 9db56cf338f9560654f47cbb648b196f38c709d6
3
+ metadata.gz: 181a0859c00cf3841fd5a0d43a9e0ec4e6ab88e5
4
+ data.tar.gz: c3528e7c17ec0172e4ef127325cf6688a8808255
5
5
  SHA512:
6
- metadata.gz: 2b6b14073af133d67c20ce8f4e9f08f9a56dda3077f251431ddecdc35f330250f419103a43125d51736d52573ecb3686e56133fde9e3e88797d91e08a7aaa3b6
7
- data.tar.gz: 20a14a0b2506243590d129fd0e4112d04d039d2db6ec68282a1296cedb5ded4c7cfddb06b3ef86288d9f041400e692d7f631416dae0ba6cc1924ec1b1ffb97f6
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(conf: nil, public_type: '', rss: nil)
238
-
239
- @home = conf[:home]
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
- record = Dynarex.new(@home + '/dynarex.xml').find_by_title(@public_type)
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.1.6
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: 2014-12-29 00:00:00.000000000 Z
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.2.92
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.2.92
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.0
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.0
155
+ version: 0.2.1
156
156
  description:
157
157
  email: james@r0bertson.co.uk
158
158
  executables: []
metadata.gz.sig CHANGED
Binary file