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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: e7f1b8c63b4335319a9348431561bde4bcc7f38a
4
- data.tar.gz: 33878d37967b292e7e4325836764cde987c6e7e4
3
+ metadata.gz: 2ac95f788efe2a2b7956d479047e0f505bcbc1aa
4
+ data.tar.gz: 85e3841a84f2d981b4b17af5e989acab139f23b3
5
5
  SHA512:
6
- metadata.gz: 8efb496ab38652ba84b20cd88712285fc43566a5ee35cf01714c39b82438ae68818b88924abba8fedf7c1112a0959bb1e526a374d5d0462aeadcd0ba8a7e1c3c
7
- data.tar.gz: ab8ecad024e01bc99f5086bf5d112defd52592cb1c37e42906801fc534ff9edf54047f8820c3aeb0759b26e5a055cd52e8a0857a11f184348aab664e2e9f5caf
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
 
@@ -1,25 +1,27 @@
1
1
  DocumentationEditor::Engine.routes.draw do
2
- scope path: '/admin' do
3
- get '/', as: :admin, :controller => 'pages', :action => 'index'
4
- post '/', :controller => 'pages', :action => 'create'
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
- post '/images', as: :upload_image, :controller => 'pages', :action => 'upload_image'
7
+ post '/images', as: :upload_image, :controller => 'pages', :action => 'upload_image'
7
8
 
8
- get '/export', as: :export, :controller => 'pages', :action => 'export'
9
- post '/import', as: :import, :controller => 'pages', :action => 'import'
9
+ get '/export', as: :export, :controller => 'pages', :action => 'export'
10
+ post '/import', as: :import, :controller => 'pages', :action => 'import'
10
11
 
11
- get '/:id', :controller => 'pages', :action => 'source'
12
- get '/:id/edit', as: :edit_page, :controller => 'pages', :action => 'edit'
13
- put '/:id', as: :update, :controller => 'pages', :action => 'update'
14
- post '/:id', :controller => 'pages', :action => 'commit'
15
- post '/:id/thumbnail', as: :upload_thumbnail, :controller => 'pages', :action => 'upload_thumbnail'
16
- delete '/:id', as: :delete_page, :controller => 'pages', :action => 'destroy'
17
- get '/:id/preview', as: :preview_page, :controller => 'pages', :action => 'preview'
18
- get '/:prev/:cur/diff', :controller => 'pages', :action => 'diff'
19
- get '/:id/history', as: :history, :controller => 'pages', :action => 'history'
20
- get '/:id/versions', :controller => 'pages', :action => 'versions'
21
- end
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
- get '/:slug/sections/:section', as: :section, :controller => 'pages', :action => 'show', constraints: { slug: /.*/ }
24
- get '/:slug', as: :page, :controller => 'pages', :action => 'show', constraints: { slug: /.*/ }
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
@@ -1,3 +1,3 @@
1
1
  module DocumentationEditor
2
- VERSION = "0.11.0"
2
+ VERSION = "0.11.1"
3
3
  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.0
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-07 00:00:00.000000000 Z
11
+ date: 2016-06-08 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails