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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: a9017547d1a397550cf5ca9814c06c40dfbf124788d2f70886ed140cd522de5b
4
- data.tar.gz: a00880daf1a062ab77d0680caf230cf68f774cba51c658bbec2ebd700038d20a
3
+ metadata.gz: e0e73232af677ec81115b33b8c13c8df4b5eb54c79f0af3c063afd7169db3c9c
4
+ data.tar.gz: e12bf14b0cedfb4689f58ab44cad8213e7f70f4e7859b72ce3301d2e5a1a8554
5
5
  SHA512:
6
- metadata.gz: 64b2f5b76497d425093526fdd9da114211c3389dc6df4f0eb12344f146e618620f2e42c3621c2008e8b57dcdf44f7f970ed51720e6789b168824e53d7b04e149
7
- data.tar.gz: c760bdf0090e8be9980176da22599e8c75e2efa19394b4a492d53f84e9ca8a2a58b1ea6087280397ab4b0f256fc3f7ee231fa5c4fa9a695fa6a59d5fd3de1341
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.5.6
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-22 00:00:00.000000000 Z
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