trailblazer / trailblazer-operation

Trailblazer's Operation implementation.
https://trailblazer.to/2.1/docs/operation.html
87 stars 24 forks source link

add #to_hash and #keys to Result #33

Closed johannesluedke closed 5 years ago

johannesluedke commented 5 years ago

There is currently no way to see a list of keys that are included in a Result instance. This is making debugging very tedious sometimes, and also limits the ability for code to explore the results contents.

fernandes commented 5 years ago

Awesome.. I'm +1 for this :)

konung commented 5 years ago

Nice . Looks better than my monkey-patch in .pryrc 👍

seuros commented 5 years ago

Can you add a test case ?

johannesluedke commented 5 years ago

@seuros How are the tests supposed to be setup/run locally? Is there documentation for it somewhere?

seuros commented 5 years ago

rake

johannesluedke commented 5 years ago

@seuros the CI are failing because of

 gem install bundler
Fetching: bundler-2.0.1.gem (100%)
ERROR:  Error installing bundler:
    The last version of bundler (>= 0) to support your Ruby & RubyGems was 1.17.3. Try installing it with `gem install bundler -v 1.17.3`
    bundler requires Ruby version >= 2.3.0. The current ruby version is 2.1.0.
The command "gem install bundler" failed and exited with 1 during .

-- that is probably some problem with trailblazer CI config.

I added tests and rake passes locally, on CI it passes for Ruby 2.3.3, 2.4.0