runc 0.1.0 → 0.1.5
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/Gemfile.lock +1 -1
- data/lib/runc.rb +10 -7
- 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: cd1d26b7ac6ada2dc3d61c4ce35a553cfb7d707ac00f70436b8026420355727e
|
4
|
+
data.tar.gz: 91b3c2d5285629ba9edb6d92e1fda36f27952e82ad61c3815a0861d789e0eef1
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3a2b5162f00bd4794d57db21bd52a97fa8d50b14f93e3e6c212ae81e31cc83ea8b52ae3e3260bda71307f9e47639d9f12ac4831792a52f82fc9f9f246a1f6389
|
7
|
+
data.tar.gz: 7891432aab1178ce637a9a32915c2243c7da288f879a209ce530226ed379cbfbce691be1a06094d1708cdf183537835c47fc0adcf64d789c2852372cd061fc27
|
data/Gemfile.lock
CHANGED
data/lib/runc.rb
CHANGED
@@ -40,7 +40,6 @@ class Runc
|
|
40
40
|
body = (args.include?("-B") or args.include?("--no-body")) ? nil : true
|
41
41
|
res_header = (args.include?("-H") or args.include?("--no-header")) ? nil : true
|
42
42
|
|
43
|
-
puts "Hostname: #{hostname}", "Port: #{port}"
|
44
43
|
new(hostname, port, body, res_header).repl
|
45
44
|
rescue => e
|
46
45
|
abort e.message
|
@@ -56,12 +55,12 @@ class Runc
|
|
56
55
|
|
57
56
|
def self.help # :nodoc:
|
58
57
|
puts <<~eos
|
59
|
-
-B
|
60
|
-
-H
|
61
|
-
-h, --help
|
62
|
-
-n, --host
|
63
|
-
-p, --port
|
64
|
-
-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
|
65
64
|
eos
|
66
65
|
exit
|
67
66
|
end
|
@@ -115,6 +114,10 @@ class Runc
|
|
115
114
|
|
116
115
|
request=Net::HTTP.const_get(@req[/^\w+/].capitalize).new(@uri, @header)
|
117
116
|
|
117
|
+
if [Net::HTTP::Post, Net::HTTP::Put, Net::HTTP::Patch].include?(request.class)
|
118
|
+
request.body=ask('body')
|
119
|
+
end
|
120
|
+
|
118
121
|
http=Net::HTTP.new(@uri.host,@uri.port)
|
119
122
|
|
120
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.5
|
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:
|