whoamid 0.1.0 → 0.2.0

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: 2daad169846d79aad0b657798efc1960d86bd459e6d55c470577085608631b67
4
- data.tar.gz: a5af96bca8991427282ae9cf8db4a195196ff68c367bdfbfab1b23bb7878d6c8
3
+ metadata.gz: ca3638613b03b9fb43d794001829f48822673b2e8d42f78d0437c7e29d67ff9e
4
+ data.tar.gz: bfefcb3be58685ef8143d1f441afb12859310ea78db412ec6f00f232eb953620
5
5
  SHA512:
6
- metadata.gz: 81808af6f0f67c5b09eef8d3db0289c9be3cb902ee8c795a7fb282703ba08c0c8a13b90a4b297c712502d931a3094dfe983cd52f630f239bb929462f4b8c183b
7
- data.tar.gz: b8819aca9457435b87859e199f0aeedbbedf24cd295638eae7e5df5e3343b9ed9e320a1fb12d99df69d9ca3c186a0f910b632e6209e528eccc1fbc07d9c51f38
6
+ metadata.gz: 4586dc768ce38376e7398acea13ca8e973b31bcab97b02e883db50c39d56977c3c18ad43edb250c386e21f26d2ee581fa89a45034530933d18ff7949fab75487
7
+ data.tar.gz: 00e8302fb45dca5672fbe3de7168a32f227ee53569f714a9ee4f5dc76c9ba9c074bd55af5aaf04b0b6fab57783b4d697f42da58b7e4eb4afa31b2d91877fae1b
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- whoamid (0.1.0)
4
+ whoamid (0.2.0)
5
5
 
6
6
  GEM
7
7
  remote: https://rubygems.org/
@@ -23,6 +23,18 @@ module Whoamid
23
23
  res.body = ENV["HOSTNAME"]
24
24
  end
25
25
 
26
+ server.mount_proc '/echo' do |req,res|
27
+ response = []
28
+ response << "remote ip: #{req.remote_ip}"
29
+
30
+ response << "headers"
31
+ req.each do |header|
32
+ response << "#{header}: #{req[header]}"
33
+ end
34
+ response << ""
35
+ res.body = response.join("\n")
36
+ end
37
+
26
38
  server.start
27
39
  end
28
40
  end
@@ -1,3 +1,3 @@
1
1
  module Whoamid
2
- VERSION = "0.1.0"
2
+ VERSION = "0.2.0"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: whoamid
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Matti Paksula