Michael Chui

Results 10 comments of Michael Chui

Oh, I like the sound of that. What would be involved?

Ooh, I have not. I think that I personally prefer my DSL, but they've definitely gotten further along in fleshing it out to be generally useful.

@CGA1123 I've put up my work so far at https://github.com/saraid/slack-block-kit ; feel free to steal ideas or techniques from there. I'd be happy to explain anything that's unclear in it.

Try changing the first line to `Hashie::Mash.new` from the [Hashie gem](https://github.com/hashie/hashie) and the rest should work fine.

I'm presuming you have a use case that involves executing the generated Ruby code in Ruby. If you don't have any use case for this, please ignore my suggestion.

The following change appears to address this issue: ```diff diff --git a/lib/unitwise/measurement.rb b/lib/unitwise/measurement.rb index f8541e5..509f0e5 100644 --- a/lib/unitwise/measurement.rb +++ b/lib/unitwise/measurement.rb @@ -185,7 +185,7 @@ module Unitwise new(value.send(operator, converted.value), unit.send(operator, converted.unit))...

Agreed. You could also do ```ruby def value_for_operation(operator) case operator when :/ then to_r else value end end ``` and then change it to ```ruby new(value_for_operation(operator).send(operator, other.value), unit.send(operator, other.unit)) ```...

The following diff appears to address this: ```diff diff --git a/lib/unitwise/unit.rb b/lib/unitwise/unit.rb index d8ad8be..013b6bf 100644 --- a/lib/unitwise/unit.rb +++ b/lib/unitwise/unit.rb @@ -88,7 +88,7 @@ module Unitwise # @api public def scalar(magnitude...

The deprecation article doesn't discuss it for some reason, but newer versions of `gem` and `bundler` ([JFrog's Artifactory](https://jfrog.com/help/r/artifactory-rubygems-org-dependency-api-deprecation/background) identifies the desired versions to be "Gem 3.2.3 or higher; Bundler 1.12...

> @saraid Usually there is no need to upgrade Ruby. Just install newer bundler using `gem install bundler`. All currently supported Rubies (2.7+) includes bundler 2.1.4 or newer. Why would...