runc 0.1.1 → 0.1.6
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/lib/runc.rb +12 -8
- data/lib/runc/version.rb +1 -1
- data/runc.gemspec +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 141df9f1dd43f34517a19eb28b4469d6b7aa13471f18a31daeeeef02c8bcb021
|
4
|
+
data.tar.gz: a4ec031374014d31b569cc77baf8e0172c84393e4563c8031e0daf46223d1d72
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a0a70fee03017e2750f365502653d11296e55c77ca45c4429b842748b6041450d86eb65fe46c2f52b596ec08e29244a13cf37ac236df741f589bd81ed20ed7a9
|
7
|
+
data.tar.gz: 537727deafba7628eb3fe62f84eb3aa3e35f07096d7614f8669c175696dd1549fa15223975f72d997e3ccc4dce690e6b261c974cd442f4705060829b8232748c
|
data/Gemfile.lock
CHANGED
data/lib/runc.rb
CHANGED
@@ -55,12 +55,12 @@ class Runc
|
|
55
55
|
|
56
56
|
def self.help # :nodoc:
|
57
57
|
puts <<~eos
|
58
|
-
-B
|
59
|
-
-H
|
60
|
-
-h, --help
|
61
|
-
-n, --host
|
62
|
-
-p, --port
|
63
|
-
-v, --version
|
58
|
+
-B, --no-body discard the response body
|
59
|
+
-H, --no-header discard the response header
|
60
|
+
-h, --help print this message
|
61
|
+
-n, --host host name (default 'localhost')
|
62
|
+
-p, --port port (default 8000)
|
63
|
+
-v, --version print runc version
|
64
64
|
eos
|
65
65
|
exit
|
66
66
|
end
|
@@ -104,16 +104,20 @@ class Runc
|
|
104
104
|
def repl # :nodoc:
|
105
105
|
read_protocols
|
106
106
|
loop do
|
107
|
+
update_header
|
108
|
+
|
107
109
|
req_tmp=ask('request')
|
108
110
|
|
109
111
|
@req = req_tmp.empty? ? @req : req_tmp
|
110
112
|
|
111
|
-
update_header
|
112
|
-
|
113
113
|
update_uri
|
114
114
|
|
115
115
|
request=Net::HTTP.const_get(@req[/^\w+/].capitalize).new(@uri, @header)
|
116
116
|
|
117
|
+
if [Net::HTTP::Post, Net::HTTP::Put, Net::HTTP::Patch].include?(request.class)
|
118
|
+
request.body=ask('body')
|
119
|
+
end
|
120
|
+
|
117
121
|
http=Net::HTTP.new(@uri.host,@uri.port)
|
118
122
|
|
119
123
|
http.use_ssl = port==443 ? true : false
|
data/lib/runc/version.rb
CHANGED
data/runc.gemspec
CHANGED
@@ -7,7 +7,7 @@ Gem::Specification.new do |spec|
|
|
7
7
|
spec.email = ["yo@sergioro.com"]
|
8
8
|
|
9
9
|
spec.summary = %q{Network REPL}
|
10
|
-
spec.description = %q{"
|
10
|
+
spec.description = %q{Pronounced "runsi" stands for "run connection"}
|
11
11
|
spec.license = "MIT"
|
12
12
|
spec.required_ruby_version = Gem::Requirement.new(">= 2.3.0")
|
13
13
|
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: runc
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- sergioro
|
@@ -66,7 +66,7 @@ dependencies:
|
|
66
66
|
- - "~>"
|
67
67
|
- !ruby/object:Gem::Version
|
68
68
|
version: 13.0.1
|
69
|
-
description:
|
69
|
+
description: Pronounced "runsi" stands for "run connection"
|
70
70
|
email:
|
71
71
|
- yo@sergioro.com
|
72
72
|
executables:
|