Skip to content

Instantly share code, notes, and snippets.

@unleashed
Last active February 16, 2021 08:18
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save unleashed/c107af7eecb4ef823d453d342bb2c398 to your computer and use it in GitHub Desktop.
Save unleashed/c107af7eecb4ef823d453d342bb2c398 to your computer and use it in GitHub Desktop.
Bundler + rubygems packaging code execution
3scale/r/lolo via πŸ’Ž v2.7.2
❯ cat Gemfile
# frozen_string_literal: true
source "https://rubygems.org"
# lala, lele, lulu and this Gemfile contain code to write <gemname>-gemfile or <gemname>-gemspec
# depending on whether a Gemfile or a <gem>.gemspec gets executed.
File.open 'lolo-gemfile', 'w' do |f|
f.write 'lolo'
end
gem 'lala', path: '../lala'
gem 'lele', git: '../lele'
gem 'lulu', path: '../lulu'
gem 'injectedlogger'
# gem "rails"
3scale/r/lolo via πŸ’Ž v2.7.2
❯ find .. -type f -iname "*-gemspec" -o -iname "*-gemfile"
3scale/r/lolo via πŸ’Ž v2.7.2
❯ bundle package --no-install
Fetching ../lele
Fetching gem metadata from https://rubygems.org/.......
Resolving dependencies...
Using bundler 2.2.1
Using lala 0.1.1 from source at `../lala`
Fetching rack 2.2.3
Fetching racc 1.5.2
Fetching injectedlogger 0.0.13
Fetching ruby2_keywords 0.0.4
Fetching tilt 2.0.10
Fetching mustermann 1.1.1
Fetching rack-protection 2.1.0
Fetching nokogiri 1.11.1 (x86_64-linux)
Fetching sinatra 2.1.0
Using lulu 0.4.4 from source at `../lulu`
Using lele 0.1.5 from ../lele (at master@f21db1f)
Bundle complete! 4 Gemfile dependencies, 13 gems now installed.
Bundled gems are installed into `./vendor/bundle`
Updating files in vendor/cache
* injectedlogger-0.0.13.gem
* racc-1.5.2.gem
* nokogiri-1.11.1-x86_64-linux.gem
* ruby2_keywords-0.0.4.gem
* mustermann-1.1.1.gem
* rack-2.2.3.gem
* rack-protection-2.1.0.gem
* tilt-2.0.10.gem
* sinatra-2.1.0.gem
3scale/r/lolo via πŸ’Ž v2.7.2 took 2s
❯ find .. -type f -iname "*-gemspec" -o -iname "*-gemfile"
../lolo/vendor/bundle/ruby/2.7.0/bundler/gems/lele-f21db1f31114/lele-gemspec
../lolo/lolo-gemfile
../lala/lala-gemspec
../lulu/lulu-gemspec
3scale/r/lolo via πŸ’Ž v2.7.2
❯ find .. -type f -iname "*-gemspec" -delete -o -iname "*-gemfile" -delete
3scale/r/lolo via πŸ’Ž v2.7.2
❯ find .. -type f -iname "*-gemspec" -o -iname "*-gemfile"
3scale/r/lolo via πŸ’Ž v2.7.2
❯ ls -alF
total 24
drwxrwxr-x. 4 alex alex 4096 Feb 16 09:09 ./
drwxrwxr-x. 7 alex alex 4096 Feb 15 21:25 ../
drwxrwxr-x. 2 alex alex 4096 Feb 16 09:08 .bundle/
-rw-rw-r--. 1 alex alex 241 Feb 15 21:07 Gemfile
-rw-rw-r--. 1 alex alex 762 Feb 16 09:08 Gemfile.lock
drwxrwxr-x. 4 alex alex 4096 Feb 16 09:08 vendor/
3scale/r/lolo via πŸ’Ž v2.7.2
❯ bundle package --no-install
Fetching gem metadata from https://rubygems.org/.......
Using bundler 2.2.1
Using lala 0.1.1 from source at `../lala`
Using lele 0.1.5 from ../lele (at master@f21db1f)
Using lulu 0.4.4 from source at `../lulu`
Updating files in vendor/cache
Bundle complete! 4 Gemfile dependencies, 13 gems now installed.
Bundled gems are installed into `./vendor/bundle`
Updating files in vendor/cache
3scale/r/lolo via πŸ’Ž v2.7.2
❯ find .. -type f -iname "*-gemspec" -o -iname "*-gemfile"
../lolo/lolo-gemfile
../lala/lala-gemspec
../lulu/lulu-gemspec
3scale/r/lolo via πŸ’Ž v2.7.2
❯ find .. -type f -iname "*-gemspec" -delete -o -iname "*-gemfile" -delete
3scale/r/lolo via πŸ’Ž v2.7.2
❯ find .. -type f -iname "*-gemspec" -o -iname "*-gemfile"
3scale/r/lolo via πŸ’Ž v2.7.2
❯ ls -alF
total 24
drwxrwxr-x. 4 alex alex 4096 Feb 16 09:14 ./
drwxrwxr-x. 7 alex alex 4096 Feb 15 21:25 ../
drwxrwxr-x. 2 alex alex 4096 Feb 16 09:08 .bundle/
-rw-rw-r--. 1 alex alex 241 Feb 15 21:07 Gemfile
-rw-rw-r--. 1 alex alex 762 Feb 16 09:08 Gemfile.lock
drwxrwxr-x. 4 alex alex 4096 Feb 16 09:08 vendor/
3scale/r/lolo via πŸ’Ž v2.7.2
❯ bundle package --no-install --all
[DEPRECATED] The `--all` flag is deprecated because it relies on being remembered across bundler invocations, which bundler will no longer do in future versions. Instead please use `bundle config set cache_all true`, and stop using this flag
Fetching gem metadata from https://rubygems.org/.......
Using bundler 2.2.1
Using lala 0.1.1 from source at `../lala`
Using lele 0.1.5 from ../lele (at master@f21db1f)
Using lulu 0.4.4 from source at `../lulu`
Updating files in vendor/cache
Bundle complete! 4 Gemfile dependencies, 13 gems now installed.
Bundled gems are installed into `./vendor/bundle`
Updating files in vendor/cache
3scale/r/lolo via πŸ’Ž v2.7.2
❯ find .. -type f -iname "*-gemspec" -o -iname "*-gemfile"
../lolo/vendor/cache/lala/lala-gemspec
../lolo/vendor/cache/lulu/lulu-gemspec
../lolo/lolo-gemfile
../lala/lala-gemspec
../lulu/lulu-gemspec
3scale/r/lolo via πŸ’Ž v2.7.2
❯ rm -rf .bundle/ lolo-gemfile Gemfile.lock
3scale/r/lolo via πŸ’Ž v2.7.2
❯ find .. -type f -iname "*-gemspec" -delete -o -iname "*-gemfile" -delete
3scale/r/lolo via πŸ’Ž v2.7.2
❯ find .. -type f -iname "*-gemspec" -o -iname "*-gemfile"
3scale/r/lolo via πŸ’Ž v2.7.2
❯ bundle package --no-install --all
[DEPRECATED] The `--all` flag is deprecated because it relies on being remembered across bundler invocations, which bundler will no longer do in future versions. Instead please use `bundle config set cache_all true`, and stop using this flag
Fetching ../lele
fatal: '../lele' does not appear to be a git repository
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
Retrying `git fetch --force --quiet --tags '../lele' "refs/heads/*:refs/heads/*" ` due to error (2/4): Bundler::Source::Git::GitCommandError Git error: command `git fetch --force --quiet --tags '../lele' "refs/heads/*:refs/heads/*" ` in directory /home/alex/dev/3scale/r/lolo/vendor/bundle/ruby/2.7.0/cache/bundler/git/lele-d1f85285a21be82c7e9546a62fe79ec2e22e7166 has failed.
If this error persists you could try removing the cache directory '/home/alex/dev/3scale/r/lolo/vendor/bundle/ruby/2.7.0/cache/bundler/git/lele-d1f85285a21be82c7e9546a62fe79ec2e22e7166'
Retrying `git fetch --force --quiet --tags '../lele' "refs/heads/*:refs/heads/*" ` due to error (3/4): Bundler::Source::Git::GitCommandError Git error: command `git fetch --force --quiet --tags '../lele' "refs/heads/*:refs/heads/*" ` in directory /home/alex/dev/3scale/r/lolo/vendor/bundle/ruby/2.7.0/cache/bundler/git/lele-d1f85285a21be82c7e9546a62fe79ec2e22e7166 has failed.
If this error persists you could try removing the cache directory '/home/alex/dev/3scale/r/lolo/vendor/bundle/ruby/2.7.0/cache/bundler/git/lele-d1f85285a21be82c7e9546a62fe79ec2e22e7166'
Retrying `git fetch --force --quiet --tags '../lele' "refs/heads/*:refs/heads/*" ` due to error (4/4): Bundler::Source::Git::GitCommandError Git error: command `git fetch --force --quiet --tags '../lele' "refs/heads/*:refs/heads/*" ` in directory /home/alex/dev/3scale/r/lolo/vendor/bundle/ruby/2.7.0/cache/bundler/git/lele-d1f85285a21be82c7e9546a62fe79ec2e22e7166 has failed.
If this error persists you could try removing the cache directory '/home/alex/dev/3scale/r/lolo/vendor/bundle/ruby/2.7.0/cache/bundler/git/lele-d1f85285a21be82c7e9546a62fe79ec2e22e7166'
Git error: command `git fetch --force --quiet --tags '../lele'
"refs/heads/*:refs/heads/*" ` in directory
/home/alex/dev/3scale/r/lolo/vendor/bundle/ruby/2.7.0/cache/bundler/git/lele-d1f85285a21be82c7e9546a62fe79ec2e22e7166
has failed.
If this error persists you could try removing the cache directory
'/home/alex/dev/3scale/r/lolo/vendor/bundle/ruby/2.7.0/cache/bundler/git/lele-d1f85285a21be82c7e9546a62fe79ec2e22e7166'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment