Skip to content

Conversation

@ignaciosplit
Copy link
Contributor

This PR introduces a refactor for the configuration to implement a new pattern that avoids passing the @config instance throughout the library classes, clarifying the code thus increasing maintainability.
It also adds:

  • Pry as a require in the spec_helpers.rb, allowing to debug while writing specs.
  • Add dump.rb to the .gitignore. This is a file that is automatically created when the user runs the specs.
  • You can now run the specs. Simply by running bundle exec rspec

Copy link
Contributor

@mmelogranommelograno left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!


rescueStandardError=>error
@config.log_found_exception(__method__.to_s,error)
SplitIoClient.configuration.logger.info(SplitIoClient.configuration.block_until_ready)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this just logging the number/boolean that was passed to the config? If you think it's better to surface the value in case of error here I won't argue with it, but maybe we should add something to the message to explain what that value represent.

If I'm reading this line wrong, disregard my comment.

Copy link
ContributorAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch @NicoZelaya I think it doesn't make sense to log this value. I'll remove this line.

@NicoZelayaNicoZelaya merged commit 0addaf8 into developmentSep 28, 2018
@NicoZelayaNicoZelaya deleted the refactor-configuration branch September 28, 2018 19:52
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants

@ignaciosplit@NicoZelaya@mmelograno