documentation-editor 0.0.7 → 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 7bdacfe2b5f51241f500516411b6ed2a626515ac
4
- data.tar.gz: 68abadcc62db314a2fffd764daf60a9c5b7afd73
3
+ metadata.gz: 8ed6f8ee85ae24985b7dedbdf30380a31dc5d392
4
+ data.tar.gz: 23cd83513142d1b48956035e24dd06f03db98dbd
5
5
  SHA512:
6
- metadata.gz: 13624d0ab386204817cd0f08e0c03c4f9149c622c9cec9f9b955c6ecb711ccba9d30dc039b7ec60e96414c2052621404dc1babb3ea0083f300de03f471df2f28
7
- data.tar.gz: d39661d49cc3a71cdce9dcf1eefea9414552401d02b1d2d3bd166cb12380140add9fe4f65a84593135ccd4c20159e38d571219c45835c607684d28402a5169b2
6
+ metadata.gz: fe11497eca3cf438f8bec4e74bd74711d48d42e55e258c1b4fdb059bf68906729d174bc6c6e3df92582723c8c4e8a451208a6c41e7a49135c29e43f7cfef3947
7
+ data.tar.gz: 6b21de6dc04da6a8d3bce79e4d358356098f6b1b3ceec628d82241acf6c95fb1aa3fb8e4fba4c8b7c2b5a2603721e634f0e1c7b3f5dd642e0d874ee301b7fc53
data/README.md CHANGED
@@ -101,6 +101,9 @@ DocumentationEditor::Config.layout = 'my_custom_layout'
101
101
  # to protect the access to the edition pages to admin
102
102
  DocumentationEditor::Config.is_admin = :method_checking_if_admin?
103
103
 
104
+ # to configure a before_filter to add on the 'show' & 'preview' actions
105
+ DocumentationEditor::Config.before_filter = :my_before_filter
106
+
104
107
  # to use custom options for paperclip
105
108
  DocumentationEditor::Config.paperclip_options = {
106
109
  storage: 's3',
@@ -15,6 +15,10 @@ module DocumentationEditor
15
15
  end
16
16
  end
17
17
 
18
+ if DocumentationEditor::Config.before_filter
19
+ before_filter DocumentationEditor::Config.before_filter, only: [:preview, :show]
20
+ end
21
+
18
22
  before_filter :setup_page, only: [:edit, :source, :update, :preview, :destroy, :history, :versions]
19
23
 
20
24
  def index
@@ -11,5 +11,8 @@ module DocumentationEditor
11
11
 
12
12
  # should we wrap h1's content by sections
13
13
  attr_accessor :wrap_h1_with_sections
14
+
15
+ # configure the before_filter used for the preview & show actions
16
+ attr_accessor :before_filter
14
17
  end
15
18
  end
@@ -1,3 +1,3 @@
1
1
  module DocumentationEditor
2
- VERSION = "0.0.7"
2
+ VERSION = "0.1.0"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: documentation-editor
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.7
4
+ version: 0.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Algolia Team