mymedia 0.5.6 → 0.6.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- checksums.yaml.gz.sig +0 -0
- data/lib/mymedia.rb +16 -9
- data.tar.gz.sig +0 -0
- metadata +2 -2
- metadata.gz.sig +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e0e73232af677ec81115b33b8c13c8df4b5eb54c79f0af3c063afd7169db3c9c
|
4
|
+
data.tar.gz: e12bf14b0cedfb4689f58ab44cad8213e7f70f4e7859b72ce3301d2e5a1a8554
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 35a2248a7b2ac7cb7007d7d349d2cfd223324597ae1cc67b7282804a948c78b21b602bb60ab2783f2bec13074f59aa538f1bbb644ba200224d8463b998176123
|
7
|
+
data.tar.gz: 90a8cfb9aece78804c4812b3d6f7c2861e9296d8fd756bfabcba27609da5e0019dd0c928c53cad9f826e160878a8810cb43db8ba873f5b18f36c712fe209218c
|
checksums.yaml.gz.sig
CHANGED
Binary file
|
data/lib/mymedia.rb
CHANGED
@@ -14,6 +14,18 @@ require 'rxfileio'
|
|
14
14
|
require 'wordsdotdat'
|
15
15
|
|
16
16
|
|
17
|
+
module StringFilter
|
18
|
+
|
19
|
+
def normalize(s)
|
20
|
+
|
21
|
+
r = s.downcase.gsub(/\s#\w+/,'').strip.gsub(/\W/,'-').gsub(/-{2,}/,'-')\
|
22
|
+
.gsub(/^-|-$/,'')
|
23
|
+
return s.scan(/#(\w+)/)[0..1].join('_').downcase if r.empty?
|
24
|
+
return r
|
25
|
+
end
|
26
|
+
|
27
|
+
end
|
28
|
+
|
17
29
|
module MyMedia
|
18
30
|
|
19
31
|
class MyMediaPublisherException < Exception
|
@@ -183,12 +195,15 @@ module MyMedia
|
|
183
195
|
|
184
196
|
end
|
185
197
|
end
|
198
|
+
|
199
|
+
|
186
200
|
|
187
201
|
class BaseException < Exception
|
188
202
|
end
|
189
203
|
|
190
204
|
class Base < Publisher
|
191
205
|
include RXFileIOModule
|
206
|
+
include StringFilter
|
192
207
|
|
193
208
|
attr_reader :to_s, :destination
|
194
209
|
|
@@ -393,15 +408,7 @@ module MyMedia
|
|
393
408
|
|
394
409
|
static_url
|
395
410
|
|
396
|
-
end
|
397
|
-
|
398
|
-
def normalize(s)
|
399
|
-
|
400
|
-
r = s.downcase.gsub(/\s#\w+/,'').strip.gsub(/\W/,'-').gsub(/-{2,}/,'-')\
|
401
|
-
.gsub(/^-|-$/,'')
|
402
|
-
return s.scan(/#(\w+)/)[0..1].join('_').downcase if r.empty?
|
403
|
-
return r
|
404
|
-
end
|
411
|
+
end
|
405
412
|
|
406
413
|
end
|
407
414
|
|
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.6.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- James Robertson
|
@@ -36,7 +36,7 @@ cert_chain:
|
|
36
36
|
XV2ORsrE0BA5hbgbfiQFazW2d62rWKrt3CTi36GNST95GXGBpapX9CyezadYE+5i
|
37
37
|
D3/VNb1+lseG5sGSOWMV8J01/J89XOfp5Gk=
|
38
38
|
-----END CERTIFICATE-----
|
39
|
-
date: 2023-02-
|
39
|
+
date: 2023-02-26 00:00:00.000000000 Z
|
40
40
|
dependencies:
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
42
|
name: dir-to-xml
|
metadata.gz.sig
CHANGED
Binary file
|