bundler-git-slim 0.1.1 → 1.0.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 +4 -4
- data/README.md +45 -0
- data/bundler-git-slim.gemspec +1 -1
- data/lib/bundler_git_slim.rb +1 -1
- metadata +8 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 4f723a2ee94eaff4346a86d5c591f076d9dd3bb09d5294657116d632b46cd45f
|
|
4
|
+
data.tar.gz: 0fcf98d7dd68116d53b70a958412b0f68b6eabc1d562dcee9cb01ea76b9654d6
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: e60239498d7916f4a71125152a7d258b22b0cbf836e12bad390920b7f6b75d8d100843dbb3a0e80d057fd5f7ca3a0bd907cb08e31c4c76daf943b700ba3f631d
|
|
7
|
+
data.tar.gz: 99fd0e366f005b1bf3ef9ad831bd2cf60bf602b9b80d4f9776e610d87ec18f561583107a3297c9df7f93c74e7f366c7799e72b7c690924dd397da02ae4bf8f98
|
data/README.md
CHANGED
|
@@ -1,7 +1,31 @@
|
|
|
1
1
|
# bundler-git-slim
|
|
2
2
|
|
|
3
|
+
[](https://github.com/svetam/bundler-git-slim/actions/workflows/ci.yml)
|
|
4
|
+
[](https://rubygems.org/gems/bundler-git-slim)
|
|
5
|
+
|
|
3
6
|
Bundler plugin that slims git-installed gems down to the files listed in `spec.files`, reducing disk usage and cache size.
|
|
4
7
|
|
|
8
|
+
## Why use this?
|
|
9
|
+
|
|
10
|
+
When you install gems via `git:` in your Gemfile, Bundler clones the entire repository - including specs, docs, fixtures, CI configs, and other development files that aren't part of the production gem. This bloats your bundle directory and increases Docker image sizes, especially with private gems that have large test suites or documentation.
|
|
11
|
+
|
|
12
|
+
This plugin automatically removes everything except the files declared in `spec.files`, giving you the same lean footprint as a gem installed from RubyGems.
|
|
13
|
+
|
|
14
|
+
**Use this if you:**
|
|
15
|
+
- Install private gems from Git repositories
|
|
16
|
+
- Want smaller Docker images and faster deployments
|
|
17
|
+
- Have git gems with large test suites, docs, or assets not needed in production
|
|
18
|
+
|
|
19
|
+
## Example output
|
|
20
|
+
|
|
21
|
+
During `bundle install`, the plugin reports what was removed:
|
|
22
|
+
|
|
23
|
+
```
|
|
24
|
+
Slimmed my_private_gem 1.2.0 (847 files, 12.3 MB)
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
The output shows the gem name, version, number of files removed, and total size freed.
|
|
28
|
+
|
|
5
29
|
## Features
|
|
6
30
|
|
|
7
31
|
- Only affects gems installed from `git "..."` sources
|
|
@@ -49,6 +73,27 @@ This will prune all git-sourced gems in your current bundle.
|
|
|
49
73
|
- If `spec.files` is empty or nil, does nothing
|
|
50
74
|
- Always preserves `*.gemspec` files
|
|
51
75
|
|
|
76
|
+
## Requirements
|
|
77
|
+
|
|
78
|
+
- Ruby >= 3.2
|
|
79
|
+
- Bundler >= 2.0 (including Bundler 4.x)
|
|
80
|
+
|
|
81
|
+
## Development
|
|
82
|
+
|
|
83
|
+
```bash
|
|
84
|
+
bundle install
|
|
85
|
+
bundle exec rake spec
|
|
86
|
+
bundle exec rubocop
|
|
87
|
+
```
|
|
88
|
+
|
|
89
|
+
## Contributing
|
|
90
|
+
|
|
91
|
+
1. Fork it
|
|
92
|
+
2. Create your feature branch (`git checkout -b feature/my-feature`)
|
|
93
|
+
3. Commit your changes (`git commit -am 'Add my feature'`)
|
|
94
|
+
4. Push to the branch (`git push origin feature/my-feature`)
|
|
95
|
+
5. Create a Pull Request
|
|
96
|
+
|
|
52
97
|
## License
|
|
53
98
|
|
|
54
99
|
MIT
|
data/bundler-git-slim.gemspec
CHANGED
|
@@ -18,7 +18,7 @@ Gem::Specification.new do |spec|
|
|
|
18
18
|
spec.files = Dir['lib/**/*.rb', 'plugins.rb', 'README.md', 'LICENSE', 'bundler-git-slim.gemspec']
|
|
19
19
|
spec.require_paths = ['lib']
|
|
20
20
|
|
|
21
|
-
spec.add_dependency 'bundler', '>= 2.0'
|
|
21
|
+
spec.add_dependency 'bundler', '>= 2.0', '< 5'
|
|
22
22
|
|
|
23
23
|
spec.metadata = {
|
|
24
24
|
'homepage_uri' => spec.homepage,
|
data/lib/bundler_git_slim.rb
CHANGED
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: bundler-git-slim
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.
|
|
4
|
+
version: 1.0.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Sveta Markovic
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2026-01-
|
|
11
|
+
date: 2026-01-28 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: bundler
|
|
@@ -17,6 +17,9 @@ dependencies:
|
|
|
17
17
|
- - ">="
|
|
18
18
|
- !ruby/object:Gem::Version
|
|
19
19
|
version: '2.0'
|
|
20
|
+
- - "<"
|
|
21
|
+
- !ruby/object:Gem::Version
|
|
22
|
+
version: '5'
|
|
20
23
|
type: :runtime
|
|
21
24
|
prerelease: false
|
|
22
25
|
version_requirements: !ruby/object:Gem::Requirement
|
|
@@ -24,6 +27,9 @@ dependencies:
|
|
|
24
27
|
- - ">="
|
|
25
28
|
- !ruby/object:Gem::Version
|
|
26
29
|
version: '2.0'
|
|
30
|
+
- - "<"
|
|
31
|
+
- !ruby/object:Gem::Version
|
|
32
|
+
version: '5'
|
|
27
33
|
description: Bundler plugin that slims git-installed gems down to spec.files.
|
|
28
34
|
email:
|
|
29
35
|
- svetislav.markovic@pm.me
|