alephant-preview 0.3.8 → 0.3.9
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/alephant/preview/server.rb +9 -0
- data/lib/alephant/preview/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: fcda4eb6c69ce0fb086ae7d9c213695497f1e79d
|
4
|
+
data.tar.gz: 136476e63d5eff470c063e08e0928a3473835cf3
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: af200493984a52bf0e820a57df296db0489ec9440a3ac89cd5b878c1c011ed6e4fd93a33c5cddcd222cd33bd5e0a695594bd5b02ae11257a6c9c7e202fc3a6ca
|
7
|
+
data.tar.gz: c1460d492c879c0dc57e4747a2410272fa8a4232953a781872cd793453e3df0b8b1288d1c5d4ae9327cefe314ef306d66b121ff5641e1894216edd0b452c1a6d
|
@@ -63,9 +63,18 @@ module Alephant
|
|
63
63
|
'ok'
|
64
64
|
end
|
65
65
|
|
66
|
+
not_found do
|
67
|
+
'Not found'
|
68
|
+
end
|
69
|
+
|
66
70
|
def find_id_from_template(template)
|
67
71
|
files = Dir.glob(BASE_LOCATION + '/**/models/*')
|
68
72
|
file = files.select! { |file| file.include? "/#{template}.rb" }.pop
|
73
|
+
|
74
|
+
if file.nil?
|
75
|
+
halt(404)
|
76
|
+
end
|
77
|
+
|
69
78
|
result = /#{BASE_LOCATION}\/(\w+)/.match(file)
|
70
79
|
result[1]
|
71
80
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: alephant-preview
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.3.
|
4
|
+
version: 0.3.9
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- BBC News
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-
|
11
|
+
date: 2016-03-07 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
requirement: !ruby/object:Gem::Requirement
|