rackstep 0.0.4 → 0.0.5
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/controller.rb +0 -14
- data/lib/rackstep.rb +8 -2
- data/lib/router.rb +3 -1
- metadata +3 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 5ae595eef51cb68ce8488b0198916fd31f58a993
|
|
4
|
+
data.tar.gz: e0cac291299b137a9d5c94369e67a6ef696a6396
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 8558d518e2296257a2e6c59b2423bc6532ffadb97aab79950aa765c36ab09661862fc0f25d055128e92fc9aca4f812756b7dcd6f6e723969928214e83aa8382e
|
|
7
|
+
data.tar.gz: bd486f7573e6d50f024ec8fc09a61f96e85f520745e95bc68df2febe352d46d2eeb82d542bb254b0a6326ff6d1c06b08ffe7e135d42f137b3e71d2c0799de330
|
data/lib/controller.rb
CHANGED
|
@@ -61,20 +61,6 @@ class RackStep::NotFoundController < RackStep::Controller
|
|
|
61
61
|
|
|
62
62
|
end
|
|
63
63
|
|
|
64
|
-
# A module for controllers to add static html pages rendering.
|
|
65
|
-
# This is not the best way to serve static content. In production, consider
|
|
66
|
-
# using Nginx or Apache or Amazon S3. Using ruby/rack to serve static content
|
|
67
|
-
# is a waste of resources and should be only used for low traffic web pages.
|
|
68
|
-
# This method is provided so that in this circumstances you may use it to
|
|
69
|
-
# keep a simpler architecture.
|
|
70
|
-
# TODO: Add layout support.
|
|
71
|
-
module RackStep::Controller::HtmlRendering
|
|
72
|
-
|
|
73
|
-
def render_page(page_name, pages_directory = 'app/public/pages')
|
|
74
|
-
File.read("#{pages_directory}/#{page_name}.html")
|
|
75
|
-
end
|
|
76
|
-
|
|
77
|
-
end
|
|
78
64
|
|
|
79
65
|
# A module for controllers to add ERB template rendering. RackStep is not meant
|
|
80
66
|
# to be used for template rendering. We recommend you to use a SPA (Single Page
|
data/lib/rackstep.rb
CHANGED
|
@@ -1,5 +1,8 @@
|
|
|
1
|
-
#
|
|
2
|
-
#
|
|
1
|
+
# In this file you will find the RackStep::App class.
|
|
2
|
+
# This is one of the fundamental parts of the framework and
|
|
3
|
+
# is responsable for the whole orchestration.
|
|
4
|
+
# To use RackStep one of the first things you will have to
|
|
5
|
+
# do is extend this class.
|
|
3
6
|
|
|
4
7
|
require 'rack'
|
|
5
8
|
require_relative 'response'
|
|
@@ -10,6 +13,8 @@ require_relative 'controller'
|
|
|
10
13
|
|
|
11
14
|
module RackStep
|
|
12
15
|
|
|
16
|
+
# Abstract class with the base of a RackStep app.
|
|
17
|
+
# This class MUST be extended by the user.
|
|
13
18
|
class App
|
|
14
19
|
|
|
15
20
|
# Will store the received request which will be injected into the user controllers.
|
|
@@ -30,6 +35,7 @@ module RackStep
|
|
|
30
35
|
new(env).process_request
|
|
31
36
|
end
|
|
32
37
|
|
|
38
|
+
# Initialize all instance variables and add a default "not found" route.
|
|
33
39
|
def initialize(env)
|
|
34
40
|
@request = Rack::Request.new(env)
|
|
35
41
|
@settings = RackStep::GlobalConfiguration.instance.settings
|
data/lib/router.rb
CHANGED
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: rackstep
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.0.
|
|
4
|
+
version: 0.0.5
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Marcio Frayze David
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2016-02-
|
|
11
|
+
date: 2016-02-23 00:00:00.000000000 Z
|
|
12
12
|
dependencies: []
|
|
13
13
|
description: RackStep is (yet another) micro ruby framework for microservices and
|
|
14
14
|
web development.
|
|
@@ -48,3 +48,4 @@ signing_key:
|
|
|
48
48
|
specification_version: 4
|
|
49
49
|
summary: RackStep micro web framework
|
|
50
50
|
test_files: []
|
|
51
|
+
has_rdoc:
|