mymedia 0.5.3 → 0.5.4
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 +27 -2
- 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: '0549b56450b11fe46c8c2b51e9d77258936651dad8a6768fc97a8dc5c6aaac26'
|
4
|
+
data.tar.gz: 39526f96af64fc8809b27d8debb6ad00c98ac559d9530d2cab79dd0bed832420
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 815295d51895458924a515ae171d7f8886585c2b957de9c511d290a32c4b72e89758bb30adc2bd7320291c3a73a2c0dbd13aedd8e42b04787c2f0b5c2fea6c53
|
7
|
+
data.tar.gz: 1b9ddf1205599269266c5fc544bbaf6ed4953358c3555048c77a21d864fe9cd8a500b4d08f3eda4d474cb0653d1ca8c6d11eb851760c1d62b272476d8c93100d
|
checksums.yaml.gz.sig
CHANGED
Binary file
|
data/lib/mymedia.rb
CHANGED
@@ -76,7 +76,7 @@ module MyMedia
|
|
76
76
|
dynarex = if FileX.exists? dynarex_filepath then
|
77
77
|
DxLite.new(dynarex_filepath)
|
78
78
|
else
|
79
|
-
DxLite.new(@schema, order: 'descending')
|
79
|
+
DxLite.new(@schema, order: 'descending', debug: @debug)
|
80
80
|
end
|
81
81
|
|
82
82
|
dynarex.create record
|
@@ -131,6 +131,25 @@ module MyMedia
|
|
131
131
|
|
132
132
|
end
|
133
133
|
|
134
|
+
def find(keyword)
|
135
|
+
|
136
|
+
json_filepath = "%s/%s/dynarex.json" % [@home, @public_type]
|
137
|
+
|
138
|
+
if FileX.exists? json_filepath then
|
139
|
+
|
140
|
+
dx = DxLite.new(json_filepath)
|
141
|
+
|
142
|
+
return dx.all.find do |x|
|
143
|
+
|
144
|
+
regex = keyword.is_a?(String) ? /#{keyword}/i : keyword
|
145
|
+
x.title =~ regex
|
146
|
+
|
147
|
+
end
|
148
|
+
|
149
|
+
end
|
150
|
+
|
151
|
+
end
|
152
|
+
|
134
153
|
def search(keyword)
|
135
154
|
|
136
155
|
json_filepath = "%s/%s/dynarex.json" % [@home, @public_type]
|
@@ -138,7 +157,13 @@ module MyMedia
|
|
138
157
|
if FileX.exists? json_filepath then
|
139
158
|
|
140
159
|
dx = DxLite.new(json_filepath)
|
141
|
-
|
160
|
+
|
161
|
+
return dx.all.select do |x|
|
162
|
+
|
163
|
+
regex = keyword.is_a?(String) ? /#{keyword}/i : keyword
|
164
|
+
x.title =~ regex
|
165
|
+
|
166
|
+
end
|
142
167
|
|
143
168
|
end
|
144
169
|
|
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.
|
4
|
+
version: 0.5.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- James Robertson
|
@@ -35,7 +35,7 @@ cert_chain:
|
|
35
35
|
bL55NDdi8BFHkNVohRBak7aqxsw41LJKy3UTP+4TzU5vyluDJMiscK6JJFaM4JiS
|
36
36
|
xtlAM0O5ZFe9QflatP+P8JnB
|
37
37
|
-----END CERTIFICATE-----
|
38
|
-
date: 2022-04-
|
38
|
+
date: 2022-04-07 00:00:00.000000000 Z
|
39
39
|
dependencies:
|
40
40
|
- !ruby/object:Gem::Dependency
|
41
41
|
name: dir-to-xml
|
metadata.gz.sig
CHANGED
Binary file
|