mirror of
https://github.com/pry/pry.git
synced 2022-11-09 12:35:05 -05:00
Remove support for Ruby 1.9.3
This commit is contained in:
parent
db5b2b4ef6
commit
e43dbb0962
7 changed files with 7 additions and 132 deletions
|
@ -1,26 +0,0 @@
|
|||
version: 2.1
|
||||
|
||||
jobs:
|
||||
build:
|
||||
working_directory: ~/pry
|
||||
|
||||
docker:
|
||||
- image: kyrylo/ruby-1.9.3p551
|
||||
|
||||
steps:
|
||||
- checkout
|
||||
|
||||
- run:
|
||||
name: Install Bundler dependencies
|
||||
command: bundle install
|
||||
|
||||
- run:
|
||||
name: Install Nano text editor (required for some tests)
|
||||
command: apk add nano
|
||||
|
||||
- run:
|
||||
name: Run unit tests
|
||||
command: bundle exec rake
|
||||
environment:
|
||||
# Make sure TERM is set so Pry can indent correctly inside tests.
|
||||
TERM: screen-256color
|
|
@ -1,80 +0,0 @@
|
|||
FROM alpine
|
||||
|
||||
RUN mkdir -p /usr/local/etc \
|
||||
&& { \
|
||||
echo 'install: --no-document'; \
|
||||
echo 'update: --no-document'; \
|
||||
} >> /usr/local/etc/gemrc
|
||||
|
||||
ENV RUBY_MAJOR 1.9
|
||||
ENV RUBY_VERSION 1.9.3-p551
|
||||
ENV RUBYGEMS_VERSION 1.8.23.2
|
||||
ENV BUNDLER_VERSION 1.16.6
|
||||
|
||||
RUN set -ex \
|
||||
&& apk add --no-cache --virtual .ruby-builddeps \
|
||||
autoconf \
|
||||
bison \
|
||||
bzip2 \
|
||||
bzip2-dev \
|
||||
ca-certificates \
|
||||
coreutils \
|
||||
curl \
|
||||
gcc \
|
||||
gdbm-dev \
|
||||
glib-dev \
|
||||
libc-dev \
|
||||
libffi-dev \
|
||||
libxml2-dev \
|
||||
libxslt-dev \
|
||||
linux-headers \
|
||||
make \
|
||||
ncurses-dev \
|
||||
openssl-dev \
|
||||
procps \
|
||||
readline-dev \
|
||||
ruby \
|
||||
yaml-dev \
|
||||
zlib-dev \
|
||||
&& curl -fSL -o ruby.tar.gz "http://cache.ruby-lang.org/pub/ruby/$RUBY_MAJOR/ruby-$RUBY_VERSION.tar.gz" \
|
||||
&& mkdir -p /usr/src \
|
||||
&& tar -xzf ruby.tar.gz -C /usr/src \
|
||||
&& rm ruby.tar.gz \
|
||||
&& cd /usr/src/ruby-$RUBY_VERSION \
|
||||
&& { echo '#define ENABLE_PATH_CHECK 0'; echo; cat file.c; } > file.c.new && mv file.c.new file.c \
|
||||
&& { echo '#include <asm/ioctl.h>'; echo; cat io.c; } > io.c.new && mv io.c.new io.c \
|
||||
&& autoconf \
|
||||
&& ac_cv_func_isnan=yes ac_cv_func_isinf=yes ./configure --disable-install-doc \
|
||||
&& make \
|
||||
&& make install \
|
||||
&& runDeps="$( \
|
||||
scanelf --needed --nobanner --recursive /usr/local \
|
||||
| awk '{ gsub(/,/, "\nso:", $2); print "so:" $2 }' \
|
||||
| sort -u \
|
||||
| xargs -r apk info --installed \
|
||||
| sort -u \
|
||||
)" \
|
||||
&& apk add --virtual .ruby-rundeps $runDeps \
|
||||
bzip2 \
|
||||
ca-certificates \
|
||||
curl \
|
||||
libffi-dev \
|
||||
openssl-dev \
|
||||
yaml-dev \
|
||||
procps \
|
||||
zlib-dev \
|
||||
&& apk del .ruby-builddeps \
|
||||
&& gem update --system $RUBYGEMS_VERSION \
|
||||
&& rm -r /usr/src/ruby-$RUBY_VERSION
|
||||
|
||||
RUN apk add --no-cache git nano build-base
|
||||
|
||||
RUN gem update --system 2.7.9
|
||||
|
||||
RUN gem install bundler --version "$BUNDLER_VERSION" --force
|
||||
|
||||
ENV GEM_HOME /usr/local/bundle
|
||||
ENV BUNDLE_PATH="$GEM_HOME" BUNDLE_BIN="$GEM_HOME/bin" BUNDLE_SILENCE_ROOT_WARNING=1 BUNDLE_APP_CONFIG="$GEM_HOME"
|
||||
ENV PATH $BUNDLE_BIN:$PATH
|
||||
RUN mkdir -p "$GEM_HOME" "$BUNDLE_BIN" && chmod 777 "$GEM_HOME" "$BUNDLE_BIN"
|
||||
CMD [ "irb" ]
|
|
@ -443,7 +443,7 @@ putting the line `Pry.color = false` in your `pryrc` file.
|
|||
Supported Rubies
|
||||
----------------
|
||||
|
||||
* CRuby >= 1.9.3
|
||||
* CRuby >= 2.0.0
|
||||
* JRuby >= 1.7
|
||||
|
||||
Contact
|
||||
|
|
|
@ -10,16 +10,9 @@ class Pry
|
|||
# @param [String] message
|
||||
# @return [void]
|
||||
def self.warn(message)
|
||||
if Kernel.respond_to?(:caller_locations)
|
||||
location = caller_locations(2..2).first
|
||||
path = location.path
|
||||
lineno = location.lineno
|
||||
else
|
||||
# Ruby 1.9.3 support.
|
||||
frame = caller[1].split(':') # rubocop:disable Performance/Caller
|
||||
path = frame.first
|
||||
lineno = frame[1]
|
||||
end
|
||||
|
||||
Kernel.warn("#{path}:#{lineno}: warning: #{message}")
|
||||
end
|
||||
|
|
|
@ -6,7 +6,7 @@ Gem::Specification.new do |s|
|
|||
s.name = "pry"
|
||||
s.version = Pry::VERSION
|
||||
|
||||
s.required_ruby_version = '>= 1.9.3'
|
||||
s.required_ruby_version = '>= 2.0'
|
||||
|
||||
s.authors = [
|
||||
'John Mair (banisterfiend)',
|
||||
|
|
|
@ -23,13 +23,7 @@ describe "edit" do
|
|||
before do
|
||||
# OS-specific tempdir name. For GNU/Linux it's "tmp", for Windows it's
|
||||
# something "Temp".
|
||||
@tf_dir =
|
||||
if Pry::Helpers::Platform.mri_19?
|
||||
Pathname.new(Dir::Tmpname.tmpdir)
|
||||
else
|
||||
Pathname.new(Dir.tmpdir)
|
||||
end
|
||||
|
||||
@tf_dir = Pathname.new(Dir.tmpdir)
|
||||
@tf_path = File.expand_path(File.join(@tf_dir.to_s, 'bar.rb'))
|
||||
FileUtils.touch(@tf_path)
|
||||
end
|
||||
|
|
|
@ -6,13 +6,7 @@ describe Pry::Editor do
|
|||
before do
|
||||
# OS-specific tempdir name. For GNU/Linux it's "tmp", for Windows it's
|
||||
# something "Temp".
|
||||
@tf_dir =
|
||||
if Pry::Helpers::Platform.mri_19?
|
||||
Pathname.new(Dir::Tmpname.tmpdir)
|
||||
else
|
||||
Pathname.new(Dir.tmpdir)
|
||||
end
|
||||
|
||||
@tf_dir = Pathname.new(Dir.tmpdir)
|
||||
@tf_path = File.join(@tf_dir.to_s, 'hello world.rb')
|
||||
|
||||
@editor = Pry::Editor.new(Pry.new)
|
||||
|
|
Loading…
Reference in a new issue