Skip to content

Commit ba024ff

Browse files
committed
rip-only for disabling the RubyGems Ruby API in the current ripenv
1 parent 4439c96 commit ba024ff

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

bin/rip-only

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
#!/usr/bin/env ruby
2+
# Usage: rip-only [-d]
3+
#
4+
# Drops a rubygems.rb into $RIPENV/lib, causing the current Rip
5+
# environment to be the only environment seen. Essentially turns off
6+
# the Ruby RubyGems API for the current ripenv.
7+
#
8+
# The -d option removes this file, undoing the changes it made.
9+
10+
require 'rip/script'
11+
exec (ARGV[0] == '-d' ? "rm" : "touch") + " #{Rip.envdir}/lib/rubygems.rb"

0 commit comments

Comments
 (0)