xcurl 1.0.3 → 1.0.4

Sign up to get free protection for your applications and to get access to all the features.
Files changed (4) hide show
  1. checksums.yaml +4 -4
  2. data/lib/xcurl.rb +17 -2
  3. data/xcurl.gemspec +1 -1
  4. metadata +1 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 44c97b2b08c32b11e8693fd4a9cb27d8400f8f8343f31c4c0d5cf653562d3735
4
- data.tar.gz: 71fc6c1b177b28bec9fc3058343878bba2479ec7426f2a9413117d233157f93a
3
+ metadata.gz: 85e5ee6c52e96591715ee115f4dc86cec6993d8c5a740f69c979d6dfd0be8195
4
+ data.tar.gz: cb1c1d7d691934dff486f98d51dd3cc4a5812b14400525e15308473b7c97ad32
5
5
  SHA512:
6
- metadata.gz: ce757532fb7a297dd16478e3ec88a05164e38924e742ed0ace01fe5a6d43ac90b197f5dd367e2927ad62232af9ee3adec544786010705d7ab95f5f2b14d2df7c
7
- data.tar.gz: 513e0b71dc267984dddc67a601b4010d080c868fe2071f1a4747db001e22a5a585e7eb81a0884b0ccf59d4fdfc6ff59e332660b204598dc052f83e45f59a34f2
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
- break if cmd == 'q'
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,7 +2,7 @@
2
2
 
3
3
  Gem::Specification.new do |spec|
4
4
  spec.name = "xcurl"
5
- spec.version = '1.0.3'
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"
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.3
4
+ version: 1.0.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Andrew S Aguiar