documentation-editor 0.11.0 → 0.11.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/controllers/documentation_editor/pages_controller.rb +1 -0
- data/config/routes.rb +21 -19
- data/lib/documentation_editor/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: 2ac95f788efe2a2b7956d479047e0f505bcbc1aa
|
4
|
+
data.tar.gz: 85e3841a84f2d981b4b17af5e989acab139f23b3
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2796aa7355f83e18becf4f52e133fea9d35bc398b849d8990b97d7637b3edb45d15d4dcc7b318e9c96a4e6dbe44b392776974b60c9513b4b9624c5b66694ad7b
|
7
|
+
data.tar.gz: 158e1cc4b9b7763a4103ff28baf39b51d7ca5f3716bd220335a788116bee3378be991a64881a73cf3eac27ae76c85e5ea51d9ff7e1bd89c0a656d3252434b226
|
@@ -70,6 +70,7 @@ module DocumentationEditor
|
|
70
70
|
@page = Page.find_by!(slug: params[:slug][0..(p - 1)])
|
71
71
|
params[:language] = params[:slug][(p + 1)..-1]
|
72
72
|
end
|
73
|
+
raise ActiveRecord::RecordNotFound.new if @page.nil?
|
73
74
|
@revision = @page.published_revision
|
74
75
|
raise ActiveRecord::RecordNotFound.new if @revision.nil?
|
75
76
|
|
data/config/routes.rb
CHANGED
@@ -1,25 +1,27 @@
|
|
1
1
|
DocumentationEditor::Engine.routes.draw do
|
2
|
-
|
3
|
-
|
4
|
-
|
2
|
+
constraints format: 'html' do
|
3
|
+
scope path: '/admin' do
|
4
|
+
get '/', as: :admin, :controller => 'pages', :action => 'index'
|
5
|
+
post '/', :controller => 'pages', :action => 'create'
|
5
6
|
|
6
|
-
|
7
|
+
post '/images', as: :upload_image, :controller => 'pages', :action => 'upload_image'
|
7
8
|
|
8
|
-
|
9
|
-
|
9
|
+
get '/export', as: :export, :controller => 'pages', :action => 'export'
|
10
|
+
post '/import', as: :import, :controller => 'pages', :action => 'import'
|
10
11
|
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
12
|
+
get '/:id', :controller => 'pages', :action => 'source'
|
13
|
+
get '/:id/edit', as: :edit_page, :controller => 'pages', :action => 'edit'
|
14
|
+
put '/:id', as: :update, :controller => 'pages', :action => 'update'
|
15
|
+
post '/:id', :controller => 'pages', :action => 'commit'
|
16
|
+
post '/:id/thumbnail', as: :upload_thumbnail, :controller => 'pages', :action => 'upload_thumbnail'
|
17
|
+
delete '/:id', as: :delete_page, :controller => 'pages', :action => 'destroy'
|
18
|
+
get '/:id/preview', as: :preview_page, :controller => 'pages', :action => 'preview'
|
19
|
+
get '/:prev/:cur/diff', :controller => 'pages', :action => 'diff'
|
20
|
+
get '/:id/history', as: :history, :controller => 'pages', :action => 'history'
|
21
|
+
get '/:id/versions', :controller => 'pages', :action => 'versions'
|
22
|
+
end
|
22
23
|
|
23
|
-
|
24
|
-
|
24
|
+
get '/:slug/sections/:section', as: :section, :controller => 'pages', :action => 'show', constraints: { slug: /.*/ }
|
25
|
+
get '/:slug', as: :page, :controller => 'pages', :action => 'show', constraints: { slug: /.*/ }
|
26
|
+
end
|
25
27
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: documentation-editor
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.11.
|
4
|
+
version: 0.11.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Algolia Team
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-06-
|
11
|
+
date: 2016-06-08 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|