iatelier 0.4.3 → 0.4.4
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 +4 -4
- data/lib/iatelier/models/book.rb +5 -11
- data/lib/iatelier/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 0d0ea435d398836e042fdc16823794f774ead547af140dab422a08c6890142aa
|
4
|
+
data.tar.gz: 746fb34460ec905ac5e505f770595124df7bc40b93f416658d43e47613e7dc9b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 82c1cefe9a016441ec0c243d62f5103a29cd65ae709ef822df9417c4b781f4e6cfed60cc19b97998889b9880a03944427c8a58f27039fe3af1fb480993c05b75
|
7
|
+
data.tar.gz: fda655c5b7feb305f307d62335fb5c518de82ce57a8412d9bfe5c0faf833255a497eb4f3271436cd4c4c0a3209db45e9fc10c30eec57ff423dc6ddc3369061f6
|
data/lib/iatelier/models/book.rb
CHANGED
@@ -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 '
|
55
|
+
puts 'triving to retrive the content from the path = ' + path.to_s
|
61
56
|
if File.exists? path
|
62
|
-
|
63
|
-
@content = File.open(path).read
|
57
|
+
return File.open(path).read
|
64
58
|
else
|
65
|
-
|
59
|
+
return nil
|
66
60
|
end
|
67
61
|
else
|
68
|
-
|
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(
|
68
|
+
return markdown.render(content_raw.to_s)
|
75
69
|
end
|
76
70
|
|
77
71
|
# def initialized
|
data/lib/iatelier/version.rb
CHANGED
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.
|
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-
|
11
|
+
date: 2020-01-30 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|