documentation-editor 0.6.0 → 0.6.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: 5c1b887bb5ba7cc9014c287d2aa2ed28453c53f4
4
- data.tar.gz: b7d916b3011f1837912961c63f48703189fe45c8
3
+ metadata.gz: 73df497dbde26523003bbad414656c6602e3ec34
4
+ data.tar.gz: 42356b52768e202f985e1938251e3a3395fca12e
5
5
  SHA512:
6
- metadata.gz: 0a2f8125e3fc22d8af168e03d10ed5244e2e309524b0fc45cb254efebf04e55ede5a88934ccf193738607e882de6eb3ae9d7af7184400da17d3bdc07e31960c1
7
- data.tar.gz: 4d3d7f39146758c4e62cd2bde32cfc6cff878d87ef69bf1ab4a3fa7a97c8c4bfbf62a763653ca4b480e76da64baaa9945c4d4bae01cf79d16e84f7163dd3ebb7
6
+ metadata.gz: 8e63484a201f765e17468fb63a0d9929ad57e7f220bf47ca0c24f1cd835d70e422ae546d60e1c2f0a8da59fd434d012e5658983886c5aaf75a791adc370dac96
7
+ data.tar.gz: e3274fdbc790741abc6cf045d1cc9f3240c35dd9dc839c383455a4d485fdde9dbad8f59fb5976659085d9b83f862c0068c177c03f5bbf9f11f6c18cad7a72e41
@@ -8,6 +8,8 @@ module DocumentationEditor
8
8
 
9
9
  belongs_to :thumbnail, class_name: 'Image'
10
10
 
11
+ after_create :add_first_revision
12
+
11
13
  def add_revision!(content, publish = false, author_id = nil)
12
14
  r = revisions.build
13
15
  r.author_id = author_id
@@ -24,5 +26,12 @@ module DocumentationEditor
24
26
  thumbnail.try(:image).try(:url)
25
27
  end
26
28
 
29
+ private
30
+ def add_first_revision
31
+ r = Revision.new
32
+ r.content = "# FIXME\n\nLorem ipsum."
33
+ self.revisions << r
34
+ end
35
+
27
36
  end
28
37
  end
@@ -1,3 +1,3 @@
1
1
  module DocumentationEditor
2
- VERSION = "0.6.0"
2
+ VERSION = "0.6.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.6.0
4
+ version: 0.6.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: 2015-11-16 00:00:00.000000000 Z
11
+ date: 2015-11-17 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails