Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: centralize client spec info #176

Merged
merged 12 commits into from
Jul 4, 2024
Merged

Conversation

sighphyre
Copy link
Member

I'd be pretty cool to have the required semver for the client-specification as a single source of truth. This PR makes that happen by encoding it in the gemspec file.

This is part of the move towards a more standardized set of metrics across all of our SDKs - I could just hard code it but that information will drift and it actually needs to be accurate for Unleash to function properly.

As a part of this I've made the client-specification necessary for a successful test run. Currently leaving this in draft while I test the build but I'll put a nicer set of instructions in place before I move to ready for review

@sighphyre sighphyre force-pushed the chore/centralize-client-spec-info branch from e4cbc70 to 8f98bef Compare July 4, 2024 10:40
@sighphyre sighphyre force-pushed the chore/centralize-client-spec-info branch from 1b47e4d to cdbbd44 Compare July 4, 2024 10:45
state_segments = state.fetch('segments', []).map{ |segment| [segment["id"], segment] }.to_h
let(:unleash_toggles) { state_features }
unleash_client = Unleash::Client.new
unless File.exist?(SPECIFICATION_PATH + '/index.json')
Copy link
Member Author

Choose a reason for hiding this comment

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

This looks like a big change, it's 99% whitespace. All this does is make the tests fail instead of warn if the client spec isn't present

@sighphyre sighphyre requested a review from gardleopard July 4, 2024 11:13
@coveralls
Copy link

coveralls commented Jul 4, 2024

Pull Request Test Coverage Report for Build 9793287416

Details

  • 28 of 29 (96.55%) changed or added relevant lines in 2 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage increased (+0.002%) to 97.131%

Changes Missing Coverage Covered Lines Changed/Added Lines %
spec/unleash/client_specification_spec.rb 26 27 96.3%
Totals Coverage Status
Change from base Build 9624271247: 0.002%
Covered Lines: 2539
Relevant Lines: 2614

💛 - Coveralls

Copy link
Contributor

@gardleopard gardleopard left a comment

Choose a reason for hiding this comment

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

LGTM

@coveralls
Copy link

coveralls commented Jul 4, 2024

Pull Request Test Coverage Report for Build 9793316835

Details

  • 28 of 29 (96.55%) changed or added relevant lines in 2 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage increased (+0.002%) to 97.131%

Changes Missing Coverage Covered Lines Changed/Added Lines %
spec/unleash/client_specification_spec.rb 26 27 96.3%
Totals Coverage Status
Change from base Build 9624271247: 0.002%
Covered Lines: 2539
Relevant Lines: 2614

💛 - Coveralls

@sighphyre sighphyre merged commit 04d84bf into main Jul 4, 2024
39 checks passed
@sighphyre sighphyre deleted the chore/centralize-client-spec-info branch July 4, 2024 12:32
Sign up for free to 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