Skip to content

Commit

Permalink
47 bump gems january 2025 (#48)
Browse files Browse the repository at this point in the history
* [47] Bump gems

* [47] Update the calcpace.gemspec infos to version 1.5.1
  • Loading branch information
0jonjo authored Jan 6, 2025
1 parent 4374c55 commit 9ac5a4c
Show file tree
Hide file tree
Showing 4 changed files with 32 additions and 25 deletions.
6 changes: 3 additions & 3 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ source 'https://rubygems.org'

ruby '3.2.1'

gem 'minitest', '~> 5.14'
gem 'rake', '~> 13.0'
gem 'minitest', '~> 5.25'
gem 'rake', '~> 13.2'
gem 'rake-compiler', '~> 1.0'
gem 'rdoc', '~> 6.2'
gem 'rubocop', '~> 1.66'
gem 'rubocop', '~> 1.69'
38 changes: 21 additions & 17 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2,48 +2,52 @@ GEM
remote: https://rubygems.org/
specs:
ast (2.4.2)
json (2.7.4)
date (3.4.1)
json (2.9.1)
language_server-protocol (3.17.0.3)
minitest (5.25.1)
minitest (5.25.4)
parallel (1.26.3)
parser (3.3.5.0)
parser (3.3.6.0)
ast (~> 2.4.1)
racc
psych (5.1.2)
psych (5.2.2)
date
stringio
racc (1.8.1)
rainbow (3.1.1)
rake (13.2.1)
rake-compiler (1.2.8)
rake-compiler (1.2.9)
rake
rdoc (6.7.0)
rdoc (6.10.0)
psych (>= 4.0.0)
regexp_parser (2.9.2)
rubocop (1.67.0)
regexp_parser (2.10.0)
rubocop (1.69.2)
json (~> 2.3)
language_server-protocol (>= 3.17.0)
parallel (~> 1.10)
parser (>= 3.3.0.2)
rainbow (>= 2.2.2, < 4.0)
regexp_parser (>= 2.4, < 3.0)
rubocop-ast (>= 1.32.2, < 2.0)
regexp_parser (>= 2.9.3, < 3.0)
rubocop-ast (>= 1.36.2, < 2.0)
ruby-progressbar (~> 1.7)
unicode-display_width (>= 2.4.0, < 3.0)
rubocop-ast (1.32.3)
unicode-display_width (>= 2.4.0, < 4.0)
rubocop-ast (1.37.0)
parser (>= 3.3.1.0)
ruby-progressbar (1.13.0)
stringio (3.1.1)
unicode-display_width (2.6.0)
stringio (3.1.2)
unicode-display_width (3.1.3)
unicode-emoji (~> 4.0, >= 4.0.4)
unicode-emoji (4.0.4)

PLATFORMS
ruby

DEPENDENCIES
minitest (~> 5.14)
rake (~> 13.0)
minitest (~> 5.25)
rake (~> 13.2)
rake-compiler (~> 1.0)
rdoc (~> 6.2)
rubocop (~> 1.66)
rubocop (~> 1.69)

RUBY VERSION
ruby 3.2.1p31
Expand Down
8 changes: 4 additions & 4 deletions calcpace.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

Gem::Specification.new do |s|
s.name = 'calcpace'
s.version = '1.5.0'
s.version = '1.5.1'
s.summary = 'Calcpace: calculate total, distance, speed, and convert distances and velocity in an easy way.'
s.description = 'It is designed for calculations related to distance, speed and time. The gem also supports conversion to 42 different units of distance and velocity, including metric, nautical and imperial units.'
s.authors = ['Joao Gilberto Saraiva']
Expand All @@ -11,11 +11,11 @@ Gem::Specification.new do |s|
'lib/calcpace/converter.rb']
s.test_files = ['test/calcpace/test_calculator.rb', 'test/calcpace/test_checker.rb',
'test/calcpace/test_converter.rb']
s.add_development_dependency 'minitest', '~> 5.14'
s.add_development_dependency 'rake', '~> 13.0'
s.add_development_dependency 'minitest', '~> 5.25'
s.add_development_dependency 'rake', '~> 13.2'
s.add_development_dependency 'rake-compiler', '~> 1.0'
s.add_development_dependency 'rdoc', '~> 6.2'
s.add_development_dependency 'rubocop', '~> 1.66'
s.add_development_dependency 'rubocop', '~> 1.69'
s.required_ruby_version = '>= 2.7.0'
s.post_install_message = "It's time to calculate! Thank you for installing Calcpace."
s.metadata = { 'source_code_uri' => 'https://github.com/0jonjo/calcpace' }
Expand Down
5 changes: 4 additions & 1 deletion lib/calcpace/checker.rb
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@ def check_positive(number)
end

def check_time(time_string)
raise ArgumentError, 'It must be a valid time in the format XX:XX:XX' unless time_string =~ /\A\d{1,2}:\d{2}:\d{2}\z/
return if time_string =~ /\A\d{1,2}:\d{2}:\d{2}\z/

raise ArgumentError,
'It must be a valid time in the format XX:XX:XX'
end
end

0 comments on commit 9ac5a4c

Please sign in to comment.