mymedia 0.2.8 → 0.2.9
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/lib/mymedia.rb +21 -5
- data.tar.gz.sig +2 -1
- metadata +3 -3
- 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: 060dd60ca8dea252f52fce738f981a8e587fa96c
|
|
4
|
+
data.tar.gz: f91634aaf745d3739ee5f7f2cf041612ded79368
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 0841d3849fbd443188168345139aa73c2fdadf796bb211f65c317d71b96e63a80e6a06d6c3806d91d1db5e42d0187f87a27a9e757bfbd0a6e8422d0ccebb8548
|
|
7
|
+
data.tar.gz: 38e02659e09436c8e9f85c0708c7cc16c0d038739bbe0772e0a9af80c90b82561a710afa4f6d5717314b991bca84bbd2d7d5973aba69f56b61c46c8b1e97c97d
|
checksums.yaml.gz.sig
CHANGED
|
Binary file
|
data/lib/mymedia.rb
CHANGED
|
@@ -133,12 +133,21 @@ module MyMedia
|
|
|
133
133
|
|
|
134
134
|
def auto_copy_publish(raw_msg='')
|
|
135
135
|
|
|
136
|
-
filename = DirToXML.new(@media_src).select_by_ext(@ext)\
|
|
137
|
-
|
|
136
|
+
#filename = DirToXML.new(@media_src).select_by_ext(@ext)\
|
|
137
|
+
# .sort_by(:last_modified).last[:name]
|
|
138
|
+
dir = DirToXML.new(@media_src, recursive: true)
|
|
139
|
+
a = dir.last_modified
|
|
140
|
+
filename = File.join a.map {|x| x[:name]}
|
|
138
141
|
|
|
139
142
|
copy_publish( filename ,raw_msg)
|
|
140
143
|
end
|
|
141
144
|
|
|
145
|
+
def basename(s1, s2)
|
|
146
|
+
|
|
147
|
+
(s2.split('/') - s1.split('/')).join('/')
|
|
148
|
+
|
|
149
|
+
end
|
|
150
|
+
|
|
142
151
|
def copy_publish(filename, raw_msg='')
|
|
143
152
|
file_publish(File.join(@media_src,filename), raw_msg)
|
|
144
153
|
end
|
|
@@ -187,12 +196,19 @@ module MyMedia
|
|
|
187
196
|
|
|
188
197
|
raw_msg = raw_msg.join if raw_msg.is_a? Array
|
|
189
198
|
|
|
190
|
-
|
|
191
|
-
normalize(raw_msg) + File.extname(destination)
|
|
199
|
+
if raw_msg.length > 0 then
|
|
200
|
+
static_filename = normalize(raw_msg) + File.extname(destination)
|
|
192
201
|
else
|
|
193
|
-
|
|
202
|
+
|
|
203
|
+
static_filename = basename(@media_src, src_path)
|
|
204
|
+
|
|
205
|
+
if static_filename =~ /\// then
|
|
206
|
+
FileUtils.mkdir_p(File.dirname(static_filename))
|
|
207
|
+
end
|
|
194
208
|
end
|
|
195
209
|
|
|
210
|
+
|
|
211
|
+
|
|
196
212
|
static_path = "%s/%s/%s" % [@public_type, \
|
|
197
213
|
Time.now.strftime('%Y/%b/%d').downcase, static_filename]
|
|
198
214
|
|
data.tar.gz.sig
CHANGED
|
@@ -1 +1,2 @@
|
|
|
1
|
-
|
|
1
|
+
NK�f\���_���#��H�D�D�$��!e�X{˰hJ��-W�(���蒒l��T8pΰ7����]�z|�^ �Qd��$�(�����l�, ��u:@���(:�$�Xy�Q�L���A �{r�)�'i*�ȸX�l�v.���!������s������L�
|
|
2
|
+
}��(ī;��#<��>�:'k�8�W�[����>�����@5�/`+�ߏ��!@9˭��T��K�~b\2"�-A]/o���
|
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.2.
|
|
4
|
+
version: 0.2.9
|
|
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: 2015-
|
|
34
|
+
date: 2015-08-15 00:00:00.000000000 Z
|
|
35
35
|
dependencies:
|
|
36
36
|
- !ruby/object:Gem::Dependency
|
|
37
37
|
name: dynarex
|
|
@@ -180,7 +180,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
180
180
|
version: '0'
|
|
181
181
|
requirements: []
|
|
182
182
|
rubyforge_project:
|
|
183
|
-
rubygems_version: 2.4.
|
|
183
|
+
rubygems_version: 2.4.8
|
|
184
184
|
signing_key:
|
|
185
185
|
specification_version: 4
|
|
186
186
|
summary: Makes publishing to the web easier
|
metadata.gz.sig
CHANGED
|
Binary file
|