Skip to content

Commit

Permalink
Increase Ruby versions support
Browse files Browse the repository at this point in the history
To make this library more accessible, I am increasing the number of
ruby versions supported.

I initially limited the support to very recent Ruby versions for two
reasons:
- support only branches in normal maintenance
- reduce the precision difference in BigDecimal with older versions

Now that BigDecimal has been removed from the project (e3d862f), this is
a good opportunity to increase the Ruby versions support, so that older
versions of Ruby are supported even if these versions are in EOL
maintenance mode.
  • Loading branch information
rhannequin committed Apr 5, 2024
1 parent e3d862f commit cdc6275
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 7 deletions.
9 changes: 4 additions & 5 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,10 @@ jobs:
strategy:
matrix:
ruby:
- 3.2.0
- 3.2.1
- 3.2.2
- 3.2.3
- 3.3.0
- 3.0
- 3.1
- 3.2
- 3.3
steps:
- name: checkout
uses: actions/checkout@v4
Expand Down
2 changes: 1 addition & 1 deletion astronoby.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ Gem::Specification.new do |spec|
spec.description = "Ruby version of the calculations from various books like Celestial Calculations by J. L. Lawrence, Practical Astronomy with your Calculator or Spreadsheet by Peter Duffett-Smith and Jonathan Zwart, or Astronomical Algorithms by Jean Meeus"
spec.homepage = "https://github.com/rhannequin/astronoby"
spec.license = "MIT"
spec.required_ruby_version = ">= 3.2.0"
spec.required_ruby_version = ">= 3.0.0"

spec.metadata["homepage_uri"] = spec.homepage
spec.metadata["source_code_uri"] = spec.homepage
Expand Down
4 changes: 4 additions & 0 deletions lib/astronoby/bodies/sun.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# frozen_string_literal: true

# rubocop:disable Lint/RedundantRequireStatement
require "set"
# rubocop:enable Lint/RedundantRequireStatement

module Astronoby
class Sun
SEMI_MAJOR_AXIS_IN_METERS = 149_598_500_000
Expand Down
1 change: 0 additions & 1 deletion spec/astronoby/angle_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -305,7 +305,6 @@ def clear
angle1 = Astronoby::Angle.from_degrees(180)
angle1_bis = Astronoby::Angle.from_degrees(180)
set = Set.new([angle1])

expect(set.include?(angle1_bis)).to be true
end
end
Expand Down

0 comments on commit cdc6275

Please sign in to comment.