xcurl 1.0.4 → 1.0.6

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 +16 -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: 85e5ee6c52e96591715ee115f4dc86cec6993d8c5a740f69c979d6dfd0be8195
4
- data.tar.gz: cb1c1d7d691934dff486f98d51dd3cc4a5812b14400525e15308473b7c97ad32
3
+ metadata.gz: c1930a12933baeaf30e46f94d87040cbf33e549dbdb21f3c9be3ae849a0f24a6
4
+ data.tar.gz: f0f433f7941a2c0552384b37ab24f55783441db7327e109253bd403db1d7bb53
5
5
  SHA512:
6
- metadata.gz: 49515da7f35c849b1208d785b9a4c283581d8e70d252b96494c0dbf5f500f8268b57155267d7015c08f09a41dfc8d9e6985a98372bbe341de8f4038d18bbe4f6
7
- data.tar.gz: 55a16278c32a8efa0d91c0d4fb571a7fc3f5291deb41943b04a0c82db7fd8b817be96c576a94f780fed96122aee06111adcf7ed3f9c33f1a23e640554ac2f808
6
+ metadata.gz: 8d4b8dac3dcab83863ecfc938a578545dab0c2e4feeebc9cf68d8d2cf4c0034030a0a549a41bbbc8eacb824e8e9824d91087cfc3fb4b27697b7c19c67e104122
7
+ data.tar.gz: be21b926a4b0c183392f7169fa5f953f9da3089ae088146f76db2f683dcc0b45c75240ab63d387c02f7a7083d4c512b4c9068c4525c826ec42d23f98ea6df435
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,20 @@ class Xcurl
17
21
  when /init /
18
22
  current_session = cmd.scan(/init (.*)/).flatten.first
19
23
 
24
+ when ''
25
+ parts.each do |part|
26
+ puts pastel.green("'#{pastel.bold(part)}'")
27
+ end
28
+
20
29
  when /add /
21
- parts << cmd.scan(/add (.*)/).flatten.first
30
+ part = cmd.scan(/add (.*)/).flatten.first
31
+
32
+ parts << part
33
+
34
+ puts pastel.green("added '#{pastel.bold(part)}'")
22
35
 
23
36
  when /curl /
24
- puts "#{curl} #{parts.join(' ')}"
37
+ puts "curl #{parts.join(' ')}"
25
38
  end
26
39
  end
27
40
  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.4'
5
+ spec.version = '1.0.6'
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.4
4
+ version: 1.0.6
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: