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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 6aea65d1ea49b4078499456513c6c2018f06dde7d219f299a8179326773bc36a
4
- data.tar.gz: b0a65d45b9a5e24e869dba1c30b211f4ba8a95795603ab76f8ee1f2cd32e5362
3
+ metadata.gz: cd1d26b7ac6ada2dc3d61c4ce35a553cfb7d707ac00f70436b8026420355727e
4
+ data.tar.gz: 91b3c2d5285629ba9edb6d92e1fda36f27952e82ad61c3815a0861d789e0eef1
5
5
  SHA512:
6
- metadata.gz: 04d95885440f2506a240e9933c797e14f47410579b484af63096b2054bb9eca9fd6ba61cb2a3da889e3f3e3f6c748c4b9b850376d79166cb7ccb2390248b9348
7
- data.tar.gz: 93294cef3f815dfa24eea7aacd9eba90784f86228413a001ef9592bd5152901e607ff689722dc43e88f40dde65a1591a7d3b5de3bef6c0dee90a0a311984a8b6
6
+ metadata.gz: 3a2b5162f00bd4794d57db21bd52a97fa8d50b14f93e3e6c212ae81e31cc83ea8b52ae3e3260bda71307f9e47639d9f12ac4831792a52f82fc9f9f246a1f6389
7
+ data.tar.gz: 7891432aab1178ce637a9a32915c2243c7da288f879a209ce530226ed379cbfbce691be1a06094d1708cdf183537835c47fc0adcf64d789c2852372cd061fc27
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- runc (0.1.0)
4
+ runc (0.1.5)
5
5
 
6
6
  GEM
7
7
  remote: https://rubygems.org/
@@ -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 --no-body dont print response body
60
- -H --no-header dont print response headers
61
- -h, --help print this message
62
- -n, --host host name, defaults to 'localhost'
63
- -p, --port port, defaults to 8000
64
- -v, --version print runc 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
@@ -1,4 +1,4 @@
1
1
  class Runc
2
2
  # :nodoc
3
- VERSION = "0.1.0"
3
+ VERSION = "0.1.5"
4
4
  end
@@ -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{"runc" stands for "ruby nc"}
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.0
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: '"runc" stands for "ruby nc"'
69
+ description: Pronounced "runsi" stands for "run connection"
70
70
  email:
71
71
  - yo@sergioro.com
72
72
  executables: