simple-httpd 0.0.2 → 0.0.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/VERSION +1 -1
- data/lib/simple/httpd/base_controller/error_handling.rb +1 -0
- data/tasks/release.rake +1 -1
- metadata +2 -3
- data/lib/simple/httpd/base_controller/erb.rb +0 -20
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3273a1672a08dca30bf4541e2169bee7e5eb107b0cbf4f335c20c5c4d2190756
|
4
|
+
data.tar.gz: c5262312bb70eb9e213688d6b85c05c4c1bd447d3e682eed5f1ba415d69a33b9
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 44224855c4874348894465f0a56e4910a4d136a5fb675dd34dec7d4306affacdae9c161caccad1eb91122eddb9d1894811938c6f3888abba7e8090d8111d0657
|
7
|
+
data.tar.gz: 6b4bc045304a398031f17471d74c3dca151b0b7ae3847f859fbdf91e80777c9f77b10946f380ebf12e5946a9e6caca7f60a79cdd274ce593a8c25f00e41fb963
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.0.
|
1
|
+
0.0.4
|
data/tasks/release.rake
CHANGED
@@ -15,7 +15,7 @@ class VersionNumberTracker
|
|
15
15
|
end
|
16
16
|
|
17
17
|
def auto_version_bump
|
18
|
-
old_version_number = File.read("VERSION")
|
18
|
+
old_version_number = File.read("VERSION").chomp
|
19
19
|
old = old_version_number.split('.')
|
20
20
|
current = old[0..-2] << old[-1].next
|
21
21
|
new_version_number = current.join('.')
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: simple-httpd
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- radiospiel
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-06-
|
11
|
+
date: 2019-06-16 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: neatjson
|
@@ -162,7 +162,6 @@ files:
|
|
162
162
|
- lib/simple/httpd/base_controller/build_url.rb
|
163
163
|
- lib/simple/httpd/base_controller/cors.rb
|
164
164
|
- lib/simple/httpd/base_controller/debug.rb
|
165
|
-
- lib/simple/httpd/base_controller/erb.rb
|
166
165
|
- lib/simple/httpd/base_controller/error_handling.rb
|
167
166
|
- lib/simple/httpd/base_controller/json.rb
|
168
167
|
- lib/simple/httpd/base_controller/x_processing.rb
|
@@ -1,20 +0,0 @@
|
|
1
|
-
require "erb"
|
2
|
-
|
3
|
-
class Simple::Httpd::BaseController
|
4
|
-
# A simple ERB renderer
|
5
|
-
helpers do
|
6
|
-
module ERB::Helpers
|
7
|
-
def self.json(data)
|
8
|
-
JSON.pretty_generate(data)
|
9
|
-
end
|
10
|
-
end
|
11
|
-
|
12
|
-
def erb(template, data)
|
13
|
-
content_type "text/html"
|
14
|
-
|
15
|
-
erb = template.is_a?(ERB) ? template : ERB.new(template)
|
16
|
-
data[:helpers] = ERB::Helpers
|
17
|
-
erb.result_with_hash(data)
|
18
|
-
end
|
19
|
-
end
|
20
|
-
end
|