gem_bench 2.0.1 → 2.0.3

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: b054d58ceb273738cbb17694960de3fb3a5c8646eeed7f41c77e9b4177e3a52c
4
- data.tar.gz: a5565712bc1ae7423890b8b7615a048850962e6a403f6ed76828804f60fa8840
3
+ metadata.gz: ba58266e066c47120ecba80dcd81b5aa35cf2e35132e5eb8f8bc62a0cfdcb8b4
4
+ data.tar.gz: 9b491c517466e244b98f8d01152daa213a5947d9de92970abae6ad64076842ef
5
5
  SHA512:
6
- metadata.gz: 9ba5c0b8243072eec99db4ccd0d7efd6aab41d6d592bfddecf359259777a9be5c578f7ef8c3cf02b01117369c0f777db594cbf22ec5663d6dbaf06c700e87d96
7
- data.tar.gz: 25e0360cd1200ecdc0d7a65de318c02270492c255dc66f9bf46cd4359a5fe37ff6b67307c351b20657ada7a3ec04584221bbe8bafce5f29e8d2373671042a941
6
+ metadata.gz: 8eb0b66dc41d9913fad9e88599908cf0e1787e01701e64ade5e065ac4428853b726855345704742a9279dc7dba74fef2eea4c7d4eb84495f7cc46438b07051a5
7
+ data.tar.gz: 9f8b0b6419d6c8ffeb0999149a4c7bc797723dd3a4e362025644c83813e4cb5e3c065b4b7e0bcd8e55d941d7ad3a395072510a7895bfe910b3eb8fad0b6627a9
checksums.yaml.gz.sig CHANGED
Binary file
data/CHANGELOG.md CHANGED
@@ -11,53 +11,75 @@ and this project adheres to [Semantic Versioning v2](https://semver.org/spec/v2.
11
11
  ### Fixed
12
12
  ### Removed
13
13
 
14
- [2.0.1] SEP.17.2024
14
+ ## [2.0.3] SEP.18.2024
15
+ ### Added
16
+ - More documentation
17
+ ### Fixed
18
+ - Typos in documentation
19
+ - Copyright years
20
+
21
+ ## [2.0.2] SEP.17.2024
22
+ COVERAGE: 82.15% -- 382/465 lines in 9 files
23
+ BRANCH COVERAGE: 58.79% -- 97/165 branches in 9 files
24
+ 51.72% documented
25
+ ### Added
26
+ - CI for Ancient Rubies
27
+ - Ruby 2.3
28
+ - Ruby 2.4
29
+ - Ruby 2.5
30
+ - Ruby 2.6
31
+ - More & improved documentation
32
+ ### Fixed
33
+ - Typo in URL in documentation
34
+ - Gemspec description & Summary
35
+
36
+ ## [2.0.1] SEP.17.2024
15
37
  COVERAGE: 82.15% -- 382/465 lines in 9 files
16
38
  BRANCH COVERAGE: 58.08% -- 97/167 branches in 9 files
17
39
  51.72% documented
18
40
  ### Added
19
- * Ability to re-namespace and load copy of a gem alongside vanilla version for benchmarking via `GemBench::Jersey`
20
- * See: https://github.com/panorama-ed/memo_wise/pull/339
21
- * Many more tests
22
- * `kettle-soup-cover` for test coverage enforcement
23
- * Better documentation
24
- * Improved instructions for contributing
41
+ - Ability to re-namespace and load copy of a gem alongside vanilla version for benchmarking via `GemBench::Jersey`
42
+ - See: https://github.com/panorama-ed/memo_wise/pull/339
43
+ - Many more tests
44
+ - `kettle-soup-cover` for test coverage enforcement
45
+ - Better documentation
46
+ - Improved instructions for contributing
25
47
  ### Changed
26
- * Improved `bin/checksums`
48
+ - Improved `bin/checksums`
27
49
  ### Fixed
28
- * Stopped swallowing `ArgumentError` in certain exceptional cases
50
+ - Stopped swallowing `ArgumentError` in certain exceptional cases
29
51
 
30
- [2.0.0] SEP.25.2023
52
+ ## [2.0.0] SEP.25.2023
31
53
  ### Added
32
- * Compatible with Bundler 2+
33
- * Checksums for release
34
- * SHA-256
35
- * SHA-512
36
- * Signed releases
37
- * Add CODE_OF_CONDUCT.md
38
- * Add SECURITY.md (Security policy)
39
- * Github Actions
54
+ - Compatible with Bundler 2+
55
+ - Checksums for release
56
+ - SHA-256
57
+ - SHA-512
58
+ - Signed releases
59
+ - Add CODE_OF_CONDUCT.md
60
+ - Add SECURITY.md (Security policy)
61
+ - Github Actions
40
62
  ### Changed
41
- * Dropped support for Ruby 2.0, 2.1, and 2.2
42
- * `VERSION` constant now lives at `GemBench::Version::VERSION`, enhanced by `version_gem`
43
- * Changelog updated to Keep-a-changelog format (going forward)
63
+ - Dropped support for Ruby 2.0, 2.1, and 2.2
64
+ - `VERSION` constant now lives at `GemBench::Version::VERSION`, enhanced by `version_gem`
65
+ - Changelog updated to Keep-a-changelog format (going forward)
44
66
  ### Removed
45
- * Removed Appraisals
46
- * Removed Travis-CI
67
+ - Removed Appraisals
68
+ - Removed Travis-CI
47
69
 
48
- [1.0.6] SEP.09.2018
49
- * Documentation improvements
50
- * Add Ruby 2.5 to build matrix
70
+ ## [1.0.6] SEP.09.2018
71
+ - Documentation improvements
72
+ - Add Ruby 2.5 to build matrix
51
73
 
52
- [1.0.5] JUN.05.2017
53
- * Allow github macro as an alternative to git within Gemfile for strict version constraint analysis
74
+ ## [1.0.5] JUN.05.2017
75
+ - Allow github macro as an alternative to git within Gemfile for strict version constraint analysis
54
76
 
55
- [1.0.3] JUN.02.2017
56
- * fixed accidental removal of loaded_gems in 1.0.2
57
- * better documentation
77
+ ## [1.0.3] JUN.02.2017
78
+ - fixed accidental removal of loaded_gems in 1.0.2
79
+ - better documentation
58
80
 
59
- [1.0.2] JUN.02.2017
60
- * version constraint checking, useful to add a spec enforcing Gemfile version constraints, by Peter Boling
81
+ ## [1.0.2] JUN.02.2017
82
+ - version constraint checking, useful to add a spec enforcing Gemfile version constraints, by Peter Boling
61
83
  - Console use:
62
84
  - GemBench::StrictVersionRequirement.new({verbose: true})
63
85
  - Spec use:
@@ -70,42 +92,42 @@ Rspec.describe("Gemfile") do
70
92
  end
71
93
  ```
72
94
 
73
- [1.0.1] MAR.25.2017
74
- * fixed a typo that prevented Gemfile comparison by mobilutz
95
+ ## [1.0.1] MAR.25.2017
96
+ - fixed a typo that prevented Gemfile comparison by mobilutz
75
97
 
76
- [1.0.0] FEB.26.2017
77
- * New feature: scan all code (except for test/spec/feature code) in all loaded gems for a given regex:
98
+ ## [1.0.0] FEB.26.2017
99
+ - New feature: scan all code (except for test/spec/feature code) in all loaded gems for a given regex:
78
100
  - puts GemBench.find(look_for_regex: /HERE BE DRAGONS/).starters.map {|gem| "#{gem.name} has DRAGONS at #{gem.stats}" }.join("\n")
79
- * Added basic specs
80
- * More Documentation
81
- * added back git dependency to gemspec (pulled in latest Gem scaffolding from Bundler :/)
101
+ - Added basic specs
102
+ - More Documentation
103
+ - added back git dependency to gemspec (pulled in latest Gem scaffolding from Bundler :/)
82
104
 
83
- [0.0.8] JAN.16.2014
84
- * Corrected issues with 0.0.7 release.
85
- * More Documentation
86
- * removed git dependency from gemspec
105
+ ## [0.0.8] JAN.16.2014
106
+ - Corrected issues with 0.0.7 release.
107
+ - More Documentation
108
+ - removed git dependency from gemspec
87
109
 
88
- [0.0.7] DEC.23.2013 (Yanked immediately)
89
- * Attempt to fix failure on encoding problem, with a rescue fallback (Issue #1) by Peter Boling
90
- * Readme / Documentation improvements by John Bachir
91
- * Runtime output improvements by John Bachir
110
+ ## [0.0.7] DEC.23.2013 (Yanked immediately)
111
+ - Attempt to fix failure on encoding problem, with a rescue fallback (Issue #1) by Peter Boling
112
+ - Readme / Documentation improvements by John Bachir
113
+ - Runtime output improvements by John Bachir
92
114
 
93
- [0.0.6] AUG.29.2013
94
- * Added license to gemspec by Peter Boling
95
- * No longer altering Ruby load path - Let the gem manager do that by Peter Boling
115
+ ## [0.0.6] AUG.29.2013
116
+ - Added license to gemspec by Peter Boling
117
+ - No longer altering Ruby load path - Let the gem manager do that by Peter Boling
96
118
 
97
- [0.0.5] AUG.28.2013
98
- * Encode as UTF-8 prior to comparison by Peter Boling
119
+ ## [0.0.5] AUG.28.2013
120
+ - Encode as UTF-8 prior to comparison by Peter Boling
99
121
 
100
- [0.0.4] APR.06.2013
101
- * Expanded exclusion list by Peter Boling
122
+ ## [0.0.4] APR.06.2013
123
+ - Expanded exclusion list by Peter Boling
102
124
 
103
- [0.0.3] APR.06.2013
104
- * Late night coding needs more coffee by Peter Boling
125
+ ## [0.0.3] APR.06.2013
126
+ - Late night coding needs more coffee by Peter Boling
105
127
 
106
- [0.0.2] APR.06.2013
107
- * Works against 265 dependency Gemfile by Peter Boling
108
- * Added ability to evaluate a Gemfile by Peter Boling
128
+ ## [0.0.2] APR.06.2013
129
+ - Works against 265 dependency Gemfile by Peter Boling
130
+ - Added ability to evaluate a Gemfile by Peter Boling
109
131
 
110
- [0.0.1] APR.05.2013
111
- * Initial release by Peter Boling
132
+ ## [0.0.1] APR.05.2013
133
+ - Initial release by Peter Boling
data/CODE_OF_CONDUCT.md CHANGED
@@ -1,20 +1,30 @@
1
+
1
2
  # Contributor Covenant Code of Conduct
2
3
 
3
4
  ## Our Pledge
4
5
 
5
- We as members, contributors, and leaders pledge to make participation in our community a harassment-free experience for everyone, regardless of age, body size, visible or invisible disability, ethnicity, sex characteristics, gender identity and expression, level of experience, education, socio-economic status, nationality, personal appearance, race, religion, or sexual identity and orientation.
6
+ We as members, contributors, and leaders pledge to make participation in our
7
+ community a harassment-free experience for everyone, regardless of age, body
8
+ size, visible or invisible disability, ethnicity, sex characteristics, gender
9
+ identity and expression, level of experience, education, socio-economic status,
10
+ nationality, personal appearance, race, religion, or sexual identity
11
+ and orientation.
6
12
 
7
- We pledge to act and interact in ways that contribute to an open, welcoming, diverse, inclusive, and healthy community.
13
+ We pledge to act and interact in ways that contribute to an open, welcoming,
14
+ diverse, inclusive, and healthy community.
8
15
 
9
16
  ## Our Standards
10
17
 
11
- Examples of behavior that contributes to a positive environment for our community include:
18
+ Examples of behavior that contributes to a positive environment for our
19
+ community include:
12
20
 
13
21
  * Demonstrating empathy and kindness toward other people
14
22
  * Being respectful of differing opinions, viewpoints, and experiences
15
23
  * Giving and gracefully accepting constructive feedback
16
- * Accepting responsibility and apologizing to those affected by our mistakes, and learning from the experience
17
- * Focusing on what is best not just for us as individuals, but for the overall community
24
+ * Accepting responsibility and apologizing to those affected by our mistakes,
25
+ and learning from the experience
26
+ * Focusing on what is best not just for us as individuals, but for the
27
+ overall community
18
28
 
19
29
  Examples of unacceptable behavior include:
20
30
 
@@ -29,56 +39,95 @@ Examples of unacceptable behavior include:
29
39
 
30
40
  ## Enforcement Responsibilities
31
41
 
32
- Community leaders are responsible for clarifying and enforcing our standards of acceptable behavior and will take appropriate and fair corrective action in response to any behavior that they deem inappropriate, threatening, offensive, or harmful.
42
+ Community leaders are responsible for clarifying and enforcing our standards of
43
+ acceptable behavior and will take appropriate and fair corrective action in
44
+ response to any behavior that they deem inappropriate, threatening, offensive,
45
+ or harmful.
33
46
 
34
- Community leaders have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct, and will communicate reasons for moderation decisions when appropriate.
47
+ Community leaders have the right and responsibility to remove, edit, or reject
48
+ comments, commits, code, wiki edits, issues, and other contributions that are
49
+ not aligned to this Code of Conduct, and will communicate reasons for moderation
50
+ decisions when appropriate.
35
51
 
36
52
  ## Scope
37
53
 
38
- This Code of Conduct applies within all community spaces, and also applies when an individual is officially representing the community in public spaces. Examples of representing our community include using an official e-mail address, posting via an official social media account, or acting as an appointed representative at an online or offline event.
54
+ This Code of Conduct applies within all community spaces, and also applies when
55
+ an individual is officially representing the community in public spaces.
56
+ Examples of representing our community include using an official e-mail address,
57
+ posting via an official social media account, or acting as an appointed
58
+ representative at an online or offline event.
39
59
 
40
60
  ## Enforcement
41
61
 
42
- Instances of abusive, harassing, or otherwise unacceptable behavior may be reported to the community leaders responsible for enforcement at peter.boling@gmail.com. All complaints will be reviewed and investigated promptly and fairly.
62
+ Instances of abusive, harassing, or otherwise unacceptable behavior may be
63
+ reported to the community leaders responsible for enforcement at
64
+ [INSERT CONTACT METHOD].
65
+ All complaints will be reviewed and investigated promptly and fairly.
43
66
 
44
- All community leaders are obligated to respect the privacy and security of the reporter of any incident.
67
+ All community leaders are obligated to respect the privacy and security of the
68
+ reporter of any incident.
45
69
 
46
70
  ## Enforcement Guidelines
47
71
 
48
- Community leaders will follow these Community Impact Guidelines in determining the consequences for any action they deem in violation of this Code of Conduct:
72
+ Community leaders will follow these Community Impact Guidelines in determining
73
+ the consequences for any action they deem in violation of this Code of Conduct:
49
74
 
50
75
  ### 1. Correction
51
76
 
52
- **Community Impact**: Use of inappropriate language or other behavior deemed unprofessional or unwelcome in the community.
77
+ **Community Impact**: Use of inappropriate language or other behavior deemed
78
+ unprofessional or unwelcome in the community.
53
79
 
54
- **Consequence**: A private, written warning from community leaders, providing clarity around the nature of the violation and an explanation of why the behavior was inappropriate. A public apology may be requested.
80
+ **Consequence**: A private, written warning from community leaders, providing
81
+ clarity around the nature of the violation and an explanation of why the
82
+ behavior was inappropriate. A public apology may be requested.
55
83
 
56
84
  ### 2. Warning
57
85
 
58
- **Community Impact**: A violation through a single incident or series of actions.
86
+ **Community Impact**: A violation through a single incident or series
87
+ of actions.
59
88
 
60
- **Consequence**: A warning with consequences for continued behavior. No interaction with the people involved, including unsolicited interaction with those enforcing the Code of Conduct, for a specified period of time. This includes avoiding interactions in community spaces as well as external channels like social media. Violating these terms may lead to a temporary or permanent ban.
89
+ **Consequence**: A warning with consequences for continued behavior. No
90
+ interaction with the people involved, including unsolicited interaction with
91
+ those enforcing the Code of Conduct, for a specified period of time. This
92
+ includes avoiding interactions in community spaces as well as external channels
93
+ like social media. Violating these terms may lead to a temporary or
94
+ permanent ban.
61
95
 
62
96
  ### 3. Temporary Ban
63
97
 
64
- **Community Impact**: A serious violation of community standards, including sustained inappropriate behavior.
98
+ **Community Impact**: A serious violation of community standards, including
99
+ sustained inappropriate behavior.
65
100
 
66
- **Consequence**: A temporary ban from any sort of interaction or public communication with the community for a specified period of time. No public or private interaction with the people involved, including unsolicited interaction with those enforcing the Code of Conduct, is allowed during this period. Violating these terms may lead to a permanent ban.
101
+ **Consequence**: A temporary ban from any sort of interaction or public
102
+ communication with the community for a specified period of time. No public or
103
+ private interaction with the people involved, including unsolicited interaction
104
+ with those enforcing the Code of Conduct, is allowed during this period.
105
+ Violating these terms may lead to a permanent ban.
67
106
 
68
107
  ### 4. Permanent Ban
69
108
 
70
- **Community Impact**: Demonstrating a pattern of violation of community standards, including sustained inappropriate behavior, harassment of an individual, or aggression toward or disparagement of classes of individuals.
109
+ **Community Impact**: Demonstrating a pattern of violation of community
110
+ standards, including sustained inappropriate behavior, harassment of an
111
+ individual, or aggression toward or disparagement of classes of individuals.
71
112
 
72
- **Consequence**: A permanent ban from any sort of public interaction within the community.
113
+ **Consequence**: A permanent ban from any sort of public interaction within
114
+ the community.
73
115
 
74
116
  ## Attribution
75
117
 
76
- This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 2.0,
77
- available at https://www.contributor-covenant.org/version/2/0/code_of_conduct.html.
78
-
79
- Community Impact Guidelines were inspired by [Mozilla's code of conduct enforcement ladder](https://github.com/mozilla/diversity).
118
+ This Code of Conduct is adapted from the [Contributor Covenant][homepage],
119
+ version 2.0, available at
120
+ [https://www.contributor-covenant.org/version/2/0/code_of_conduct.html][v2.0].
80
121
 
81
- [homepage]: https://www.contributor-covenant.org
122
+ Community Impact Guidelines were inspired by
123
+ [Mozilla's code of conduct enforcement ladder][Mozilla CoC].
82
124
 
83
125
  For answers to common questions about this code of conduct, see the FAQ at
84
- https://www.contributor-covenant.org/faq. Translations are available at https://www.contributor-covenant.org/translations.
126
+ [https://www.contributor-covenant.org/faq][FAQ]. Translations are available
127
+ at [https://www.contributor-covenant.org/translations][translations].
128
+
129
+ [homepage]: https://www.contributor-covenant.org
130
+ [v2.0]: https://www.contributor-covenant.org/version/2/0/code_of_conduct.html
131
+ [Mozilla CoC]: https://github.com/mozilla/diversity
132
+ [FAQ]: https://www.contributor-covenant.org/faq
133
+ [translations]: https://www.contributor-covenant.org/translations
data/CONTRIBUTING.md CHANGED
@@ -4,8 +4,7 @@ Bug reports and pull requests are welcome on GitHub at [https://github.com/pboli
4
4
  This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to
5
5
  the [code of conduct][🤝conduct].
6
6
 
7
- To submit a patch, please fork the project and create a patch with tests. Once you're happy with it send a pull request
8
- and you might also post a message to the [gitter chat][🏘chat].
7
+ To submit a patch, please fork the project and create a patch with tests. Once you're happy with it send a pull request.
9
8
 
10
9
  ## Development
11
10
 
@@ -59,4 +58,3 @@ Made with [contributors-img][🖐contrib-rocks].
59
58
  [🔒️rubygems-security-guide]: https://guides.rubygems.org/security/#building-gems
60
59
  [🔒️rubygems-checksums-pr]: https://github.com/rubygems/guides/pull/325
61
60
  [🚎src-main]: https://github.com/pboling/gem_bench
62
- [🏘chat]: https://matrix.to/#/%23pboling_gem_bench:gitter.im
data/LICENSE.txt CHANGED
@@ -1,6 +1,6 @@
1
1
  MIT License
2
2
 
3
- Copyright (c) 2013 - 2018 Peter H. Boling, http://railsbling.com
3
+ Copyright (c) 2013 - 2014, 2016 - 2020, 2023 - 2024 Peter H. Boling, http://railsbling.com
4
4
 
5
5
  Permission is hereby granted, free of charge, to any person obtaining a copy
6
6
  of this software and associated documentation files (the "Software"), to deal
data/README.md CHANGED
@@ -8,6 +8,7 @@
8
8
  [![Version](https://img.shields.io/gem/v/gem_bench.svg)](https://rubygems.org/gems/gem_bench)
9
9
  [![Downloads Today](https://img.shields.io/gem/rd/gem_bench.svg)](https://github.com/pboling/gem_bench)
10
10
  [![Depfu](https://badges.depfu.com/badges/865e7bb1d0d3eb3ba807fca7344e22d1/overview.svg)](https://depfu.com/github/pboling/gem_bench?project_id=2688)
11
+ [![CodeCov][🖇codecov-img♻️]][🖇codecov]
11
12
  [![Test Coverage](https://api.codeclimate.com/v1/badges/80787f126e7a486b19af/test_coverage)](https://codeclimate.com/github/pboling/gem_bench/test_coverage)
12
13
  [![Maintainability](https://api.codeclimate.com/v1/badges/80787f126e7a486b19af/maintainability)](https://codeclimate.com/github/pboling/gem_bench/maintainability)
13
14
  [![CI Supported Build][🚎s-wfi]][🚎s-wf]
@@ -15,7 +16,10 @@
15
16
  [![CI Style Build][🚎st-wfi]][🚎st-wf]
16
17
  [![CI Coverage Build][🚎cov-wfi]][🚎cov-wf]
17
18
  [![CI Heads Build][🚎hd-wfi]][🚎hd-wf]
19
+ [![CI Ancient Build][🚎an-wfi]][🚎an-wf]
18
20
 
21
+ [🖇codecov-img♻️]: https://codecov.io/gh/pboling/gem_bench/graph/badge.svg?token=selEoMrZzA
22
+ [🖇codecov]: https://codecov.io/gh/pboling/gem_bench
19
23
  [🚎s-wf]: https://github.com/pboling/gem_bench/actions/workflows/supported.yml
20
24
  [🚎s-wfi]: https://github.com/pboling/gem_bench/actions/workflows/supported.yml/badge.svg
21
25
  [🚎us-wf]: https://github.com/pboling/gem_bench/actions/workflows/unsupported.yml
@@ -26,6 +30,8 @@
26
30
  [🚎cov-wfi]: https://github.com/pboling/gem_bench/actions/workflows/coverage.yml/badge.svg
27
31
  [🚎hd-wf]: https://github.com/pboling/gem_bench/actions/workflows/heads.yml
28
32
  [🚎hd-wfi]: https://github.com/pboling/gem_bench/actions/workflows/heads.yml/badge.svg
33
+ [🚎an-wf]: https://github.com/pboling/gem_bench/actions/workflows/ancient.yml
34
+ [🚎an-wfi]: https://github.com/pboling/gem_bench/actions/workflows/ancient.yml/badge.svg
29
35
 
30
36
  </div>
31
37
 
@@ -57,45 +63,69 @@
57
63
  </div>
58
64
  </div>
59
65
 
60
- Scene: You are a spectator at a game of Ruby Sports Gem Ball.
66
+ [benchmarking-example]: https://github.com/panorama-ed/memo_wise/pull/339
61
67
 
62
- Gem wearing jersey namespace **#23**:
63
-
64
- > "Put me in coach!"
65
-
66
- Other Gem, also wearing jersey namespace **#23**:
67
-
68
- > "Put me in coach!"
68
+ ## What's it do?
69
69
 
70
- Coach:
70
+ 🏁 Copy & Re-namespace any gem to benchmark side-by-side with `benchmarks-ips`!
71
71
 
72
- > ❨╯°□°❩╯︵┻━┻ fine, but one of you change your jersey first!
72
+ 👯 For example, many of the ~dozen Memoization gems use the same namespaces (`Memoist`, `Memery`, etc).
73
+ In order to compare them side-by-side one of them must be re-namespaced. ([working example][benchmarking-example])
73
74
 
74
- ## What's it do?
75
+ <details>
76
+ <summary>Scene: Spectator at a game of Ruby Sports Gem Ball</summary>
75
77
 
76
- `gem_bench` is for static Gemfile and installed gem library source code analysis.
78
+ Gem wearing jersey **#23**:
77
79
 
78
- `gem_bench` can be used to re-namespace a gem at run-time so that you can run simultaneously:
80
+ > "Put me in coach!"
79
81
 
80
- - two versions of the same library, or
81
- - two different things that happen to have a namespace collision,
82
+ Other Gem, also wearing jersey **#23**:
82
83
 
83
- for benchmarking or other purposes.
84
+ > "Put me in coach!"
84
85
 
85
- `gem_bench` can also be used to trim down app load times by keeping your worst players on the bench.
86
+ Coach:
86
87
 
87
- | Project | GemBench |
88
- |------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
89
- | gem name | [gem_bench](https://rubygems.org/gems/gem_bench) |
90
- | code triage | [![Open Source Helpers](https://www.codetriage.com/pboling/gem_bench/badges/users.svg)](https://www.codetriage.com/pboling/gem_bench) |
91
- | homepage | [on Github.com][homepage] |
92
- | documentation | [on Rdoc.info][documentation] |
93
- | live chat | [![Join the chat][🏘chati]][🏘chat] |
94
- | expert support | [![Get help on Codementor](https://cdn.codementor.io/badges/get_help_github.svg)](https://www.codementor.io/peterboling?utm_source=github&utm_medium=button&utm_term=peterboling&utm_campaign=github) |
95
- | Spread ~♡ⓛⓞⓥⓔ♡~ | [🌏](https://about.me/peter.boling) [👼](https://angel.co/peter-boling) [![Tweet Peter](https://img.shields.io/twitter/follow/galtzo.svg?style=social&label=Follow)](http://twitter.com/galtzo) |
88
+ > ❨╯°□°❩╯︵┻━┻ fine, but one of you change your jersey first!
96
89
 
97
- [🏘chat]: https://matrix.to/#/%23pboling_gem_bench:gitter.im
98
- [🏘chati]: https://badges.gitter.im/Join%20Chat.svg
90
+ </details>
91
+
92
+ 🤩 Benchmark trunk against released version of a library! ([working example][benchmarking-example])
93
+
94
+ 🧐 A `git clone` build can now be run against the latest public release build, side-by-side, by re-namespacing one of them. ([working example][benchmarking-example])
95
+
96
+ 🕵️‍♀️ Static Gemfile and installed gem library source code analysis.
97
+ Regex search through all of a project's source code, including installed Bundler dependencies.
98
+
99
+ 🛟 Trim down app load times, such as on Heroku, by finding and keeping your worst players on the bench.
100
+
101
+ | Project | GemBench |
102
+ |----------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
103
+ | gem name | [gem_bench](https://rubygems.org/gems/gem_bench) |
104
+ | code triage | [![Open Source Helpers](https://www.codetriage.com/pboling/gem_bench/badges/users.svg)](https://www.codetriage.com/pboling/gem_bench) |
105
+ | homepage | [on Github.com][homepage] |
106
+ | documentation | [on Rdoc.info][documentation] |
107
+ | expert support | [![Get help on Codementor](https://cdn.codementor.io/badges/get_help_github.svg)](https://www.codementor.io/peterboling?utm_source=github&utm_medium=button&utm_term=peterboling&utm_campaign=github) |
108
+ | `...` 💖 | [![Liberapay Patrons][⛳liberapay-img]][⛳liberapay] [![Sponsor Me][🖇sponsor-img]][🖇sponsor] [![Follow Me on LinkedIn][🖇linkedin-img]][🖇linkedin] [![Find Me on WellFound:][✌️wellfound-img]][✌️wellfound] [![Find Me on CrunchBase][💲crunchbase-img]][💲crunchbase] [![My LinkTree][🌳linktree-img]][🌳linktree] [![Follow Me on Ruby.Social][🐘ruby-mast-img]][🐘ruby-mast] [![Tweet @ Peter][🐦tweet-img]][🐦tweet] [💻][coderme] [🌏][aboutme] |
109
+
110
+ <!-- 7️⃣ spread 💖 -->
111
+ [🐦tweet-img]: https://img.shields.io/twitter/follow/galtzo.svg?style=social&label=Follow%20%40galtzo
112
+ [🐦tweet]: http://twitter.com/galtzo
113
+ [🚎blog]: http://www.railsbling.com/tags/gem_bench/
114
+ [🚎blog-img]: https://img.shields.io/badge/blog-railsbling-brightgreen.svg?style=flat
115
+ [🖇linkedin]: http://www.linkedin.com/in/peterboling
116
+ [🖇linkedin-img]: https://img.shields.io/badge/PeterBoling-blue?style=plastic&logo=linkedin
117
+ [✌️wellfound]: https://angel.co/u/peter-boling
118
+ [✌️wellfound-img]: https://img.shields.io/badge/peter--boling-orange?style=plastic&logo=wellfound
119
+ [💲crunchbase]: https://www.crunchbase.com/person/peter-boling
120
+ [💲crunchbase-img]: https://img.shields.io/badge/peter--boling-purple?style=plastic&logo=crunchbase
121
+ [🐘ruby-mast]: https://ruby.social/@galtzo
122
+ [🐘ruby-mast-img]: https://img.shields.io/mastodon/follow/109447111526622197?domain=https%3A%2F%2Fruby.social&style=plastic&logo=mastodon&label=Ruby%20%40galtzo
123
+ [🌳linktree]: https://linktr.ee/galtzo
124
+ [🌳linktree-img]: https://img.shields.io/badge/galtzo-purple?style=plastic&logo=linktree
125
+
126
+ <!-- Maintainer Contact Links -->
127
+ [aboutme]: https://about.me/peter.boling
128
+ [coderme]: https://coderwall.com/Peter%20Boling
99
129
 
100
130
  ### New for 2.0.1 - `GemBench::Jersey`
101
131
 
@@ -177,11 +207,14 @@ For string version constraints anything is allowed (e.g. `'~> 1.0'`), as it assu
177
207
 
178
208
  Search the Ruby source code of all the gems loaded by your Gemfile for a specified regex, to find out which gems have wat DRAGONS.
179
209
 
210
+ <details>
211
+ <summary>Scene: Rubiana Jones is searching for WAT Dragon relics in dusty bins of source code</summary>
212
+
180
213
  Gem:
181
214
 
182
215
  > "I have no wat DRAGONS!"`
183
216
 
184
- You:
217
+ Rubiana Jones:
185
218
 
186
219
  > ❨╯°□°❩╯︵┻━┻ Yes you do!
187
220
 
@@ -196,6 +229,8 @@ byebug has wat DRAGONS at [["/Users/pboling/.rvm/gems/ruby-2.4.0@foss/gems/byebu
196
229
  NOTE: The number (954, above) is not a line number. The file which contains the text `wat` was the 954th file evaluated, i.e. the number doesn't matter.
197
230
  NOTE: This is a contrived example. The occurrence of `wat` in byebug is meaningless: `byebug/commands/frame.rb:34` has ` if there is a front end also watching over things.`. This is just an example! You can find anything you want, perhaps even something important!
198
231
 
232
+ </details>
233
+
199
234
  It is a fact of RubyGems that many of them do not need to be loaded by your app at boot time.
200
235
  It is a fact of Bundler that you don't know which ones need to be 'required' while staring at the Gemfile.
201
236
  It is a fact of Heroku that you only have 60, 75, or 120 ([by special request](https://devcenter.heroku.com/articles/error-codes#h20-app-boot-timeout)) precious seconds to get your app loaded before ❨╯°□°❩╯︵┻━┻
@@ -206,11 +241,22 @@ You can even use it to evaluate your project's actual Gemfile for easy peasy boo
206
241
 
207
242
  ## Installation
208
243
 
209
- You *may not* need to add this gem to your project. You have three options, 1, 2 or BEST:
244
+ You *may not* need to add this gem to your project.
245
+
246
+ Install the gem and add to the application's Gemfile by executing:
247
+
248
+ $ bundle add gem_bench
249
+
250
+ If bundler is not being used to manage dependencies, install the gem by executing:
251
+
252
+ $ gem install gem_bench
253
+
254
+ <details>
255
+ <summary>Installation Options</summary>
210
256
 
211
257
  ### Option 1
212
258
 
213
- Just install it, and require it in your`irb`/`console` session when you want to use it. However, if you load your console with `bundle exec` then you only have access to gems in the gemfile, so either load without `bundle exec` or add it to the `Gemfile`.
259
+ Just install it, and require it in your `irb` or `console` session when you want to use it. However, if you load your console with `bundle exec` then you only have access to gems in the gemfile, so either load without `bundle exec` or add it to the `Gemfile`.
214
260
 
215
261
  $ gem install gem_bench
216
262
 
@@ -236,13 +282,16 @@ If you are going to use the gem in your specs, you will need to add it to the te
236
282
 
237
283
  gem 'gem_bench', :group => :test
238
284
 
285
+ </details>
286
+
239
287
  ## Usage
240
288
 
241
289
  Works with Ruby >= 2.3.
242
290
 
243
- ### Example!
291
+ ### Examples
244
292
 
245
- Getting tired of seeing this `irb` warning, perhaps?
293
+ <details>
294
+ <summary>Getting tired of seeing this `irb` warning, perhaps?</summary>
246
295
 
247
296
  ```
248
297
  $ bundle exec rails console
@@ -268,7 +317,10 @@ Then find the file with the first occurrence of the regex in each:
268
317
  => [["/Users/pboling/.rvm/gems/ruby-2.4.0@foss/gems/byebug-9.0.6/lib/byebug/command.rb"], ["/Users/pboling/.rvm/gems/ruby-2.4.0@foss/gems/diff-lcs-1.3/lib/diff/lcs/hunk.rb"]]
269
318
  ```
270
319
 
271
- ### Find what gems have `RAILS_ENV` specific code!
320
+ </details>
321
+
322
+ <details>
323
+ <summary>Find what gems have `RAILS_ENV` specific code!</summary>
272
324
 
273
325
  Let's try to find what libraries might be using a conditional guard to alter their behavior in a specific Rails environment.
274
326
 
@@ -296,7 +348,10 @@ sass has Rails.env condition in [["/Users/pboling/.asdf/installs/ruby/2.7.8/lib/
296
348
  sass-rails has Rails.env condition in [["/Users/pboling/.asdf/installs/ruby/2.7.8/lib/ruby/gems/2.7.0/gems/sass-rails-5.1.0/lib/sass/rails/railtie.rb", 3349]]
297
349
  ```
298
350
 
299
- ### More Different Example!
351
+ </details>
352
+
353
+ <details>
354
+ <summary> Basic Gemfile Analysis</summary>
300
355
 
301
356
  Fire up an `irb` session or a `rails console` and then:
302
357
 
@@ -352,7 +407,10 @@ If you run the check against a real app's Gemfile it will find numerous primary
352
407
 
353
408
  In a random directory, in an irb session, where there is no Gemfile in sight it will give a lot more information.
354
409
 
355
- ### Advanced Usage
410
+ </details>
411
+
412
+ <details>
413
+ <summary>Advanced Gemfile Analysis</summary>
356
414
 
357
415
  In order to *also* see list gems may *not* be required at boot time you need to:
358
416
 
@@ -512,12 +570,28 @@ How much faster will my app boot loading 45 fewer gems? A bit.
512
570
 
513
571
  **Note:** Some of the gems in the list above should have been excluded. They are now excluded as of `gem_bench` version 0.0.4.
514
572
 
573
+ </details>
574
+
515
575
  ## Future
516
576
 
517
577
  This gem determines which gems need to be loaded at Rails' boot time by looking for Railties and Engines.
518
578
  A future version will also look for initializers, because gems which have code that runs (e.g. configuration) in an initializer also need to be loaded at boot time.
519
579
 
520
- ## Contributors
580
+ ## 🤝 Contributing
581
+
582
+ See [CONTRIBUTING.md][🤝contributing]
583
+
584
+ [🤝contributing]: CONTRIBUTING.md
585
+
586
+ ### Code Coverage
587
+
588
+ If you need some ideas of where to help, you could work on adding more code coverage.
589
+
590
+ [![Coverage Graph][🔑codecov-g]][🖇codecov]
591
+
592
+ [🔑codecov-g]: https://codecov.io/gh/pboling/gem_bench/graphs/tree.svg?token=selEoMrZzA
593
+
594
+ ## 🌈 Contributors
521
595
 
522
596
  [![Contributors][🖐contributors-img]][🖐contributors]
523
597
 
@@ -527,38 +601,73 @@ Made with [contributors-img][🖐contrib-rocks].
527
601
  [🖐contributors]: https://github.com/pboling/gem_bench/graphs/contributors
528
602
  [🖐contributors-img]: https://contrib.rocks/image?repo=pboling/gem_bench
529
603
 
530
- ## Contributing
604
+ ## Star History
605
+
606
+ <a href="https://star-history.com/#pboling/gem_bench&Date">
607
+ <picture>
608
+ <source media="(prefers-color-scheme: dark)" srcset="https://api.star-history.com/svg?repos=pboling/gem_bench&type=Date&theme=dark" />
609
+ <source media="(prefers-color-scheme: light)" srcset="https://api.star-history.com/svg?repos=pboling/gem_bench&type=Date" />
610
+ <img alt="Star History Chart" src="https://api.star-history.com/svg?repos=pboling/gem_bench&type=Date" />
611
+ </picture>
612
+ </a>
613
+
614
+ ## 🪇 Code of Conduct
615
+
616
+ Everyone interacting in this project's codebases, issue trackers,
617
+ chat rooms and mailing lists is expected to follow the [code of conduct][🪇conduct].
531
618
 
532
- See [CONTRIBUTING.md](CONTRIBUTING.md)
619
+ [🪇conduct]: CODE_OF_CONDUCT.md
533
620
 
534
- ## Versioning
621
+ ## 📌 Versioning
535
622
 
536
- This library aims to adhere to [Semantic Versioning 2.0.0][semver].
537
- Violations of this scheme should be reported as bugs. Specifically,
538
- if a minor or patch version is released that breaks backward
539
- compatibility, a new version should be immediately released that
540
- restores compatibility. Breaking changes to the public API will
541
- only be introduced with new major versions.
623
+ This Library adheres to [Semantic Versioning 2.0.0][📌semver].
624
+ Violations of this scheme should be reported as bugs.
625
+ Specifically, if a minor or patch version is released that breaks backward compatibility,
626
+ a new version should be immediately released that restores compatibility.
627
+ Breaking changes to the public API will only be introduced with new major versions.
542
628
 
543
- As a result of this policy, you can (and should) specify a
544
- dependency on this gem using the [Pessimistic Version Constraint][pvc] with two digits of precision.
629
+ To get a better understanding of how SemVer is intended to work over a project's lifetime,
630
+ read this article from the creator of SemVer:
631
+
632
+ - ["Major Version Numbers are Not Sacred"][📌major-versions-not-sacred]
633
+
634
+ As a result of this policy, you can (and should) specify a dependency on these libraries using
635
+ the [Pessimistic Version Constraint][📌pvc] with two digits of precision.
545
636
 
546
637
  For example:
547
638
 
548
- spec.add_dependency 'gem_bench', '~> 2.0'
639
+ ```ruby
640
+ spec.add_dependency("gem_bench", "~> 2.0")
641
+ ```
642
+
643
+ See [CHANGELOG.md][📌changelog] for list of releases.
549
644
 
550
- See [CHANGELOG.md](CHANGELOG.md) for list of releases.
645
+ [comment]: <> ( 📌 VERSIONING LINKS )
551
646
 
552
- ## Legal
647
+ [📌pvc]: http://guides.rubygems.org/patterns/#pessimistic-version-constraint
648
+ [📌semver]: http://semver.org/
649
+ [📌major-versions-not-sacred]: https://tom.preston-werner.com/2022/05/23/major-version-numbers-are-not-sacred.html
650
+ [📌changelog]: CHANGELOG.md
553
651
 
554
- * [![License: MIT](https://img.shields.io/badge/License-MIT-green.svg)](https://opensource.org/licenses/MIT)
555
- * Copyright (c) 2013 - 2014, 2016 - 2020, 2023 [Peter H. Boling][peterboling] of [Rails Bling][railsbling]
652
+ ## 📄 License
653
+
654
+ The gem is available as open source under the terms of
655
+ the [MIT License][📄license] [![License: MIT][📄license-img]][📄license-ref].
656
+ See [LICENSE.txt][📄license] for the official [Copyright Notice][📄copyright-notice-explainer].
657
+
658
+ [comment]: <> ( 📄 LEGAL LINKS )
659
+
660
+ [📄copyright-notice-explainer]: https://opensource.stackexchange.com/questions/5778/why-do-licenses-such-as-the-mit-license-specify-a-single-year
661
+ [📄license]: LICENSE.txt
662
+ [📄license-ref]: https://opensource.org/licenses/MIT
663
+ [📄license-img]: https://img.shields.io/badge/License-MIT-green.svg
664
+
665
+ ### © Copyright
666
+
667
+ * Copyright (c) 2013 - 2014, 2016 - 2020, 2023 - 2024 [Peter H. Boling][peterboling] of [Rails Bling][railsbling]
556
668
 
557
- [semver]: http://semver.org/
558
- [pvc]: http://docs.rubygems.org/read/chapter/16#page74
559
- [bundle-group-pattern]: https://gist.github.com/pboling/4564780
560
669
  [railsbling]: http://www.railsbling.com
561
670
  [peterboling]: http://www.peterboling.com
562
- [coderwall]: http://coderwall.com/pboling
671
+ [bundle-group-pattern]: https://gist.github.com/pboling/4564780
563
672
  [documentation]: http://rdoc.info/github/pboling/gem_bench/frames
564
673
  [homepage]: https://github.com/pboling/gem_bench
@@ -1,5 +1,5 @@
1
1
  module GemBench
2
2
  module Version
3
- VERSION = "2.0.1"
3
+ VERSION = "2.0.3"
4
4
  end
5
5
  end
data.tar.gz.sig CHANGED
Binary file
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: gem_bench
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.1
4
+ version: 2.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Peter Boling
@@ -36,7 +36,7 @@ cert_chain:
36
36
  KuxrfYrN+9HvMdm+nZ6TypmKftHY3Gj+/uu+g8Icm/zrvTWAEE0mcJOkfrIoNPJb
37
37
  pF8dMA==
38
38
  -----END CERTIFICATE-----
39
- date: 2024-09-17 00:00:00.000000000 Z
39
+ date: 2024-09-18 00:00:00.000000000 Z
40
40
  dependencies:
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: bundler
@@ -244,38 +244,26 @@ dependencies:
244
244
  - - ">="
245
245
  - !ruby/object:Gem::Version
246
246
  version: '0'
247
- - !ruby/object:Gem::Dependency
248
- name: simplecov
249
- requirement: !ruby/object:Gem::Requirement
250
- requirements:
251
- - - ">="
252
- - !ruby/object:Gem::Version
253
- version: '0'
254
- type: :development
255
- prerelease: false
256
- version_requirements: !ruby/object:Gem::Requirement
257
- requirements:
258
- - - ">="
259
- - !ruby/object:Gem::Version
260
- version: '0'
261
247
  - !ruby/object:Gem::Dependency
262
248
  name: standard
263
249
  requirement: !ruby/object:Gem::Requirement
264
250
  requirements:
265
251
  - - ">="
266
252
  - !ruby/object:Gem::Version
267
- version: 1.35.1
253
+ version: '1.40'
268
254
  type: :development
269
255
  prerelease: false
270
256
  version_requirements: !ruby/object:Gem::Requirement
271
257
  requirements:
272
258
  - - ">="
273
259
  - !ruby/object:Gem::Version
274
- version: 1.35.1
260
+ version: '1.40'
275
261
  description: |-
276
- Enforce Gemfile version constraints
277
- Regex search across all installed gem's source code to find issues quickly
278
- Trim down app load times by keeping your worst players on the bench (useful for beating Heroku slug load time cutoff)
262
+ * Benchmark different versions of same or similar gems
263
+ * Copy & Re-namespace any gem to benchmark side-by-side with `benchmarks-ips`
264
+ * Enforce Gemfile version constraints
265
+ * Regex search across all installed gem's source code to find issues quickly
266
+ * Trim down app load times by keeping your worst players on the bench (useful for beating Heroku slug load time cutoff)
279
267
  email:
280
268
  - peter.boling@gmail.com
281
269
  executables: []
@@ -302,10 +290,10 @@ licenses:
302
290
  - MIT
303
291
  metadata:
304
292
  homepage_uri: https://railsbling.com/tags/gem_bench/
305
- source_code_uri: http://github.com/pboling/gem_bench/tree/v2.0.1
306
- changelog_uri: http://github.com/pboling/gem_bench/blob/v2.0.1/CHANGELOG.md
293
+ source_code_uri: http://github.com/pboling/gem_bench/tree/v2.0.3
294
+ changelog_uri: http://github.com/pboling/gem_bench/blob/v2.0.3/CHANGELOG.md
307
295
  bug_tracker_uri: http://github.com/pboling/gem_bench/issues
308
- documentation_uri: https://www.rubydoc.info/gems/gem_bench/2.0.1
296
+ documentation_uri: https://www.rubydoc.info/gems/gem_bench/2.0.3
309
297
  wiki_uri: http://github.com/pboling/gem_bench/wiki
310
298
  funding_uri: https://liberapay.com/pboling
311
299
  rubygems_mfa_required: 'true'
@@ -324,8 +312,9 @@ required_rubygems_version: !ruby/object:Gem::Requirement
324
312
  - !ruby/object:Gem::Version
325
313
  version: '0'
326
314
  requirements: []
327
- rubygems_version: 3.4.22
315
+ rubygems_version: 3.5.18
328
316
  signing_key:
329
317
  specification_version: 4
330
- summary: Static Gemfile and installed gem library source code analysis
318
+ summary: Benchmark different versions of same or similar gems & Static Gemfile and
319
+ installed gem library source code analysis
331
320
  test_files: []
metadata.gz.sig CHANGED
Binary file