metanorma / atmospheric

International Standard Atmosphere / ICAO Standard Atmosphere (ISA) from ICAO 7488 / ISO 2533
BSD 2-Clause "Simplified" License
1 stars 1 forks source link

Replace `measured` dependency with something that doesn't require `activesupport` #36

Closed ronaldtse closed 5 months ago

ronaldtse commented 5 months ago

Just as an aside, that new measured dependency hauls along a couple others, among them activesupport, which apparently may conflict with the latest json gem on some systems... like mine :joy:

Got an error like that, and had to downgrade ruby-json: https://gitlab.archlinux.org/archlinux/packaging/packages/wpscan/-/issues/1

Let's use another "meter to foot" conversion gem/mechanism.

Originally posted by @newbthenewbd in https://github.com/metanorma/atmospheric/issues/34#issuecomment-2030769910

newbthenewbd commented 5 months ago

I mean - my original commit just computed it by the assumption that a foot is equal to exactly 0.3048 a meter, and it would seem that measured does this too:

[Czcibor@new-host ~]$ echo "require 'measured'; puts Measured::Length.new(1, 'm').convert_to('ft')" | ruby
3.2808398950131235 ft
[Czcibor@new-host ~]$ echo "require 'measured'; puts Measured::Length.new(1, 'ft').convert_to('m')" | ruby
0.3048 m

So, are there reasons against doing it ourselves :)?

ronaldtse commented 5 months ago

We can do it the manual way for now.

You could also use “irb” the Ruby interpreter shell to test out ruby code.

newbthenewbd commented 5 months ago

Fixed by #37.