timer-cli 0.2.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: 758abf527cf0150b6049565c1074b26e099db5114056c1a4915a5b8ee836ab11
4
+ data.tar.gz: 4252db2fa9815d491836d2ea79240dcc8ac9a7eed4f9ea56b64c3086859c6e71
5
+ SHA512:
6
+ metadata.gz: d1d465e01fa658fb33c744188c47f0f5574e13850c0d9e8da8f550a2c2412e814a6a1c9c04e39bf2b790efc273f47cf885e4199a1c627f2d668a13dacfafc61d
7
+ data.tar.gz: acdffed643e240af642540d836b04454cca59a224784c464de856ebfb94adc96edf67dfdfb361c640d63686f4b99db57beb6a724472634a20d33f2ed1a9139ee
data/.rspec ADDED
@@ -0,0 +1,3 @@
1
+ --format documentation
2
+ --color
3
+ --require spec_helper
data/CHANGELOG.md ADDED
@@ -0,0 +1,5 @@
1
+ ## [Unreleased]
2
+
3
+ ## [0.1.0] - 2024-05-15
4
+
5
+ - Initial release
@@ -0,0 +1,84 @@
1
+ # Contributor Covenant Code of Conduct
2
+
3
+ ## Our Pledge
4
+
5
+ We as members, contributors, and leaders pledge to make participation in our community a harassment-free experience for everyone, regardless of age, body size, visible or invisible disability, ethnicity, sex characteristics, gender identity and expression, level of experience, education, socio-economic status, nationality, personal appearance, race, religion, or sexual identity and orientation.
6
+
7
+ We pledge to act and interact in ways that contribute to an open, welcoming, diverse, inclusive, and healthy community.
8
+
9
+ ## Our Standards
10
+
11
+ Examples of behavior that contributes to a positive environment for our community include:
12
+
13
+ * Demonstrating empathy and kindness toward other people
14
+ * Being respectful of differing opinions, viewpoints, and experiences
15
+ * Giving and gracefully accepting constructive feedback
16
+ * Accepting responsibility and apologizing to those affected by our mistakes, and learning from the experience
17
+ * Focusing on what is best not just for us as individuals, but for the overall community
18
+
19
+ Examples of unacceptable behavior include:
20
+
21
+ * The use of sexualized language or imagery, and sexual attention or
22
+ advances of any kind
23
+ * Trolling, insulting or derogatory comments, and personal or political attacks
24
+ * Public or private harassment
25
+ * Publishing others' private information, such as a physical or email
26
+ address, without their explicit permission
27
+ * Other conduct which could reasonably be considered inappropriate in a
28
+ professional setting
29
+
30
+ ## Enforcement Responsibilities
31
+
32
+ Community leaders are responsible for clarifying and enforcing our standards of acceptable behavior and will take appropriate and fair corrective action in response to any behavior that they deem inappropriate, threatening, offensive, or harmful.
33
+
34
+ Community leaders have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct, and will communicate reasons for moderation decisions when appropriate.
35
+
36
+ ## Scope
37
+
38
+ This Code of Conduct applies within all community spaces, and also applies when an individual is officially representing the community in public spaces. Examples of representing our community include using an official e-mail address, posting via an official social media account, or acting as an appointed representative at an online or offline event.
39
+
40
+ ## Enforcement
41
+
42
+ Instances of abusive, harassing, or otherwise unacceptable behavior may be reported to the community leaders responsible for enforcement at daniel.vinciguerra@bivee.com.br. All complaints will be reviewed and investigated promptly and fairly.
43
+
44
+ All community leaders are obligated to respect the privacy and security of the reporter of any incident.
45
+
46
+ ## Enforcement Guidelines
47
+
48
+ Community leaders will follow these Community Impact Guidelines in determining the consequences for any action they deem in violation of this Code of Conduct:
49
+
50
+ ### 1. Correction
51
+
52
+ **Community Impact**: Use of inappropriate language or other behavior deemed unprofessional or unwelcome in the community.
53
+
54
+ **Consequence**: A private, written warning from community leaders, providing clarity around the nature of the violation and an explanation of why the behavior was inappropriate. A public apology may be requested.
55
+
56
+ ### 2. Warning
57
+
58
+ **Community Impact**: A violation through a single incident or series of actions.
59
+
60
+ **Consequence**: A warning with consequences for continued behavior. No interaction with the people involved, including unsolicited interaction with those enforcing the Code of Conduct, for a specified period of time. This includes avoiding interactions in community spaces as well as external channels like social media. Violating these terms may lead to a temporary or permanent ban.
61
+
62
+ ### 3. Temporary Ban
63
+
64
+ **Community Impact**: A serious violation of community standards, including sustained inappropriate behavior.
65
+
66
+ **Consequence**: A temporary ban from any sort of interaction or public communication with the community for a specified period of time. No public or private interaction with the people involved, including unsolicited interaction with those enforcing the Code of Conduct, is allowed during this period. Violating these terms may lead to a permanent ban.
67
+
68
+ ### 4. Permanent Ban
69
+
70
+ **Community Impact**: Demonstrating a pattern of violation of community standards, including sustained inappropriate behavior, harassment of an individual, or aggression toward or disparagement of classes of individuals.
71
+
72
+ **Consequence**: A permanent ban from any sort of public interaction within the community.
73
+
74
+ ## Attribution
75
+
76
+ This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 2.0,
77
+ available at https://www.contributor-covenant.org/version/2/0/code_of_conduct.html.
78
+
79
+ Community Impact Guidelines were inspired by [Mozilla's code of conduct enforcement ladder](https://github.com/mozilla/diversity).
80
+
81
+ [homepage]: https://www.contributor-covenant.org
82
+
83
+ For answers to common questions about this code of conduct, see the FAQ at
84
+ https://www.contributor-covenant.org/faq. Translations are available at https://www.contributor-covenant.org/translations.
data/Gemfile ADDED
@@ -0,0 +1,16 @@
1
+ # frozen_string_literal: true
2
+
3
+ source 'https://rubygems.org'
4
+
5
+ # Specify your gem's dependencies in timer-cli.gemspec
6
+ gemspec
7
+
8
+ gem 'rake', '~> 13.0'
9
+
10
+ group :development, :test do
11
+ gem 'rspec', '~> 3.0'
12
+ gem 'rubocop', require: false
13
+ gem 'rubocop-rspec', require: false
14
+ gem 'simplecov', require: false
15
+ gem 'solargraph', require: false
16
+ end
data/Gemfile.lock ADDED
@@ -0,0 +1,133 @@
1
+ PATH
2
+ remote: .
3
+ specs:
4
+ timer-cli (0.2.0)
5
+ chronic
6
+ pastel
7
+ tty-option
8
+ tty-progressbar
9
+
10
+ GEM
11
+ remote: https://rubygems.org/
12
+ specs:
13
+ ast (2.4.2)
14
+ backport (1.2.0)
15
+ benchmark (0.3.0)
16
+ chronic (0.10.2)
17
+ diff-lcs (1.5.1)
18
+ docile (1.4.0)
19
+ e2mmap (0.1.0)
20
+ jaro_winkler (1.5.6)
21
+ json (2.7.2)
22
+ kramdown (2.4.0)
23
+ rexml
24
+ kramdown-parser-gfm (1.1.0)
25
+ kramdown (~> 2.0)
26
+ language_server-protocol (3.17.0.3)
27
+ mini_portile2 (2.8.6)
28
+ nokogiri (1.16.5)
29
+ mini_portile2 (~> 2.8.2)
30
+ racc (~> 1.4)
31
+ parallel (1.24.0)
32
+ parser (3.3.1.0)
33
+ ast (~> 2.4.1)
34
+ racc
35
+ pastel (0.8.0)
36
+ tty-color (~> 0.5)
37
+ racc (1.7.3)
38
+ rainbow (3.1.1)
39
+ rake (13.2.1)
40
+ rbs (2.8.4)
41
+ regexp_parser (2.9.1)
42
+ reverse_markdown (2.1.1)
43
+ nokogiri
44
+ rexml (3.2.6)
45
+ rspec (3.13.0)
46
+ rspec-core (~> 3.13.0)
47
+ rspec-expectations (~> 3.13.0)
48
+ rspec-mocks (~> 3.13.0)
49
+ rspec-core (3.13.0)
50
+ rspec-support (~> 3.13.0)
51
+ rspec-expectations (3.13.0)
52
+ diff-lcs (>= 1.2.0, < 2.0)
53
+ rspec-support (~> 3.13.0)
54
+ rspec-mocks (3.13.1)
55
+ diff-lcs (>= 1.2.0, < 2.0)
56
+ rspec-support (~> 3.13.0)
57
+ rspec-support (3.13.1)
58
+ rubocop (1.63.5)
59
+ json (~> 2.3)
60
+ language_server-protocol (>= 3.17.0)
61
+ parallel (~> 1.10)
62
+ parser (>= 3.3.0.2)
63
+ rainbow (>= 2.2.2, < 4.0)
64
+ regexp_parser (>= 1.8, < 3.0)
65
+ rexml (>= 3.2.5, < 4.0)
66
+ rubocop-ast (>= 1.31.1, < 2.0)
67
+ ruby-progressbar (~> 1.7)
68
+ unicode-display_width (>= 2.4.0, < 3.0)
69
+ rubocop-ast (1.31.3)
70
+ parser (>= 3.3.1.0)
71
+ rubocop-capybara (2.20.0)
72
+ rubocop (~> 1.41)
73
+ rubocop-factory_bot (2.25.1)
74
+ rubocop (~> 1.41)
75
+ rubocop-rspec (2.29.2)
76
+ rubocop (~> 1.40)
77
+ rubocop-capybara (~> 2.17)
78
+ rubocop-factory_bot (~> 2.22)
79
+ rubocop-rspec_rails (~> 2.28)
80
+ rubocop-rspec_rails (2.28.3)
81
+ rubocop (~> 1.40)
82
+ ruby-progressbar (1.13.0)
83
+ simplecov (0.22.0)
84
+ docile (~> 1.1)
85
+ simplecov-html (~> 0.11)
86
+ simplecov_json_formatter (~> 0.1)
87
+ simplecov-html (0.12.3)
88
+ simplecov_json_formatter (0.1.4)
89
+ solargraph (0.50.0)
90
+ backport (~> 1.2)
91
+ benchmark
92
+ bundler (~> 2.0)
93
+ diff-lcs (~> 1.4)
94
+ e2mmap
95
+ jaro_winkler (~> 1.5)
96
+ kramdown (~> 2.3)
97
+ kramdown-parser-gfm (~> 1.1)
98
+ parser (~> 3.0)
99
+ rbs (~> 2.0)
100
+ reverse_markdown (~> 2.0)
101
+ rubocop (~> 1.38)
102
+ thor (~> 1.0)
103
+ tilt (~> 2.0)
104
+ yard (~> 0.9, >= 0.9.24)
105
+ strings-ansi (0.2.0)
106
+ thor (1.3.1)
107
+ tilt (2.3.0)
108
+ tty-color (0.6.0)
109
+ tty-cursor (0.7.1)
110
+ tty-option (0.3.0)
111
+ tty-progressbar (0.18.2)
112
+ strings-ansi (~> 0.2)
113
+ tty-cursor (~> 0.7)
114
+ tty-screen (~> 0.8)
115
+ unicode-display_width (>= 1.6, < 3.0)
116
+ tty-screen (0.8.2)
117
+ unicode-display_width (2.5.0)
118
+ yard (0.9.36)
119
+
120
+ PLATFORMS
121
+ ruby
122
+
123
+ DEPENDENCIES
124
+ rake (~> 13.0)
125
+ rspec (~> 3.0)
126
+ rubocop
127
+ rubocop-rspec
128
+ simplecov
129
+ solargraph
130
+ timer-cli!
131
+
132
+ BUNDLED WITH
133
+ 2.5.5
data/LICENSE.txt ADDED
@@ -0,0 +1,21 @@
1
+ The MIT License (MIT)
2
+
3
+ Copyright (c) 2024 Daniel Vinciguerra
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in
13
+ all copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21
+ THE SOFTWARE.
data/README.md ADDED
@@ -0,0 +1,43 @@
1
+ # Timer::Cli
2
+
3
+ Welcome to your new gem! In this directory, you'll find the files you need to be able to package up your Ruby library into a gem. Put your Ruby code in the file `lib/timer/cli`. To experiment with that code, run `bin/console` for an interactive prompt.
4
+
5
+ TODO: Delete this and the text above, and describe your gem
6
+
7
+ ## Installation
8
+
9
+ Add this line to your application's Gemfile:
10
+
11
+ ```ruby
12
+ gem 'timer-cli'
13
+ ```
14
+
15
+ And then execute:
16
+
17
+ $ bundle install
18
+
19
+ Or install it yourself as:
20
+
21
+ $ gem install timer-cli
22
+
23
+ ## Usage
24
+
25
+ TODO: Write usage instructions here
26
+
27
+ ## Development
28
+
29
+ After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake spec` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
30
+
31
+ To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and the created tag, and push the `.gem` file to [rubygems.org](https://rubygems.org).
32
+
33
+ ## Contributing
34
+
35
+ Bug reports and pull requests are welcome on GitHub at https://github.com/dvinciguerra/timer-cli. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [code of conduct](https://github.com/dvinciguerra/timer-cli/blob/main/CODE_OF_CONDUCT.md).
36
+
37
+ ## License
38
+
39
+ The gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).
40
+
41
+ ## Code of Conduct
42
+
43
+ Everyone interacting in the Timer::Cli project's codebases, issue trackers, chat rooms and mailing lists is expected to follow the [code of conduct](https://github.com/dvinciguerra/timer-cli/blob/main/CODE_OF_CONDUCT.md).
data/Rakefile ADDED
@@ -0,0 +1,8 @@
1
+ # frozen_string_literal: true
2
+
3
+ require "bundler/gem_tasks"
4
+ require "rspec/core/rake_task"
5
+
6
+ RSpec::Core::RakeTask.new(:spec)
7
+
8
+ task default: :spec
data/bin/timer ADDED
@@ -0,0 +1,9 @@
1
+ #!/usr/bin/env ruby
2
+ # vim: set fileencoding=utf-8 :set ft=ruby
3
+ # frozen_string_literal: true
4
+
5
+ $LOAD_PATH.unshift(File.expand_path('../lib', __dir__))
6
+
7
+ require 'timer-cli'
8
+
9
+ TimerCli.run(ARGV)
data/lib/timer-cli.rb ADDED
@@ -0,0 +1,3 @@
1
+ # frozen_string_literal: true
2
+
3
+ require_relative 'timer_cli'
@@ -0,0 +1,20 @@
1
+ # frozen_string_literal: true
2
+
3
+ module TimerCli
4
+ class Command
5
+ # base timer command execution class
6
+ class BaseCommand
7
+ def self.execute(params)
8
+ new.execute(params)
9
+ end
10
+
11
+ def execute(params)
12
+ @params = params
13
+ end
14
+
15
+ private
16
+
17
+ attr_reader :params
18
+ end
19
+ end
20
+ end
@@ -0,0 +1,37 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'timer_cli/command/base_command'
4
+ require 'timer_cli/command/timer_command'
5
+
6
+ module TimerCli
7
+ class Command
8
+ # timer commands dispatcher
9
+ module Dispatcher
10
+ def dispatch
11
+ parse
12
+
13
+ if help?
14
+ print help
15
+ elsif errors?
16
+ puts params.errors.summary
17
+ else
18
+ TimerCli::Command::TimerCommand.execute(params)
19
+ end
20
+ end
21
+
22
+ private
23
+
24
+ def help?
25
+ params[:help]
26
+ end
27
+
28
+ def errors?
29
+ params.errors.any?
30
+ end
31
+
32
+ def errors_summary
33
+ puts params.errors.summary
34
+ end
35
+ end
36
+ end
37
+ end
@@ -0,0 +1,90 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'pastel'
4
+ require 'tty-progressbar'
5
+
6
+ module TimerCli
7
+ class Command
8
+ # timer command execution class
9
+ class TimerCommand < BaseCommand
10
+ def execute(params)
11
+ super
12
+
13
+ parse_time_and_unit!
14
+
15
+ start_time = Time.now
16
+ finish_time = time.send(unit).from_now
17
+
18
+ prepare_clock(start: start_time, finish: finish_time)
19
+
20
+ puts "#{[name, timer].join(' ')} - #{start_time.strftime('%H:%M:%S')}"
21
+
22
+ (0..clock).each do
23
+ break if $timer_cli_terminate
24
+
25
+ sleep(1)
26
+ progressbar.advance unless $timer_cli_terminate
27
+ end
28
+
29
+ puts "Timer #{name} finished at #{finish_time}" unless $timer_cli_terminate
30
+ end
31
+
32
+ private
33
+
34
+ UNIT_PATTERN = /(?<time>\d+)(?<unit>s|m|h)/.freeze
35
+
36
+ AVAILABLE_UNITS = {
37
+ 's' => 'seconds',
38
+ 'm' => 'minutes',
39
+ 'h' => 'hours'
40
+ }.freeze
41
+
42
+ attr_reader :clock, :time, :unit
43
+
44
+ def parse_time_and_unit!
45
+ time, unit = timer.match(UNIT_PATTERN).values_at(:time, :unit)
46
+
47
+ @time = time.to_i
48
+ @unit = AVAILABLE_UNITS[unit]
49
+ end
50
+
51
+ def timer
52
+ @timer ||= params[:timer]
53
+ end
54
+
55
+ def name
56
+ @name ||= params[:name]
57
+ end
58
+
59
+ def color
60
+ @color ||= Pastel.new
61
+ end
62
+
63
+ def prepare_clock(start:, finish:)
64
+ @clock = finish - start
65
+ end
66
+
67
+ def progressbar
68
+ raise TimerCli::Error, 'Timer @clock variable is not set' unless @clock
69
+
70
+ @progressbar ||= TTY::ProgressBar.new(
71
+ ':bar :elapsed :percent',
72
+ width: 40,
73
+ bar_format: :block,
74
+ total: @clock,
75
+ complete: primary_color,
76
+ incomplete: secondary_color,
77
+ clear: true
78
+ )
79
+ end
80
+
81
+ def primary_color
82
+ color.on_bright_magenta(' ')
83
+ end
84
+
85
+ def secondary_color
86
+ color.on_black(' ')
87
+ end
88
+ end
89
+ end
90
+ end
@@ -0,0 +1,40 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'tty-option'
4
+
5
+ require 'timer_cli/command/dispatcher'
6
+
7
+ module TimerCli
8
+ # TimerCli command line interface
9
+ class Command
10
+ include TTY::Option
11
+ include Dispatcher
12
+
13
+ usage do
14
+ program 'timer'
15
+ end
16
+
17
+ argument :timer do
18
+ optional
19
+ desc 'execution timer from given time unit (s, m, h)'
20
+ # example 'timer 5m'
21
+ end
22
+
23
+ option :name do
24
+ short '-n'
25
+ long '--name string'
26
+ desc 'Define timer name'
27
+ # example 'timer -n "Daily Standup" 10m'
28
+ end
29
+
30
+ flag :help do
31
+ short '-h'
32
+ long '--help'
33
+ desc 'Print usage'
34
+ end
35
+
36
+ def run
37
+ dispatch
38
+ end
39
+ end
40
+ end
@@ -0,0 +1,32 @@
1
+ # frozen_string_literal: true
2
+
3
+ module TimerCli
4
+ module Helpers
5
+ # Integer helpers to time units
6
+ module IntegerTime
7
+ def hours
8
+ self * 3600
9
+ end
10
+
11
+ def minutes
12
+ self * 60
13
+ end
14
+
15
+ def seconds
16
+ self
17
+ end
18
+
19
+ def days
20
+ self * 86_400
21
+ end
22
+
23
+ def from_now
24
+ Time.now + self
25
+ end
26
+ end
27
+ end
28
+ end
29
+
30
+ class Integer
31
+ include TimerCli::Helpers::IntegerTime
32
+ end
@@ -0,0 +1,5 @@
1
+ # frozen_string_literal: true
2
+
3
+ module TimerCli
4
+ VERSION = '0.2.0'
5
+ end
data/lib/timer_cli.rb ADDED
@@ -0,0 +1,33 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'timer_cli/version'
4
+ require 'timer_cli/helpers/integer_time'
5
+ require 'timer_cli/command'
6
+
7
+ # TimerCli module
8
+ module TimerCli
9
+ # Generic error class
10
+ class Error < StandardError; end
11
+
12
+ # globals
13
+ $timer_cli_terminate = false # :RuboCop: Naming/GlobalVars
14
+
15
+ # trap signals
16
+ trap('SIGINT') do
17
+ $timer_cli_terminate = true
18
+ puts "\n[timer canceled] Terminating #{Time.now.strftime('%H:%M:%S')}..."
19
+ end
20
+
21
+ trap('SIGTERM') do
22
+ $timer_cli_terminate = true
23
+ puts "\n[timer canceled] Terminating #{Time.now.strftime('%H:%M:%S')}..."
24
+ end
25
+
26
+ class << self
27
+ # execute the command line interface
28
+ def run(_argv)
29
+ command = TimerCli::Command.new
30
+ command.run
31
+ end
32
+ end
33
+ end
data/sig/timer/cli.rbs ADDED
@@ -0,0 +1,6 @@
1
+ module Timer
2
+ module Cli
3
+ VERSION: String
4
+ # See the writing guide of rbs: https://github.com/ruby/rbs#guides
5
+ end
6
+ end
data/timer-cli.gemspec ADDED
@@ -0,0 +1,44 @@
1
+ # frozen_string_literal: true
2
+
3
+ $LOAD_PATH.unshift(File.expand_path('lib', __dir__))
4
+
5
+ require 'timer_cli/version'
6
+
7
+ Gem::Specification.new do |spec|
8
+ spec.name = 'timer-cli'
9
+ spec.version = TimerCli::VERSION
10
+ spec.authors = ['Daniel Vinciguerra']
11
+ spec.email = ['daniel.vinciguerra@bivee.com.br']
12
+
13
+ spec.summary = 'timer-cli is a simple timer command line interface'
14
+ spec.description = spec.summary
15
+ spec.homepage = 'https://github.com/dvinciguerra/timer-cli'
16
+ spec.license = 'MIT'
17
+ spec.required_ruby_version = '>= 2.7.0'
18
+
19
+ spec.metadata['homepage_uri'] = spec.homepage
20
+ spec.metadata['source_code_uri'] = spec.homepage
21
+ spec.metadata['changelog_uri'] = spec.homepage
22
+
23
+ # Specify which files should be added to the gem when it is released.
24
+ # The `git ls-files -z` loads the files in the RubyGem that have been added into git.
25
+ spec.files = Dir.chdir(File.expand_path(__dir__)) do
26
+ `git ls-files -z`.split("\x0").reject do |f|
27
+ (f == __FILE__) || f.match(%r{\A(?:(?:test|spec|features)/|\.(?:git|travis|circleci)|appveyor)})
28
+ end
29
+ end
30
+ spec.bindir = 'bin'
31
+ spec.executables = spec.files.grep(%r{\Abin/}) { |f| File.basename(f) }
32
+ spec.require_paths = ['lib']
33
+
34
+ # Uncomment to register a new dependency of your gem
35
+ # spec.add_dependency "example-gem", "~> 1.0"
36
+ spec.add_dependency 'chronic'
37
+ spec.add_dependency 'pastel'
38
+ spec.add_dependency 'tty-option'
39
+ spec.add_dependency 'tty-progressbar'
40
+
41
+ # For more information and examples about making a new gem, check out our
42
+ # guide at: https://bundler.io/guides/creating_gem.html
43
+ spec.metadata['rubygems_mfa_required'] = 'true'
44
+ end
metadata ADDED
@@ -0,0 +1,123 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: timer-cli
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.2.0
5
+ platform: ruby
6
+ authors:
7
+ - Daniel Vinciguerra
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2024-05-15 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: chronic
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
+ - !ruby/object:Gem::Dependency
28
+ name: pastel
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - ">="
32
+ - !ruby/object:Gem::Version
33
+ version: '0'
34
+ type: :runtime
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - ">="
39
+ - !ruby/object:Gem::Version
40
+ version: '0'
41
+ - !ruby/object:Gem::Dependency
42
+ name: tty-option
43
+ requirement: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - ">="
46
+ - !ruby/object:Gem::Version
47
+ version: '0'
48
+ type: :runtime
49
+ prerelease: false
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - ">="
53
+ - !ruby/object:Gem::Version
54
+ version: '0'
55
+ - !ruby/object:Gem::Dependency
56
+ name: tty-progressbar
57
+ requirement: !ruby/object:Gem::Requirement
58
+ requirements:
59
+ - - ">="
60
+ - !ruby/object:Gem::Version
61
+ version: '0'
62
+ type: :runtime
63
+ prerelease: false
64
+ version_requirements: !ruby/object:Gem::Requirement
65
+ requirements:
66
+ - - ">="
67
+ - !ruby/object:Gem::Version
68
+ version: '0'
69
+ description: timer-cli is a simple timer command line interface
70
+ email:
71
+ - daniel.vinciguerra@bivee.com.br
72
+ executables:
73
+ - timer
74
+ extensions: []
75
+ extra_rdoc_files: []
76
+ files:
77
+ - ".rspec"
78
+ - CHANGELOG.md
79
+ - CODE_OF_CONDUCT.md
80
+ - Gemfile
81
+ - Gemfile.lock
82
+ - LICENSE.txt
83
+ - README.md
84
+ - Rakefile
85
+ - bin/timer
86
+ - lib/timer-cli.rb
87
+ - lib/timer_cli.rb
88
+ - lib/timer_cli/command.rb
89
+ - lib/timer_cli/command/base_command.rb
90
+ - lib/timer_cli/command/dispatcher.rb
91
+ - lib/timer_cli/command/timer_command.rb
92
+ - lib/timer_cli/helpers/integer_time.rb
93
+ - lib/timer_cli/version.rb
94
+ - sig/timer/cli.rbs
95
+ - timer-cli.gemspec
96
+ homepage: https://github.com/dvinciguerra/timer-cli
97
+ licenses:
98
+ - MIT
99
+ metadata:
100
+ homepage_uri: https://github.com/dvinciguerra/timer-cli
101
+ source_code_uri: https://github.com/dvinciguerra/timer-cli
102
+ changelog_uri: https://github.com/dvinciguerra/timer-cli
103
+ rubygems_mfa_required: 'true'
104
+ post_install_message:
105
+ rdoc_options: []
106
+ require_paths:
107
+ - lib
108
+ required_ruby_version: !ruby/object:Gem::Requirement
109
+ requirements:
110
+ - - ">="
111
+ - !ruby/object:Gem::Version
112
+ version: 2.7.0
113
+ required_rubygems_version: !ruby/object:Gem::Requirement
114
+ requirements:
115
+ - - ">="
116
+ - !ruby/object:Gem::Version
117
+ version: '0'
118
+ requirements: []
119
+ rubygems_version: 3.4.22
120
+ signing_key:
121
+ specification_version: 4
122
+ summary: timer-cli is a simple timer command line interface
123
+ test_files: []