yobi-http 0.4.2 → 0.6.0
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/CHANGELOG.md +5 -0
- data/exe/yobi +11 -1
- data/lib/yobi.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 8300927c161636f736c477436c29cc441b79847df717a899a465fd0f129cec13
|
|
4
|
+
data.tar.gz: d6d693cabeea337129547854608fa394a23b870d89f4f60e3d975960a7bcf1cb
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: df1eda58dbc36deb0719785872684adc9fbfa43f033e3ded3ff737792e4bf763a3dd98ab0452db1da4f96ce3fdf4450f73d865e13a061b67eef907c4510d2700
|
|
7
|
+
data.tar.gz: 16d5746464e6619d3dee0725b04b0c0cfd723860f2bd952ba0500f4bc1c238e262aaf521f75d2f92310ef0440bdeadc10ee1f704fc1581f00c06780acd99d054
|
data/CHANGELOG.md
CHANGED
data/exe/yobi
CHANGED
|
@@ -60,6 +60,10 @@ parser = OptionParser.new do |opts|
|
|
|
60
60
|
@options[:offline] = true
|
|
61
61
|
end
|
|
62
62
|
|
|
63
|
+
opts.on("-o", "--output FILE", "Write output to a file instead of STDOUT") do |file|
|
|
64
|
+
@options[:output] = file
|
|
65
|
+
end
|
|
66
|
+
|
|
63
67
|
opts.on("-v", "--verbose", "Print detailed request and response information") do
|
|
64
68
|
@options[:verbose] = true
|
|
65
69
|
end
|
|
@@ -168,5 +172,11 @@ Net::HTTP.start(URI(url).host, URI(url).port, use_ssl: URI(url).scheme == "https
|
|
|
168
172
|
end
|
|
169
173
|
|
|
170
174
|
view = Yobi.view(:output)
|
|
171
|
-
|
|
175
|
+
|
|
176
|
+
if options[:output]
|
|
177
|
+
file = File.expand_path(options[:output], Dir.pwd)
|
|
178
|
+
File.write(file, ERB.new(view).result(binding), mode: "w")
|
|
179
|
+
else
|
|
180
|
+
puts TTY::Markdown.parse(ERB.new(view).result(binding), color: :always)
|
|
181
|
+
end
|
|
172
182
|
end
|
data/lib/yobi.rb
CHANGED