starlined 0.1.2 → 0.2.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/Gemfile +3 -3
- data/README.md +1 -18
- data/Rakefile +122 -16
- data/examples/basic_messages.rb +2 -2
- data/lib/starlined/animation.rb +17 -13
- data/lib/starlined/configuration.rb +2 -3
- data/lib/starlined/messages.rb +11 -12
- data/lib/starlined/runner.rb +43 -20
- data/lib/starlined/version.rb +1 -1
- data/lib/starlined.rb +7 -7
- data/starlined.gemspec +18 -18
- metadata +1 -2
- data/LICENSE.txt +0 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: '08105cc16591e81bcd8f4b04173b0fb16154753fc2386433760fdc075444d797'
|
|
4
|
+
data.tar.gz: 2051129391c16c7eec09b2f676b119e7c76307f17c93a7d43213105c98af1f3e
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: ec265f48d253cdb7bb169aec85e898307d9e4b32c75e46b8edac283fe2aee8c1af437ad6a343c7aaddacd9fd7c828da80dca2d7269f202193ff3155bf9aafb96
|
|
7
|
+
data.tar.gz: 1edc1a126b7efd1b8dbf7e975c1e1f34e33cd10e0ea02b30692ad5635287c58a46c3f4e60ca243dae9df8d0a257aaaaf85a8bc328c54ae0db180943d176904b0
|
data/Gemfile
CHANGED
data/README.md
CHANGED
|
@@ -52,28 +52,11 @@ threads.each(&:join)
|
|
|
52
52
|
runner.stop
|
|
53
53
|
```
|
|
54
54
|
|
|
55
|
-
### animation manipulation/control
|
|
56
|
-
|
|
57
|
-
```ruby
|
|
58
|
-
animation = Starlined::Animation.new("Processing", steps: 100)
|
|
59
|
-
animation.start
|
|
60
|
-
|
|
61
|
-
100.times do |i|
|
|
62
|
-
# do work
|
|
63
|
-
animation.increment_step
|
|
64
|
-
animation.add_alias("file_#{i}.txt")
|
|
65
|
-
sleep 0.1
|
|
66
|
-
animation.remove_alias("file_#{i}.txt")
|
|
67
|
-
end
|
|
68
|
-
|
|
69
|
-
animation.stop
|
|
70
|
-
```
|
|
71
|
-
|
|
72
55
|
### custom configuration
|
|
73
56
|
|
|
74
57
|
```ruby
|
|
75
58
|
Starlined.configure do |config|
|
|
76
|
-
config.
|
|
59
|
+
config.verbose = true # show verbose messages
|
|
77
60
|
config.sleep_time = 0.5 # animation speed
|
|
78
61
|
config.msg_ljust = 40 # message padding
|
|
79
62
|
end
|
data/Rakefile
CHANGED
|
@@ -1,31 +1,137 @@
|
|
|
1
1
|
# frozen_string_literal: true
|
|
2
2
|
|
|
3
|
-
require
|
|
4
|
-
|
|
3
|
+
require 'bundler/gem_tasks'
|
|
4
|
+
require_relative 'lib/starlined/version'
|
|
5
5
|
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
6
|
+
begin
|
|
7
|
+
require 'rspec/core/rake_task'
|
|
8
|
+
RSpec::Core::RakeTask.new(:spec)
|
|
9
|
+
task default: :spec
|
|
10
|
+
rescue LoadError
|
|
11
|
+
# rspec not available
|
|
12
|
+
end
|
|
9
13
|
|
|
10
|
-
desc
|
|
14
|
+
desc 'Run all examples'
|
|
11
15
|
task :examples do
|
|
12
|
-
Dir[
|
|
16
|
+
Dir['examples/*.rb'].each do |example|
|
|
13
17
|
puts "\n📝 Running: #{example}"
|
|
14
|
-
puts
|
|
18
|
+
puts '=' * 50
|
|
15
19
|
system("ruby #{example}")
|
|
16
|
-
puts
|
|
20
|
+
puts '=' * 50
|
|
17
21
|
end
|
|
18
22
|
end
|
|
19
23
|
|
|
20
|
-
desc
|
|
24
|
+
desc 'Open an interactive console with the gem loaded'
|
|
21
25
|
task :console do
|
|
22
|
-
require
|
|
23
|
-
require_relative
|
|
26
|
+
require 'pry'
|
|
27
|
+
require_relative 'lib/starlined'
|
|
24
28
|
include Starlined::Messages
|
|
25
29
|
runner = Starlined::Runner.new
|
|
26
|
-
puts
|
|
27
|
-
puts
|
|
28
|
-
puts
|
|
29
|
-
puts
|
|
30
|
+
puts 'Starlined loaded! Available:'
|
|
31
|
+
puts ' - Messages module included (info, warn, error, success, etc.)'
|
|
32
|
+
puts ' - runner = Starlined::Runner.new'
|
|
33
|
+
puts ' - Starlined::Animation'
|
|
30
34
|
Pry.start
|
|
31
35
|
end
|
|
36
|
+
|
|
37
|
+
# Version management tasks
|
|
38
|
+
namespace :version do
|
|
39
|
+
desc 'Show current version'
|
|
40
|
+
task :current do
|
|
41
|
+
puts "Current version: #{Starlined::VERSION}"
|
|
42
|
+
end
|
|
43
|
+
|
|
44
|
+
def bump_version(type)
|
|
45
|
+
version_file = 'lib/starlined/version.rb'
|
|
46
|
+
content = File.read(version_file)
|
|
47
|
+
|
|
48
|
+
current_version = Starlined::VERSION
|
|
49
|
+
major, minor, patch = current_version.split('.').map(&:to_i)
|
|
50
|
+
|
|
51
|
+
case type
|
|
52
|
+
when :major
|
|
53
|
+
new_version = "#{major + 1}.0.0"
|
|
54
|
+
when :minor
|
|
55
|
+
new_version = "#{major}.#{minor + 1}.0"
|
|
56
|
+
when :patch
|
|
57
|
+
new_version = "#{major}.#{minor}.#{patch + 1}"
|
|
58
|
+
end
|
|
59
|
+
|
|
60
|
+
new_content = content.gsub(/VERSION = ['"]#{Regexp.escape(current_version)}['"]/, "VERSION = '#{new_version}'")
|
|
61
|
+
File.write(version_file, new_content)
|
|
62
|
+
|
|
63
|
+
puts "Version bumped from #{current_version} to #{new_version}"
|
|
64
|
+
new_version
|
|
65
|
+
end
|
|
66
|
+
|
|
67
|
+
desc 'Bump major version (x.0.0)'
|
|
68
|
+
task :major do
|
|
69
|
+
bump_version(:major)
|
|
70
|
+
end
|
|
71
|
+
|
|
72
|
+
desc 'Bump minor version (0.x.0)'
|
|
73
|
+
task :minor do
|
|
74
|
+
bump_version(:minor)
|
|
75
|
+
end
|
|
76
|
+
|
|
77
|
+
desc 'Bump patch version (0.0.x)'
|
|
78
|
+
task :patch do
|
|
79
|
+
bump_version(:patch)
|
|
80
|
+
end
|
|
81
|
+
end
|
|
82
|
+
|
|
83
|
+
# Release tasks
|
|
84
|
+
namespace :release do
|
|
85
|
+
def release(type)
|
|
86
|
+
# Bump version
|
|
87
|
+
puts "📝 Bumping #{type} version..."
|
|
88
|
+
new_version = nil
|
|
89
|
+
Rake::Task["version:#{type}"].invoke
|
|
90
|
+
|
|
91
|
+
# Reload version
|
|
92
|
+
load 'lib/starlined/version.rb'
|
|
93
|
+
new_version = Starlined::VERSION
|
|
94
|
+
|
|
95
|
+
# Build gem
|
|
96
|
+
puts "\n📦 Building gem..."
|
|
97
|
+
system('gem build starlined.gemspec') or abort('Build failed!')
|
|
98
|
+
|
|
99
|
+
# Ask for confirmation before pushing
|
|
100
|
+
print "\n🚀 Push starlined-#{new_version}.gem to RubyGems? (y/n): "
|
|
101
|
+
response = STDIN.gets.chomp.downcase
|
|
102
|
+
|
|
103
|
+
if response == 'y'
|
|
104
|
+
puts 'Pushing to RubyGems...'
|
|
105
|
+
system("gem push starlined-#{new_version}.gem") or abort('Push failed!')
|
|
106
|
+
puts "\n✅ Successfully released version #{new_version}!"
|
|
107
|
+
else
|
|
108
|
+
puts '❌ Push cancelled. Gem built but not pushed.'
|
|
109
|
+
puts " You can manually push with: gem push starlined-#{new_version}.gem"
|
|
110
|
+
end
|
|
111
|
+
end
|
|
112
|
+
|
|
113
|
+
desc 'Release new major version (x.0.0)'
|
|
114
|
+
task :major do
|
|
115
|
+
release(:major)
|
|
116
|
+
end
|
|
117
|
+
|
|
118
|
+
desc 'Release new minor version (0.x.0)'
|
|
119
|
+
task :minor do
|
|
120
|
+
release(:minor)
|
|
121
|
+
end
|
|
122
|
+
|
|
123
|
+
desc 'Release new patch version (0.0.x)'
|
|
124
|
+
task :patch do
|
|
125
|
+
release(:patch)
|
|
126
|
+
end
|
|
127
|
+
end
|
|
128
|
+
|
|
129
|
+
# Quick release aliases
|
|
130
|
+
desc 'Release patch version (alias for release:patch)'
|
|
131
|
+
task patch: 'release:patch'
|
|
132
|
+
|
|
133
|
+
desc 'Release minor version (alias for release:minor)'
|
|
134
|
+
task minor: 'release:minor'
|
|
135
|
+
|
|
136
|
+
desc 'Release major version (alias for release:major)'
|
|
137
|
+
task major: 'release:major'
|
data/examples/basic_messages.rb
CHANGED
|
@@ -19,10 +19,10 @@ sleep(1)
|
|
|
19
19
|
|
|
20
20
|
# configurar modo verbose
|
|
21
21
|
Starlined.configure do |config|
|
|
22
|
-
config.
|
|
22
|
+
config.verbose = true
|
|
23
23
|
end
|
|
24
24
|
|
|
25
|
-
|
|
25
|
+
verbose("This verbose message is now visible")
|
|
26
26
|
sleep(1)
|
|
27
27
|
|
|
28
28
|
# ejemplo con error (comentado para no salir del programa)
|
data/lib/starlined/animation.rb
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# frozen_string_literal: true
|
|
2
2
|
|
|
3
|
-
require
|
|
3
|
+
require 'colorize'
|
|
4
4
|
|
|
5
5
|
module Starlined
|
|
6
6
|
class Animation
|
|
@@ -17,12 +17,13 @@ module Starlined
|
|
|
17
17
|
@pos = [0, 1, 2]
|
|
18
18
|
@move = 1
|
|
19
19
|
|
|
20
|
-
# manejo de
|
|
20
|
+
# manejo de aliases
|
|
21
21
|
@aliases = []
|
|
22
22
|
@alias_pointer = 0
|
|
23
23
|
@alias_timer = 0
|
|
24
24
|
@alias_semaphore = Mutex.new
|
|
25
25
|
|
|
26
|
+
# semáforo para pasos
|
|
26
27
|
@steps_semaphore = Mutex.new
|
|
27
28
|
|
|
28
29
|
@running = false
|
|
@@ -94,13 +95,13 @@ module Starlined
|
|
|
94
95
|
config = Starlined.configuration
|
|
95
96
|
|
|
96
97
|
config.stars_range.each do |i|
|
|
97
|
-
if !@pos.include?(i)
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
98
|
+
stars += if !@pos.include?(i)
|
|
99
|
+
' '
|
|
100
|
+
elsif i == @pos[1]
|
|
101
|
+
'*'.bold.red
|
|
102
|
+
else
|
|
103
|
+
'*'.yellow
|
|
104
|
+
end
|
|
104
105
|
end
|
|
105
106
|
|
|
106
107
|
stars
|
|
@@ -121,12 +122,12 @@ module Starlined
|
|
|
121
122
|
|
|
122
123
|
def current_alias_string
|
|
123
124
|
@alias_semaphore.synchronize do
|
|
124
|
-
return
|
|
125
|
+
return '' if @aliases.empty?
|
|
125
126
|
|
|
126
127
|
begin
|
|
127
128
|
@aliases[@alias_pointer].to_s
|
|
128
129
|
rescue NoMethodError, ArgumentError
|
|
129
|
-
@aliases.first.to_s
|
|
130
|
+
@aliases.first.to_s unless @aliases.empty?
|
|
130
131
|
end
|
|
131
132
|
end
|
|
132
133
|
end
|
|
@@ -138,8 +139,11 @@ module Starlined
|
|
|
138
139
|
@pos = @pos.map { |p| (p + @move) % config.stars_range.length }
|
|
139
140
|
|
|
140
141
|
# cambiar el sentido de movimiento si se toca alguno de los bordes
|
|
141
|
-
@move = @pos.first == config.stars_range.first
|
|
142
|
-
|
|
142
|
+
@move = if @pos.first == config.stars_range.first
|
|
143
|
+
1
|
|
144
|
+
else
|
|
145
|
+
@pos.last == config.stars_range.last ? -1 : @move
|
|
146
|
+
end
|
|
143
147
|
end
|
|
144
148
|
|
|
145
149
|
def update_alias_timer
|
|
@@ -3,16 +3,15 @@
|
|
|
3
3
|
module Starlined
|
|
4
4
|
class Configuration
|
|
5
5
|
attr_accessor :sleep_time, :msg_ljust, :extra_rjust, :stars_range,
|
|
6
|
-
:
|
|
6
|
+
:verbose, :clear_line_string
|
|
7
7
|
|
|
8
8
|
def initialize
|
|
9
9
|
@sleep_time = 0.75
|
|
10
10
|
@msg_ljust = 30
|
|
11
11
|
@extra_rjust = 8
|
|
12
12
|
@stars_range = (0..5).to_a
|
|
13
|
-
@
|
|
13
|
+
@verbose = false
|
|
14
14
|
@clear_line_string = "\33[2K"
|
|
15
|
-
@symbol = '*'
|
|
16
15
|
end
|
|
17
16
|
end
|
|
18
17
|
end
|
data/lib/starlined/messages.rb
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# frozen_string_literal: true
|
|
2
2
|
|
|
3
|
-
require
|
|
3
|
+
require "colorize"
|
|
4
4
|
|
|
5
5
|
module Starlined
|
|
6
6
|
module Messages
|
|
@@ -8,42 +8,41 @@ module Starlined
|
|
|
8
8
|
|
|
9
9
|
def error(message = nil, context = nil)
|
|
10
10
|
clear_line
|
|
11
|
-
output = "\r[#{
|
|
11
|
+
output = "\r[#{"FAILED".red}] #{context || "Operation failed"}"
|
|
12
12
|
output += " (#{message})" unless message.nil?
|
|
13
13
|
puts output
|
|
14
14
|
end
|
|
15
15
|
|
|
16
16
|
def info(message)
|
|
17
17
|
clear_line
|
|
18
|
-
puts "\r[ #{
|
|
18
|
+
puts "\r[ #{"INFO".blue} ] #{message}"
|
|
19
19
|
end
|
|
20
20
|
|
|
21
21
|
def warn(message)
|
|
22
22
|
clear_line
|
|
23
|
-
puts "\r[ #{
|
|
23
|
+
puts "\r[ #{"WARN".yellow} ] #{message}"
|
|
24
24
|
end
|
|
25
25
|
|
|
26
26
|
def success(message, time = nil)
|
|
27
27
|
clear_line
|
|
28
|
-
output = "\r[ #{
|
|
28
|
+
output = "\r[ #{"OK".green} ] #{message}"
|
|
29
29
|
if time
|
|
30
|
-
dots =
|
|
30
|
+
dots = "." * [3, 36 - message.length - time.to_s.length].max
|
|
31
31
|
output += " #{dots.bold.gray} #{time}s"
|
|
32
32
|
end
|
|
33
33
|
puts output
|
|
34
34
|
end
|
|
35
35
|
|
|
36
|
-
def
|
|
37
|
-
return unless Starlined.configuration.
|
|
38
|
-
|
|
36
|
+
def verbose(message)
|
|
37
|
+
return unless Starlined.configuration.verbose
|
|
39
38
|
clear_line
|
|
40
|
-
puts "\r[#{
|
|
39
|
+
puts "\r[#{"VRBOSE".light_black}] #{message}"
|
|
41
40
|
end
|
|
42
41
|
|
|
43
42
|
def ask(prompt)
|
|
44
43
|
clear_line
|
|
45
|
-
print "\r[ #{
|
|
46
|
-
|
|
44
|
+
print "\r[ #{"??".light_blue} ] #{prompt}: "
|
|
45
|
+
STDIN.gets.chomp
|
|
47
46
|
end
|
|
48
47
|
|
|
49
48
|
private
|
data/lib/starlined/runner.rb
CHANGED
|
@@ -8,15 +8,14 @@ module Starlined
|
|
|
8
8
|
attr_reader :animation
|
|
9
9
|
|
|
10
10
|
def initialize
|
|
11
|
-
@
|
|
11
|
+
@running_instances = 0
|
|
12
12
|
@run_semaphore = Mutex.new
|
|
13
13
|
@animation = nil
|
|
14
14
|
end
|
|
15
15
|
|
|
16
16
|
def start(message, steps: 0)
|
|
17
|
-
stop_animation
|
|
17
|
+
stop_animation
|
|
18
18
|
@animation = Animation.new(message, steps)
|
|
19
|
-
@animation
|
|
20
19
|
end
|
|
21
20
|
|
|
22
21
|
def stop
|
|
@@ -26,38 +25,60 @@ module Starlined
|
|
|
26
25
|
stop_animation
|
|
27
26
|
end
|
|
28
27
|
|
|
29
|
-
# Función que se encarga de ejecutar comandos y mostrar animaciones por pantalla.
|
|
30
|
-
# Utiliza un hilo separado para las animaciones y comprueba el exitcode de los callbacks
|
|
31
|
-
# para detectar errores. Si se ejecutan múltiples instancias de manera simultánea
|
|
32
|
-
# (como cuando se ejecutan comandos en paralelo), se utiliza un semáforo para controlar
|
|
33
|
-
# que no se creen más de un hilo de animación. Si se ejecuta un comando que requiere
|
|
34
|
-
# permisos de sudo, detecta si necesita contraseña y para la animación según corresponda.
|
|
35
28
|
def run(command, print_err: true, aka: nil, no_count: false)
|
|
36
|
-
|
|
29
|
+
needs_sudo = !!(command =~ /^sudo/)
|
|
30
|
+
|
|
31
|
+
execute(
|
|
32
|
+
-> { Open3.capture3(command) },
|
|
33
|
+
print_err,
|
|
34
|
+
aka: aka,
|
|
35
|
+
no_count: no_count,
|
|
36
|
+
sudo: needs_sudo
|
|
37
|
+
)
|
|
38
|
+
end
|
|
37
39
|
|
|
40
|
+
def pass_step
|
|
41
|
+
start_step
|
|
42
|
+
end
|
|
43
|
+
|
|
44
|
+
private
|
|
45
|
+
|
|
46
|
+
def start_step(aka: nil)
|
|
38
47
|
@run_semaphore.synchronize do
|
|
39
48
|
@animation&.add_alias(aka) unless aka.nil?
|
|
40
|
-
|
|
41
|
-
@
|
|
49
|
+
|
|
50
|
+
@animation.start if @running_instances.zero? && @animation
|
|
51
|
+
@running_instances += 1
|
|
42
52
|
end
|
|
43
53
|
|
|
44
|
-
|
|
54
|
+
@running_instances
|
|
55
|
+
end
|
|
45
56
|
|
|
57
|
+
def end_step(aka: nil, no_count: false)
|
|
46
58
|
@run_semaphore.synchronize do
|
|
47
|
-
@
|
|
59
|
+
@running_instances -= 1
|
|
48
60
|
@animation&.increment_step unless no_count
|
|
49
61
|
@animation&.remove_alias(aka) unless aka.nil?
|
|
50
|
-
|
|
62
|
+
|
|
63
|
+
@animation.stop if @running_instances.zero? && @animation
|
|
51
64
|
end
|
|
65
|
+
end
|
|
66
|
+
|
|
67
|
+
def execute(callback, print_err: true, aka: nil, no_count: false, sudo: false)
|
|
68
|
+
handle_sudo if sudo
|
|
69
|
+
|
|
70
|
+
start_step(aka: aka)
|
|
71
|
+
result = callback.call
|
|
72
|
+
end_step(aka: aka, no_count: no_count)
|
|
52
73
|
|
|
53
74
|
handle_error(result, print_err) unless result.last.success?
|
|
54
75
|
|
|
55
76
|
result
|
|
56
77
|
end
|
|
57
78
|
|
|
58
|
-
private
|
|
59
|
-
|
|
60
79
|
def stop_animation
|
|
80
|
+
return unless @animation
|
|
81
|
+
|
|
61
82
|
@animation&.stop
|
|
62
83
|
@animation = nil
|
|
63
84
|
end
|
|
@@ -78,7 +99,7 @@ module Starlined
|
|
|
78
99
|
result = system('sudo -v')
|
|
79
100
|
raise 'Sudo privileges not granted' unless result
|
|
80
101
|
|
|
81
|
-
@animation&.start
|
|
102
|
+
@animation&.start unless @running_instances.zero?
|
|
82
103
|
end
|
|
83
104
|
|
|
84
105
|
def handle_error(result, print_err)
|
|
@@ -86,9 +107,11 @@ module Starlined
|
|
|
86
107
|
|
|
87
108
|
stop_animation
|
|
88
109
|
Messages.error(nil, @animation&.message)
|
|
89
|
-
puts result[1].empty? ? result[0] : result[1] # stdout si stderr está vacío
|
|
90
110
|
|
|
91
|
-
|
|
111
|
+
puts result[1] # stderr
|
|
112
|
+
puts result[0] if result[1].empty? # stdout si stderr está vacío
|
|
113
|
+
|
|
114
|
+
Messages.verbose("Exit code: #{result.last.exitstatus}")
|
|
92
115
|
exit 1
|
|
93
116
|
end
|
|
94
117
|
end
|
data/lib/starlined/version.rb
CHANGED
data/lib/starlined.rb
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
# frozen_string_literal: true
|
|
2
2
|
|
|
3
|
-
require
|
|
4
|
-
require
|
|
3
|
+
require "open3"
|
|
4
|
+
require "colorize"
|
|
5
5
|
|
|
6
|
-
require_relative
|
|
7
|
-
require_relative
|
|
8
|
-
require_relative
|
|
9
|
-
require_relative
|
|
10
|
-
require_relative
|
|
6
|
+
require_relative "starlined/version"
|
|
7
|
+
require_relative "starlined/configuration"
|
|
8
|
+
require_relative "starlined/animation"
|
|
9
|
+
require_relative "starlined/messages"
|
|
10
|
+
require_relative "starlined/runner"
|
|
11
11
|
|
|
12
12
|
module Starlined
|
|
13
13
|
class << self
|
data/starlined.gemspec
CHANGED
|
@@ -1,36 +1,36 @@
|
|
|
1
1
|
# frozen_string_literal: true
|
|
2
2
|
|
|
3
|
-
require_relative
|
|
3
|
+
require_relative 'lib/starlined/version'
|
|
4
4
|
|
|
5
5
|
Gem::Specification.new do |spec|
|
|
6
|
-
spec.name =
|
|
6
|
+
spec.name = 'starlined'
|
|
7
7
|
spec.version = Starlined::VERSION
|
|
8
|
-
spec.authors = [
|
|
9
|
-
spec.email = [
|
|
8
|
+
spec.authors = ['mier']
|
|
9
|
+
spec.email = ['ruby@mier.info']
|
|
10
10
|
|
|
11
|
-
spec.summary =
|
|
12
|
-
spec.homepage =
|
|
13
|
-
spec.license =
|
|
14
|
-
spec.required_ruby_version =
|
|
11
|
+
spec.summary = 'Terminal output utilities with animated progress indicators'
|
|
12
|
+
spec.homepage = 'https://github.com/miermontoto/starlined'
|
|
13
|
+
spec.license = 'CC-NC-BY-4.0'
|
|
14
|
+
spec.required_ruby_version = '>= 2.6.0'
|
|
15
15
|
|
|
16
|
-
spec.metadata[
|
|
17
|
-
spec.metadata[
|
|
16
|
+
spec.metadata['homepage_uri'] = spec.homepage
|
|
17
|
+
spec.metadata['source_code_uri'] = spec.homepage
|
|
18
18
|
|
|
19
19
|
# especificar qué archivos deben incluirse en el gem
|
|
20
20
|
spec.files = Dir.chdir(File.expand_path(__dir__)) do
|
|
21
21
|
`git ls-files -z`.split("\x0").reject { |f| f.match(%r{\A(?:test|spec|features)/}) }
|
|
22
22
|
end
|
|
23
|
-
spec.bindir =
|
|
23
|
+
spec.bindir = 'exe'
|
|
24
24
|
spec.executables = spec.files.grep(%r{\Aexe/}) { |f| File.basename(f) }
|
|
25
|
-
spec.require_paths = [
|
|
25
|
+
spec.require_paths = ['lib']
|
|
26
26
|
|
|
27
27
|
# dependencias en tiempo de ejecución
|
|
28
|
-
spec.add_dependency
|
|
28
|
+
spec.add_dependency 'colorize', '>= 0.8'
|
|
29
29
|
|
|
30
30
|
# dependencias de desarrollo
|
|
31
|
-
spec.add_development_dependency
|
|
32
|
-
spec.add_development_dependency
|
|
33
|
-
spec.add_development_dependency
|
|
34
|
-
spec.add_development_dependency
|
|
35
|
-
spec.add_development_dependency
|
|
31
|
+
spec.add_development_dependency 'bundler', '~> 2.0'
|
|
32
|
+
spec.add_development_dependency 'rake', '~> 13.0'
|
|
33
|
+
spec.add_development_dependency 'rspec', '~> 3.0'
|
|
34
|
+
spec.add_development_dependency 'rubocop', '~> 1.0'
|
|
35
|
+
spec.add_development_dependency 'simplecov', '~> 0.21'
|
|
36
36
|
end
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: starlined
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.
|
|
4
|
+
version: 0.2.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- mier
|
|
@@ -101,7 +101,6 @@ extra_rdoc_files: []
|
|
|
101
101
|
files:
|
|
102
102
|
- ".gitignore"
|
|
103
103
|
- Gemfile
|
|
104
|
-
- LICENSE.txt
|
|
105
104
|
- README.md
|
|
106
105
|
- Rakefile
|
|
107
106
|
- examples/animated_commands.rb
|
data/LICENSE.txt
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
Juan Mier <mier@mier.info>, CC-NC-BY-4.0
|