mymedia-card 0.3.4 → 0.3.5
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.tar.gz.sig +0 -0
- data/lib/mymedia-card.rb +11 -5
- metadata +2 -2
- 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: 601c5c4599c7a6a66c70272f6c7681916fe1f55f
|
4
|
+
data.tar.gz: 96f4fd325cfe4bcb47edb4e6f3904c4aff8db677
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: dd8381e2a477bfdb8013d63141b6de2dc5de9458ff409ab6f38acabe01480b5b288def8c2a566a359e7820f2cb5309b6ba300d5e6ff941b8032487c43db9387b
|
7
|
+
data.tar.gz: 9d0fa720d5c1a5f557f086507b482ae4cb65ed5c09929324da1a541d8c7756fad7c5362525cfafc45c0c4f46b96d764189f2d265c70e4effae20fb430b2277b5
|
checksums.yaml.gz.sig
CHANGED
Binary file
|
data.tar.gz.sig
CHANGED
Binary file
|
data/lib/mymedia-card.rb
CHANGED
@@ -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
|
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
|
-
|
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
|
+
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-
|
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
|