xcurl 1.0.5 → 1.0.7

Sign up to get free protection for your applications and to get access to all the features.
Files changed (5) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile.lock +5 -1
  3. data/lib/xcurl.rb +21 -3
  4. data/xcurl.gemspec +3 -1
  5. metadata +17 -3
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 6a156ae2fbab462e3b2310b1072394e1d2fefb67a402ba6e78194abd31a56e18
4
- data.tar.gz: 67f91d06ea26209dc9ea3872f18d93561d08b88324e53ac707a0870f00c1e669
3
+ metadata.gz: 51c16433d41b618dd392ee5c5947abe0ff49f1e4ae85d2be57fb01397e796be5
4
+ data.tar.gz: 1e8b22f003337513720186006f6bf48f15d177f2d8857d91b198e52d3777bc48
5
5
  SHA512:
6
- metadata.gz: 8c94675f51ffb23f16d3ae0ffe34e56b0fb8802a685a7f0c50f7d8caacb8b066173bbd4ff12db95bdbf70577ee5cfa91729955298a3c12d48a1d5cf350e98955
7
- data.tar.gz: 13824d345b23dc062a21e1c7b235bbe7852d6e5fe2e15c8ace3ba94a551fc1f3b770a685f056281fa6bccbbf90038ae646afbec45bd8bf524922815c75fe5cc9
6
+ metadata.gz: 2964a90ef8a8bfe770a0f67f12f7e47b01d246618078e283c5c7b1132907213733498a1fc41b92c0e89f2263d28b209e12e5b8cf06711164eea0c9eb27a3ee3e
7
+ data.tar.gz: 6e55675649b012750edd9dd7f325e266bf4c9e5b8f40da2f0d3e2244192ecb84235d26ae2d2721919f354c771eb7bf280572caadeb307054e9115152aefcb277
data/Gemfile.lock CHANGED
@@ -1,12 +1,15 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- xcurl (1.0.0)
4
+ xcurl (1.0.6)
5
+ pastel (~> 0.8)
5
6
 
6
7
  GEM
7
8
  remote: https://rubygems.org/
8
9
  specs:
9
10
  diff-lcs (1.5.0)
11
+ pastel (0.8.0)
12
+ tty-color (~> 0.5)
10
13
  rake (13.0.6)
11
14
  rspec (3.12.0)
12
15
  rspec-core (~> 3.12.0)
@@ -21,6 +24,7 @@ GEM
21
24
  diff-lcs (>= 1.2.0, < 2.0)
22
25
  rspec-support (~> 3.12.0)
23
26
  rspec-support (3.12.0)
27
+ tty-color (0.6.0)
24
28
 
25
29
  PLATFORMS
26
30
  x86_64-linux
data/lib/xcurl.rb CHANGED
@@ -1,8 +1,12 @@
1
1
  # frozen_string_literal: true
2
2
 
3
+ require 'pastel'
4
+
3
5
  class Xcurl
4
6
  def self.start(session)
5
- current_session = session || 'anon'
7
+ pastel = Pastel.new
8
+
9
+ current_session = session || 'untitled'
6
10
  parts = []
7
11
 
8
12
  while true
@@ -17,11 +21,25 @@ class Xcurl
17
21
  when /init /
18
22
  current_session = cmd.scan(/init (.*)/).flatten.first
19
23
 
24
+ when 'show'
25
+ parts.each_with_index do |part, index|
26
+ puts "#{pastel.blue(index)} - #{pastel.green("'#{pastel.bold(part)}'")}"
27
+ end
28
+
29
+ when /delete /
30
+ index_part = cmd.scan(/delete (.*)/).flatten.first.to_i
31
+
32
+ parts.delete_at(index_part)
33
+
20
34
  when /add /
21
- parts << cmd.scan(/add (.*)/).flatten.first
35
+ part = cmd.scan(/add (.*)/).flatten.first
36
+
37
+ parts << part
38
+
39
+ puts pastel.green("added '#{pastel.bold(part)}'")
22
40
 
23
41
  when /curl /
24
- puts "#{curl} #{parts.join(' ')}"
42
+ puts "curl #{parts.join(' ')}"
25
43
  end
26
44
  end
27
45
  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.5'
5
+ spec.version = '1.0.7'
6
6
  spec.authors = ["Andrew S Aguiar"]
7
7
  spec.email = ["andrewaguiar6@gmail.com"]
8
8
  spec.summary = "Convenient wrapper for curl"
@@ -20,4 +20,6 @@ Gem::Specification.new do |spec|
20
20
  spec.bindir = 'bin'
21
21
  spec.executables = ['xcurl']
22
22
  spec.require_paths = ['lib']
23
+
24
+ spec.add_dependency 'pastel', '~> 0.8'
23
25
  end
metadata CHANGED
@@ -1,15 +1,29 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: xcurl
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.5
4
+ version: 1.0.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Andrew S Aguiar
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-06-18 00:00:00.000000000 Z
12
- dependencies: []
11
+ date: 2023-06-19 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: pastel
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - "~>"
18
+ - !ruby/object:Gem::Version
19
+ version: '0.8'
20
+ type: :runtime
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - "~>"
25
+ - !ruby/object:Gem::Version
26
+ version: '0.8'
13
27
  description: Convenient wrapper for curl adds some features like (saved sessions,
14
28
  parameters)
15
29
  email: