Skip to content

Instantly share code, notes, and snippets.

View colby-swandale's full-sized avatar
✌️

Colby Swandale colby-swandale

✌️
View GitHub Profile
@colby-swandale
colby-swandale / gist:6173b0221ad91a2168ef27b5c08dd089
Created May 12, 2017 00:16
bundle exec spec breaking on local
› bin/rspec spec/commands/exec_spec.rb -f progress
Run options: exclude {:rubygems_master=>true, :git=>"=< 2.12.2", :rubygems=>"=< 2.6.8", :ruby=>"=< 2.4.0", :realworld=>true, :sudo=>true}
........................FFFFF.....FFFFF.....FFFFF.....FFFFF.....................*...
Retried examples: 0
Pending: (Failures listed here are expected and do not affect your suite's status)
1) bundle exec `load`ing a ruby file instead of `exec`ing regarding $0 and __FILE__ when the path is relative with a leading ./ relative paths with ./ have absolute __FILE__
version: '3'
services:
db:
image: postgres:9
ports:
- "5432:5432"
cache:
image: memcached
ports:
- "11211:11211"
version: '3'
services:
db:
image: postgres:9
ports:
- "5432:5432"
cache:
image: memcached
ports:
- "11211:11211"
[vagrant@localhost ~]$ ls -la /tmp/bundler20180519-24861-1y67io7rake-12.3.1/
total 4
drwx------. 3 vagrant vagrant 17 May 19 07:36 .
drwxrwxrwt. 9 root root 4096 May 19 07:36 ..
drwxr-xr-x. 2 root root 6 May 19 07:36 bin
# Configuration for Alacritty, the GPU enhanced terminal emulator
# Any items in the `env` entry below will be added as
# environment variables. Some entries may override variables
# set by alacritty it self.
env:
# TERM env customization.
#
# If this property is not set, alacritty will set it to xterm-256color.
redefine_method(gem_class, :activate_bin_path) do |name, *args|
exec_name = args.first
return ENV["BUNDLE_BIN_PATH"] if exec_name == "bundle"
# Copy of Rubygems activate_bin_path impl
requirement = args.last
spec = find_spec_for_exe name, exec_name, [requirement]
gem_bin = File.join(spec.full_gem_path, spec.bindir, exec_name)
gem_from_path_bin = File.join(File.dirname(spec.loaded_from), spec.bindir, exec_name)
def set_bundle_variables
begin
ENV["BUNDLE_BIN_PATH"] = Bundler.rubygems.bin_path("bundler", "bundle", VERSION)
rescue Gem::GemNotFoundException
ENV["BUNDLE_BIN_PATH"] = File.expand_path("../../../exe/bundle", __FILE__)
end
# Set BUNDLE_GEMFILE
ENV["BUNDLE_GEMFILE"] = find_gemfile.to_s
def self.bin_path(name, exec_name = nil, *requirements)
# TODO: fails test_self_bin_path_bin_file_gone_in_latest
# Gem::Specification.find_by_name(name, *requirements).bin_file exec_name
raise ArgumentError, "you must supply exec_name" unless exec_name
requirements = Gem::Requirement.default if
requirements.empty?
find_spec_for_exe(name, exec_name, requirements).bin_file exec_name
* Bundler ruby gems check inside bundler `bundle exec`
#!/usr/bin/env ruby
# encoding: utf-8
if ARGV.include?("-h") || ARGV.include?("--help")
puts "USAGE: check.rb [HOSTNAME] [TLS_VERSION] [VERIFY]"
puts " default: check.rb rubygems.org auto VERIFY_PEER"
puts " example: check.rb github.com TLSv1_2 VERIFY_NONE"
exit 0
end