gem_bench 1.0.4 → 2.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- checksums.yaml.gz.sig +0 -0
- data/{CHANGELOG → CHANGELOG.md} +50 -15
- data/CODE_OF_CONDUCT.md +84 -0
- data/CONTRIBUTING.md +46 -0
- data/LICENSE.txt +17 -18
- data/README.md +83 -51
- data/SECURITY.md +14 -0
- data/lib/gem_bench/gemfile_line_tokenizer.rb +59 -55
- data/lib/gem_bench/player.rb +38 -33
- data/lib/gem_bench/scout.rb +19 -20
- data/lib/gem_bench/strict_version_gem.rb +16 -21
- data/lib/gem_bench/strict_version_requirement.rb +26 -30
- data/lib/gem_bench/team.rb +120 -81
- data/lib/gem_bench/version.rb +3 -1
- data/lib/gem_bench.rb +21 -8
- data.tar.gz.sig +1 -0
- metadata +188 -35
- metadata.gz.sig +0 -0
- data/.byebug_history +0 -44
- data/.gitignore +0 -16
- data/.rspec +0 -2
- data/.travis.yml +0 -9
- data/Gemfile +0 -6
- data/Rakefile +0 -6
- data/bin/console +0 -14
- data/bin/setup +0 -8
- data/gem_bench.gemspec +0 -37
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: bb28fac08232d2a64f31d1c3ac4dd0172ae1898460cc24b6770d84bb6fb8f478
|
4
|
+
data.tar.gz: abe5ec2c0d44d28e70dd89141da8d56e3c440f80b21b5ff8d197aaa01031e10e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8a56aa10d455dbf1b745af1d83b80db1c5501ae78edf3ddd3fcb8047e4230512249249215240765a540a963eff6551149406d534ba5fa209a10bce8e358884a9
|
7
|
+
data.tar.gz: 58e77a2c83629a736e203c8918f8258f04f0e83357a403b53669f1a439d5996f34f429701d7be5bc154842dcf941fa27c0884afba976b6d8e1a031d44f83dc19
|
checksums.yaml.gz.sig
ADDED
Binary file
|
data/{CHANGELOG → CHANGELOG.md}
RENAMED
@@ -1,60 +1,95 @@
|
|
1
|
-
|
1
|
+
# Changelog
|
2
|
+
|
3
|
+
All notable changes to this project will be documented in this file.
|
4
|
+
|
5
|
+
The format is based on [Keep a Changelog v1](https://keepachangelog.com/en/1.0.0/),
|
6
|
+
and this project adheres to [Semantic Versioning v2](https://semver.org/spec/v2.0.0.html).
|
7
|
+
|
8
|
+
## [Unreleased]
|
9
|
+
### Added
|
10
|
+
### Changed
|
11
|
+
### Fixed
|
12
|
+
### Removed
|
13
|
+
|
14
|
+
[2.0.0] SEP.25.2023
|
15
|
+
### Added
|
16
|
+
* Compatible with Bundler 2+
|
17
|
+
* Checksums for release
|
18
|
+
* SHA-256
|
19
|
+
* SHA-512
|
20
|
+
* Signed releases
|
21
|
+
* Add CODE_OF_CONDUCT.md
|
22
|
+
* Add SECURITY.md (Security policy)
|
23
|
+
* Github Actions
|
24
|
+
### Changed
|
25
|
+
* Dropped support for Ruby 2.0, 2.1, and 2.2
|
26
|
+
* `VERSION` constant now lives at `GemBench::Version::VERSION`, enhanced by `version_gem`
|
27
|
+
* Changelog updated to Keep-a-changelog format (going forward)
|
28
|
+
### Removed
|
29
|
+
* Removed Appraisals
|
30
|
+
* Removed Travis-CI
|
31
|
+
|
32
|
+
[1.0.6] SEP.09.2018
|
33
|
+
* Documentation improvements
|
34
|
+
* Add Ruby 2.5 to build matrix
|
35
|
+
|
36
|
+
[1.0.5] JUN.05.2017
|
2
37
|
* Allow github macro as an alternative to git within Gemfile for strict version constraint analysis
|
3
38
|
|
4
|
-
|
39
|
+
[1.0.3] JUN.02.2017
|
5
40
|
* fixed accidental removal of loaded_gems in 1.0.2
|
6
41
|
* better documentation
|
7
42
|
|
8
|
-
|
43
|
+
[1.0.2] JUN.02.2017
|
9
44
|
* version constraint checking, useful to add a spec enforcing Gemfile version constraints, by Peter Boling
|
10
45
|
- Console use:
|
11
46
|
- GemBench::StrictVersionRequirement.new({verbose: true})
|
12
47
|
- Spec use:
|
13
48
|
```ruby
|
14
|
-
Rspec.describe
|
49
|
+
Rspec.describe("Gemfile") do
|
15
50
|
it("has version constraint on every gem") do
|
16
51
|
requirements = GemBench::StrictVersionRequirement.new({verbose: true})
|
17
|
-
expect(requirements.list_missing_version_constraints).to
|
52
|
+
expect(requirements.list_missing_version_constraints).to(eq([]))
|
18
53
|
end
|
19
54
|
end
|
20
55
|
```
|
21
56
|
|
22
|
-
|
57
|
+
[1.0.1] MAR.25.2017
|
23
58
|
* fixed a typo that prevented Gemfile comparison by mobilutz
|
24
59
|
|
25
|
-
|
60
|
+
[1.0.0] FEB.26.2017
|
26
61
|
* New feature: scan all code (except for test/spec/feature code) in all loaded gems for a given regex:
|
27
62
|
- puts GemBench.find(look_for_regex: /HERE BE DRAGONS/).starters.map {|gem| "#{gem.name} has DRAGONS at #{gem.stats}" }.join("\n")
|
28
63
|
* Added basic specs
|
29
64
|
* More Documentation
|
30
65
|
* added back git dependency to gemspec (pulled in latest Gem scaffolding from Bundler :/)
|
31
66
|
|
32
|
-
|
67
|
+
[0.0.8] JAN.16.2014
|
33
68
|
* Corrected issues with 0.0.7 release.
|
34
69
|
* More Documentation
|
35
70
|
* removed git dependency from gemspec
|
36
71
|
|
37
|
-
|
72
|
+
[0.0.7] DEC.23.2013 (Yanked immediately)
|
38
73
|
* Attempt to fix failure on encoding problem, with a rescue fallback (Issue #1) by Peter Boling
|
39
74
|
* Readme / Documentation improvements by John Bachir
|
40
75
|
* Runtime output improvements by John Bachir
|
41
76
|
|
42
|
-
|
77
|
+
[0.0.6] AUG.29.2013
|
43
78
|
* Added license to gemspec by Peter Boling
|
44
79
|
* No longer altering Ruby load path - Let the gem manager do that by Peter Boling
|
45
80
|
|
46
|
-
|
81
|
+
[0.0.5] AUG.28.2013
|
47
82
|
* Encode as UTF-8 prior to comparison by Peter Boling
|
48
83
|
|
49
|
-
|
84
|
+
[0.0.4] APR.06.2013
|
50
85
|
* Expanded exclusion list by Peter Boling
|
51
86
|
|
52
|
-
|
87
|
+
[0.0.3] APR.06.2013
|
53
88
|
* Late night coding needs more coffee by Peter Boling
|
54
89
|
|
55
|
-
|
90
|
+
[0.0.2] APR.06.2013
|
56
91
|
* Works against 265 dependency Gemfile by Peter Boling
|
57
92
|
* Added ability to evaluate a Gemfile by Peter Boling
|
58
93
|
|
59
|
-
|
94
|
+
[0.0.1] APR.05.2013
|
60
95
|
* Initial release by Peter Boling
|
data/CODE_OF_CONDUCT.md
ADDED
@@ -0,0 +1,84 @@
|
|
1
|
+
# Contributor Covenant Code of Conduct
|
2
|
+
|
3
|
+
## Our Pledge
|
4
|
+
|
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
|
+
|
7
|
+
We pledge to act and interact in ways that contribute to an open, welcoming, diverse, inclusive, and healthy community.
|
8
|
+
|
9
|
+
## Our Standards
|
10
|
+
|
11
|
+
Examples of behavior that contributes to a positive environment for our community include:
|
12
|
+
|
13
|
+
* Demonstrating empathy and kindness toward other people
|
14
|
+
* Being respectful of differing opinions, viewpoints, and experiences
|
15
|
+
* 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
|
18
|
+
|
19
|
+
Examples of unacceptable behavior include:
|
20
|
+
|
21
|
+
* The use of sexualized language or imagery, and sexual attention or
|
22
|
+
advances of any kind
|
23
|
+
* Trolling, insulting or derogatory comments, and personal or political attacks
|
24
|
+
* Public or private harassment
|
25
|
+
* Publishing others' private information, such as a physical or email
|
26
|
+
address, without their explicit permission
|
27
|
+
* Other conduct which could reasonably be considered inappropriate in a
|
28
|
+
professional setting
|
29
|
+
|
30
|
+
## Enforcement Responsibilities
|
31
|
+
|
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.
|
33
|
+
|
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.
|
35
|
+
|
36
|
+
## Scope
|
37
|
+
|
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.
|
39
|
+
|
40
|
+
## Enforcement
|
41
|
+
|
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.
|
43
|
+
|
44
|
+
All community leaders are obligated to respect the privacy and security of the reporter of any incident.
|
45
|
+
|
46
|
+
## Enforcement Guidelines
|
47
|
+
|
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:
|
49
|
+
|
50
|
+
### 1. Correction
|
51
|
+
|
52
|
+
**Community Impact**: Use of inappropriate language or other behavior deemed unprofessional or unwelcome in the community.
|
53
|
+
|
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.
|
55
|
+
|
56
|
+
### 2. Warning
|
57
|
+
|
58
|
+
**Community Impact**: A violation through a single incident or series of actions.
|
59
|
+
|
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.
|
61
|
+
|
62
|
+
### 3. Temporary Ban
|
63
|
+
|
64
|
+
**Community Impact**: A serious violation of community standards, including sustained inappropriate behavior.
|
65
|
+
|
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.
|
67
|
+
|
68
|
+
### 4. Permanent Ban
|
69
|
+
|
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.
|
71
|
+
|
72
|
+
**Consequence**: A permanent ban from any sort of public interaction within the community.
|
73
|
+
|
74
|
+
## Attribution
|
75
|
+
|
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).
|
80
|
+
|
81
|
+
[homepage]: https://www.contributor-covenant.org
|
82
|
+
|
83
|
+
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.
|
data/CONTRIBUTING.md
ADDED
@@ -0,0 +1,46 @@
|
|
1
|
+
## Contributing
|
2
|
+
|
3
|
+
Bug reports and pull requests are welcome on GitLab at [https://gitlab.com/rubocop-lts/standard-rubocop-lts][🚎src-main]
|
4
|
+
. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to
|
5
|
+
the [code of conduct][conduct].
|
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 post a message to the [gitter chat][🏘chat].
|
9
|
+
|
10
|
+
## Development
|
11
|
+
|
12
|
+
After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake spec` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
|
13
|
+
|
14
|
+
## Release
|
15
|
+
|
16
|
+
To release a new version:
|
17
|
+
|
18
|
+
1. Run `bin/setup && bin/rake` as a tests, coverage, & linting sanity check
|
19
|
+
2. update the version number in `version.rb`
|
20
|
+
3. Run `bin/setup && bin/rake` again as a secondary check, and to update `Gemfile.lock`
|
21
|
+
4. Double check the `CHANGELOG.md`, make sure changes are documented
|
22
|
+
5. run `git commit -am "🔖 Prepare release v<VERSION>"` to commit the changes
|
23
|
+
6. Run `git push` to trigger the final CI pipeline before release, & merge PRs
|
24
|
+
7. Run `git checkout main` (Or whichever branch is considered `trunk`, e.g. `master`)
|
25
|
+
8. Run `git pull origin main` to ensure you will release the latest trunk code.
|
26
|
+
9. Run `bundle exec rake build`
|
27
|
+
10. Run `bin/checksum` to create and commit the SHA256 & SHA512 checksums
|
28
|
+
11. Run `bundle exec rake release`
|
29
|
+
|
30
|
+
NOTE: You will need to have a public key in `certs/`, and list your cert in the
|
31
|
+
`gemspec`, in order to sign the new release.
|
32
|
+
See: [RubyGems Security Guide][rubygems-security-guide]
|
33
|
+
|
34
|
+
## Contributors
|
35
|
+
|
36
|
+
[![Contributors](https://contrib.rocks/image?repo=pboling/gitmoji-regex)][🖐contributors]
|
37
|
+
|
38
|
+
Made with [contributors-img][contrib-rocks].
|
39
|
+
|
40
|
+
[🖐contributors]: https://github.com/pboling/gem_bench/graphs/contributors
|
41
|
+
[contrib-rocks]: https://contrib.rocks
|
42
|
+
[conduct]: https://github.com/pboling/gem_bench/blob/main/CODE_OF_CONDUCT.md
|
43
|
+
[🚎src-main]: https://github.com/pboling/gem_bench/tree/main
|
44
|
+
[🏘chat]: https://matrix.to/#/%23pboling_gem_bench:gitter.im
|
45
|
+
[rubygems-security-guide]: https://guides.rubygems.org/security/#building-gems
|
46
|
+
[rubygems]: https://rubygems.org
|
data/LICENSE.txt
CHANGED
@@ -1,22 +1,21 @@
|
|
1
|
-
Copyright (c) 2013 Peter Boling
|
2
|
-
|
3
1
|
MIT License
|
4
2
|
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
the
|
3
|
+
Copyright (c) 2013 - 2018 Peter H. Boling, http://railsbling.com
|
4
|
+
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
7
|
+
in the Software without restriction, including without limitation the rights
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
10
|
+
furnished to do so, subject to the following conditions:
|
12
11
|
|
13
|
-
The above copyright notice and this permission notice shall be
|
14
|
-
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
13
|
+
copies or substantial portions of the Software.
|
15
14
|
|
16
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
OF
|
22
|
-
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
21
|
+
SOFTWARE.
|
data/README.md
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
# GemBench
|
1
|
+
# GemBench
|
2
2
|
|
3
3
|
`gem_bench` is for static Gemfile and installed gem library source code analysis.
|
4
4
|
|
@@ -7,18 +7,74 @@
|
|
7
7
|
Gem: "Put me in coach!"
|
8
8
|
You: ❨╯°□°❩╯︵┻━┻
|
9
9
|
|
10
|
-
|
11
|
-
|
10
|
+
| Project | GemBench |
|
11
|
+
|------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
|
12
|
+
| gem name | [gem_bench](https://rubygems.org/gems/gem_bench) |
|
13
|
+
| license | [![License: MIT](https://img.shields.io/badge/License-MIT-green.svg)](https://opensource.org/licenses/MIT) |
|
14
|
+
| download rank | [![Downloads Today](https://img.shields.io/gem/rd/gem_bench.svg)](https://github.com/pboling/gem_bench) |
|
15
|
+
| version | [![Version](https://img.shields.io/gem/v/gem_bench.svg)](https://rubygems.org/gems/gem_bench) |
|
16
|
+
| dependencies | [![Depfu](https://badges.depfu.com/badges/865e7bb1d0d3eb3ba807fca7344e22d1/overview.svg)](https://depfu.com/github/pboling/gem_bench?project_id=5613) |
|
17
|
+
| continuous integration | [![Current][🚎cwfi]][🚎cwf] [![Heads][🖐hwfi]][🖐hwf] [![Style][🧮swfi]][🧮swf] [![Coverage][📗cov-wfi]][📗cov-wf] |
|
18
|
+
| test coverage | [![Test Coverage](https://api.codeclimate.com/v1/badges/80787f126e7a486b19af/test_coverage)](https://codeclimate.com/github/pboling/gem_bench/test_coverage) |
|
19
|
+
| maintainability | [![Maintainability](https://api.codeclimate.com/v1/badges/80787f126e7a486b19af/maintainability)](https://codeclimate.com/github/pboling/gem_bench/maintainability) |
|
20
|
+
| code triage | [![Open Source Helpers](https://www.codetriage.com/pboling/gem_bench/badges/users.svg)](https://www.codetriage.com/pboling/gem_bench) |
|
21
|
+
| homepage | [on Github.com][homepage] |
|
22
|
+
| documentation | [on Rdoc.info][documentation] |
|
23
|
+
| live chat | [![Join the chat][🏘chati]][🏘chat] |
|
24
|
+
| 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) |
|
25
|
+
| 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) |
|
26
|
+
|
27
|
+
[🚎cwf]: https://github.com/rubocop-lts/rubocop-lts/actions/workflows/current.yml
|
28
|
+
[🚎cwfi]: https://github.com/rubocop-lts/rubocop-lts/actions/workflows/current.yml/badge.svg
|
29
|
+
[🖐hwf]: https://github.com/rubocop-lts/rubocop-lts/actions/workflows/heads.yml
|
30
|
+
[🖐hwfi]: https://github.com/rubocop-lts/rubocop-lts/actions/workflows/heads.yml/badge.svg
|
31
|
+
[🧮swf]: https://github.com/rubocop-lts/rubocop-lts/actions/workflows/style.yml
|
32
|
+
[🧮swfi]: https://github.com/rubocop-lts/rubocop-lts/actions/workflows/style.yml/badge.svg
|
33
|
+
[📗cov-wf]: https://github.com/rubocop-lts/rubocop-lts/actions/workflows/coverage.yml
|
34
|
+
[📗cov-wfi]: https://github.com/rubocop-lts/rubocop-lts/actions/workflows/coverage.yml/badge.svg
|
35
|
+
[🏘chat]: https://matrix.to/#/%23pboling_gem_bench:gitter.im
|
36
|
+
[🏘chati]: https://badges.gitter.im/Join%20Chat.svg
|
37
|
+
|
38
|
+
### New for 2.0.0 - Dropped Support for Ruby 2.0, 2.1, 2.2
|
39
|
+
|
40
|
+
-- Required Ruby is now 2.3+
|
41
|
+
- `VERSION` is now namespaced at `GemBench::Version::VERSION` and is enhanced by `version_gem`.
|
42
|
+
|
43
|
+
### New for 1.0.2 - Gemfile specs
|
44
|
+
|
45
|
+
Version constraints are important. Give the Gemfile some love in your CI build
|
46
|
+
|
47
|
+
Create a `spec/gemfile_spec.rb` like:
|
12
48
|
```ruby
|
13
|
-
Rspec.describe
|
49
|
+
Rspec.describe("Gemfile") do
|
14
50
|
it("has version constraint on every gem") do
|
15
51
|
requirements = GemBench::StrictVersionRequirement.new({verbose: false})
|
16
|
-
expect(requirements.list_missing_version_constraints).to
|
52
|
+
expect(requirements.list_missing_version_constraints).to(eq([]))
|
17
53
|
end
|
18
54
|
end
|
19
55
|
```
|
20
56
|
|
21
|
-
|
57
|
+
Then your build will fail as soon as a gem is added without a proper constraint:
|
58
|
+
|
59
|
+
```
|
60
|
+
Failures:
|
61
|
+
|
62
|
+
1) Gemfile has version constraint on every gem
|
63
|
+
Failure/Error: expect(requirements.list_missing_version_constraints).to eq([])
|
64
|
+
|
65
|
+
expected: []
|
66
|
+
got: ["puma"]
|
67
|
+
|
68
|
+
(compared using ==)
|
69
|
+
# ./spec/gemfile_spec.rb:7:in `block (2 levels) in <top (required)>'
|
70
|
+
```
|
71
|
+
|
72
|
+
For `:git`/`:github` sources, `:ref` and `:tag` are considered as "constraints", while `:branch` is not, because branches may be a moving target, and this gem aims to make Gemfiles production-ready.
|
73
|
+
For string version constraints anything is allowed (e.g. `'~> 1.0'`), as it assumes the constraint placed is well considered.
|
74
|
+
|
75
|
+
### New for 1.0.0 - Find WAT Dragons in 3rd party source code
|
76
|
+
|
77
|
+
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.
|
22
78
|
|
23
79
|
Gem: "I have no wat DRAGONS!"
|
24
80
|
You: ❨╯°□°❩╯︵┻━┻
|
@@ -30,34 +86,10 @@ You: ❨╯°□°❩╯︵┻━┻
|
|
30
86
|
byebug has wat DRAGONS at [["/Users/pboling/.rvm/gems/ruby-2.4.0@foss/gems/byebug-9.0.6/lib/byebug/commands/frame.rb", 954]]
|
31
87
|
=> nil
|
32
88
|
```
|
89
|
+
|
33
90
|
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.
|
34
91
|
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!
|
35
92
|
|
36
|
-
| Project | GemBench |
|
37
|
-
|------------------------ | ----------------- |
|
38
|
-
| gem name | gem_bench |
|
39
|
-
| license | [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT) |
|
40
|
-
| 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) |
|
41
|
-
| download rank | [![Download Rank](https://img.shields.io/gem/rt/gem_bench.svg)](https://rubygems.org/gems/gem_bench) |
|
42
|
-
| version | [![Gem Version](https://badge.fury.io/rb/gem_bench.png)](http://badge.fury.io/rb/gem_bench) |
|
43
|
-
| dependencies | [![Dependency Status](https://gemnasium.com/pboling/gem_bench.png)](https://gemnasium.com/pboling/gem_bench) |
|
44
|
-
| code quality | [![Code Climate](https://codeclimate.com/github/pboling/gem_bench.png)](https://codeclimate.com/github/pboling/gem_bench) |
|
45
|
-
| inline documenation | [![Inline docs](http://inch-ci.org/github/pboling/gem_bench.png)](http://inch-ci.org/github/pboling/gem_bench) |
|
46
|
-
| continuous integration | [![Build Status](https://secure.travis-ci.org/pboling/gem_bench.png?branch=master)](https://travis-ci.org/pboling/gem_bench) |
|
47
|
-
| test coverage | [![Coverage Status](https://coveralls.io/repos/pboling/gem_bench/badge.png)](https://coveralls.io/r/pboling/gem_bench) |
|
48
|
-
| homepage | [on Github.com][homepage] |
|
49
|
-
| documentation | [on Rdoc.info][documentation] |
|
50
|
-
| live chat | [![Join the chat at https://gitter.im/pboling/gem_bench](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/pboling/gem_bench?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge) |
|
51
|
-
| Spread ~♡ⓛⓞⓥⓔ♡~ | [on Coderwall][coderwall] |
|
52
|
-
|
53
|
-
[semver]: http://semver.org/
|
54
|
-
[pvc]: http://docs.rubygems.org/read/chapter/16#page74
|
55
|
-
[railsbling]: http://www.railsbling.com
|
56
|
-
[peterboling]: http://www.peterboling.com
|
57
|
-
[coderwall]: http://coderwall.com/pboling
|
58
|
-
[documentation]: http://rdoc.info/github/pboling/gem_bench/frames
|
59
|
-
[homepage]: https://github.com/pboling/gem_bench
|
60
|
-
|
61
93
|
It is a fact of RubyGems that many of them do not need to be loaded by your app at boot time.
|
62
94
|
It is a fact of Bundler that you don't know which ones need to be 'required' while staring at the Gemfile.
|
63
95
|
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 ❨╯°□°❩╯︵┻━┻
|
@@ -100,7 +132,7 @@ If you are going to use the gem in your specs, you will need to add it to the te
|
|
100
132
|
|
101
133
|
## Usage
|
102
134
|
|
103
|
-
Works with Ruby >= 2.
|
135
|
+
Works with Ruby >= 2.3.
|
104
136
|
|
105
137
|
### Example!
|
106
138
|
|
@@ -116,14 +148,14 @@ Find out what gems may be causing it by defining `context`!
|
|
116
148
|
```
|
117
149
|
>> require 'gem_bench'
|
118
150
|
=> true
|
119
|
-
>>
|
151
|
+
>> bad_context_maybes = GemBench.find(look_for_regex: /def context/).starters
|
120
152
|
[GemBench] Will search for gems in ["/Users/pboling/.rvm/gems/ruby-2.4.0@foss/gems", "/Users/pboling/.rvm/gems/ruby-2.4.0@global/gems", "/Users/pboling/.rvm/gems/ruby-2.4.0@foss/bundler/gems"]
|
121
153
|
[GemBench] Detected 11 loaded gems + 2 loaded gems which GemBench is configured to ignore.
|
122
154
|
=> [byebug, diff-lcs]
|
123
155
|
```
|
124
156
|
Then find the file with the first occurrence of the regex in each:
|
125
157
|
```
|
126
|
-
>>
|
158
|
+
>> bad_context_maybes.map { |bcm| bcm.stats.map(&:first) }
|
127
159
|
=> [["/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"]]
|
128
160
|
```
|
129
161
|
|
@@ -348,25 +380,18 @@ How much faster will my app boot loading 45 fewer gems? A bit.
|
|
348
380
|
This gem determines which gems need to be loaded at Rails' boot time by looking for Railties and Engines.
|
349
381
|
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.
|
350
382
|
|
351
|
-
##
|
352
|
-
|
353
|
-
After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake spec` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
|
383
|
+
## Contributors
|
354
384
|
|
355
|
-
|
385
|
+
[![Contributors](https://contrib.rocks/image?repo=pboling/gitmoji-regex)][🖐contributors]
|
356
386
|
|
357
|
-
|
387
|
+
Made with [contributors-img][contrib-rocks].
|
358
388
|
|
359
|
-
|
389
|
+
[🖐contributors]: https://github.com/pboling/gem_bench/graphs/contributors
|
390
|
+
[contrib-rocks]: https://contrib.rocks
|
360
391
|
|
361
|
-
|
362
|
-
Create an issue and tell me about it, or fix it yo'sef.
|
392
|
+
## Contributing
|
363
393
|
|
364
|
-
|
365
|
-
2. Create your feature branch (`git checkout -b my-new-feature`)
|
366
|
-
3. Commit your changes (`git commit -am 'Added some feature'`)
|
367
|
-
4. Push to the branch (`git push origin my-new-feature`)
|
368
|
-
5. Make sure to add tests for it. This is important so I don't break it in a future version unintentionally.
|
369
|
-
6. Create new Pull Request
|
394
|
+
See [CONTRIBUTING.md](CONTRIBUTING.md)
|
370
395
|
|
371
396
|
## Versioning
|
372
397
|
|
@@ -382,13 +407,20 @@ dependency on this gem using the [Pessimistic Version Constraint][pvc] with two
|
|
382
407
|
|
383
408
|
For example:
|
384
409
|
|
385
|
-
spec.add_dependency 'gem_bench', '~>
|
410
|
+
spec.add_dependency 'gem_bench', '~> 2.0'
|
411
|
+
|
412
|
+
See [CHANGELOG.md](CHANGELOG.md) for list of releases.
|
386
413
|
|
387
414
|
## Legal
|
388
415
|
|
389
|
-
* MIT
|
390
|
-
* Copyright (c) 2013 [Peter H. Boling]
|
416
|
+
* [![License: MIT](https://img.shields.io/badge/License-MIT-green.svg)](https://opensource.org/licenses/MIT)
|
417
|
+
* Copyright (c) 2013 - 2014, 2016 - 2020, 2023 [Peter H. Boling][peterboling] of [Rails Bling][railsbling]
|
391
418
|
|
392
419
|
[semver]: http://semver.org/
|
393
420
|
[pvc]: http://docs.rubygems.org/read/chapter/16#page74
|
394
421
|
[bundle-group-pattern]: https://gist.github.com/pboling/4564780
|
422
|
+
[railsbling]: http://www.railsbling.com
|
423
|
+
[peterboling]: http://www.peterboling.com
|
424
|
+
[coderwall]: http://coderwall.com/pboling
|
425
|
+
[documentation]: http://rdoc.info/github/pboling/gem_bench/frames
|
426
|
+
[homepage]: https://github.com/pboling/gem_bench
|
data/SECURITY.md
ADDED
@@ -0,0 +1,14 @@
|
|
1
|
+
# Security Policy
|
2
|
+
|
3
|
+
## Supported Versions
|
4
|
+
|
5
|
+
| Version | Supported |
|
6
|
+
|---------|-----------|
|
7
|
+
| 2.x | ✅ |
|
8
|
+
| 1.x | ❌ |
|
9
|
+
|
10
|
+
## Reporting a Vulnerability
|
11
|
+
|
12
|
+
Peter Boling is the primary maintainer of this gem. Please find a way
|
13
|
+
to [contact him directly](https://railsbling.com/contact) to report the issue. Include as much relevant information as
|
14
|
+
possible.
|