xcurl 1.0.2 → 1.0.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/xcurl.rb +17 -2
- data/xcurl.gemspec +2 -2
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 85e5ee6c52e96591715ee115f4dc86cec6993d8c5a740f69c979d6dfd0be8195
|
4
|
+
data.tar.gz: cb1c1d7d691934dff486f98d51dd3cc4a5812b14400525e15308473b7c97ad32
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 49515da7f35c849b1208d785b9a4c283581d8e70d252b96494c0dbf5f500f8268b57155267d7015c08f09a41dfc8d9e6985a98372bbe341de8f4038d18bbe4f6
|
7
|
+
data.tar.gz: 55a16278c32a8efa0d91c0d4fb571a7fc3f5291deb41943b04a0c82db7fd8b817be96c576a94f780fed96122aee06111adcf7ed3f9c33f1a23e640554ac2f808
|
data/lib/xcurl.rb
CHANGED
@@ -2,12 +2,27 @@
|
|
2
2
|
|
3
3
|
class Xcurl
|
4
4
|
def self.start(session)
|
5
|
+
current_session = session || 'anon'
|
6
|
+
parts = []
|
7
|
+
|
5
8
|
while true
|
9
|
+
print "[#{current_session}] "
|
6
10
|
|
7
|
-
print "> "
|
8
11
|
cmd = gets.chomp
|
9
12
|
|
10
|
-
|
13
|
+
case cmd
|
14
|
+
when 'quit'
|
15
|
+
break
|
16
|
+
|
17
|
+
when /init /
|
18
|
+
current_session = cmd.scan(/init (.*)/).flatten.first
|
19
|
+
|
20
|
+
when /add /
|
21
|
+
parts << cmd.scan(/add (.*)/).flatten.first
|
22
|
+
|
23
|
+
when /curl /
|
24
|
+
puts "#{curl} #{parts.join(' ')}"
|
25
|
+
end
|
11
26
|
end
|
12
27
|
end
|
13
28
|
end
|
data/xcurl.gemspec
CHANGED
@@ -2,11 +2,11 @@
|
|
2
2
|
|
3
3
|
Gem::Specification.new do |spec|
|
4
4
|
spec.name = "xcurl"
|
5
|
-
spec.version = '1.0.
|
5
|
+
spec.version = '1.0.4'
|
6
6
|
spec.authors = ["Andrew S Aguiar"]
|
7
7
|
spec.email = ["andrewaguiar6@gmail.com"]
|
8
8
|
spec.summary = "Convenient wrapper for curl"
|
9
|
-
spec.description = "Convenient wrapper for curl"
|
9
|
+
spec.description = "Convenient wrapper for curl adds some features like (saved sessions, parameters)"
|
10
10
|
spec.homepage = 'https://github.com/andrewaguiar/xcurl'
|
11
11
|
spec.license = "MIT"
|
12
12
|
spec.required_ruby_version = Gem::Requirement.new(">= 2.3.0")
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: xcurl
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Andrew S Aguiar
|
@@ -10,7 +10,8 @@ bindir: bin
|
|
10
10
|
cert_chain: []
|
11
11
|
date: 2023-06-18 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
|
-
description: Convenient wrapper for curl
|
13
|
+
description: Convenient wrapper for curl adds some features like (saved sessions,
|
14
|
+
parameters)
|
14
15
|
email:
|
15
16
|
- andrewaguiar6@gmail.com
|
16
17
|
executables:
|