dorian-progress 1.0.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA256:
3
+ metadata.gz: 2b09264766e7a9f12701fc2e46c60a83f4410fa26d70d8384ca8aadb5571e836
4
+ data.tar.gz: f3e5194c2a5f9de502fedea912bf617e1865084ee988d454b72ec2c94192f430
5
+ SHA512:
6
+ metadata.gz: b09213ca842e56b6c2eb96b7562b7081319f38cca5a34d5fb769ef2f0a94520c1c1444b284feeefec613b54a2246fbdb109e6d94394fffe50e642163d3fd8092
7
+ data.tar.gz: d0e13786f7b9c46ec7c47846510ed8fa42084e15e856ea59d8fb425c87cc392e5bcae5988320b8552c29d89b7bcc8045991c1172cecd504b76f0d88a3f8a1293
data/VERSION ADDED
@@ -0,0 +1 @@
1
+ 1.0.0
data/bin/progress ADDED
@@ -0,0 +1,12 @@
1
+ #!/usr/bin/env ruby
2
+ # frozen_string_literal: true
3
+
4
+ require "dorian/arguments"
5
+
6
+ parsed = Dorian::Arguments.parse(version: { alias: :v }, help: { alias: :h })
7
+
8
+ if parsed.options.version
9
+ abort File.read(File.expand_path("../../VERSION", __FILE__))
10
+ else
11
+ abort parsed.help
12
+ end
@@ -0,0 +1,15 @@
1
+ require "ruby-progressbar"
2
+
3
+ class Dorian
4
+ class Progress
5
+ FORMATS = {
6
+ full: "%a |%b%i| %p%% %t | %c/%C | %e",
7
+ minimal: nil
8
+ }
9
+
10
+ def self.create(total: nil, format: :full, output: nil)
11
+ format = FORMATS.fetch(format.to_sym) if format
12
+ ProgressBar.create(total:, format:, output:)
13
+ end
14
+ end
15
+ end
@@ -0,0 +1,3 @@
1
+ # frozen_string_literal: true
2
+
3
+ require_relative "dorian/progress"
metadata ADDED
@@ -0,0 +1,62 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: dorian-progress
3
+ version: !ruby/object:Gem::Version
4
+ version: 1.0.0
5
+ platform: ruby
6
+ authors:
7
+ - Dorian Marié
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2024-08-24 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: ruby-progressbar
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - ">="
18
+ - !ruby/object:Gem::Version
19
+ version: '0'
20
+ type: :runtime
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - ">="
25
+ - !ruby/object:Gem::Version
26
+ version: '0'
27
+ description: progress bar
28
+ email: dorian@dorianmarie.com
29
+ executables:
30
+ - progress
31
+ extensions: []
32
+ extra_rdoc_files: []
33
+ files:
34
+ - VERSION
35
+ - bin/progress
36
+ - lib/dorian-progress.rb
37
+ - lib/dorian/progress.rb
38
+ homepage: https://github.com/dorianmariecom/dorian-progress
39
+ licenses:
40
+ - MIT
41
+ metadata:
42
+ rubygems_mfa_required: 'true'
43
+ post_install_message:
44
+ rdoc_options: []
45
+ require_paths:
46
+ - lib
47
+ required_ruby_version: !ruby/object:Gem::Requirement
48
+ requirements:
49
+ - - ">="
50
+ - !ruby/object:Gem::Version
51
+ version: '0'
52
+ required_rubygems_version: !ruby/object:Gem::Requirement
53
+ requirements:
54
+ - - ">="
55
+ - !ruby/object:Gem::Version
56
+ version: '0'
57
+ requirements: []
58
+ rubygems_version: 3.5.11
59
+ signing_key:
60
+ specification_version: 4
61
+ summary: progress bar
62
+ test_files: []