simple-httpd 0.0.4 → 0.3.0
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/.gitignore +1 -1
- data/.rubocop.yml +9 -0
- data/.tm_properties +1 -0
- data/Gemfile +21 -1
- data/Makefile +9 -0
- data/README.md +87 -2
- data/Rakefile +5 -0
- data/VERSION +1 -1
- data/bin/simple-httpd +13 -0
- data/examples/README.md +41 -0
- data/examples/ex1/ex1_helpers.rb +5 -0
- data/examples/ex1/root.rb +11 -0
- data/examples/ex2/README.txt +1 -0
- data/examples/ex2/ex2_helpers.rb +5 -0
- data/examples/ex2/helpers.rb +15 -0
- data/examples/ex2/info.rb +4 -0
- data/examples/ex2/root.rb +3 -0
- data/examples/ex3/example_service.rb +13 -0
- data/examples/services/example_service.rb +25 -0
- data/examples/services/explicit_example_service.rb +18 -0
- data/examples/v2/api.js +1 -0
- data/examples/v2/jobs.rb +13 -0
- data/examples/v2/root.rb +3 -0
- data/examples/v2/v2_helpers.rb +5 -0
- data/lib/simple-service.rb +3 -0
- data/lib/simple/httpd.rb +99 -25
- data/lib/simple/httpd/base_controller.rb +2 -2
- data/lib/simple/httpd/base_controller/error_handling.rb +45 -17
- data/lib/simple/httpd/base_controller/json.rb +15 -8
- data/lib/simple/httpd/cli.rb +99 -0
- data/lib/simple/httpd/helpers.rb +54 -0
- data/lib/simple/httpd/mount_spec.rb +106 -0
- data/lib/simple/httpd/rack.rb +17 -0
- data/lib/simple/httpd/rack/dynamic_mount.rb +66 -0
- data/lib/simple/httpd/rack/merger.rb +28 -0
- data/lib/simple/httpd/rack/static_mount.rb +50 -0
- data/lib/simple/httpd/server.rb +69 -0
- data/lib/simple/httpd/service.rb +70 -0
- data/lib/simple/httpd/version.rb +1 -1
- data/lib/simple/service.rb +69 -0
- data/lib/simple/service/action.rb +78 -0
- data/lib/simple/service/context.rb +46 -0
- data/scripts/release +2 -0
- data/scripts/release.rb +91 -0
- data/simple-httpd.gemspec +9 -19
- data/spec/simple/httpd/base_controller/httpd_cors_spec.rb +15 -0
- data/spec/simple/httpd/base_controller/httpd_debug_spec.rb +11 -0
- data/spec/simple/httpd/base_controller/httpd_x_processing_copy.rb +15 -0
- data/spec/simple/httpd/base_spec.rb +16 -0
- data/spec/simple/httpd/dynamic_mounting_spec.rb +33 -0
- data/spec/simple/httpd/helpers_spec.rb +15 -0
- data/spec/simple/httpd/rspec_httpd_spec.rb +17 -0
- data/spec/simple/httpd/services/service_explicit_spec.rb +34 -0
- data/spec/simple/httpd/services/service_spec.rb +34 -0
- data/spec/simple/httpd/static_mounting_spec.rb +13 -0
- data/spec/spec_helper.rb +30 -6
- data/spec/support/004_simplecov.rb +3 -12
- metadata +61 -84
- data/lib/simple/httpd/app.rb +0 -84
- data/lib/simple/httpd/app/file_server.rb +0 -19
- data/spec/simple/httpd/version_spec.rb +0 -10
- data/tasks/release.rake +0 -104
data/simple-httpd.gemspec
CHANGED
@@ -1,10 +1,5 @@
|
|
1
|
-
#
|
2
|
-
#
|
3
|
-
# Copyright (c) 2016, 2017 @radiospiel, mediapeers Gem
|
4
|
-
# Distributed under the terms of the modified BSD license, see LICENSE.BSD
|
5
|
-
|
6
|
-
lib = File.expand_path('../lib', __FILE__)
|
7
|
-
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
1
|
+
# lib = File.expand_path('../lib', __FILE__)
|
2
|
+
# $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
8
3
|
|
9
4
|
Gem::Specification.new do |gem|
|
10
5
|
gem.name = "simple-httpd"
|
@@ -26,16 +21,11 @@ Gem::Specification.new do |gem|
|
|
26
21
|
|
27
22
|
gem.required_ruby_version = '~> 2.5'
|
28
23
|
|
29
|
-
#
|
30
|
-
gem.
|
31
|
-
gem.
|
32
|
-
gem.
|
33
|
-
|
34
|
-
|
35
|
-
gem.add_development_dependency "rspec-httpd", "~> 0.0.14"
|
36
|
-
gem.add_development_dependency 'rake', '~> 11'
|
37
|
-
gem.add_development_dependency 'rspec', '~> 3.7'
|
38
|
-
gem.add_development_dependency 'rubocop', '~> 0.61.1'
|
39
|
-
gem.add_development_dependency 'simplecov', '~> 0'
|
40
|
-
gem.add_development_dependency 'awesome_print', '~> 0'
|
24
|
+
# dependencies
|
25
|
+
gem.add_dependency "neatjson", "~> 0.8.4"
|
26
|
+
gem.add_dependency "sinatra", "~> 2"
|
27
|
+
# gem.add_dependency "sinatra-reloader", "~> 1"
|
28
|
+
gem.add_dependency "expectation", "~> 1"
|
29
|
+
gem.add_dependency "simple-cli", "~> 0.3.0"
|
41
30
|
end
|
31
|
+
#require "expectation"
|
@@ -0,0 +1,15 @@
|
|
1
|
+
require "spec_helper"
|
2
|
+
|
3
|
+
describe Simple::Httpd do
|
4
|
+
describe "CORS headers" do
|
5
|
+
it "returns CORS headers on dynamic responses" do
|
6
|
+
http.get "/"
|
7
|
+
expect(http.response.headers.keys).to include("access-control-allow-origin")
|
8
|
+
end
|
9
|
+
|
10
|
+
it "returns CORS headers" do
|
11
|
+
http.get "/README.txt"
|
12
|
+
expect(http.response.headers.keys).not_to include("access-control-allow-origin")
|
13
|
+
end
|
14
|
+
end
|
15
|
+
end
|
@@ -0,0 +1,11 @@
|
|
1
|
+
require "spec_helper"
|
2
|
+
|
3
|
+
describe Simple::Httpd do
|
4
|
+
describe "debug feature" do
|
5
|
+
it "returns CORS headers on dynamic responses" do
|
6
|
+
http.get "/debug?foo"
|
7
|
+
expect_response '{"foo"=>nil}' + "\n"
|
8
|
+
expect(http.response.headers["content-type"]).to match(/text\/plain/)
|
9
|
+
end
|
10
|
+
end
|
11
|
+
end
|
@@ -0,0 +1,15 @@
|
|
1
|
+
require "spec_helper"
|
2
|
+
|
3
|
+
describe Simple::Httpd do
|
4
|
+
describe "X-Processing headers" do
|
5
|
+
it "returns X-Processing headers on dynamic responses" do
|
6
|
+
http.get "/"
|
7
|
+
expect(http.response.headers.keys).to include("x-processing")
|
8
|
+
end
|
9
|
+
|
10
|
+
it "returns X-Processing headers on static responses" do
|
11
|
+
http.get "/README.txt"
|
12
|
+
expect(http.response.headers.keys).not_to include("x-processing")
|
13
|
+
end
|
14
|
+
end
|
15
|
+
end
|
@@ -0,0 +1,16 @@
|
|
1
|
+
require "spec_helper"
|
2
|
+
|
3
|
+
describe Simple::Httpd do
|
4
|
+
describe "VERSION" do
|
5
|
+
it "defines a version string" do
|
6
|
+
expect(Simple::Httpd::VERSION).to match(/^\d+\.\d+\.\d+/)
|
7
|
+
end
|
8
|
+
end
|
9
|
+
|
10
|
+
describe "root routing" do
|
11
|
+
it "resolves routes from root.rb" do
|
12
|
+
http.get "/"
|
13
|
+
expect_response "root"
|
14
|
+
end
|
15
|
+
end
|
16
|
+
end
|
@@ -0,0 +1,33 @@
|
|
1
|
+
require "spec_helper"
|
2
|
+
|
3
|
+
describe "dynamic mounting" do
|
4
|
+
it "resolves routes from root.rb" do
|
5
|
+
http.get "/"
|
6
|
+
expect_response "root"
|
7
|
+
end
|
8
|
+
|
9
|
+
# mounting not at root level
|
10
|
+
it "gets deep route from a root.rb file not mounted at /" do
|
11
|
+
http.get "/api/v2"
|
12
|
+
expect(http.content).to eq("version" => "v2")
|
13
|
+
expect(http.response.headers["content-type"]).to match(/application\/json/)
|
14
|
+
end
|
15
|
+
|
16
|
+
it "gets deep route from static file" do
|
17
|
+
http.get "/api/v2/api.js"
|
18
|
+
expect_response /API example file/
|
19
|
+
expect(http.response.headers["content-type"]).to match(/application\/javascript/)
|
20
|
+
end
|
21
|
+
|
22
|
+
it "gets deep route from non-root.rb file" do
|
23
|
+
http.get "/api/v2/jobs/info"
|
24
|
+
expect_response "info"
|
25
|
+
expect(http.response.headers["content-type"]).to match(/text\/plain/)
|
26
|
+
end
|
27
|
+
|
28
|
+
it "gets deep route with params from non-root.rb file" do
|
29
|
+
http.get "/api/v2/jobs/12/events"
|
30
|
+
expect(http.response.headers["content-type"]).to match(/application\/json/)
|
31
|
+
expect(http.content).to eq([{ "job_id" => "12", "id" => "event1" }, { "job_id" => "12", "id" => "event2" }])
|
32
|
+
end
|
33
|
+
end
|
@@ -0,0 +1,15 @@
|
|
1
|
+
require "spec_helper"
|
2
|
+
|
3
|
+
describe Simple::Httpd do
|
4
|
+
describe "helpers" do
|
5
|
+
it "loads helpers from the same directory tree" do
|
6
|
+
http.get "/helpers/ex2"
|
7
|
+
expect_response "ex2_helper"
|
8
|
+
end
|
9
|
+
|
10
|
+
it "does not load helpers from other directory tree even on the same URL tree" do
|
11
|
+
http.get "/helpers/ex1"
|
12
|
+
expect_response status: 404
|
13
|
+
end
|
14
|
+
end
|
15
|
+
end
|
@@ -0,0 +1,17 @@
|
|
1
|
+
require "spec_helper"
|
2
|
+
|
3
|
+
describe "RSpec::Httpd features" do
|
4
|
+
it "sends proper headers" do
|
5
|
+
http.get "/info/inspect?qux"
|
6
|
+
|
7
|
+
result_lines = http.content.split("\n")
|
8
|
+
|
9
|
+
expect(result_lines).to include("QUERY_STRING=qux")
|
10
|
+
expect(result_lines).to include("REQUEST_METHOD=GET")
|
11
|
+
expect(result_lines).to include("REQUEST_PATH=/info/inspect")
|
12
|
+
expect(result_lines).to include("SERVER_NAME=127.0.0.1")
|
13
|
+
expect(result_lines).to include("SERVER_PORT=12345")
|
14
|
+
|
15
|
+
expect(http.response.headers["content-type"]).to match(/text\/plain/)
|
16
|
+
end
|
17
|
+
end
|
@@ -0,0 +1,34 @@
|
|
1
|
+
require "spec_helper"
|
2
|
+
|
3
|
+
describe "explicit mounting of service" do
|
4
|
+
# mounting not at root level
|
5
|
+
it "mounts the file" do
|
6
|
+
http.get "/example_service/check"
|
7
|
+
expect_response("ok: explicit_service")
|
8
|
+
end
|
9
|
+
|
10
|
+
it "properly extracts an argument from the path" do
|
11
|
+
http.post "/example_service/echo/1?b=2", { one: "foo", two: "bar" }
|
12
|
+
expect_response "one: [foo]/two: [bar]/a: [1]/b: [2]"
|
13
|
+
end
|
14
|
+
|
15
|
+
it "ignores extra body arguments and extra parameters" do
|
16
|
+
http.post "/example_service/echo/1?b=2&c=3", { one: "foo", two: "bar", three: "baz" }
|
17
|
+
expect_response "one: [foo]/two: [bar]/a: [1]/b: [2]"
|
18
|
+
end
|
19
|
+
|
20
|
+
it "complains on missing body arguments" do
|
21
|
+
http.post "/example_service/echo/1?b=2&c=3", { two: "bar" }
|
22
|
+
expect_response 422
|
23
|
+
end
|
24
|
+
|
25
|
+
it "ignores missing parameters arguments" do
|
26
|
+
http.post "/example_service/echo/1", { one: "foo", two: "bar" }
|
27
|
+
expect_response "one: [foo]/two: [bar]/a: [1]/b: []"
|
28
|
+
end
|
29
|
+
|
30
|
+
it "properly extracts arguments and parameters" do
|
31
|
+
http.put "/example_service/echo_context"
|
32
|
+
expect_response /Simple::Service::Context/
|
33
|
+
end
|
34
|
+
end
|
@@ -0,0 +1,34 @@
|
|
1
|
+
require "spec_helper"
|
2
|
+
|
3
|
+
describe "service file" do
|
4
|
+
# mounting not at root level
|
5
|
+
it "returns value from mapped function" do
|
6
|
+
http.post "/service/example/test?a=1&b=2"
|
7
|
+
expect_response("hello from ExampleService#test")
|
8
|
+
end
|
9
|
+
|
10
|
+
it "properly extracts arguments and parameters" do
|
11
|
+
http.post "/service/example/echo?a=1&b=2", { one: "foo", two: "bar" }
|
12
|
+
expect_response "one: [foo]/two: [bar]/a: [1]/b: [2]"
|
13
|
+
end
|
14
|
+
|
15
|
+
it "ignores extra body arguments and extra parameters" do
|
16
|
+
http.post "/service/example/echo?a=1&b=2&c=3", { one: "foo", two: "bar", three: "baz" }
|
17
|
+
expect_response "one: [foo]/two: [bar]/a: [1]/b: [2]"
|
18
|
+
end
|
19
|
+
|
20
|
+
it "complains on missing body arguments" do
|
21
|
+
http.post "/service/example/echo?a=1&b=2&c=3", { two: "bar" }
|
22
|
+
expect_response 422
|
23
|
+
end
|
24
|
+
|
25
|
+
it "ignores missing parameters arguments" do
|
26
|
+
http.post "/service/example/echo?b=2", { one: "foo", two: "bar" }
|
27
|
+
expect_response "one: [foo]/two: [bar]/a: []/b: [2]"
|
28
|
+
end
|
29
|
+
|
30
|
+
it "properly extracts arguments and parameters" do
|
31
|
+
http.post "/service/example/echo_context"
|
32
|
+
expect_response /Simple::Service::Context/
|
33
|
+
end
|
34
|
+
end
|
@@ -0,0 +1,13 @@
|
|
1
|
+
require "spec_helper"
|
2
|
+
|
3
|
+
describe "static mounting" do
|
4
|
+
it "returns a static file" do
|
5
|
+
http.get "/README.txt"
|
6
|
+
expect_response "This is a README file\n"
|
7
|
+
end
|
8
|
+
|
9
|
+
it "does not return a forbidden static file" do
|
10
|
+
http.get "/root.rb"
|
11
|
+
expect_response 404
|
12
|
+
end
|
13
|
+
end
|
data/spec/spec_helper.rb
CHANGED
@@ -1,14 +1,36 @@
|
|
1
|
-
%w(auth authentication authorization).each do |library_name|
|
2
|
-
path = File.expand_path("../../#{library_name}/lib", __FILE__)
|
3
|
-
$LOAD_PATH.unshift(path) unless $LOAD_PATH.include?(path)
|
4
|
-
end
|
5
|
-
|
6
1
|
ENV["RACK_ENV"] = "test"
|
7
2
|
ENV["RAILS_ENV"] = "test"
|
8
3
|
|
9
4
|
require "byebug"
|
10
5
|
require "rspec"
|
11
|
-
require "
|
6
|
+
require "rspec-httpd"
|
7
|
+
|
8
|
+
if ENV["PRELOAD_SERVER_GEM"]
|
9
|
+
require ENV["PRELOAD_SERVER_GEM"]
|
10
|
+
end
|
11
|
+
|
12
|
+
# You can comment parts of the command below by prepending the line with a '#'
|
13
|
+
HTTPD_COMMAND = <<~CMD
|
14
|
+
PORT=12345
|
15
|
+
bin/simple-httpd
|
16
|
+
--environment=test
|
17
|
+
examples/ex1
|
18
|
+
examples/ex2
|
19
|
+
examples/ex3
|
20
|
+
examples/v2:api/v2
|
21
|
+
--services=examples/services
|
22
|
+
Example::Service:service/example
|
23
|
+
2> log/test.log
|
24
|
+
CMD
|
25
|
+
|
26
|
+
RSpec::Httpd.configure do |config|
|
27
|
+
config.host = "127.0.0.1"
|
28
|
+
config.port = 12_345
|
29
|
+
|
30
|
+
# remove commented parts from HTTPD_COMMAND
|
31
|
+
config.command = HTTPD_COMMAND.split(/\s*\n\s*/m).grep(/^\s*[^#]/).join(" ")
|
32
|
+
end
|
33
|
+
|
12
34
|
Dir.glob("./spec/support/**/*.rb").sort.each { |path| load path }
|
13
35
|
|
14
36
|
require "simple/httpd"
|
@@ -24,6 +46,8 @@ RSpec.configure do |config|
|
|
24
46
|
config.backtrace_exclusion_patterns << /spec_helper/
|
25
47
|
config.backtrace_exclusion_patterns << /database_cleaner/
|
26
48
|
|
49
|
+
config.include ::RSpec::Httpd
|
50
|
+
|
27
51
|
# config.around(:each) do |example|
|
28
52
|
# example.run
|
29
53
|
# end
|
@@ -1,22 +1,13 @@
|
|
1
1
|
require "simplecov"
|
2
2
|
|
3
|
-
# make sure multiple runs result in multiple result set. SimpleCov will take
|
4
|
-
# care of merging these results automatically.
|
5
|
-
SimpleCov.command_name "test:#{ENV['USE_ACTIVE_RECORD']}"
|
6
|
-
|
7
|
-
USE_ACTIVE_RECORD = ENV["USE_ACTIVE_RECORD"] == "1"
|
8
|
-
|
9
3
|
SimpleCov.start do
|
10
|
-
# return true to remove src from coverage
|
4
|
+
# return true to remove src from coverage
|
11
5
|
add_filter do |src|
|
12
6
|
next true if src.filename =~ /\/spec\//
|
13
|
-
next true if src.filename =~ /\/
|
14
|
-
|
15
|
-
next true if USE_ACTIVE_RECORD && src.filename =~ /\/sql\/connection\/raw_connection\.rb/
|
16
|
-
next true if !USE_ACTIVE_RECORD && src.filename =~ /\/sql\/connection\/active_record_connection\.rb/
|
7
|
+
next true if src.filename =~ /\/version.rb$/
|
17
8
|
|
18
9
|
false
|
19
10
|
end
|
20
11
|
|
21
|
-
minimum_coverage 90
|
12
|
+
# minimum_coverage 90
|
22
13
|
end
|
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.3.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- radiospiel
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-
|
11
|
+
date: 2019-11-16 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: neatjson
|
@@ -39,7 +39,7 @@ dependencies:
|
|
39
39
|
- !ruby/object:Gem::Version
|
40
40
|
version: '2'
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
|
-
name:
|
42
|
+
name: expectation
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
44
44
|
requirements:
|
45
45
|
- - "~>"
|
@@ -53,89 +53,19 @@ dependencies:
|
|
53
53
|
- !ruby/object:Gem::Version
|
54
54
|
version: '1'
|
55
55
|
- !ruby/object:Gem::Dependency
|
56
|
-
name:
|
56
|
+
name: simple-cli
|
57
57
|
requirement: !ruby/object:Gem::Requirement
|
58
58
|
requirements:
|
59
59
|
- - "~>"
|
60
60
|
- !ruby/object:Gem::Version
|
61
|
-
version: 0.0
|
62
|
-
type: :
|
63
|
-
prerelease: false
|
64
|
-
version_requirements: !ruby/object:Gem::Requirement
|
65
|
-
requirements:
|
66
|
-
- - "~>"
|
67
|
-
- !ruby/object:Gem::Version
|
68
|
-
version: 0.0.14
|
69
|
-
- !ruby/object:Gem::Dependency
|
70
|
-
name: rake
|
71
|
-
requirement: !ruby/object:Gem::Requirement
|
72
|
-
requirements:
|
73
|
-
- - "~>"
|
74
|
-
- !ruby/object:Gem::Version
|
75
|
-
version: '11'
|
76
|
-
type: :development
|
77
|
-
prerelease: false
|
78
|
-
version_requirements: !ruby/object:Gem::Requirement
|
79
|
-
requirements:
|
80
|
-
- - "~>"
|
81
|
-
- !ruby/object:Gem::Version
|
82
|
-
version: '11'
|
83
|
-
- !ruby/object:Gem::Dependency
|
84
|
-
name: rspec
|
85
|
-
requirement: !ruby/object:Gem::Requirement
|
86
|
-
requirements:
|
87
|
-
- - "~>"
|
88
|
-
- !ruby/object:Gem::Version
|
89
|
-
version: '3.7'
|
90
|
-
type: :development
|
91
|
-
prerelease: false
|
92
|
-
version_requirements: !ruby/object:Gem::Requirement
|
93
|
-
requirements:
|
94
|
-
- - "~>"
|
95
|
-
- !ruby/object:Gem::Version
|
96
|
-
version: '3.7'
|
97
|
-
- !ruby/object:Gem::Dependency
|
98
|
-
name: rubocop
|
99
|
-
requirement: !ruby/object:Gem::Requirement
|
100
|
-
requirements:
|
101
|
-
- - "~>"
|
102
|
-
- !ruby/object:Gem::Version
|
103
|
-
version: 0.61.1
|
104
|
-
type: :development
|
105
|
-
prerelease: false
|
106
|
-
version_requirements: !ruby/object:Gem::Requirement
|
107
|
-
requirements:
|
108
|
-
- - "~>"
|
109
|
-
- !ruby/object:Gem::Version
|
110
|
-
version: 0.61.1
|
111
|
-
- !ruby/object:Gem::Dependency
|
112
|
-
name: simplecov
|
113
|
-
requirement: !ruby/object:Gem::Requirement
|
114
|
-
requirements:
|
115
|
-
- - "~>"
|
116
|
-
- !ruby/object:Gem::Version
|
117
|
-
version: '0'
|
118
|
-
type: :development
|
119
|
-
prerelease: false
|
120
|
-
version_requirements: !ruby/object:Gem::Requirement
|
121
|
-
requirements:
|
122
|
-
- - "~>"
|
123
|
-
- !ruby/object:Gem::Version
|
124
|
-
version: '0'
|
125
|
-
- !ruby/object:Gem::Dependency
|
126
|
-
name: awesome_print
|
127
|
-
requirement: !ruby/object:Gem::Requirement
|
128
|
-
requirements:
|
129
|
-
- - "~>"
|
130
|
-
- !ruby/object:Gem::Version
|
131
|
-
version: '0'
|
132
|
-
type: :development
|
61
|
+
version: 0.3.0
|
62
|
+
type: :runtime
|
133
63
|
prerelease: false
|
134
64
|
version_requirements: !ruby/object:Gem::Requirement
|
135
65
|
requirements:
|
136
66
|
- - "~>"
|
137
67
|
- !ruby/object:Gem::Version
|
138
|
-
version:
|
68
|
+
version: 0.3.0
|
139
69
|
description: Super-simple HTTPD server - sinatra w/gimmiks
|
140
70
|
email: eno@radiospiel.org
|
141
71
|
executables: []
|
@@ -144,7 +74,9 @@ extra_rdoc_files: []
|
|
144
74
|
files:
|
145
75
|
- ".gitignore"
|
146
76
|
- ".rubocop.yml"
|
77
|
+
- ".tm_properties"
|
147
78
|
- Gemfile
|
79
|
+
- Makefile
|
148
80
|
- README.md
|
149
81
|
- Rakefile
|
150
82
|
- VERSION
|
@@ -153,11 +85,26 @@ files:
|
|
153
85
|
- bin/rake
|
154
86
|
- bin/rspec
|
155
87
|
- bin/rubocop
|
88
|
+
- bin/simple-httpd
|
89
|
+
- examples/README.md
|
90
|
+
- examples/ex1/ex1_helpers.rb
|
91
|
+
- examples/ex1/root.rb
|
92
|
+
- examples/ex2/README.txt
|
93
|
+
- examples/ex2/ex2_helpers.rb
|
94
|
+
- examples/ex2/helpers.rb
|
95
|
+
- examples/ex2/info.rb
|
96
|
+
- examples/ex2/root.rb
|
97
|
+
- examples/ex3/example_service.rb
|
98
|
+
- examples/services/example_service.rb
|
99
|
+
- examples/services/explicit_example_service.rb
|
100
|
+
- examples/v2/api.js
|
101
|
+
- examples/v2/jobs.rb
|
102
|
+
- examples/v2/root.rb
|
103
|
+
- examples/v2/v2_helpers.rb
|
156
104
|
- lib/simple-httpd.rb
|
105
|
+
- lib/simple-service.rb
|
157
106
|
- lib/simple.rb
|
158
107
|
- lib/simple/httpd.rb
|
159
|
-
- lib/simple/httpd/app.rb
|
160
|
-
- lib/simple/httpd/app/file_server.rb
|
161
108
|
- lib/simple/httpd/base_controller.rb
|
162
109
|
- lib/simple/httpd/base_controller/build_url.rb
|
163
110
|
- lib/simple/httpd/base_controller/cors.rb
|
@@ -165,15 +112,37 @@ files:
|
|
165
112
|
- lib/simple/httpd/base_controller/error_handling.rb
|
166
113
|
- lib/simple/httpd/base_controller/json.rb
|
167
114
|
- lib/simple/httpd/base_controller/x_processing.rb
|
115
|
+
- lib/simple/httpd/cli.rb
|
116
|
+
- lib/simple/httpd/helpers.rb
|
117
|
+
- lib/simple/httpd/mount_spec.rb
|
118
|
+
- lib/simple/httpd/rack.rb
|
119
|
+
- lib/simple/httpd/rack/dynamic_mount.rb
|
120
|
+
- lib/simple/httpd/rack/merger.rb
|
121
|
+
- lib/simple/httpd/rack/static_mount.rb
|
122
|
+
- lib/simple/httpd/server.rb
|
123
|
+
- lib/simple/httpd/service.rb
|
168
124
|
- lib/simple/httpd/version.rb
|
125
|
+
- lib/simple/service.rb
|
126
|
+
- lib/simple/service/action.rb
|
127
|
+
- lib/simple/service/context.rb
|
169
128
|
- log/.gitkeep
|
129
|
+
- scripts/release
|
130
|
+
- scripts/release.rb
|
170
131
|
- scripts/stats
|
171
132
|
- scripts/watch
|
172
133
|
- simple-httpd.gemspec
|
173
|
-
- spec/simple/httpd/
|
134
|
+
- spec/simple/httpd/base_controller/httpd_cors_spec.rb
|
135
|
+
- spec/simple/httpd/base_controller/httpd_debug_spec.rb
|
136
|
+
- spec/simple/httpd/base_controller/httpd_x_processing_copy.rb
|
137
|
+
- spec/simple/httpd/base_spec.rb
|
138
|
+
- spec/simple/httpd/dynamic_mounting_spec.rb
|
139
|
+
- spec/simple/httpd/helpers_spec.rb
|
140
|
+
- spec/simple/httpd/rspec_httpd_spec.rb
|
141
|
+
- spec/simple/httpd/services/service_explicit_spec.rb
|
142
|
+
- spec/simple/httpd/services/service_spec.rb
|
143
|
+
- spec/simple/httpd/static_mounting_spec.rb
|
174
144
|
- spec/spec_helper.rb
|
175
145
|
- spec/support/004_simplecov.rb
|
176
|
-
- tasks/release.rake
|
177
146
|
homepage: http://github.com/radiospiel/simple-httpd
|
178
147
|
licenses: []
|
179
148
|
metadata: {}
|
@@ -192,12 +161,20 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
192
161
|
- !ruby/object:Gem::Version
|
193
162
|
version: '0'
|
194
163
|
requirements: []
|
195
|
-
|
196
|
-
rubygems_version: 2.7.6
|
164
|
+
rubygems_version: 3.0.4
|
197
165
|
signing_key:
|
198
166
|
specification_version: 4
|
199
167
|
summary: Super-simple HTTPD server
|
200
168
|
test_files:
|
201
|
-
- spec/simple/httpd/
|
169
|
+
- spec/simple/httpd/base_controller/httpd_cors_spec.rb
|
170
|
+
- spec/simple/httpd/base_controller/httpd_debug_spec.rb
|
171
|
+
- spec/simple/httpd/base_controller/httpd_x_processing_copy.rb
|
172
|
+
- spec/simple/httpd/base_spec.rb
|
173
|
+
- spec/simple/httpd/dynamic_mounting_spec.rb
|
174
|
+
- spec/simple/httpd/helpers_spec.rb
|
175
|
+
- spec/simple/httpd/rspec_httpd_spec.rb
|
176
|
+
- spec/simple/httpd/services/service_explicit_spec.rb
|
177
|
+
- spec/simple/httpd/services/service_spec.rb
|
178
|
+
- spec/simple/httpd/static_mounting_spec.rb
|
202
179
|
- spec/spec_helper.rb
|
203
180
|
- spec/support/004_simplecov.rb
|