rack-blogengine 0.0.1 → 0.0.2

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: ad0a0f4e4702a31c490837832bef8fa0c96e2a2b
4
- data.tar.gz: e61d6ab819d643afe7f0b467d090975e5d7c9690
3
+ metadata.gz: 8bd1b8e37482f8cd95c294489db394f439206333
4
+ data.tar.gz: 561ba12dc36433557caf33dcf8496d460ea7d8b4
5
5
  SHA512:
6
- metadata.gz: f71ba584675c2c82695f4cff9de09524a06d8f43322b8d778748c74ce08dcbfa4854a6bfeaa4be7b1408fa76069ab23fe57a5b01d8fc50207d8121d522c34965
7
- data.tar.gz: 759821571f299483d17165b99b5194b8fa629a83e2bad677abf6f1e02b4b737b62d41efe75ac01a729f912362f98fd50027f44991aaa66d759c40bfd9d0019b5
6
+ metadata.gz: c7201c5742f32fc2f9ed07793b72aec14b30c628afd1bb6d3305d716b9de08fb952930f4fff71daee10c16c0794cae8073ed351e0fb19652c0fc4084cc86a6ec
7
+ data.tar.gz: a1ef385672e8ce3d1ef369d43900c742e54125a918b21e427e3ad1c0870086960c4d1117dddaa47baced3377b2a30566baae2184335cb9214e76f2f17c1a6bb3
@@ -1,6 +1,9 @@
1
1
  module Rack
2
2
  module Blogengine
3
3
  class Application
4
+
5
+ # Call Method for run this method as Rack Middleware.
6
+ # @param env, Environment contains information such as path, headers etc...
4
7
  def self.call(env)
5
8
  # Router for map docs to routes
6
9
  route = ApplicationRouter.map_route(env, $targetfolder)
@@ -1,6 +1,8 @@
1
1
  module Rack
2
2
  module Blogengine
3
- class ApplicationRouter
3
+ class ApplicationRouter
4
+ # Maps documents to routes.
5
+ # @param env, @param target (Target folder).
4
6
  def self.map_route(env, target)
5
7
  status = 200
6
8
  header = {"Content-Type" => "text/html; charset=UTF-8"}
@@ -9,6 +9,9 @@ module Rack
9
9
  # }]
10
10
  #
11
11
  # HTML contains Content, Style, JS etc...
12
+
13
+ # Parse in .content Documents.
14
+ # @param target.
12
15
  def self.parseInDocuments(target)
13
16
  @target = target
14
17
  documents = []
@@ -35,6 +38,8 @@ module Rack
35
38
  return documents
36
39
  end
37
40
 
41
+ # Get File Contents (path, title, content)
42
+ # @param file
38
43
  def self.getFileContents(file)
39
44
  # do work on real items
40
45
  content_file = ::File.open("#{@target}/#{file}");
@@ -60,6 +65,8 @@ module Rack
60
65
  end
61
66
  end
62
67
 
68
+ # Replace layout placeholder with content from .content file
69
+ # @param layout
63
70
  def self.fillFileContents(layout)
64
71
  layout.gsub! "{title}", @title
65
72
  layout["{content}"] = @content
@@ -1,5 +1,5 @@
1
1
  module Rack
2
2
  module Blogengine
3
- VERSION = "0.0.1"
3
+ VERSION = "0.0.2"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rack-blogengine
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Benny1992