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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: dd1530d6e7b09fe8cb6a32c88dfdf95c54356e110c92637e4e8bae24c2d33846
4
- data.tar.gz: e337708c33e09392e1fc83d221042109569fc4c35b3b786cde1c8db911717376
3
+ metadata.gz: 4f723a2ee94eaff4346a86d5c591f076d9dd3bb09d5294657116d632b46cd45f
4
+ data.tar.gz: 0fcf98d7dd68116d53b70a958412b0f68b6eabc1d562dcee9cb01ea76b9654d6
5
5
  SHA512:
6
- metadata.gz: e700a2f17f55f7c474c98336d023bf90210271552ce234ac69d35fead52ddfb20273caea4950be4f9f7e3d3c248bf1d1cb66e68773000f7ce35f4c960069d9b6
7
- data.tar.gz: 5a6ac66a076d50205ab3a5e8117583997332afba46f4832a3c21e0931d6d689ba1ad6828822c531bacb3a5bc35b431a83e247383bb0ceb5845debf0c00dc5792
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
+ [![CI](https://github.com/svetam/bundler-git-slim/actions/workflows/ci.yml/badge.svg)](https://github.com/svetam/bundler-git-slim/actions/workflows/ci.yml)
4
+ [![Gem Version](https://badge.fury.io/rb/bundler-git-slim.svg)](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
@@ -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,
@@ -5,7 +5,7 @@ require 'set'
5
5
  require 'pathname'
6
6
 
7
7
  module BundlerGitSlim
8
- VERSION = '0.1.1'
8
+ VERSION = '1.0.0'
9
9
  UNITS = %w[B KB MB GB].freeze
10
10
 
11
11
  class << self
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.1.1
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-01 00:00:00.000000000 Z
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