bigfiles 0.2.0 → 0.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +5 -5
- data/.circleci/config.yml +134 -0
- data/.envrc +2 -0
- data/.git-hooks/pre_commit/circle_ci.rb +21 -0
- data/.gitattributes +6 -0
- data/.gitignore +65 -0
- data/.markdownlint_style.rb +3 -0
- data/.mdlrc +1 -0
- data/.overcommit.yml +55 -0
- data/.rubocop.yml +116 -0
- data/.rubocop_todo.yml +13 -0
- data/.yamllint.yml +8 -0
- data/CODE_OF_CONDUCT.md +104 -46
- data/CONTRIBUTING.rst +75 -0
- data/DEVELOPMENT.md +31 -0
- data/Gemfile +6 -0
- data/Gemfile.lock +133 -0
- data/LICENSE +21 -0
- data/Makefile +75 -0
- data/README.md +43 -2
- data/Rakefile +3 -0
- data/bigfiles.gemspec +43 -31
- data/bin/bigfiles +25 -2
- data/bin/bump +29 -0
- data/bin/overcommit +29 -0
- data/bin/rake +29 -0
- data/coverage/.last_run.json +6 -0
- data/docs/cookiecutter_input.json +13 -0
- data/exe/bigfiles +6 -0
- data/feature/big_files_cli_spec.rb +49 -0
- data/feature/expected/four_files_results.txt +3 -0
- data/feature/expected/no_files_results.txt +0 -0
- data/feature/expected/swift_and_ruby_files_results.txt +3 -0
- data/feature/expected/swift_zorb_and_ruby_files_excluded_results.txt +3 -0
- data/feature/expected/swift_zorb_and_ruby_files_results.txt +3 -0
- data/feature/expected/three_files_results.txt +3 -0
- data/feature/feature_helper.rb +33 -0
- data/feature/pronto_big_files_use_spec.rb +54 -0
- data/feature/samples/four_files/five_lines.rb +5 -0
- data/feature/samples/four_files/four_lines.rb +4 -0
- data/feature/samples/four_files/three_lines.rb +3 -0
- data/feature/samples/four_files/two_lines.rb +2 -0
- data/feature/samples/no_files/.keepme +0 -0
- data/feature/samples/swift_and_ruby_files/five_lines.swift +5 -0
- data/feature/samples/swift_and_ruby_files/four_lines.rb +4 -0
- data/feature/samples/swift_and_ruby_files/three_lines.rb +3 -0
- data/feature/samples/swift_zorb_and_ruby_files/five_lines.swift +5 -0
- data/feature/samples/swift_zorb_and_ruby_files/four_lines.zorb +4 -0
- data/feature/samples/swift_zorb_and_ruby_files/three_lines.rb +3 -0
- data/feature/samples/swift_zorb_and_ruby_files_excluded/excluded.rb +9 -0
- data/feature/samples/swift_zorb_and_ruby_files_excluded/five_lines.swift +5 -0
- data/feature/samples/swift_zorb_and_ruby_files_excluded/four_lines.zorb +4 -0
- data/feature/samples/swift_zorb_and_ruby_files_excluded/three_lines.rb +3 -0
- data/feature/samples/three_files/five_lines.rb +5 -0
- data/feature/samples/three_files/four_lines.rb +4 -0
- data/feature/samples/three_files/three_lines.rb +3 -0
- data/fix.sh +366 -0
- data/lib/bigfiles/config.rb +4 -2
- data/lib/bigfiles/config_file_parser.rb +48 -0
- data/lib/bigfiles/inspector.rb +3 -3
- data/lib/bigfiles/option_parser.rb +6 -8
- data/lib/bigfiles/version.rb +1 -1
- data/lib/bigfiles.rb +15 -7
- data/rakelib/citest.rake +4 -0
- data/rakelib/clear_metrics.rake +17 -0
- data/rakelib/console.rake +6 -0
- data/rakelib/default.rake +4 -0
- data/rakelib/feature.rake +10 -0
- data/rakelib/gem_tasks.rake +3 -0
- data/rakelib/localtest.rake +4 -0
- data/rakelib/overcommit.rake +6 -0
- data/rakelib/quality.rake +4 -0
- data/rakelib/repl.rake +4 -0
- data/rakelib/spec.rake +9 -0
- data/rakelib/undercover.rake +8 -0
- data/requirements_dev.txt +2 -0
- metadata +172 -24
- data/License.txt +0 -20
data/CONTRIBUTING.rst
ADDED
@@ -0,0 +1,75 @@
|
|
1
|
+
============
|
2
|
+
Contributing
|
3
|
+
============
|
4
|
+
|
5
|
+
Contributions are welcome, and they are greatly appreciated! Every little bit
|
6
|
+
helps, and credit will always be given.
|
7
|
+
|
8
|
+
You can contribute in many ways:
|
9
|
+
|
10
|
+
Types of Contributions
|
11
|
+
----------------------
|
12
|
+
|
13
|
+
Report Bugs
|
14
|
+
~~~~~~~~~~~
|
15
|
+
|
16
|
+
Report bugs at https://github.com/apiology/bigfiles/issues
|
17
|
+
|
18
|
+
If you are reporting a bug, please include:
|
19
|
+
|
20
|
+
* Your operating system name and version.
|
21
|
+
* Any details about your local setup that might be helpful in troubleshooting.
|
22
|
+
* Detailed steps to reproduce the bug.
|
23
|
+
|
24
|
+
Fix Bugs
|
25
|
+
~~~~~~~~
|
26
|
+
|
27
|
+
Look through the GitHub issues for bugs. Anything tagged with "bug"
|
28
|
+
and "help wanted" is open to whoever wants to implement a fix for it.
|
29
|
+
|
30
|
+
Implement Features
|
31
|
+
~~~~~~~~~~~~~~~~~~
|
32
|
+
|
33
|
+
Look through the GitHub issues for features. Anything tagged with "enhancement"
|
34
|
+
and "help wanted" is open to whoever wants to implement it.
|
35
|
+
|
36
|
+
If you have a new feature in mind, please start it by filing an issue
|
37
|
+
so we can discuss the need and approach before you invest time into
|
38
|
+
coding it.
|
39
|
+
|
40
|
+
Write Documentation
|
41
|
+
~~~~~~~~~~~~~~~~~~~
|
42
|
+
|
43
|
+
BigFiles could always use more documentation, whether as part of
|
44
|
+
the official BigFiles docs, in docstrings, or even on the web in blog posts, articles,
|
45
|
+
and such.
|
46
|
+
|
47
|
+
Submit Feedback
|
48
|
+
~~~~~~~~~~~~~~~
|
49
|
+
|
50
|
+
The best way to send feedback is to file an issue at
|
51
|
+
https://github.com/apiology/bigfiles/issues.
|
52
|
+
|
53
|
+
If you are proposing a new feature:
|
54
|
+
|
55
|
+
* Explain in detail how it would work.
|
56
|
+
* Keep the scope as narrow as possible, to make it easier to implement.
|
57
|
+
* Remember that this is a volunteer-driven project, and that contributions
|
58
|
+
are welcome :)
|
59
|
+
|
60
|
+
Get Started!
|
61
|
+
------------
|
62
|
+
|
63
|
+
Ready to contribute? See DEVELOPMENT.md in this directory for details
|
64
|
+
on how to set yourself up for local development.
|
65
|
+
|
66
|
+
Pull Request Guidelines
|
67
|
+
-----------------------
|
68
|
+
|
69
|
+
Before you submit a pull request, check that it meets these guidelines:
|
70
|
+
|
71
|
+
1. The pull request should include tests.
|
72
|
+
|
73
|
+
2. If the pull request adds functionality, the docs should be updated. Put your
|
74
|
+
new functionality into a function with a docstring, and add the feature to
|
75
|
+
the list in README.md.
|
data/DEVELOPMENT.md
ADDED
@@ -0,0 +1,31 @@
|
|
1
|
+
# Development
|
2
|
+
|
3
|
+
## fix.sh
|
4
|
+
|
5
|
+
If you want to use rbenv/pyenv/etc to manage versions of tools,
|
6
|
+
there's a `fix.sh` script which may be what you'd like to install
|
7
|
+
dependencies.
|
8
|
+
|
9
|
+
## Overcommit
|
10
|
+
|
11
|
+
This project uses [overcommit](https://github.com/sds/overcommit) for
|
12
|
+
quality checks. `bundle exec overcommit --install` will install it.
|
13
|
+
|
14
|
+
## direnv
|
15
|
+
|
16
|
+
This project uses direnv to manage environment variables used during
|
17
|
+
development. See the `.envrc` file for detail.
|
18
|
+
|
19
|
+
## Publishing
|
20
|
+
|
21
|
+
To publish new version as a maintainer:
|
22
|
+
|
23
|
+
```sh
|
24
|
+
git checkout main && git pull
|
25
|
+
git log "v$(bump current)..."
|
26
|
+
# Set type_of_bump to patch, minor, or major
|
27
|
+
bump --tag --tag-prefix=v ${type_of_bump:?}
|
28
|
+
rake release
|
29
|
+
git push
|
30
|
+
git push --tags
|
31
|
+
```
|
data/Gemfile
ADDED
data/Gemfile.lock
ADDED
@@ -0,0 +1,133 @@
|
|
1
|
+
PATH
|
2
|
+
remote: .
|
3
|
+
specs:
|
4
|
+
bigfiles (0.3.0)
|
5
|
+
high_water_mark
|
6
|
+
source_finder (>= 2)
|
7
|
+
|
8
|
+
GEM
|
9
|
+
remote: https://rubygems.org/
|
10
|
+
specs:
|
11
|
+
ast (2.4.2)
|
12
|
+
bump (0.10.0)
|
13
|
+
chef-utils (17.10.0)
|
14
|
+
concurrent-ruby
|
15
|
+
childprocess (4.1.0)
|
16
|
+
coderay (1.1.3)
|
17
|
+
concurrent-ruby (1.1.10)
|
18
|
+
diff-lcs (1.5.0)
|
19
|
+
docile (1.4.0)
|
20
|
+
ffi (1.15.4-java)
|
21
|
+
high_water_mark (0.1.0)
|
22
|
+
imagen (0.1.8)
|
23
|
+
parser (>= 2.5, != 2.5.1.1)
|
24
|
+
iniparse (1.5.0)
|
25
|
+
json (2.6.2)
|
26
|
+
json (2.6.2-java)
|
27
|
+
kramdown (2.4.0)
|
28
|
+
rexml
|
29
|
+
kramdown-parser-gfm (1.1.0)
|
30
|
+
kramdown (~> 2.0)
|
31
|
+
mdl (0.11.0)
|
32
|
+
kramdown (~> 2.3)
|
33
|
+
kramdown-parser-gfm (~> 1.1)
|
34
|
+
mixlib-cli (~> 2.1, >= 2.1.1)
|
35
|
+
mixlib-config (>= 2.2.1, < 4)
|
36
|
+
mixlib-shellout
|
37
|
+
method_source (1.0.0)
|
38
|
+
mixlib-cli (2.1.8)
|
39
|
+
mixlib-config (3.0.27)
|
40
|
+
tomlrb
|
41
|
+
mixlib-shellout (3.2.7)
|
42
|
+
chef-utils
|
43
|
+
overcommit (0.59.1)
|
44
|
+
childprocess (>= 0.6.3, < 5)
|
45
|
+
iniparse (~> 1.4)
|
46
|
+
rexml (~> 3.2)
|
47
|
+
parallel (1.22.1)
|
48
|
+
parser (3.1.2.0)
|
49
|
+
ast (~> 2.4.1)
|
50
|
+
pry (0.14.1)
|
51
|
+
coderay (~> 1.1)
|
52
|
+
method_source (~> 1.0)
|
53
|
+
pry (0.14.1-java)
|
54
|
+
coderay (~> 1.1)
|
55
|
+
method_source (~> 1.0)
|
56
|
+
spoon (~> 0.0)
|
57
|
+
rainbow (3.1.1)
|
58
|
+
rake (13.0.6)
|
59
|
+
regexp_parser (2.5.0)
|
60
|
+
rexml (3.2.5)
|
61
|
+
rspec (3.11.0)
|
62
|
+
rspec-core (~> 3.11.0)
|
63
|
+
rspec-expectations (~> 3.11.0)
|
64
|
+
rspec-mocks (~> 3.11.0)
|
65
|
+
rspec-core (3.11.0)
|
66
|
+
rspec-support (~> 3.11.0)
|
67
|
+
rspec-expectations (3.11.0)
|
68
|
+
diff-lcs (>= 1.2.0, < 2.0)
|
69
|
+
rspec-support (~> 3.11.0)
|
70
|
+
rspec-mocks (3.11.1)
|
71
|
+
diff-lcs (>= 1.2.0, < 2.0)
|
72
|
+
rspec-support (~> 3.11.0)
|
73
|
+
rspec-support (3.11.0)
|
74
|
+
rubocop (1.31.2)
|
75
|
+
json (~> 2.3)
|
76
|
+
parallel (~> 1.10)
|
77
|
+
parser (>= 3.1.0.0)
|
78
|
+
rainbow (>= 2.2.2, < 4.0)
|
79
|
+
regexp_parser (>= 1.8, < 3.0)
|
80
|
+
rexml (>= 3.2.5, < 4.0)
|
81
|
+
rubocop-ast (>= 1.18.0, < 2.0)
|
82
|
+
ruby-progressbar (~> 1.7)
|
83
|
+
unicode-display_width (>= 1.4.0, < 3.0)
|
84
|
+
rubocop-ast (1.18.0)
|
85
|
+
parser (>= 3.1.1.0)
|
86
|
+
rubocop-rake (0.6.0)
|
87
|
+
rubocop (~> 1.0)
|
88
|
+
rubocop-rspec (2.12.1)
|
89
|
+
rubocop (~> 1.31)
|
90
|
+
ruby-progressbar (1.11.0)
|
91
|
+
rugged (1.2.0)
|
92
|
+
simplecov (0.21.2)
|
93
|
+
docile (~> 1.1)
|
94
|
+
simplecov-html (~> 0.11)
|
95
|
+
simplecov_json_formatter (~> 0.1)
|
96
|
+
simplecov-html (0.12.3)
|
97
|
+
simplecov-lcov (0.8.0)
|
98
|
+
simplecov_json_formatter (0.1.3)
|
99
|
+
source_finder (3.2.1)
|
100
|
+
spoon (0.0.6)
|
101
|
+
ffi
|
102
|
+
tomlrb (2.0.3)
|
103
|
+
undercover (0.4.4)
|
104
|
+
imagen (>= 0.1.8)
|
105
|
+
rainbow (>= 2.1, < 4.0)
|
106
|
+
rugged (>= 0.27, < 1.3)
|
107
|
+
unicode-display_width (2.2.0)
|
108
|
+
|
109
|
+
PLATFORMS
|
110
|
+
java
|
111
|
+
ruby
|
112
|
+
x86_64-darwin-19
|
113
|
+
x86_64-darwin-20
|
114
|
+
x86_64-linux
|
115
|
+
|
116
|
+
DEPENDENCIES
|
117
|
+
bigfiles!
|
118
|
+
bump
|
119
|
+
bundler
|
120
|
+
mdl
|
121
|
+
overcommit (>= 0.58.0)
|
122
|
+
pry
|
123
|
+
rake (~> 13.0)
|
124
|
+
rspec (>= 3.4)
|
125
|
+
rubocop
|
126
|
+
rubocop-rake
|
127
|
+
rubocop-rspec
|
128
|
+
simplecov (>= 0.18.0)
|
129
|
+
simplecov-lcov
|
130
|
+
undercover
|
131
|
+
|
132
|
+
BUNDLED WITH
|
133
|
+
2.2.25
|
data/LICENSE
ADDED
@@ -0,0 +1,21 @@
|
|
1
|
+
MIT License
|
2
|
+
|
3
|
+
Copyright (c) 2013-2022, Vince Broz
|
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:
|
11
|
+
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
13
|
+
copies or substantial portions of the Software.
|
14
|
+
|
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/Makefile
ADDED
@@ -0,0 +1,75 @@
|
|
1
|
+
.PHONY: clean test help quality localtest spec feature
|
2
|
+
.DEFAULT_GOAL := default
|
3
|
+
|
4
|
+
define PRINT_HELP_PYSCRIPT
|
5
|
+
import re, sys
|
6
|
+
|
7
|
+
for line in sys.stdin:
|
8
|
+
match = re.match(r'^([a-zA-Z_-]+):.*?## (.*)$$', line)
|
9
|
+
if match:
|
10
|
+
target, help = match.groups()
|
11
|
+
print("%-20s %s" % (target, help))
|
12
|
+
endef
|
13
|
+
export PRINT_HELP_PYSCRIPT
|
14
|
+
|
15
|
+
help:
|
16
|
+
@python -c "$$PRINT_HELP_PYSCRIPT" < $(MAKEFILE_LIST)
|
17
|
+
|
18
|
+
default: localtest ## run default tests and quality
|
19
|
+
|
20
|
+
requirements_dev.txt.installed: requirements_dev.txt
|
21
|
+
pip install -q --disable-pip-version-check -r requirements_dev.txt
|
22
|
+
touch requirements_dev.txt.installed
|
23
|
+
|
24
|
+
pip_install: requirements_dev.txt.installed ## Install Python dependencies
|
25
|
+
|
26
|
+
# bundle install doesn't get run here so that we can catch it below in
|
27
|
+
# fresh-checkout and fresh-rbenv cases
|
28
|
+
Gemfile.lock: Gemfile
|
29
|
+
|
30
|
+
# Ensure any Gemfile.lock changes ensure a bundle is installed.
|
31
|
+
Gemfile.lock.installed: Gemfile.lock
|
32
|
+
bundle install
|
33
|
+
touch Gemfile.lock.installed
|
34
|
+
|
35
|
+
bundle_install: Gemfile.lock.installed ## Install Ruby dependencies
|
36
|
+
|
37
|
+
clear_metrics: ## remove or reset result artifacts created by tests and quality tools
|
38
|
+
bundle exec rake clear_metrics
|
39
|
+
|
40
|
+
clean: clear_metrics ## remove all built artifacts
|
41
|
+
|
42
|
+
test: spec ## run tests quickly
|
43
|
+
|
44
|
+
typecheck: ## validate types in code and configuration
|
45
|
+
|
46
|
+
overcommit: ## run precommit quality checks
|
47
|
+
bundle exec overcommit --run
|
48
|
+
|
49
|
+
quality: overcommit ## run precommit quality checks
|
50
|
+
|
51
|
+
spec: ## Run lower-level tests
|
52
|
+
@bundle exec rake spec
|
53
|
+
|
54
|
+
feature: ## Run higher-level tests
|
55
|
+
@bundle exec rake feature
|
56
|
+
|
57
|
+
localtest: ## run default local actions
|
58
|
+
@bundle exec rake localtest
|
59
|
+
|
60
|
+
repl: ## Load up bigfiles in pry
|
61
|
+
@bundle exec rake repl
|
62
|
+
|
63
|
+
update_from_cookiecutter: ## Bring in changes from template project used to create this repo
|
64
|
+
bundle exec overcommit --uninstall
|
65
|
+
IN_COOKIECUTTER_PROJECT_UPGRADER=1 cookiecutter_project_upgrader || true
|
66
|
+
git checkout cookiecutter-template && git push && git checkout main
|
67
|
+
git checkout main && git pull && git checkout -b update-from-cookiecutter-$$(date +%Y-%m-%d-%H%M)
|
68
|
+
git merge cookiecutter-template || true
|
69
|
+
bundle exec overcommit --install
|
70
|
+
@echo
|
71
|
+
@echo "Please resolve any merge conflicts below and push up a PR with:"
|
72
|
+
@echo
|
73
|
+
@echo ' gh pr create --title "Update from cookiecutter" --body "Automated PR to update from cookiecutter boilerplate"'
|
74
|
+
@echo
|
75
|
+
@echo
|
data/README.md
CHANGED
@@ -1,6 +1,7 @@
|
|
1
1
|
# BigFiles
|
2
2
|
|
3
|
-
[](https://circleci.com/gh/apiology/bigfiles)
|
4
|
+
|
4
5
|
|
5
6
|
Simple tool to find the largest source files in your project - maybe
|
6
7
|
to target for refactoring!
|
@@ -39,6 +40,34 @@ $ bigfiles
|
|
39
40
|
$
|
40
41
|
```
|
41
42
|
|
43
|
+
## Options
|
44
|
+
|
45
|
+
You can control what files are included and excluded, and how many files are reported:
|
46
|
+
|
47
|
+
```sh
|
48
|
+
$ bigfiles --help
|
49
|
+
Usage: bigfiles [options]
|
50
|
+
-g, --glob glob here Which files to parse - default is {Dockerfile,Rakefile,{*,.*}.{c,clj,cljs,cpp,gemspec,groovy,html,java,js,json,py,rake,rb,scala,sh,swift,yml},{app,config,db,feature,lib,spec,src,test,tests,vars,www}/**/{*,.*}.{c,clj,cljs,cpp,gemspec,groovy,html,java,js,json,py,rake,rb,scala,sh,swift,yml}}
|
51
|
+
-e, --exclude-glob glob here Files to exclude - default is none
|
52
|
+
-h, --help This message
|
53
|
+
-n, --num-files number-here Top number of files to show--default 3
|
54
|
+
$
|
55
|
+
```
|
56
|
+
|
57
|
+
## Configuration
|
58
|
+
|
59
|
+
You can set different defaults for the above in a `.bigfiles.yml` in the current directory:
|
60
|
+
|
61
|
+
```yaml
|
62
|
+
---
|
63
|
+
bigfiles:
|
64
|
+
num_files: 8
|
65
|
+
include:
|
66
|
+
glob: '**/*.my-favorite-extension'
|
67
|
+
exclude:
|
68
|
+
glob: fix.sh
|
69
|
+
```
|
70
|
+
|
42
71
|
## Contributing
|
43
72
|
|
44
73
|
Bug reports and pull requests are welcome on
|
@@ -56,4 +85,16 @@ The gem is available as open source under the terms of the
|
|
56
85
|
|
57
86
|
Everyone interacting in the Pronto::Punchlist project’s codebases,
|
58
87
|
issue trackers, chat rooms and mailing lists is expected to follow the
|
59
|
-
[code of conduct](https://github.com/apiology/bigfiles/blob/
|
88
|
+
[code of conduct](https://github.com/apiology/bigfiles/blob/main/CODE_OF_CONDUCT.md).
|
89
|
+
|
90
|
+
## Contributions
|
91
|
+
|
92
|
+
This project, as with all others, rests on the shoulders of a broad
|
93
|
+
ecosystem supported by many volunteers doing thankless work, along
|
94
|
+
with specific contributors.
|
95
|
+
|
96
|
+
In particular I'd like to call out:
|
97
|
+
|
98
|
+
* [Audrey Roy Greenfeld](https://github.com/audreyfeldroy) for the
|
99
|
+
cookiecutter tool and associated examples, which keep my many
|
100
|
+
projects building with shared boilerplate with a minimum of fuss.
|
data/Rakefile
ADDED
data/bigfiles.gemspec
CHANGED
@@ -1,38 +1,50 @@
|
|
1
|
-
#
|
1
|
+
# coding: ascii
|
2
2
|
# frozen_string_literal: true
|
3
3
|
|
4
|
-
|
4
|
+
lib = File.expand_path('lib', __dir__)
|
5
|
+
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
5
6
|
require 'bigfiles/version'
|
6
7
|
|
7
|
-
Gem::Specification.new do |
|
8
|
-
|
9
|
-
|
8
|
+
Gem::Specification.new do |spec|
|
9
|
+
spec.name = 'bigfiles'
|
10
|
+
spec.version = BigFiles::VERSION
|
11
|
+
spec.authors = ['Vince Broz']
|
12
|
+
spec.email = ['vince@broz.cc']
|
13
|
+
spec.summary = 'Finds largest source files in a project'
|
14
|
+
spec.homepage = 'https://github.com/apiology/bigfiles'
|
15
|
+
spec.license = 'MIT license'
|
16
|
+
spec.required_ruby_version = '>= 2.6'
|
10
17
|
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
'{lib}/bigfiles.rb',
|
20
|
-
'{lib}/bigfiles/**/*.rb',
|
21
|
-
'bigfiles.gemspec']
|
22
|
-
# s.rdoc_options = ["--main", "README.md"]
|
23
|
-
s.require_paths = ['lib']
|
24
|
-
s.homepage = 'http://github.com/apiology/bigfiles'
|
25
|
-
# s.rubyforge_project = %q{bigfiles}
|
26
|
-
s.rubygems_version = '1.3.6'
|
27
|
-
s.summary = 'Finds largest source files in a project'
|
18
|
+
spec.files = Dir.chdir(File.expand_path(__dir__)) do
|
19
|
+
`git ls-files -z`.split("\x0").reject do |f|
|
20
|
+
f.match(%r{^(test|spec|features)/})
|
21
|
+
end
|
22
|
+
end
|
23
|
+
spec.bindir = 'exe'
|
24
|
+
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
25
|
+
spec.require_paths = ['lib']
|
28
26
|
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
s
|
27
|
+
spec.add_dependency('high_water_mark')
|
28
|
+
spec.add_dependency('source_finder', ['>=2'])
|
29
|
+
|
30
|
+
spec.add_development_dependency 'bump'
|
31
|
+
spec.add_development_dependency 'bundler'
|
32
|
+
spec.add_development_dependency 'mdl'
|
33
|
+
# 0.58.0 and 0.57.0 don't seem super compatible with signatures, and
|
34
|
+
# magit doesn't seem to want to use the bundled version at the moment,
|
35
|
+
# so let's favor the more recent version...
|
36
|
+
spec.add_development_dependency 'overcommit', ['>=0.58.0']
|
37
|
+
spec.add_development_dependency 'pry'
|
38
|
+
spec.add_development_dependency 'rake', '~> 13.0'
|
39
|
+
spec.add_development_dependency 'rspec', '>=3.4'
|
40
|
+
spec.add_development_dependency 'rubocop'
|
41
|
+
spec.add_development_dependency 'rubocop-rake'
|
42
|
+
spec.add_development_dependency 'rubocop-rspec'
|
43
|
+
# ensure version with branch coverage
|
44
|
+
spec.add_development_dependency 'simplecov', ['>=0.18.0']
|
45
|
+
spec.add_development_dependency 'simplecov-lcov'
|
46
|
+
spec.add_development_dependency 'undercover'
|
47
|
+
spec.metadata = {
|
48
|
+
'rubygems_mfa_required' => 'true',
|
49
|
+
}
|
38
50
|
end
|
data/bin/bigfiles
CHANGED
@@ -1,6 +1,29 @@
|
|
1
1
|
#!/usr/bin/env ruby
|
2
2
|
# frozen_string_literal: true
|
3
3
|
|
4
|
-
|
4
|
+
#
|
5
|
+
# This file was generated by Bundler.
|
6
|
+
#
|
7
|
+
# The application 'bigfiles' is installed as part of a gem, and
|
8
|
+
# this file is here to facilitate running it.
|
9
|
+
#
|
5
10
|
|
6
|
-
|
11
|
+
require "pathname"
|
12
|
+
ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../../Gemfile",
|
13
|
+
Pathname.new(__FILE__).realpath)
|
14
|
+
|
15
|
+
bundle_binstub = File.expand_path("../bundle", __FILE__)
|
16
|
+
|
17
|
+
if File.file?(bundle_binstub)
|
18
|
+
if File.read(bundle_binstub, 300) =~ /This file was generated by Bundler/
|
19
|
+
load(bundle_binstub)
|
20
|
+
else
|
21
|
+
abort("Your `bin/bundle` was not generated by Bundler, so this binstub cannot run.
|
22
|
+
Replace `bin/bundle` by running `bundle binstubs bundler --force`, then run this command again.")
|
23
|
+
end
|
24
|
+
end
|
25
|
+
|
26
|
+
require "rubygems"
|
27
|
+
require "bundler/setup"
|
28
|
+
|
29
|
+
load Gem.bin_path("bigfiles", "bigfiles")
|
data/bin/bump
ADDED
@@ -0,0 +1,29 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
# frozen_string_literal: true
|
3
|
+
|
4
|
+
#
|
5
|
+
# This file was generated by Bundler.
|
6
|
+
#
|
7
|
+
# The application 'bump' is installed as part of a gem, and
|
8
|
+
# this file is here to facilitate running it.
|
9
|
+
#
|
10
|
+
|
11
|
+
require "pathname"
|
12
|
+
ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../../Gemfile",
|
13
|
+
Pathname.new(__FILE__).realpath)
|
14
|
+
|
15
|
+
bundle_binstub = File.expand_path("../bundle", __FILE__)
|
16
|
+
|
17
|
+
if File.file?(bundle_binstub)
|
18
|
+
if File.read(bundle_binstub, 300) =~ /This file was generated by Bundler/
|
19
|
+
load(bundle_binstub)
|
20
|
+
else
|
21
|
+
abort("Your `bin/bundle` was not generated by Bundler, so this binstub cannot run.
|
22
|
+
Replace `bin/bundle` by running `bundle binstubs bundler --force`, then run this command again.")
|
23
|
+
end
|
24
|
+
end
|
25
|
+
|
26
|
+
require "rubygems"
|
27
|
+
require "bundler/setup"
|
28
|
+
|
29
|
+
load Gem.bin_path("bump", "bump")
|
data/bin/overcommit
ADDED
@@ -0,0 +1,29 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
# frozen_string_literal: true
|
3
|
+
|
4
|
+
#
|
5
|
+
# This file was generated by Bundler.
|
6
|
+
#
|
7
|
+
# The application 'overcommit' is installed as part of a gem, and
|
8
|
+
# this file is here to facilitate running it.
|
9
|
+
#
|
10
|
+
|
11
|
+
require "pathname"
|
12
|
+
ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../../Gemfile",
|
13
|
+
Pathname.new(__FILE__).realpath)
|
14
|
+
|
15
|
+
bundle_binstub = File.expand_path("../bundle", __FILE__)
|
16
|
+
|
17
|
+
if File.file?(bundle_binstub)
|
18
|
+
if File.read(bundle_binstub, 300) =~ /This file was generated by Bundler/
|
19
|
+
load(bundle_binstub)
|
20
|
+
else
|
21
|
+
abort("Your `bin/bundle` was not generated by Bundler, so this binstub cannot run.
|
22
|
+
Replace `bin/bundle` by running `bundle binstubs bundler --force`, then run this command again.")
|
23
|
+
end
|
24
|
+
end
|
25
|
+
|
26
|
+
require "rubygems"
|
27
|
+
require "bundler/setup"
|
28
|
+
|
29
|
+
load Gem.bin_path("overcommit", "overcommit")
|
data/bin/rake
ADDED
@@ -0,0 +1,29 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
# frozen_string_literal: true
|
3
|
+
|
4
|
+
#
|
5
|
+
# This file was generated by Bundler.
|
6
|
+
#
|
7
|
+
# The application 'rake' is installed as part of a gem, and
|
8
|
+
# this file is here to facilitate running it.
|
9
|
+
#
|
10
|
+
|
11
|
+
require "pathname"
|
12
|
+
ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../../Gemfile",
|
13
|
+
Pathname.new(__FILE__).realpath)
|
14
|
+
|
15
|
+
bundle_binstub = File.expand_path("../bundle", __FILE__)
|
16
|
+
|
17
|
+
if File.file?(bundle_binstub)
|
18
|
+
if File.read(bundle_binstub, 300) =~ /This file was generated by Bundler/
|
19
|
+
load(bundle_binstub)
|
20
|
+
else
|
21
|
+
abort("Your `bin/bundle` was not generated by Bundler, so this binstub cannot run.
|
22
|
+
Replace `bin/bundle` by running `bundle binstubs bundler --force`, then run this command again.")
|
23
|
+
end
|
24
|
+
end
|
25
|
+
|
26
|
+
require "rubygems"
|
27
|
+
require "bundler/setup"
|
28
|
+
|
29
|
+
load Gem.bin_path("rake", "rake")
|
@@ -0,0 +1,13 @@
|
|
1
|
+
{
|
2
|
+
"_template": "https://github.com/apiology/cookiecutter-gem",
|
3
|
+
"email": "vince@broz.cc",
|
4
|
+
"full_name": "Vince Broz",
|
5
|
+
"github_username": "apiology",
|
6
|
+
"module_name": "BigFiles",
|
7
|
+
"open_source_license": "MIT license",
|
8
|
+
"project_name": "BigFiles",
|
9
|
+
"project_short_description": "Simple tool to find the largest source files in your project.",
|
10
|
+
"project_slug": "bigfiles",
|
11
|
+
"type_of_github_repo": "public",
|
12
|
+
"version": "0.1.0"
|
13
|
+
}
|