mymedia-card 0.3.4 → 0.3.5

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: 54df3fd2247965cf0549ad96cbc9ada452d35d08
4
- data.tar.gz: 7cc40cd9cf89ae680edc1e163d0212623e59a012
3
+ metadata.gz: 601c5c4599c7a6a66c70272f6c7681916fe1f55f
4
+ data.tar.gz: 96f4fd325cfe4bcb47edb4e6f3904c4aff8db677
5
5
  SHA512:
6
- metadata.gz: ea5530ecc37f9129456595ae39134ddf3689d63cf0a8f3ea40a4702bd2f638bd504027eab4073cae9130a40f5a6c992f5125bba5bd4221f6bbab4bbff41f9e84
7
- data.tar.gz: 56b466d1b439ca6cca066acbcafaa75c648e6aa6b78338dc066d5b6b00c2f3b0b352605c7022d13f916168b06b63d0ccbd978347d63ebfd228c53658cc3d5021
6
+ metadata.gz: dd8381e2a477bfdb8013d63141b6de2dc5de9458ff409ab6f38acabe01480b5b288def8c2a566a359e7820f2cb5309b6ba300d5e6ff941b8032487c43db9387b
7
+ data.tar.gz: 9d0fa720d5c1a5f557f086507b482ae4cb65ed5c09929324da1a541d8c7756fad7c5362525cfafc45c0c4f46b96d764189f2d265c70e4effae20fb430b2277b5
Binary file
data.tar.gz.sig CHANGED
Binary file
@@ -24,9 +24,14 @@ class MyMediaCard < MyMediaKvx
24
24
 
25
25
  raise "MyMediaCard: ext: must be supplied at initialize()" unless @ext
26
26
 
27
- path = static_file ? File.join(@media_src, 'raw') : @media_src
28
-
27
+ path = if static_file and @public_type == 'txt' then
28
+ File.join(@media_src, 'raw')
29
+ else
30
+ @media_src
31
+ end
32
+
29
33
  dir = DirToXML.new(path)
34
+
30
35
  raw_s = dir.select_by_ext(@ext).sort_by_lastmodified.last[:name]
31
36
 
32
37
  s,ext = raw_s.split(/(?=\.\w+$)/)
@@ -40,7 +45,8 @@ class MyMediaCard < MyMediaKvx
40
45
 
41
46
  @txt_filepath = File.join(@media_src, raw_name.downcase + '.txt' )
42
47
  filename = raw_name.downcase + ext
43
- "%s/raw/%s" % [@public_type, filename]
48
+ relpath = @public_type == 'txt' ? '/raw' : ''
49
+ "%s%s/%s" % [@public_type, relpath, filename]
44
50
 
45
51
  else
46
52
 
@@ -55,13 +61,13 @@ class MyMediaCard < MyMediaKvx
55
61
 
56
62
  summary = {title: desc, tags: tags.join(' ')}
57
63
  body = {file: raw_static_destination}
58
-
64
+ #
59
65
  kvx = Kvx.new({summary: summary, body: body}, \
60
66
  attributes: {type: @media_type})
61
67
  Dir.chdir @media_src
62
68
  File.write @txt_filepath, kvx.to_s
63
69
 
64
- Dir.chdir 'raw' if static_file
70
+ Dir.chdir 'raw' if static_file and @publlic_type == 'txt'
65
71
 
66
72
  FileUtils.mv raw_s, filename
67
73
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mymedia-card
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.4
4
+ version: 0.3.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - James Robertson
@@ -31,7 +31,7 @@ cert_chain:
31
31
  Fel3ZehmfCVTepbDhmN9wy+aNa/pfEaGrRqjtvpPYQwVqzZBqxM39Y+hopVu2SCv
32
32
  2Atqh3hHPujBHw==
33
33
  -----END CERTIFICATE-----
34
- date: 2015-07-11 00:00:00.000000000 Z
34
+ date: 2015-07-25 00:00:00.000000000 Z
35
35
  dependencies:
36
36
  - !ruby/object:Gem::Dependency
37
37
  name: mymedia-kvx
metadata.gz.sig CHANGED
Binary file