simple-httpd 0.3.1 → 0.3.3

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
  SHA256:
3
- metadata.gz: 4a7ef636de1fafcba61a0e8d7ed71a235d9c4700633f8ef8a899028415ffa1c7
4
- data.tar.gz: 2018dc0e1bd99ec1bdc40524bfe2701be509e252cb6655b21e629e996da22614
3
+ metadata.gz: cc1dda6853c5b404f0e0fc39e99a683ab07e2c0fbe1b1b1652d4fc435795478a
4
+ data.tar.gz: cea28ea197759a048180cb96a8b7bac0f05e2ce9bdc6e77cb568bfcd0f19f230
5
5
  SHA512:
6
- metadata.gz: dd3fc097a2342e19b79c087fec69c92db23085c2352d323c3b284e60eaa764543048f731063e0d3c31ad3e136dc1bb2518456c00519f9231c0f3cde57a96f0d2
7
- data.tar.gz: aff819af94b2b12d8e02c1c966dc9eeb9eb6d3b4a805778d609600d2dc9ff33dccb435983ecf4e1221e5346b899ccd7b358d625756fe26b912bf662b94770226
6
+ metadata.gz: a78da1bd982ab52563ec1032f5ad678fbdf73019e02eaa21552cfc48783303aa715a9eecaa626687ea44a81177e91e1b39c29ee84ec317f7b929e43b181989c8
7
+ data.tar.gz: 25bd47a6a122d648d351b3fac73c3938d0e42eb556869cd6c618a096225e3e09d218f2cfbf8994fae1657ecce38e9978d94f27db48adbf820c9dd0bc1d845186
data/Gemfile CHANGED
@@ -21,7 +21,7 @@ group :development, :test do
21
21
  gem 'simplecov', '~> 0'
22
22
  gem 'byebug'
23
23
 
24
- if ENV["PRELOAD_SERVER_GEM"]
25
- gem ENV["PRELOAD_SERVER_GEM"]
24
+ ENV["PRELOAD_GEMS"].to_s.split(",").each do |gem_name|
25
+ gem gem_name
26
26
  end
27
27
  end
data/Makefile CHANGED
@@ -6,4 +6,4 @@ test:
6
6
  .PHONY: fulltest
7
7
  fulltest:
8
8
  rspec
9
- PRELOAD_SERVER_GEM=puma rspec
9
+ PRELOAD_GEMS=puma rspec
data/Rakefile CHANGED
@@ -4,3 +4,7 @@ task :release do
4
4
  sh "scripts/release"
5
5
  end
6
6
 
7
+ task :default do
8
+ sh "make"
9
+ end
10
+
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.3.1
1
+ 0.3.3
@@ -72,12 +72,7 @@ module Simple::Httpd::ServiceAdapter
72
72
  # define sinatra route.
73
73
  route(verb, path) do
74
74
  ::Simple::Service.with_context(context) do
75
- # [TODO] - symbolizing keys opens up this for DDOS effects.
76
- # THIS MUST BE FIXED IN simple-service.
77
- flags = self.params.inject({}) { |hsh, (k,v)| hsh.update k.to_sym => v }
78
- args = self.parsed_body.inject({}) { |hsh, (k,v)| hsh.update k.to_sym => v }
79
-
80
- result = ::Simple::Service.invoke2(service, action_name, args: args, flags: flags)
75
+ result = ::Simple::Service.invoke2(service, action_name, args: self.parsed_body, flags: self.params)
81
76
  encode_result(result)
82
77
  end
83
78
  end
data/simple-httpd.gemspec CHANGED
@@ -15,9 +15,7 @@ Gem::Specification.new do |gem|
15
15
  gem.files = `git ls-files`.split($/)
16
16
  gem.test_files = gem.files.grep(%r{^(test|spec|features)/})
17
17
  gem.require_paths = %w(lib)
18
-
19
- # executables are used for development purposes only
20
- gem.executables = []
18
+ gem.executables = [ "simple-httpd" ]
21
19
 
22
20
  gem.required_ruby_version = '~> 2.5'
23
21
 
@@ -27,6 +25,5 @@ Gem::Specification.new do |gem|
27
25
  # gem.add_dependency "sinatra-reloader", "~> 1"
28
26
  gem.add_dependency "expectation", "~> 1"
29
27
  gem.add_dependency "simple-cli", "~> 0.3.3"
30
- gem.add_dependency "simple-service", "~> 0.1.2"
28
+ gem.add_dependency "simple-service", "~> 0.1.3"
31
29
  end
32
- #require "expectation"
data/spec/spec_helper.rb CHANGED
@@ -5,8 +5,8 @@ require "byebug"
5
5
  require "rspec"
6
6
  require "rspec-httpd"
7
7
 
8
- if ENV["PRELOAD_SERVER_GEM"]
9
- require ENV["PRELOAD_SERVER_GEM"]
8
+ ENV["PRELOAD_GEMS"].to_s.split(",").each do |gem_name|
9
+ require gem_name
10
10
  end
11
11
 
12
12
  # You can comment parts of the command below by prepending the line with a '#'
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.3.1
4
+ version: 0.3.3
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-29 00:00:00.000000000 Z
11
+ date: 2019-12-03 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: neatjson
@@ -72,17 +72,18 @@ dependencies:
72
72
  requirements:
73
73
  - - "~>"
74
74
  - !ruby/object:Gem::Version
75
- version: 0.1.2
75
+ version: 0.1.3
76
76
  type: :runtime
77
77
  prerelease: false
78
78
  version_requirements: !ruby/object:Gem::Requirement
79
79
  requirements:
80
80
  - - "~>"
81
81
  - !ruby/object:Gem::Version
82
- version: 0.1.2
82
+ version: 0.1.3
83
83
  description: Super-simple HTTPD server - sinatra w/gimmiks
84
84
  email: eno@radiospiel.org
85
- executables: []
85
+ executables:
86
+ - simple-httpd
86
87
  extensions: []
87
88
  extra_rdoc_files: []
88
89
  files: