pig-media-server 2000 → 2001
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/pig-media-server/api.rb +8 -2
- data/lib/pig-media-server/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f4c467b3ab2c5feba65b25d38105927960a43c39
|
4
|
+
data.tar.gz: da7c2c42a06fdb4c9aa02233fcb2902df5d8bc12
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 43e6ba8c48a5ce9e66c761d4ae45a369c8688bc7b00391f989a2487aa02c46e346f13e2846e82a61a443ae019992d5883904fbb79fa574bc3d6ef8f4fe784b9b
|
7
|
+
data.tar.gz: 9f6435a6e3b7bb8f28da741aa682e5a4e7879e2f9f5709a97e1262db85d6a2368021eb664126774c9d7e115cb4dea956128cbdce75075d26e26b853f1340a744
|
data/lib/pig-media-server/api.rb
CHANGED
@@ -23,8 +23,12 @@ module PigMediaServer
|
|
23
23
|
|
24
24
|
included do
|
25
25
|
get '/api/r/latest' do
|
26
|
-
|
27
|
-
|
26
|
+
begin
|
27
|
+
content_type :json
|
28
|
+
list_to_json(Groonga['Files'].select.paginate([key: 'mtime', order: 'descending'], size: size, page: page).map{|x| Pig.new(x)})
|
29
|
+
rescue
|
30
|
+
[].to_json
|
31
|
+
end
|
28
32
|
end
|
29
33
|
|
30
34
|
get '/api/r/custom' do
|
@@ -69,10 +73,12 @@ module PigMediaServer
|
|
69
73
|
x['ignore'][params[:method]].each do |s|
|
70
74
|
flag = true if y['url'] =~ Regexp.new(s)
|
71
75
|
end
|
76
|
+
|
72
77
|
flag
|
73
78
|
else
|
74
79
|
false
|
75
80
|
end
|
81
|
+
|
76
82
|
}.to_json
|
77
83
|
else
|
78
84
|
[].to_json
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: pig-media-server
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: '
|
4
|
+
version: '2001'
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- ssig33
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-03-
|
11
|
+
date: 2016-03-27 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rroonga
|