iatelier 0.4.3 → 0.4.4

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
  SHA256:
3
- metadata.gz: 76590b778f4a1751dd45b71b66454fd09cd4ccef1d618877104640f4b081ada5
4
- data.tar.gz: 19ee2dac571df2899673d08636fedcbeef8f77a29a5280d7c7e4c8711251ec23
3
+ metadata.gz: 0d0ea435d398836e042fdc16823794f774ead547af140dab422a08c6890142aa
4
+ data.tar.gz: 746fb34460ec905ac5e505f770595124df7bc40b93f416658d43e47613e7dc9b
5
5
  SHA512:
6
- metadata.gz: 85efe36bba980cf2d6ae02dad61d6d2d8df5f88cf4d65223d0bac66be8512ed167d804ba9b791348245a94c4c2bccb6487fa49e0495e3a7c765a952735fb2677
7
- data.tar.gz: 2bad2720e84c46ba353a4226768a76a1384a6f2d4a6ccf95dbf5eb5f7ff3520d861de25a721eefd0b38a490e385537b22a8f5138d2aa7338d567c1d98f642add
6
+ metadata.gz: 82c1cefe9a016441ec0c243d62f5103a29cd65ae709ef822df9417c4b781f4e6cfed60cc19b97998889b9880a03944427c8a58f27039fe3af1fb480993c05b75
7
+ data.tar.gz: fda655c5b7feb305f307d62335fb5c518de82ce57a8412d9bfe5c0faf833255a497eb4f3271436cd4c4c0a3209db45e9fc10c30eec57ff423dc6ddc3369061f6
@@ -6,8 +6,6 @@ class Book < ActiveRecord::Base
6
6
  GROUPINGS = []
7
7
  ROLES = []
8
8
 
9
- @content_raw = ''
10
-
11
9
  has_one :title, as: :titleable, class_name: 'Dimensions::Title'
12
10
  has_one :slug, as: :slugable, class_name: 'Dimensions::Slug'
13
11
  has_one :subtitle, as: :subtitleable, class_name: 'Dimensions::Subtitle'
@@ -29,7 +27,6 @@ class Book < ActiveRecord::Base
29
27
 
30
28
  attr_accessor :namespace
31
29
 
32
-
33
30
  def kind
34
31
  self.class.to_s
35
32
  end
@@ -53,25 +50,22 @@ class Book < ActiveRecord::Base
53
50
  end
54
51
 
55
52
  def content_raw
56
- puts 'trying to open content'
57
53
  unless self.id.nil?
58
- puts 'id passed'
59
54
  path = Iatelier.configuration.storage_dir + @namespace.to_s + self.class.name.downcase + '/' + self.id.to_s + '/main.md'
60
- puts 'path is set to ' + path
55
+ puts 'triving to retrive the content from the path = ' + path.to_s
61
56
  if File.exists? path
62
- puts 'reading content'
63
- @content = File.open(path).read
57
+ return File.open(path).read
64
58
  else
65
- @content = nil
59
+ return nil
66
60
  end
67
61
  else
68
- @content = nil
62
+ return nil
69
63
  end
70
64
  end
71
65
 
72
66
  def content
73
67
  markdown = Redcarpet::Markdown.new(Redcarpet::Render::HTML, autolink: true, tables: true)
74
- markdown.render(self.content_raw)
68
+ return markdown.render(content_raw.to_s)
75
69
  end
76
70
 
77
71
  # def initialized
@@ -1,3 +1,3 @@
1
1
  module Iatelier
2
- VERSION = "0.4.3"
2
+ VERSION = "0.4.4"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: iatelier
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.3
4
+ version: 0.4.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Captain Husayn Pinguin
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2020-01-29 00:00:00.000000000 Z
11
+ date: 2020-01-30 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler