bundle_filter 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 +4 -4
- data/.github/issue_template.md +11 -0
- data/.github/pull_request_template.md +19 -0
- data/.github/workflows/rubocop_and_rspec.yml +26 -0
- data/.gitignore +3 -0
- data/.rubocop.yml +52 -0
- data/CHANGELOG.md +41 -0
- data/Gemfile +9 -3
- data/Gemfile.lock +33 -1
- data/README.md +15 -2
- data/Rakefile +8 -3
- data/bin/console +3 -3
- data/bundle_filter.gemspec +16 -17
- data/lib/bundle_filter/source.rb +38 -4
- data/lib/bundle_filter/{rubygems.rb → source_rubygems.rb} +15 -9
- data/lib/bundle_filter/version.rb +1 -1
- data/lib/bundle_filter.rb +2 -6
- metadata +14 -13
- data/lib/bundle_filter/cli.rb +0 -15
- data/lib/bundle_filter/configuration.rb +0 -24
- data/lib/bundle_filter/git.rb +0 -19
- data/lib/bundle_filter/install.rb +0 -96
- data/lib/bundle_filter/metadata.rb +0 -6
- data/lib/bundle_filter/path.rb +0 -9
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 23973febc234a75f39b20f397dbe1ca8a839c85937a98111e9091a9dee7282b8
|
4
|
+
data.tar.gz: aa4fb1509bf7e58d4edd2ac53d054631588ca88a112cf7005d0c6ddcbc84d5d7
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 736ec554fea256457ac95f38c77ebda38eb31dd257883168eef2f503c18376d3bb41c5439355c6c6ed00c4c23d91cc1b280a40b273dffaee085b213dc247b2bc
|
7
|
+
data.tar.gz: 3f6c05ded3d18391a733e8ccade3fef9d147947be66383600d02c6e64a51195091c8979b8f0bd89483b0a3703fe3a09814c311243a2c0f71cee05d3ab7c7210c
|
@@ -0,0 +1,19 @@
|
|
1
|
+
## New Features
|
2
|
+
|
3
|
+
Write here your new features.
|
4
|
+
|
5
|
+
## Fixes
|
6
|
+
|
7
|
+
Write here your fixes.
|
8
|
+
|
9
|
+
## Changes
|
10
|
+
|
11
|
+
Changes proposed in this pull request:
|
12
|
+
* Replace
|
13
|
+
* With your
|
14
|
+
* Changes
|
15
|
+
|
16
|
+
## Make sure your PR attent this requeriments
|
17
|
+
|
18
|
+
- [X] Write your code for new features and bug fixes.
|
19
|
+
- [X] Make sure that your pull request includes entry in the [CHANGELOG](CHANGELOG.md).
|
@@ -0,0 +1,26 @@
|
|
1
|
+
name: Rubocop and RSpec
|
2
|
+
on:
|
3
|
+
push:
|
4
|
+
branches: [ "main" ]
|
5
|
+
pull_request:
|
6
|
+
branches: [ "main" ]
|
7
|
+
|
8
|
+
permissions:
|
9
|
+
contents: read
|
10
|
+
|
11
|
+
jobs:
|
12
|
+
test:
|
13
|
+
runs-on: ubuntu-latest
|
14
|
+
strategy:
|
15
|
+
matrix:
|
16
|
+
ruby-version: ['2.6', '2.7', '3.0', '3.1', '3.2']
|
17
|
+
|
18
|
+
steps:
|
19
|
+
- uses: actions/checkout@v3
|
20
|
+
- name: Set up Ruby
|
21
|
+
uses: ruby/setup-ruby@v1
|
22
|
+
with:
|
23
|
+
ruby-version: ${{ matrix.ruby-version }}
|
24
|
+
bundler-cache: true
|
25
|
+
- name: Run tests
|
26
|
+
run: bundle exec rake
|
data/.gitignore
CHANGED
data/.rubocop.yml
ADDED
@@ -0,0 +1,52 @@
|
|
1
|
+
AllCops:
|
2
|
+
TargetRubyVersion: 2.6
|
3
|
+
NewCops: enable
|
4
|
+
|
5
|
+
require:
|
6
|
+
- rubocop-rake
|
7
|
+
- rubocop-rspec
|
8
|
+
|
9
|
+
Metrics/ClassLength:
|
10
|
+
Enabled: false
|
11
|
+
|
12
|
+
Metrics/MethodLength:
|
13
|
+
Enabled: false
|
14
|
+
|
15
|
+
Metrics/PerceivedComplexity:
|
16
|
+
Enabled: false
|
17
|
+
|
18
|
+
Metrics/CyclomaticComplexity:
|
19
|
+
Enabled: false
|
20
|
+
|
21
|
+
Metrics/AbcSize:
|
22
|
+
Enabled: false
|
23
|
+
|
24
|
+
Style/ClassAndModuleChildren:
|
25
|
+
Enabled: false
|
26
|
+
|
27
|
+
Style/HashSyntax:
|
28
|
+
Enabled: false
|
29
|
+
|
30
|
+
Style/IfUnlessModifier:
|
31
|
+
Enabled: false
|
32
|
+
|
33
|
+
Style/OptionalBooleanParameter:
|
34
|
+
Enabled: false
|
35
|
+
|
36
|
+
Layout/LineLength:
|
37
|
+
Enabled: false
|
38
|
+
|
39
|
+
Layout/ArgumentAlignment:
|
40
|
+
Enabled: false
|
41
|
+
|
42
|
+
Style/Documentation:
|
43
|
+
Enabled: false
|
44
|
+
|
45
|
+
Style/FrozenStringLiteralComment:
|
46
|
+
Enabled: false
|
47
|
+
|
48
|
+
RSpec/ExampleLength:
|
49
|
+
Enabled: false
|
50
|
+
|
51
|
+
RSpec/MultipleExpectations:
|
52
|
+
Enabled: false
|
data/CHANGELOG.md
ADDED
@@ -0,0 +1,41 @@
|
|
1
|
+
# Change Log
|
2
|
+
|
3
|
+
## [Next](https://github.com/dfop02/bundle_filter/tree/HEAD)
|
4
|
+
[Full Changelog](https://github.com/dfop02/bundle_filter/compare/0.3.0...HEAD)
|
5
|
+
|
6
|
+
## [0.3.0](https://github.com/dfop02/bundle_filter/releases/tag/0.3.0)
|
7
|
+
02 May 2023 - [Full Changelog](https://github.com/dfop02/bundle_filter/compare/0.2.0...0.3.0)
|
8
|
+
|
9
|
+
#### New features
|
10
|
+
|
11
|
+
* Update Readme for better understand.
|
12
|
+
* Add Rubocop to gem.
|
13
|
+
* Add Github Workflows and Templates.
|
14
|
+
* Add few tests, but they're still incomplete.
|
15
|
+
* Update Rakefile to run Rubocop and RSpec.
|
16
|
+
|
17
|
+
#### Bug fixes
|
18
|
+
|
19
|
+
* Fix RSpec.
|
20
|
+
|
21
|
+
## [0.2.0](https://github.com/dfop02/bundle_filter/releases/tag/0.2.0)
|
22
|
+
19 April 2023 - [Full Changelog](https://github.com/dfop02/bundle_filter/compare/0.1.0...0.2.0)
|
23
|
+
|
24
|
+
#### New features
|
25
|
+
|
26
|
+
* None
|
27
|
+
|
28
|
+
#### Bug fixes
|
29
|
+
|
30
|
+
* Fix 'Failed to install plugin'
|
31
|
+
|
32
|
+
## [0.1.0](https://github.com/dfop02/bundle_filter/releases/tag/0.1.0)
|
33
|
+
19 April 2023
|
34
|
+
|
35
|
+
#### New features
|
36
|
+
|
37
|
+
* Remove useless information from bundle install to make it more clean.
|
38
|
+
|
39
|
+
#### Bug fixes
|
40
|
+
|
41
|
+
* None
|
data/Gemfile
CHANGED
@@ -1,9 +1,15 @@
|
|
1
|
-
source
|
1
|
+
source 'https://rubygems.org'
|
2
2
|
|
3
3
|
# Specify your gem's dependencies in bundler-filter.gemspec
|
4
4
|
gemspec
|
5
5
|
|
6
6
|
group :development do
|
7
|
-
gem
|
8
|
-
gem
|
7
|
+
gem 'rake', '~> 12.0'
|
8
|
+
gem 'rspec', '~> 3.0'
|
9
|
+
end
|
10
|
+
|
11
|
+
group :rubocop do
|
12
|
+
gem 'rubocop', require: false
|
13
|
+
gem 'rubocop-rake', require: false
|
14
|
+
gem 'rubocop-rspec', require: false
|
9
15
|
end
|
data/Gemfile.lock
CHANGED
@@ -1,13 +1,21 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
bundle_filter (0.
|
4
|
+
bundle_filter (0.3.0)
|
5
5
|
|
6
6
|
GEM
|
7
7
|
remote: https://rubygems.org/
|
8
8
|
specs:
|
9
|
+
ast (2.4.2)
|
9
10
|
diff-lcs (1.5.0)
|
11
|
+
json (2.6.3)
|
12
|
+
parallel (1.23.0)
|
13
|
+
parser (3.2.2.1)
|
14
|
+
ast (~> 2.4.1)
|
15
|
+
rainbow (3.1.1)
|
10
16
|
rake (12.3.3)
|
17
|
+
regexp_parser (2.8.0)
|
18
|
+
rexml (3.2.5)
|
11
19
|
rspec (3.12.0)
|
12
20
|
rspec-core (~> 3.12.0)
|
13
21
|
rspec-expectations (~> 3.12.0)
|
@@ -21,6 +29,27 @@ GEM
|
|
21
29
|
diff-lcs (>= 1.2.0, < 2.0)
|
22
30
|
rspec-support (~> 3.12.0)
|
23
31
|
rspec-support (3.12.0)
|
32
|
+
rubocop (1.50.2)
|
33
|
+
json (~> 2.3)
|
34
|
+
parallel (~> 1.10)
|
35
|
+
parser (>= 3.2.0.0)
|
36
|
+
rainbow (>= 2.2.2, < 4.0)
|
37
|
+
regexp_parser (>= 1.8, < 3.0)
|
38
|
+
rexml (>= 3.2.5, < 4.0)
|
39
|
+
rubocop-ast (>= 1.28.0, < 2.0)
|
40
|
+
ruby-progressbar (~> 1.7)
|
41
|
+
unicode-display_width (>= 2.4.0, < 3.0)
|
42
|
+
rubocop-ast (1.28.1)
|
43
|
+
parser (>= 3.2.1.0)
|
44
|
+
rubocop-capybara (2.18.0)
|
45
|
+
rubocop (~> 1.41)
|
46
|
+
rubocop-rake (0.6.0)
|
47
|
+
rubocop (~> 1.0)
|
48
|
+
rubocop-rspec (2.20.0)
|
49
|
+
rubocop (~> 1.33)
|
50
|
+
rubocop-capybara (~> 2.17)
|
51
|
+
ruby-progressbar (1.13.0)
|
52
|
+
unicode-display_width (2.4.2)
|
24
53
|
|
25
54
|
PLATFORMS
|
26
55
|
ruby
|
@@ -29,6 +58,9 @@ DEPENDENCIES
|
|
29
58
|
bundle_filter!
|
30
59
|
rake (~> 12.0)
|
31
60
|
rspec (~> 3.0)
|
61
|
+
rubocop
|
62
|
+
rubocop-rake
|
63
|
+
rubocop-rspec
|
32
64
|
|
33
65
|
BUNDLED WITH
|
34
66
|
2.1.4
|
data/README.md
CHANGED
@@ -4,7 +4,11 @@ A filter for bundle that removes useless info when run bundle
|
|
4
4
|
|
5
5
|
## Installation
|
6
6
|
|
7
|
-
|
7
|
+
You can install by command line using
|
8
|
+
|
9
|
+
$ bundler plugin install bundle_filter
|
10
|
+
|
11
|
+
or add this line to your application's Gemfile:
|
8
12
|
|
9
13
|
```ruby
|
10
14
|
plugin 'bundle_filter'
|
@@ -18,11 +22,20 @@ After install, every time you execute:
|
|
18
22
|
|
19
23
|
this plugin will remove useless info from bundle install like unchanged gems "Using gem x.y.z"
|
20
24
|
|
25
|
+
## Uninstall
|
26
|
+
|
27
|
+
For uninstall the plugin from your application, you must run code above even if you install from Gemfile (only available on Bundler >= 2.2.0)
|
28
|
+
|
29
|
+
$ bundler plugin uninstall bundle_filter
|
30
|
+
|
31
|
+
If your Bundler < 2.2.0, you should instead go to root of your project and delete de `.bundle/plugin/` folder, will work as well.
|
32
|
+
|
21
33
|
## To-do
|
22
34
|
|
23
|
-
New features that
|
35
|
+
New features ideas that may be interesting to add if more users want too
|
24
36
|
- Set config file to give freedom to user select which show up
|
25
37
|
- Remove or simplify "Complete" final mensage
|
38
|
+
- Add a "pretty" bundle install?
|
26
39
|
- Add progress-bar to bundle install gem?
|
27
40
|
|
28
41
|
## Contributing
|
data/Rakefile
CHANGED
@@ -1,6 +1,11 @@
|
|
1
|
-
require
|
2
|
-
require
|
1
|
+
require 'bundler/gem_tasks'
|
2
|
+
require 'rspec/core/rake_task'
|
3
|
+
require 'rubocop/rake_task'
|
4
|
+
|
5
|
+
RuboCop::RakeTask.new(:rubocop) do |t|
|
6
|
+
t.options = ['--display-cop-names']
|
7
|
+
end
|
3
8
|
|
4
9
|
RSpec::Core::RakeTask.new(:spec)
|
5
10
|
|
6
|
-
task default:
|
11
|
+
task default: %i[rubocop spec]
|
data/bin/console
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
#!/usr/bin/env ruby
|
2
2
|
|
3
|
-
require
|
4
|
-
require
|
3
|
+
require 'bundler/setup'
|
4
|
+
require 'bundler/filter'
|
5
5
|
|
6
6
|
# You can add fixtures and/or initialization code here to make experimenting
|
7
7
|
# with your gem easier. You can also use a different console, if you like.
|
@@ -10,5 +10,5 @@ require "bundler/filter"
|
|
10
10
|
# require "pry"
|
11
11
|
# Pry.start
|
12
12
|
|
13
|
-
require
|
13
|
+
require 'irb'
|
14
14
|
IRB.start(__FILE__)
|
data/bundle_filter.gemspec
CHANGED
@@ -1,28 +1,28 @@
|
|
1
1
|
require_relative 'lib/bundle_filter/version'
|
2
2
|
|
3
3
|
Gem::Specification.new do |spec|
|
4
|
-
spec.name
|
5
|
-
spec.version
|
6
|
-
spec.authors
|
7
|
-
spec.email
|
8
|
-
|
9
|
-
spec.
|
10
|
-
spec.
|
11
|
-
spec.
|
12
|
-
spec.license = "MIT"
|
4
|
+
spec.name = 'bundle_filter'
|
5
|
+
spec.version = BundleFilter::VERSION
|
6
|
+
spec.authors = ['Diogo Fernandes']
|
7
|
+
spec.email = ['diogofernandesop@gmail.com']
|
8
|
+
spec.summary = 'Filter bundle install output.'
|
9
|
+
spec.description = 'A filter for bundle that removes useless info when run bundle.'
|
10
|
+
spec.homepage = 'https://github.com/dfop02/bundle_filter'
|
11
|
+
spec.license = 'MIT'
|
13
12
|
|
14
13
|
spec.metadata = {
|
15
14
|
'allowed_push_host' => 'https://rubygems.org',
|
16
|
-
'bug_tracker_uri'
|
17
|
-
'changelog_uri'
|
18
|
-
'homepage_uri'
|
19
|
-
'documentation_uri' =>
|
20
|
-
'source_code_uri'
|
15
|
+
'bug_tracker_uri' => "#{spec.homepage}/issues",
|
16
|
+
'changelog_uri' => "#{spec.homepage}/blob/#{spec.version}/Changelog.md",
|
17
|
+
'homepage_uri' => spec.homepage,
|
18
|
+
'documentation_uri' => spec.homepage,
|
19
|
+
'source_code_uri' => spec.homepage,
|
20
|
+
'rubygems_mfa_required' => 'true'
|
21
21
|
}
|
22
22
|
|
23
23
|
# Specify which files should be added to the gem when it is released.
|
24
24
|
# The `git ls-files -z` loads the files in the RubyGem that have been added into git.
|
25
|
-
spec.files
|
25
|
+
spec.files = Dir.chdir(File.expand_path(__dir__)) do
|
26
26
|
`git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
|
27
27
|
end
|
28
28
|
spec.rdoc_options = ['--charset=UTF-8']
|
@@ -30,8 +30,7 @@ Gem::Specification.new do |spec|
|
|
30
30
|
spec.require_path = 'lib'
|
31
31
|
spec.bindir = 'exe'
|
32
32
|
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
33
|
-
spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
|
34
33
|
spec.require_paths = ['lib']
|
35
34
|
|
36
|
-
spec.required_ruby_version = Gem::Requirement.new('>= 2.
|
35
|
+
spec.required_ruby_version = Gem::Requirement.new('>= 2.6.0')
|
37
36
|
end
|
data/lib/bundle_filter/source.rb
CHANGED
@@ -1,9 +1,43 @@
|
|
1
1
|
class Bundler::Source
|
2
|
-
def
|
3
|
-
|
4
|
-
|
2
|
+
def version_message(spec, locked_spec = nil)
|
3
|
+
message = spec.name.to_s
|
4
|
+
|
5
|
+
if locked_spec
|
6
|
+
locked_spec_version = locked_spec.version
|
7
|
+
if locked_spec_version && spec.version != locked_spec_version
|
8
|
+
message += Bundler.ui.add_color(' [', :white)
|
9
|
+
message += Bundler.ui.add_color(locked_spec_version.to_s, version_color(locked_spec_version, spec.version))
|
10
|
+
message += Bundler.ui.add_color(' => ', :white)
|
11
|
+
message += Bundler.ui.add_color(spec.version.to_s, version_color(spec.version, locked_spec_version))
|
12
|
+
message += Bundler.ui.add_color(']', :white)
|
13
|
+
end
|
14
|
+
end
|
15
|
+
message += " #{spec.version}" unless message.include?('=>')
|
16
|
+
message += " (#{spec.platform})" if spec.platform != Gem::Platform::RUBY && !spec.platform.nil?
|
17
|
+
|
18
|
+
message
|
19
|
+
end
|
20
|
+
|
21
|
+
private
|
22
|
+
|
23
|
+
def version_color(spec_version, locked_spec_version)
|
24
|
+
if Gem::Version.correct?(spec_version) && Gem::Version.correct?(locked_spec_version)
|
25
|
+
# display yellow if there appears to be a regression
|
26
|
+
earlier_version?(spec_version, locked_spec_version) ? :yellow : :green
|
5
27
|
else
|
6
|
-
|
28
|
+
# default to green if the versions cannot be directly compared
|
29
|
+
:green
|
7
30
|
end
|
8
31
|
end
|
32
|
+
|
33
|
+
def earlier_version?(spec_version, locked_spec_version)
|
34
|
+
Gem::Version.new(spec_version) < Gem::Version.new(locked_spec_version)
|
35
|
+
end
|
36
|
+
|
37
|
+
def print_using_message(message)
|
38
|
+
# suppress_install_using_messages
|
39
|
+
# ignore 'suppress_install_using_messages' flag because was
|
40
|
+
# introduced on bundler > 3
|
41
|
+
message.include?('=>') ? Bundler.ui.info(message) : Bundler.ui.debug(message)
|
42
|
+
end
|
9
43
|
end
|
@@ -9,13 +9,11 @@ class Bundler::Source::Rubygems
|
|
9
9
|
end
|
10
10
|
|
11
11
|
if installed?(spec) && !force
|
12
|
-
#
|
13
|
-
|
14
|
-
return nil # no post-install message
|
12
|
+
print_using_message("Using #{version_message(spec, options[:previous_spec])}")
|
13
|
+
return nil
|
15
14
|
end
|
16
15
|
|
17
16
|
if spec.remote
|
18
|
-
# Check for this spec from other sources
|
19
17
|
uris = [spec.remote, *remotes_for_spec(spec)].map(&:anonymized_uri).uniq
|
20
18
|
Installer.ambiguous_gems << [spec.name, *uris] if uris.length > 1
|
21
19
|
end
|
@@ -28,11 +26,11 @@ class Bundler::Source::Rubygems
|
|
28
26
|
install_path = rubygems_dir
|
29
27
|
bin_path = Bundler.system_bindir
|
30
28
|
|
31
|
-
|
29
|
+
require 'bundler/rubygems_gem_installer'
|
32
30
|
|
33
31
|
installer = Bundler::RubyGemsGemInstaller.at(
|
34
32
|
path,
|
35
|
-
:security_policy => Bundler.rubygems.security_policies[Bundler.settings[
|
33
|
+
:security_policy => Bundler.rubygems.security_policies[Bundler.settings['trust-policy']],
|
36
34
|
:install_dir => install_path.to_s,
|
37
35
|
:bin_dir => bin_path.to_s,
|
38
36
|
:ignore_dependencies => true,
|
@@ -51,7 +49,7 @@ class Bundler::Source::Rubygems
|
|
51
49
|
raise
|
52
50
|
rescue Gem::Security::Exception => e
|
53
51
|
raise SecurityError,
|
54
|
-
"The gem #{File.basename(path,
|
52
|
+
"The gem #{File.basename(path, '.gem')} can't be installed because " \
|
55
53
|
"the security policy didn't allow it, with the message: #{e.message}"
|
56
54
|
end
|
57
55
|
|
@@ -59,8 +57,8 @@ class Bundler::Source::Rubygems
|
|
59
57
|
end
|
60
58
|
|
61
59
|
message = "Installing #{version_message(spec, options[:previous_spec])}"
|
62
|
-
message +=
|
63
|
-
Bundler.ui.confirm
|
60
|
+
message += ' with native extensions' if spec.extensions.any?
|
61
|
+
Bundler.ui.confirm(message)
|
64
62
|
|
65
63
|
installed_spec = installer.install
|
66
64
|
|
@@ -69,4 +67,12 @@ class Bundler::Source::Rubygems
|
|
69
67
|
|
70
68
|
spec.post_install_message
|
71
69
|
end
|
70
|
+
|
71
|
+
private
|
72
|
+
|
73
|
+
def download_gem(spec, download_cache_path, _previous_spec = nil)
|
74
|
+
uri = spec.remote.uri
|
75
|
+
Bundler.ui.confirm("Fetching #{version_message(spec, nil)}")
|
76
|
+
Bundler.rubygems.download_gem(spec, uri, download_cache_path)
|
77
|
+
end
|
72
78
|
end
|
data/lib/bundle_filter.rb
CHANGED
@@ -1,11 +1,7 @@
|
|
1
|
+
# require 'progressbar'
|
1
2
|
require 'bundler'
|
2
|
-
require 'bundle_filter/configuration'
|
3
|
-
require 'bundle_filter/cli'
|
4
3
|
require 'bundle_filter/source'
|
5
|
-
require 'bundle_filter/
|
6
|
-
require 'bundle_filter/metadata'
|
7
|
-
require 'bundle_filter/git'
|
8
|
-
require 'bundle_filter/path'
|
4
|
+
require 'bundle_filter/source_rubygems'
|
9
5
|
|
10
6
|
module BundleFilter
|
11
7
|
Bundler::Plugin.add_hook('before-install-all') do |dependencies|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: bundle_filter
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.3.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Diogo Fernandes
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-
|
11
|
+
date: 2023-05-10 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description: A filter for bundle that removes useless info when run bundle.
|
14
14
|
email:
|
@@ -17,11 +17,17 @@ executables: []
|
|
17
17
|
extensions: []
|
18
18
|
extra_rdoc_files:
|
19
19
|
- README.md
|
20
|
+
- CHANGELOG.md
|
20
21
|
- LICENSE
|
21
22
|
files:
|
23
|
+
- ".github/issue_template.md"
|
24
|
+
- ".github/pull_request_template.md"
|
25
|
+
- ".github/workflows/rubocop_and_rspec.yml"
|
22
26
|
- ".gitignore"
|
23
27
|
- ".rspec"
|
28
|
+
- ".rubocop.yml"
|
24
29
|
- ".travis.yml"
|
30
|
+
- CHANGELOG.md
|
25
31
|
- Gemfile
|
26
32
|
- Gemfile.lock
|
27
33
|
- LICENSE
|
@@ -31,14 +37,8 @@ files:
|
|
31
37
|
- bin/setup
|
32
38
|
- bundle_filter.gemspec
|
33
39
|
- lib/bundle_filter.rb
|
34
|
-
- lib/bundle_filter/cli.rb
|
35
|
-
- lib/bundle_filter/configuration.rb
|
36
|
-
- lib/bundle_filter/git.rb
|
37
|
-
- lib/bundle_filter/install.rb
|
38
|
-
- lib/bundle_filter/metadata.rb
|
39
|
-
- lib/bundle_filter/path.rb
|
40
|
-
- lib/bundle_filter/rubygems.rb
|
41
40
|
- lib/bundle_filter/source.rb
|
41
|
+
- lib/bundle_filter/source_rubygems.rb
|
42
42
|
- lib/bundle_filter/version.rb
|
43
43
|
- plugins.rb
|
44
44
|
homepage: https://github.com/dfop02/bundle_filter
|
@@ -47,10 +47,11 @@ licenses:
|
|
47
47
|
metadata:
|
48
48
|
allowed_push_host: https://rubygems.org
|
49
49
|
bug_tracker_uri: https://github.com/dfop02/bundle_filter/issues
|
50
|
-
changelog_uri: https://github.com/dfop02/bundle_filter/blob/0.
|
50
|
+
changelog_uri: https://github.com/dfop02/bundle_filter/blob/0.3.0/Changelog.md
|
51
51
|
homepage_uri: https://github.com/dfop02/bundle_filter
|
52
|
-
documentation_uri: https://
|
52
|
+
documentation_uri: https://github.com/dfop02/bundle_filter
|
53
53
|
source_code_uri: https://github.com/dfop02/bundle_filter
|
54
|
+
rubygems_mfa_required: 'true'
|
54
55
|
post_install_message:
|
55
56
|
rdoc_options:
|
56
57
|
- "--charset=UTF-8"
|
@@ -60,14 +61,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
60
61
|
requirements:
|
61
62
|
- - ">="
|
62
63
|
- !ruby/object:Gem::Version
|
63
|
-
version: 2.
|
64
|
+
version: 2.6.0
|
64
65
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
65
66
|
requirements:
|
66
67
|
- - ">="
|
67
68
|
- !ruby/object:Gem::Version
|
68
69
|
version: '0'
|
69
70
|
requirements: []
|
70
|
-
rubygems_version: 3.
|
71
|
+
rubygems_version: 3.4.12
|
71
72
|
signing_key:
|
72
73
|
specification_version: 4
|
73
74
|
summary: Filter bundle install output.
|
data/lib/bundle_filter/cli.rb
DELETED
@@ -1,15 +0,0 @@
|
|
1
|
-
class Bundler::CLI
|
2
|
-
def install
|
3
|
-
SharedHelpers.major_deprecation(2, "The `--force` option has been renamed to `--redownload`") if ARGV.include?("--force")
|
4
|
-
|
5
|
-
%w[clean deployment frozen no-cache no-prune path shebang system without with].each do |option|
|
6
|
-
remembered_flag_deprecation(option)
|
7
|
-
end
|
8
|
-
|
9
|
-
# Try reload cli install to change the complete msg
|
10
|
-
require_relative "install"
|
11
|
-
Bundler.settings.temporary(no_install: false) do
|
12
|
-
Install.new(options.dup).run
|
13
|
-
end
|
14
|
-
end
|
15
|
-
end
|
@@ -1,24 +0,0 @@
|
|
1
|
-
module BundleFilter
|
2
|
-
class Configuration
|
3
|
-
PRETTY = true
|
4
|
-
STYLE = 'boxes'
|
5
|
-
|
6
|
-
class << self
|
7
|
-
def pretty
|
8
|
-
PRETTY
|
9
|
-
end
|
10
|
-
|
11
|
-
def style
|
12
|
-
STYLE
|
13
|
-
end
|
14
|
-
|
15
|
-
def default_style?
|
16
|
-
STYLE == 'default'
|
17
|
-
end
|
18
|
-
|
19
|
-
def boxes_style?
|
20
|
-
STYLE == 'boxes'
|
21
|
-
end
|
22
|
-
end
|
23
|
-
end
|
24
|
-
end
|
data/lib/bundle_filter/git.rb
DELETED
@@ -1,19 +0,0 @@
|
|
1
|
-
class Bundler::Source::Git
|
2
|
-
def install(spec, options = {})
|
3
|
-
force = options[:force]
|
4
|
-
|
5
|
-
print_using_message "Using #{version_message(spec, options[:previous_spec])} from #{self}" unless BundleFilter::Configuration.pretty
|
6
|
-
|
7
|
-
if (requires_checkout? && !@copied) || force
|
8
|
-
Bundler.ui.debug " * Checking out revision: #{ref}"
|
9
|
-
git_proxy.copy_to(install_path, submodules)
|
10
|
-
serialize_gemspecs_in(install_path)
|
11
|
-
@copied = true
|
12
|
-
end
|
13
|
-
|
14
|
-
generate_bin_options = { :disable_extensions => !Bundler.rubygems.spec_missing_extensions?(spec), :build_args => options[:build_args] }
|
15
|
-
generate_bin(spec, generate_bin_options)
|
16
|
-
|
17
|
-
requires_checkout? ? spec.post_install_message : nil
|
18
|
-
end
|
19
|
-
end
|
@@ -1,96 +0,0 @@
|
|
1
|
-
class Bundler::CLI::Install
|
2
|
-
def run
|
3
|
-
Bundler.ui.level = "warn" if options[:quiet]
|
4
|
-
|
5
|
-
warn_if_root
|
6
|
-
|
7
|
-
Bundler.self_manager.install_locked_bundler_and_restart_with_it_if_needed
|
8
|
-
|
9
|
-
Bundler::SharedHelpers.set_env "RB_USER_INSTALL", "1" if Bundler::FREEBSD
|
10
|
-
|
11
|
-
# Disable color in deployment mode
|
12
|
-
Bundler.ui.shell = Thor::Shell::Basic.new if options[:deployment]
|
13
|
-
|
14
|
-
check_for_options_conflicts
|
15
|
-
|
16
|
-
check_trust_policy
|
17
|
-
|
18
|
-
if options[:deployment] || options[:frozen] || Bundler.frozen_bundle?
|
19
|
-
unless Bundler.default_lockfile.exist?
|
20
|
-
flag = "--deployment flag" if options[:deployment]
|
21
|
-
flag ||= "--frozen flag" if options[:frozen]
|
22
|
-
flag ||= "deployment setting"
|
23
|
-
raise ProductionError, "The #{flag} requires a #{Bundler.default_lockfile.relative_path_from(SharedHelpers.pwd)}. Please make " \
|
24
|
-
"sure you have checked your #{Bundler.default_lockfile.relative_path_from(SharedHelpers.pwd)} into version control " \
|
25
|
-
"before deploying."
|
26
|
-
end
|
27
|
-
|
28
|
-
options[:local] = true if Bundler.app_cache.exist?
|
29
|
-
|
30
|
-
Bundler.settings.set_command_option :deployment, true if options[:deployment]
|
31
|
-
Bundler.settings.set_command_option :frozen, true if options[:frozen]
|
32
|
-
end
|
33
|
-
|
34
|
-
# When install is called with --no-deployment, disable deployment mode
|
35
|
-
if options[:deployment] == false
|
36
|
-
Bundler.settings.set_command_option :frozen, nil
|
37
|
-
options[:system] = true
|
38
|
-
end
|
39
|
-
|
40
|
-
normalize_settings
|
41
|
-
|
42
|
-
Bundler::Fetcher.disable_endpoint = options["full-index"]
|
43
|
-
|
44
|
-
if options["binstubs"]
|
45
|
-
Bundler::SharedHelpers.major_deprecation 2,
|
46
|
-
"The --binstubs option will be removed in favor of `bundle binstubs --all`"
|
47
|
-
end
|
48
|
-
|
49
|
-
Plugin.gemfile_install(Bundler.default_gemfile) if Bundler.feature_flag.plugins?
|
50
|
-
|
51
|
-
definition = Bundler.definition
|
52
|
-
definition.validate_runtime!
|
53
|
-
|
54
|
-
installer = Installer.install(Bundler.root, definition, options)
|
55
|
-
|
56
|
-
Bundler.settings.temporary(cache_all_platforms: options[:local] ? false : Bundler.settings[:cache_all_platforms]) do
|
57
|
-
Bundler.load.cache(nil, options[:local]) if Bundler.app_cache.exist? && !options["no-cache"] && !Bundler.frozen_bundle?
|
58
|
-
end
|
59
|
-
|
60
|
-
complete_msg = "Bundle complete! #{dependencies_count_for(definition)}, #{gems_installed_for(definition)}."
|
61
|
-
|
62
|
-
puts BundleFilter::Configuration.style
|
63
|
-
if BundleFilter::Configuration.default_style?
|
64
|
-
Bundler.ui.confirm complete_msg
|
65
|
-
elsif BundleFilter::Configuration.boxes_style?
|
66
|
-
box_style = ("-" * complete_msg.length).insert(0, '|').insert(-1, '|')
|
67
|
-
Bundler.ui.confirm box_style
|
68
|
-
Bundler.ui.confirm complete_msg.insert(0, '|').insert(-1, '|')
|
69
|
-
Bundler.ui.confirm box_style
|
70
|
-
end
|
71
|
-
|
72
|
-
Bundler::CLI::Common.output_without_groups_message(:install)
|
73
|
-
|
74
|
-
# disable final message
|
75
|
-
# if Bundler.use_system_gems?
|
76
|
-
# Bundler.ui.confirm "Use `bundle info [gemname]` to see where a bundled gem is installed."
|
77
|
-
# else
|
78
|
-
# relative_path = Bundler.configured_bundle_path.base_path_relative_to_pwd
|
79
|
-
# Bundler.ui.confirm "Bundled gems are installed into `#{relative_path}`"
|
80
|
-
# end
|
81
|
-
|
82
|
-
Bundler::CLI::Common.output_post_install_messages installer.post_install_messages
|
83
|
-
|
84
|
-
warn_ambiguous_gems
|
85
|
-
|
86
|
-
if CLI::Common.clean_after_install?
|
87
|
-
require_relative "clean"
|
88
|
-
Bundler::CLI::Clean.new(options).run
|
89
|
-
end
|
90
|
-
|
91
|
-
Bundler::CLI::Common.output_fund_metadata_summary
|
92
|
-
rescue Gem::InvalidSpecificationException
|
93
|
-
Bundler.ui.warn "You have one or more invalid gemspecs that need to be fixed."
|
94
|
-
raise
|
95
|
-
end
|
96
|
-
end
|
data/lib/bundle_filter/path.rb
DELETED
@@ -1,9 +0,0 @@
|
|
1
|
-
class Bundler::Source::Path
|
2
|
-
def install(spec, options = {})
|
3
|
-
using_message = "Using #{version_message(spec, options[:previous_spec])} from #{self}"
|
4
|
-
using_message += " and installing its executables" unless spec.executables.empty?
|
5
|
-
print_using_message using_message unless BundleFilter::Configuration.pretty
|
6
|
-
generate_bin(spec, :disable_extensions => true)
|
7
|
-
nil # no post-install message
|
8
|
-
end
|
9
|
-
end
|