bundler_install_stats 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA256:
3
+ metadata.gz: 5085ef61f5eac19c41432cf624de7530ed466c3cbaef0cc6e53351520d83bed0
4
+ data.tar.gz: d24f40026afecc95efe83c01e595026a3d4b7f66861b11154babaa3bf3472320
5
+ SHA512:
6
+ metadata.gz: 465211566c3c62f032fb936a0419006b1f9ebfeb5c0d409be6a226e14fb4f3ec5a96765d46488943796093778d1bbaac5e8f08859b2681143923811d830dc95f
7
+ data.tar.gz: 9800905769e64d9183cf52d05fd48e791d25ee82a5191c49d35f05f7891fe1a57c94db0f93a2436130e7fbcc1050d65e9d403d45b4a29682fbb226f7081399fa
@@ -0,0 +1,25 @@
1
+ name: CI
2
+ on: [push, pull_request]
3
+ jobs:
4
+ rubocop:
5
+ runs-on: ubuntu-latest
6
+ steps:
7
+ - uses: actions/checkout@v2
8
+ - uses: ruby/setup-ruby@v1
9
+ with:
10
+ ruby-version: '3.2'
11
+ bundler-cache: true
12
+ - run: bundle exec rake rubocop
13
+ tests:
14
+ runs-on: ubuntu-latest
15
+ strategy:
16
+ matrix:
17
+ ruby: ['2.7', '3.0', '3.1', '3.2']
18
+ name: Ruby ${{ matrix.ruby }}
19
+ steps:
20
+ - uses: actions/checkout@v2
21
+ - uses: ruby/setup-ruby@v1
22
+ with:
23
+ ruby-version: ${{ matrix.ruby }}
24
+ bundler-cache: true
25
+ - run: bundle exec rake test
@@ -0,0 +1,22 @@
1
+ name: Contributor License Agreement (CLA)
2
+
3
+ on:
4
+ pull_request_target:
5
+ types: [opened, synchronize]
6
+ issue_comment:
7
+ types: [created]
8
+
9
+ jobs:
10
+ cla:
11
+ runs-on: ubuntu-latest
12
+ if: |
13
+ (github.event.issue.pull_request
14
+ && !github.event.issue.pull_request.merged_at
15
+ && contains(github.event.comment.body, 'signed')
16
+ )
17
+ || (github.event.pull_request && !github.event.pull_request.merged)
18
+ steps:
19
+ - uses: Shopify/shopify-cla-action@v1
20
+ with:
21
+ github-token: ${{ secrets.GITHUB_TOKEN }}
22
+ cla-token: ${{ secrets.CLA_TOKEN }}
@@ -0,0 +1,24 @@
1
+ name: Release
2
+ on:
3
+ workflow_dispatch:
4
+ branches: [ main ]
5
+ jobs:
6
+ release:
7
+ runs-on: ubuntu-latest
8
+ steps:
9
+ - uses: actions/checkout@v2
10
+ - uses: ruby/setup-ruby@v1
11
+ with:
12
+ ruby-version: '3.1'
13
+ bundler-cache: true
14
+ - name: Install dependencies
15
+ run: if [[ $(uname) == "Darwin" ]]; then brew install graphviz; else sudo apt-get install graphviz; fi
16
+ - name: Test
17
+ run: bundle exec rake
18
+ - name: Build
19
+ run: gem build seafoam.gemspec
20
+ - name: Upload
21
+ uses: actions/upload-artifact@v3
22
+ with:
23
+ name: release-build
24
+ path: 'seafoam-*.gem'
data/.gitignore ADDED
@@ -0,0 +1,8 @@
1
+ /.bundle/
2
+ /.yardoc
3
+ /_yardoc/
4
+ /coverage/
5
+ /doc/
6
+ /pkg/
7
+ /spec/reports/
8
+ /tmp/
data/.rubocop.yml ADDED
@@ -0,0 +1,7 @@
1
+ inherit_gem:
2
+ rubocop-shopify: rubocop.yml
3
+
4
+ AllCops:
5
+ TargetRubyVersion: 2.7
6
+ SuggestExtensions: false
7
+ NewCops: disable
@@ -0,0 +1,128 @@
1
+ # Contributor Covenant Code of Conduct
2
+
3
+ ## Our Pledge
4
+
5
+ We as members, contributors, and leaders pledge to make participation in our
6
+ community a harassment-free experience for everyone, regardless of age, body
7
+ size, visible or invisible disability, ethnicity, sex characteristics, gender
8
+ identity and expression, level of experience, education, socio-economic status,
9
+ nationality, personal appearance, race, religion, or sexual identity
10
+ and orientation.
11
+
12
+ We pledge to act and interact in ways that contribute to an open, welcoming,
13
+ diverse, inclusive, and healthy community.
14
+
15
+ ## Our Standards
16
+
17
+ Examples of behavior that contributes to a positive environment for our
18
+ community include:
19
+
20
+ * Demonstrating empathy and kindness toward other people
21
+ * Being respectful of differing opinions, viewpoints, and experiences
22
+ * Giving and gracefully accepting constructive feedback
23
+ * Accepting responsibility and apologizing to those affected by our mistakes,
24
+ and learning from the experience
25
+ * Focusing on what is best not just for us as individuals, but for the
26
+ overall community
27
+
28
+ Examples of unacceptable behavior include:
29
+
30
+ * The use of sexualized language or imagery, and sexual attention or
31
+ advances of any kind
32
+ * Trolling, insulting or derogatory comments, and personal or political attacks
33
+ * Public or private harassment
34
+ * Publishing others' private information, such as a physical or email
35
+ address, without their explicit permission
36
+ * Other conduct which could reasonably be considered inappropriate in a
37
+ professional setting
38
+
39
+ ## Enforcement Responsibilities
40
+
41
+ Community leaders are responsible for clarifying and enforcing our standards of
42
+ acceptable behavior and will take appropriate and fair corrective action in
43
+ response to any behavior that they deem inappropriate, threatening, offensive,
44
+ or harmful.
45
+
46
+ Community leaders have the right and responsibility to remove, edit, or reject
47
+ comments, commits, code, wiki edits, issues, and other contributions that are
48
+ not aligned to this Code of Conduct, and will communicate reasons for moderation
49
+ decisions when appropriate.
50
+
51
+ ## Scope
52
+
53
+ This Code of Conduct applies within all community spaces, and also applies when
54
+ an individual is officially representing the community in public spaces.
55
+ Examples of representing our community include using an official e-mail address,
56
+ posting via an official social media account, or acting as an appointed
57
+ representative at an online or offline event.
58
+
59
+ ## Enforcement
60
+
61
+ Instances of abusive, harassing, or otherwise unacceptable behavior may be
62
+ reported to the community leaders responsible for enforcement at
63
+ opensource@shopify.com.
64
+ All complaints will be reviewed and investigated promptly and fairly.
65
+
66
+ All community leaders are obligated to respect the privacy and security of the
67
+ reporter of any incident.
68
+
69
+ ## Enforcement Guidelines
70
+
71
+ Community leaders will follow these Community Impact Guidelines in determining
72
+ the consequences for any action they deem in violation of this Code of Conduct:
73
+
74
+ ### 1. Correction
75
+
76
+ **Community Impact**: Use of inappropriate language or other behavior deemed
77
+ unprofessional or unwelcome in the community.
78
+
79
+ **Consequence**: A private, written warning from community leaders, providing
80
+ clarity around the nature of the violation and an explanation of why the
81
+ behavior was inappropriate. A public apology may be requested.
82
+
83
+ ### 2. Warning
84
+
85
+ **Community Impact**: A violation through a single incident or series
86
+ of actions.
87
+
88
+ **Consequence**: A warning with consequences for continued behavior. No
89
+ interaction with the people involved, including unsolicited interaction with
90
+ those enforcing the Code of Conduct, for a specified period of time. This
91
+ includes avoiding interactions in community spaces as well as external channels
92
+ like social media. Violating these terms may lead to a temporary or
93
+ permanent ban.
94
+
95
+ ### 3. Temporary Ban
96
+
97
+ **Community Impact**: A serious violation of community standards, including
98
+ sustained inappropriate behavior.
99
+
100
+ **Consequence**: A temporary ban from any sort of interaction or public
101
+ communication with the community for a specified period of time. No public or
102
+ private interaction with the people involved, including unsolicited interaction
103
+ with those enforcing the Code of Conduct, is allowed during this period.
104
+ Violating these terms may lead to a permanent ban.
105
+
106
+ ### 4. Permanent Ban
107
+
108
+ **Community Impact**: Demonstrating a pattern of violation of community
109
+ standards, including sustained inappropriate behavior, harassment of an
110
+ individual, or aggression toward or disparagement of classes of individuals.
111
+
112
+ **Consequence**: A permanent ban from any sort of public interaction within
113
+ the community.
114
+
115
+ ## Attribution
116
+
117
+ This Code of Conduct is adapted from the [Contributor Covenant][homepage],
118
+ version 2.0, available at
119
+ https://www.contributor-covenant.org/version/2/0/code_of_conduct.html.
120
+
121
+ Community Impact Guidelines were inspired by [Mozilla's code of conduct
122
+ enforcement ladder](https://github.com/mozilla/diversity).
123
+
124
+ [homepage]: https://www.contributor-covenant.org
125
+
126
+ For answers to common questions about this code of conduct, see the FAQ at
127
+ https://www.contributor-covenant.org/faq. Translations are available at
128
+ https://www.contributor-covenant.org/translations.
data/CONTRIBUTING.md ADDED
@@ -0,0 +1,5 @@
1
+ # Contribution
2
+
3
+ Contributions welcome. Please discuss big ideas in an issue first.
4
+
5
+ You'll need to sign the Shopify Contributor License Agreement (CLA) https://cla.shopify.com/.
data/Gemfile ADDED
@@ -0,0 +1,12 @@
1
+ # frozen_string_literal: true
2
+
3
+ source "https://rubygems.org"
4
+
5
+ # Specify your gem's runtime dependencies in the gemspec
6
+ gemspec
7
+
8
+ # Specify development dependencies here
9
+ gem "bundler"
10
+ gem "rake", "~> 13.0"
11
+ gem "minitest", "~> 5.0", require: false
12
+ gem "rubocop-shopify", require: false
data/Gemfile.lock ADDED
@@ -0,0 +1,50 @@
1
+ PATH
2
+ remote: .
3
+ specs:
4
+ bundler_install_stats (0.1.0)
5
+
6
+ GEM
7
+ remote: https://rubygems.org/
8
+ specs:
9
+ ast (2.4.2)
10
+ json (2.6.3)
11
+ minitest (5.17.0)
12
+ parallel (1.22.1)
13
+ parser (3.2.0.0)
14
+ ast (~> 2.4.1)
15
+ rainbow (3.1.1)
16
+ rake (13.0.6)
17
+ regexp_parser (2.6.2)
18
+ rexml (3.2.5)
19
+ rubocop (1.44.1)
20
+ json (~> 2.3)
21
+ parallel (~> 1.10)
22
+ parser (>= 3.2.0.0)
23
+ rainbow (>= 2.2.2, < 4.0)
24
+ regexp_parser (>= 1.8, < 3.0)
25
+ rexml (>= 3.2.5, < 4.0)
26
+ rubocop-ast (>= 1.24.1, < 2.0)
27
+ ruby-progressbar (~> 1.7)
28
+ unicode-display_width (>= 2.4.0, < 3.0)
29
+ rubocop-ast (1.24.1)
30
+ parser (>= 3.1.1.0)
31
+ rubocop-shopify (2.11.1)
32
+ rubocop (~> 1.42)
33
+ ruby-progressbar (1.11.0)
34
+ unicode-display_width (2.4.2)
35
+
36
+ PLATFORMS
37
+ arm64-darwin-21
38
+ arm64-darwin-22
39
+ x86_64-darwin-20
40
+ x86_64-linux
41
+
42
+ DEPENDENCIES
43
+ bundler
44
+ bundler_install_stats!
45
+ minitest (~> 5.0)
46
+ rake (~> 13.0)
47
+ rubocop-shopify
48
+
49
+ BUNDLED WITH
50
+ 2.4.6
data/LICENSE.md ADDED
@@ -0,0 +1,7 @@
1
+ Copyright 2019-present, Shopify Inc.
2
+
3
+ Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
4
+
5
+ The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
6
+
7
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
data/README.md ADDED
@@ -0,0 +1,32 @@
1
+ # Bundler Install Stats
2
+
3
+ ## Introduction
4
+
5
+ This a plugin for Bundler that records and reports how long it takes to install each gem. It may be helpful in the
6
+ following situations:
7
+
8
+ * Diagnosing a slow CI run
9
+ * Tracking the install cost of dependencies over time
10
+ * Evaluating the impact of pure Ruby vs native extensions
11
+ * Evaluating the impact of pre-compiled native extensions vs those compiled on demand
12
+
13
+ ## Installation
14
+
15
+ In order to use this plugin, you must install it via Bundler:
16
+
17
+ ```bash
18
+ bundle plugin install bundle-install-stats
19
+ ```
20
+
21
+ If you're working on the plugin locally, you can install with:
22
+
23
+ ```bash
24
+ bundle plugin uninstall bundler_install_stats
25
+ bundle plugin install --git $PWD bundler_install_stats
26
+ ```
27
+
28
+ Then you should see the plugin list when you run:
29
+
30
+ ```bash
31
+ bundle plugin list
32
+ ```
data/Rakefile ADDED
@@ -0,0 +1,17 @@
1
+ # frozen_string_literal: true
2
+
3
+ require "bundler/gem_tasks"
4
+ require "rake/testtask"
5
+
6
+ Rake::TestTask.new(:test) do |t|
7
+ t.ruby_opts = ["-W0", "-W:deprecated"]
8
+ t.libs << "test"
9
+ t.libs << "lib"
10
+ t.test_files = FileList["test/**/*_test.rb"]
11
+ end
12
+
13
+ require "rubocop/rake_task"
14
+
15
+ RuboCop::RakeTask.new
16
+
17
+ task default: [:test, :rubocop]
data/bin/console ADDED
@@ -0,0 +1,15 @@
1
+ #!/usr/bin/env ruby
2
+ # frozen_string_literal: true
3
+
4
+ require "bundler/setup"
5
+ require "bundler_install_stats"
6
+
7
+ # You can add fixtures and/or initialization code here to make experimenting
8
+ # with your gem easier. You can also use a different console, if you like.
9
+
10
+ # (If you use this, don't forget to add pry to your Gemfile!)
11
+ # require "pry"
12
+ # Pry.start
13
+
14
+ require "irb"
15
+ IRB.start(__FILE__)
data/bin/rake ADDED
@@ -0,0 +1,31 @@
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(
13
+ "../../Gemfile",
14
+ Pathname.new(__FILE__).realpath,
15
+ )
16
+
17
+ bundle_binstub = File.expand_path("../bundle", __FILE__)
18
+
19
+ if File.file?(bundle_binstub)
20
+ if File.read(bundle_binstub, 300) =~ /This file was generated by Bundler/
21
+ load(bundle_binstub)
22
+ else
23
+ abort("Your `bin/bundle` was not generated by Bundler, so this binstub cannot run.
24
+ Replace `bin/bundle` by running `bundle binstubs bundler --force`, then run this command again.")
25
+ end
26
+ end
27
+
28
+ require "rubygems"
29
+ require "bundler/setup"
30
+
31
+ load Gem.bin_path("rake", "rake")
data/bin/rubocop ADDED
@@ -0,0 +1,31 @@
1
+ #!/usr/bin/env ruby
2
+ # frozen_string_literal: true
3
+
4
+ #
5
+ # This file was generated by Bundler.
6
+ #
7
+ # The application 'rubocop' 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(
13
+ "../../Gemfile",
14
+ Pathname.new(__FILE__).realpath,
15
+ )
16
+
17
+ bundle_binstub = File.expand_path("../bundle", __FILE__)
18
+
19
+ if File.file?(bundle_binstub)
20
+ if File.read(bundle_binstub, 300) =~ /This file was generated by Bundler/
21
+ load(bundle_binstub)
22
+ else
23
+ abort("Your `bin/bundle` was not generated by Bundler, so this binstub cannot run.
24
+ Replace `bin/bundle` by running `bundle binstubs bundler --force`, then run this command again.")
25
+ end
26
+ end
27
+
28
+ require "rubygems"
29
+ require "bundler/setup"
30
+
31
+ load Gem.bin_path("rubocop", "rubocop")
data/bin/setup ADDED
@@ -0,0 +1,8 @@
1
+ #!/usr/bin/env bash
2
+ set -euo pipefail
3
+ IFS=$'\n\t'
4
+ set -vx
5
+
6
+ bundle install
7
+
8
+ # Do any other automated setup that you need to do here
@@ -0,0 +1,30 @@
1
+ # frozen_string_literal: true
2
+
3
+ require_relative "lib/bundler_install_stats/version"
4
+
5
+ Gem::Specification.new do |spec|
6
+ spec.name = "bundler_install_stats"
7
+ spec.version = BundlerInstallStats::VERSION
8
+ spec.authors = ["Shopify Engineering"]
9
+ spec.email = ["gems@shopify.com"]
10
+
11
+ spec.summary = "A Bundler plugin for measuring gem installation stats."
12
+ spec.description = "A plugin for measuring gem installation stats. Discover which are your slowest gems to install."
13
+ spec.homepage = "https://github.com/Shopify/bundler-install-stats"
14
+ spec.required_ruby_version = ">= 2.6.0"
15
+
16
+ spec.metadata["allowed_push_host"] = "https://rubygems.org"
17
+
18
+ spec.metadata["homepage_uri"] = spec.homepage
19
+ spec.metadata["source_code_uri"] = spec.homepage
20
+ spec.metadata["changelog_uri"] = "#{spec.homepage}/releases"
21
+
22
+ # Specify which files should be added to the gem when it is released.
23
+ # The `git ls-files -z` loads the files in the RubyGem that have been added into git.
24
+ spec.files = Dir.chdir(File.expand_path(__dir__)) do
25
+ %x(git ls-files -z).split("\x0").reject { |f| f.match(%r{\A(?:test|spec|features)/}) }
26
+ end
27
+ spec.bindir = "exe"
28
+ spec.executables = spec.files.grep(%r{\Aexe/}) { |f| File.basename(f) }
29
+ spec.require_paths = ["lib"]
30
+ end
data/dev.yml ADDED
@@ -0,0 +1,30 @@
1
+ name: bundler-install-stats
2
+
3
+ type: ruby
4
+
5
+ up:
6
+ - ruby: '3.2.1'
7
+ - bundler
8
+
9
+ commands:
10
+ console:
11
+ desc: Open console with the gem loaded
12
+ run: bin/console
13
+ build:
14
+ desc: Build the gem using rake build
15
+ run: bin/rake build
16
+ test:
17
+ desc: Run tests
18
+ syntax:
19
+ argument: file
20
+ optional: args...
21
+ run: |
22
+ if [[ $# -eq 0 ]]; then
23
+ bin/rake test
24
+ else
25
+ bin/rake -I test "$@"
26
+ fi
27
+ style:
28
+ desc: Run rubocop
29
+ aliases: [rubocop, lint]
30
+ run: bin/rubocop
@@ -0,0 +1,103 @@
1
+ # frozen_string_literal: true
2
+
3
+ require "bundler/plugin/events"
4
+
5
+ module BundlerInstallStats
6
+ class GemInstallationHook
7
+ class << self
8
+ def register
9
+ @private_gem_times = {}
10
+ @public_gem_times = {}
11
+ @mutex = Mutex.new
12
+
13
+ # A hook called before each individual gem is installed
14
+ # Includes a Bundler::ParallelInstaller::SpecInstallation.
15
+ # No state, error, post_install_message will be present as nothing has installed yet
16
+ # GEM_BEFORE_INSTALL = "before-install"
17
+ Bundler::Plugin.add_hook(Bundler::Plugin::Events::GEM_BEFORE_INSTALL) do |gem_spec|
18
+ now = Process.clock_gettime(Process::CLOCK_MONOTONIC)
19
+ public_gem = public_gem?(gem_spec.spec)
20
+
21
+ unless public_gem
22
+ puts "\n\n"
23
+ puts "*" * 20
24
+ pp(gem_spec.spec.source.remotes.collect(&:host))
25
+ puts "*" * 20
26
+ puts "\n\n"
27
+ end
28
+
29
+ @mutex.synchronize do
30
+ if public_gem
31
+ @public_gem_times[gem_spec.full_name] = now
32
+ else
33
+ @private_gem_times[gem_spec.full_name] = now
34
+ end
35
+ end
36
+ end
37
+
38
+ # A hook called after each individual gem is installed
39
+ # Includes a Bundler::ParallelInstaller::SpecInstallation.
40
+ # - If state is failed, an error will be present.
41
+ # - If state is success, a post_install_message may be present.
42
+ # GEM_AFTER_INSTALL = "after-install"
43
+ Bundler::Plugin.add_hook(Bundler::Plugin::Events::GEM_AFTER_INSTALL) do |gem_spec|
44
+ now = Process.clock_gettime(Process::CLOCK_MONOTONIC)
45
+ public_gem = public_gem?(gem_spec.spec)
46
+
47
+ diff = @mutex.synchronize do
48
+ if public_gem
49
+ @public_gem_times[gem_spec.full_name] = now - @public_gem_times[gem_spec.full_name]
50
+ else
51
+ @private_gem_times[gem_spec.full_name] = now - @private_gem_times[gem_spec.full_name]
52
+ end
53
+ end
54
+
55
+ puts "#{gem_spec.full_name} took #{diff}s to install"
56
+ end
57
+
58
+ # A hook called before any gems install
59
+ # Includes an Array of Bundler::Dependency objects
60
+ # GEM_BEFORE_INSTALL_ALL = "before-install-all"
61
+ Bundler::Plugin.add_hook(Bundler::Plugin::Events::GEM_BEFORE_INSTALL_ALL) do |_dependencies|
62
+ puts "Before all gem installation"
63
+ end
64
+
65
+ # A hook called after any gems install
66
+ # Includes an Array of Bundler::Dependency objects
67
+ # GEM_AFTER_INSTALL_ALL = "after-install-all"
68
+ Bundler::Plugin.add_hook(Bundler::Plugin::Events::GEM_AFTER_INSTALL_ALL) do |_dependencies|
69
+ puts "After all gem installation (times in seconds)"
70
+
71
+ @mutex.synchronize do
72
+ puts "Private gems:"
73
+ pp(@private_gem_times.sort_by { |_k, v| v }.to_h)
74
+
75
+ puts "\n\nPublic gems:"
76
+ pp(@public_gem_times.sort_by { |_k, v| v }.to_h)
77
+ end
78
+ end
79
+ end
80
+
81
+ def public_gem?(gem_spec)
82
+ if gem_spec.is_a?(Bundler::Source::Metadata)
83
+ puts "*" * 10
84
+ pp(gem_spec)
85
+ puts "*" * 10
86
+
87
+ raise "bad"
88
+ end
89
+
90
+ remotes = begin
91
+ gem_spec.source.remotes
92
+ rescue
93
+ []
94
+ end
95
+ remotes.all? do |r|
96
+ r.host == "rubygems.org"
97
+ rescue
98
+ false
99
+ end
100
+ end
101
+ end
102
+ end
103
+ end
@@ -0,0 +1,6 @@
1
+ # typed: false
2
+ # frozen_string_literal: true
3
+
4
+ module BundlerInstallStats
5
+ VERSION = "0.1.0"
6
+ end
@@ -0,0 +1,8 @@
1
+ # frozen_string_literal: true
2
+
3
+ require "sorbet-runtime"
4
+ require_relative "bundler_install_stats/gem_installation_hook"
5
+ require_relative "bundler_install_stats/version"
6
+
7
+ module BundlerInstallStats
8
+ end
data/plugins.rb ADDED
@@ -0,0 +1,4 @@
1
+ # frozen_string_literal: true
2
+
3
+ require "bundler_install_stats"
4
+ BundlerInstallStats::GemInstallationHook.register
data/service.yml ADDED
@@ -0,0 +1 @@
1
+ classification: library
File without changes
metadata ADDED
@@ -0,0 +1,71 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: bundler_install_stats
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.1.0
5
+ platform: ruby
6
+ authors:
7
+ - Shopify Engineering
8
+ autorequire:
9
+ bindir: exe
10
+ cert_chain: []
11
+ date: 2023-03-23 00:00:00.000000000 Z
12
+ dependencies: []
13
+ description: A plugin for measuring gem installation stats. Discover which are your
14
+ slowest gems to install.
15
+ email:
16
+ - gems@shopify.com
17
+ executables: []
18
+ extensions: []
19
+ extra_rdoc_files: []
20
+ files:
21
+ - ".github/workflows/ci.yml"
22
+ - ".github/workflows/cla.yml"
23
+ - ".github/workflows/release.yml"
24
+ - ".gitignore"
25
+ - ".rubocop.yml"
26
+ - CODE_OF_CONDUCT.md
27
+ - CONTRIBUTING.md
28
+ - Gemfile
29
+ - Gemfile.lock
30
+ - LICENSE.md
31
+ - README.md
32
+ - Rakefile
33
+ - bin/console
34
+ - bin/rake
35
+ - bin/rubocop
36
+ - bin/setup
37
+ - bundler-install-stats.gemspec
38
+ - dev.yml
39
+ - lib/bundler_install_stats.rb
40
+ - lib/bundler_install_stats/gem_installation_hook.rb
41
+ - lib/bundler_install_stats/version.rb
42
+ - plugins.rb
43
+ - service.yml
44
+ - shipit.rubygems.yml
45
+ homepage: https://github.com/Shopify/bundler-install-stats
46
+ licenses: []
47
+ metadata:
48
+ allowed_push_host: https://rubygems.org
49
+ homepage_uri: https://github.com/Shopify/bundler-install-stats
50
+ source_code_uri: https://github.com/Shopify/bundler-install-stats
51
+ changelog_uri: https://github.com/Shopify/bundler-install-stats/releases
52
+ post_install_message:
53
+ rdoc_options: []
54
+ require_paths:
55
+ - lib
56
+ required_ruby_version: !ruby/object:Gem::Requirement
57
+ requirements:
58
+ - - ">="
59
+ - !ruby/object:Gem::Version
60
+ version: 2.6.0
61
+ required_rubygems_version: !ruby/object:Gem::Requirement
62
+ requirements:
63
+ - - ">="
64
+ - !ruby/object:Gem::Version
65
+ version: '0'
66
+ requirements: []
67
+ rubygems_version: 3.4.9
68
+ signing_key:
69
+ specification_version: 4
70
+ summary: A Bundler plugin for measuring gem installation stats.
71
+ test_files: []