runc 0.1.1 → 0.1.6

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: 2a07edec2d941aca1eaaef27a4f97db2b98692f7d14cee68687a2d39ca4578f2
4
- data.tar.gz: 9fbfb2f7a11b1683bf91d7a27f6ff9b69fd8b26648325b52d019c2166b428b96
3
+ metadata.gz: 141df9f1dd43f34517a19eb28b4469d6b7aa13471f18a31daeeeef02c8bcb021
4
+ data.tar.gz: a4ec031374014d31b569cc77baf8e0172c84393e4563c8031e0daf46223d1d72
5
5
  SHA512:
6
- metadata.gz: 89fc255385119ff309288e75ed12327135fbf82324b1b160d06f360e934749e32f17ef4a270cba745810488ece947948c40e718b3a0d909005708e093891cd5a
7
- data.tar.gz: b26189815d81e61160e3a09c15e32e30080cdff5081b7845e498149f19bba12a5af7eca54f774df896cfbd42bcacce92fa0c07b60690943713351954aa31d460
6
+ metadata.gz: a0a70fee03017e2750f365502653d11296e55c77ca45c4429b842748b6041450d86eb65fe46c2f52b596ec08e29244a13cf37ac236df741f589bd81ed20ed7a9
7
+ data.tar.gz: 537727deafba7628eb3fe62f84eb3aa3e35f07096d7614f8669c175696dd1549fa15223975f72d997e3ccc4dce690e6b261c974cd442f4705060829b8232748c
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- runc (0.1.1)
4
+ runc (0.1.6)
5
5
 
6
6
  GEM
7
7
  remote: https://rubygems.org/
@@ -55,12 +55,12 @@ class Runc
55
55
 
56
56
  def self.help # :nodoc:
57
57
  puts <<~eos
58
- -B --no-body dont print response body
59
- -H --no-header dont print response headers
60
- -h, --help print this message
61
- -n, --host host name, defaults to 'localhost'
62
- -p, --port port, defaults to 8000
63
- -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
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
@@ -1,4 +1,4 @@
1
1
  class Runc
2
2
  # :nodoc
3
- VERSION = "0.1.1"
3
+ VERSION = "0.1.6"
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 NetCat"}
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.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: '"runc" stands for "RUby NetCat"'
69
+ description: Pronounced "runsi" stands for "run connection"
70
70
  email:
71
71
  - yo@sergioro.com
72
72
  executables: