History

Remove index_path and db_path from docs manifest

Thibaut Courouble committed 10 years ago

Commit a639aed1 parent e1c02187 files · +16 −14Browse files

Showing the changes to assets/javascripts (2 of 7 files). Show all

Unified · Split

2 files
  1. assets/javascripts/app/config.coffee.erb +2 −0
  2. assets/javascripts/models/doc.coffee +3 −3
assets/javascripts/app/config.coffee.erb+2−0
@@ -1,8 +1,10 @@
11 app.config =
2+ db_filename: 'db.json'
23 default_docs: <%= App.default_docs.to_json %>
34 docs_host: '<%= App.docs_host %>'
45 env: '<%= App.environment %>'
56 history_cache_size: 10
7+ index_filename: 'index.json'
68 index_path: '/<%= App.docs_prefix %>'
79 max_results: 50
810 production_host: 'devdocs.io'
assets/javascripts/models/doc.coffee+3−3
@@ -1,5 +1,5 @@
11 class app.models.Doc extends app.Model
2− # Attributes: name, slug, type, release, index_path, db_path, db_size, mtime, links
2+ # Attributes: name, slug, type, release, db_size, mtime, links
33
44 constructor: ->
55 super
@@ -29,10 +29,10 @@ class app.models.Doc extends app.Model · 23 unmodified lines
2929 "#{app.config.docs_host}#{@fullPath(path)}?#{@mtime}"
3030
3131 dbUrl: ->
32− "#{app.config.docs_host}/#{@db_path}?#{@mtime}"
32+ "#{app.config.docs_host}/#{@slug}/#{app.config.db_filename}?#{@mtime}"
3333
3434 indexUrl: ->
35− "#{app.indexHost()}/#{@index_path}?#{@mtime}"
35+ "#{app.indexHost()}/#{@slug}/#{app.config.index_filename}?#{@mtime}"
3636
3737 toEntry: ->
3838 @entry ||= new app.models.Entry