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

Build(deps-dev): Bump test-prof from 1.0.2 to 1.2.0 #5085

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

dependabot[bot]
Copy link

@dependabot dependabot bot commented on behalf of github Feb 8, 2023

Bumps test-prof from 1.0.2 to 1.2.0.

Release notes

Sourced from test-prof's releases.

1.2.0

Features

  • before_all / let_it_be now support Active Record multi-database configuration.

1.1.0

Highlights

  • Added Factory Default (or factory associations) profiler and FactoryDefault usage stats.

Factory Default profiles shows which factories (and variations) were created via associations and how many times. This information can help you estimate the effect of adding a default record.

Here is an example report:

$ FACTORY_DEFAULT_PROF=1 bin/rspec
[TEST PROF INFO] Factory associations usage:
                                factory      count    total time
                              track        281     00:12.671

user{organization:<Organization#<id>>}         62     00:05.830
user         46     00:04.401
assessment          6     00:02.599
specialist_vertical         24     00:02.209
user[without_plan]         16     00:01.201
organization        352     00:01.138
admin        341     00:00.999

After adding default factory records, you can now also get the information about the actual usage:

$ FACTORY_DEFAULT_STATS=1 bin/rspec spec/models/user_spec.rb
[TEST PROF INFO] FactoryDefault usage stats:
    factory        hit       miss
  track        224         51
  admin         83          0


organization         77         89
user         51         82
FactoryDefault summary: hit=435 miss=222

Factory Default

... (truncated)

Changelog

Sourced from test-prof's changelog.

1.2.0 (2023-02-07)

  • Add support for multiple databases to before_all / let_it_be with Active Record. ([@​rutgerw][])

1.1.0 (2022-12-06)

  • LetItBe: freeze records during initialization with freeze: true. ([@​palkan][])

  • Add FactoryDefault profiler (factory associations profilers). ([@​palkan][])

  • FactoryDefault: Allow creating a default per trait (or set of traits). ([@​palkan][])

Now create_default(:user) and create_default(:user, :admin) would result into two defaults corresponding to the specified traits.

  • FactoryDefault: Add stats support. ([@​palkan][])

Now you can see how often the default factory values have been used by specifying the FACTORY_DEFAULT_SUMMARY=1 or FACTORY_DEFAULT_STATS=1 env var.

  • Support using FactoryDefault with before_all/let_it_be. ([@​palkan][])

Currently, RSpec only. Default factories created within before_all or let_it_be are not reset 'till the end of the corresponding context. Thus, now it's possible to use create_default within let_it_be without any additional hacks.

  • FactoryDefault: Add preserve_attributes = false | true option. ([@​palkan][])

Allow skipping defaults if association is defined with overrides, e.g.:

factory :post do
  association :user, name: "Post Author"
end
  • FactoryDefault: Add skip_factory_default(&block) to temporary disable default factories. ([@​palkan][])

You can also use TestProf::FactoryDefault.disable!(&block).

TestProf::BeforeAll.configure do |config|
  config.before(:begin, reset_sequences: true, foo: :bar) do
    warn <<~MESSAGE
      Do NOT create objects outside of transaction
      because all db sequences will be reset to 1
      in every single example, so that IDs of new objects
      can get into conflict with the long-living ones.
    MESSAGE
  end
end
</tr></table> 

... (truncated)

Commits
  • dadfe0b Bump 1.2.0
  • b4f702d fix(specs): stuck postgres connections in before_all
  • 5cd75f1 changelog: fix links
  • 1d01b2f ci: add jobs timeout
  • 9334054 style: upd rubocop config
  • 841dc69 feat: allow specifying let_it_be ivar prefix
  • 8e30fa3 Fix ArgumentError
  • 7fb00f6 For multi db, use ApplicationRecord to create connection
  • 7d0f838 fix: style
  • 28be359 fix(ci): install latest postgres
  • Additional commits viewable in compare view

Dependabot compatibility score

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


Dependabot commands and options

You can trigger Dependabot actions by commenting on this PR:

  • @dependabot rebase will rebase this PR
  • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
  • @dependabot merge will merge this PR after your CI passes on it
  • @dependabot squash and merge will squash and merge this PR after your CI passes on it
  • @dependabot cancel merge will cancel a previously requested merge and block automerging
  • @dependabot reopen will reopen this PR if it is closed
  • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
  • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)

Bumps [test-prof](https://github.com/test-prof/test-prof) from 1.0.2 to 1.2.0.
- [Release notes](https://github.com/test-prof/test-prof/releases)
- [Changelog](https://github.com/test-prof/test-prof/blob/master/CHANGELOG.md)
- [Commits](test-prof/test-prof@v1.0.2...v1.2.0)

---
updated-dependencies:
- dependency-name: test-prof
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
@dependabot dependabot bot added dependencies Pull requests that update a dependency file ruby Pull requests that update Ruby code labels Feb 8, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dependencies Pull requests that update a dependency file ruby Pull requests that update Ruby code
Projects
None yet
0 participants