Retire eol rubies (#393)

* Removed rubys 2.4 and earlier

* Updated docs with changes

Co-authored-by: Bryan Hanks, PMP <bryan@master-developer.com>
This commit is contained in:
Bryan Hanks, PMP 2021-01-12 19:08:40 -06:00 committed by GitHub
parent 0d7b6debde
commit d425b2b59d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
7 changed files with 27 additions and 81 deletions

View File

@ -2,8 +2,6 @@ language: ruby
cache: bundler
rvm:
- 2.3
- 2.4
- 2.5
- 2.6
@ -11,12 +9,9 @@ before_install:
- gem install bundler
gemfile:
# ignore 4.2 for now as the cost to run these tests is too high
# - gemfiles/rails_4.2.gemfile
- gemfiles/rails_5.0.gemfile
- gemfiles/rails_5.1.gemfile
- gemfiles/rails_5.2.gemfile
- gemfiles/mongoid_4.0.gemfile
- gemfiles/mongoid_5.0.gemfile
- gemfiles/mongoid_6.0.gemfile

View File

@ -1,4 +1,6 @@
## master (unreleased)
- Removed check for Ruby 2.4 and earlier [@bryanh]
- Rails 5.0 builds are failing, because the sqlite3 version being installed is wrong version [#366]
- Fixes spec suite to properly work via travis, gets a clean build [@imajes, others]
- Adds support for ActiveModel::Errors [@dshinzie] - [#301]
- removes use of `strip_heredoc` from specs as it's a rails dep [@kstephens] - [#303]
@ -8,7 +10,7 @@
- stat("$HOME/.aprc") once [@kstephens] - [#304]
- ActiveRecord: #joins now show the columns #select'ed [@adrianomitre] - [#211]
- Handles NoMethodError for IRB implicit `ai` [@jtnegrotto] - [#212]
- Replaced Fixnum reference with Integer
- Replaced Fixnum reference with Integer
- Colorize ORM class names [@ixti]
## 1.7.0

View File

@ -51,6 +51,7 @@ Special thanks goes to awesome team of contributors, namely:
* Barry Allard -- https://github.com/steakknife
* Benoit Daloze -- http://github.com/eregon
* Brandon Zylstra -- https://github.com/brandondrew
* Bryan Hanks, PMP -- https://github.com/bryanh
* Dan Lynn -- https://github.com/danlynn
* Daniel Johnson -- https://github.com/adhd360
* Daniel Bretoi -- http://github.com/danielb2

View File

@ -12,9 +12,8 @@ Awesome Print is a Ruby library that pretty prints Ruby objects in full color
exposing their internal structure with proper indentation. Rails ActiveRecord
objects and usage within Rails templates are supported via included mixins.
__NOTE__: awesome_print v1.2.0 is the last release supporting Ruby versions
prior to v1.9.3 and Rails versions prior to v3.0. The upcoming awesome_print
v2.0 will *require* Ruby v1.9.3 or later and Rails v3.0 or later.
__NOTE__: awesome_print v1.9.0 may not work on Ruby versions 2.4 or older or Rails versions 4.2 or older.
The upcoming awesome_print v2.0 will *require* Ruby v1.9.3 or later and Rails v3.0 or later.
### Installation ###
# Installing as Ruby gem
@ -307,7 +306,7 @@ With other web frameworks (ex: in Sinatra templates) you can explicitly request
formatting:
<%= ap @accounts.first, :html => true %>
### String Convenience Methods ###
Use methods such as `.red` to set string color:

View File

@ -1,7 +0,0 @@
# This file was generated by Appraisal
source "https://rubygems.org"
gem "mongoid", "~> 4.0.0"
gemspec path: "../"

View File

@ -1,8 +0,0 @@
# This file was generated by Appraisal
source "https://rubygems.org"
gem "rails", "~> 4.2.0"
gem "mime-types", "2.6.2", platforms: :ruby_19
gemspec path: "../"

View File

@ -21,11 +21,11 @@ RSpec.describe 'AwesomePrint/ActiveRecord', skip: -> { !ExtVerifier.has_rails? }
:rank => 1
}
EOS
if RUBY_VERSION < '1.9'
str.sub!('?', 'Sat Oct 10 12:30:00 UTC 1992')
else
str.sub!('?', '1992-10-10 12:30:00 UTC')
end
expect(RUBY_VERSION).to be >= '2.5'
str.sub!('?', '1992-10-10 12:30:00 UTC')
expect(out).to be_similar_to(str)
end
@ -49,13 +49,10 @@ RSpec.describe 'AwesomePrint/ActiveRecord', skip: -> { !ExtVerifier.has_rails? }
}
]
EOS
if RUBY_VERSION < '1.9'
str.sub!('??', 'Sat Oct 10 12:30:00 UTC 1992')
str.sub!('?!', 'Mon May 26 14:15:00 UTC 2003')
else
str.sub!('??', '1992-10-10 12:30:00 UTC')
str.sub!('?!', '2003-05-26 14:15:00 UTC')
end
str.sub!('??', '1992-10-10 12:30:00 UTC')
str.sub!('?!', '2003-05-26 14:15:00 UTC')
expect(out).to be_similar_to(str)
end
@ -81,13 +78,10 @@ RSpec.describe 'AwesomePrint/ActiveRecord', skip: -> { !ExtVerifier.has_rails? }
}
]
EOS
if RUBY_VERSION < '1.9'
str.sub!('??', 'Sat Oct 10 12:30:00 UTC 1992')
str.sub!('?!', 'Mon May 26 14:15:00 UTC 2003')
else
str.sub!('??', '1992-10-10 12:30:00 UTC')
str.sub!('?!', '2003-05-26 14:15:00 UTC')
end
str.sub!('??', '1992-10-10 12:30:00 UTC')
str.sub!('?!', '2003-05-26 14:15:00 UTC')
expect(out).to be_similar_to(str)
end
end
@ -133,21 +127,13 @@ EOS
elsif activerecord_5_0?
ActiveRecordData.raw_5_0_diana
elsif activerecord_4_2?
if RUBY_VERSION > '1.9.3'
ActiveRecordData.raw_4_2_diana
else
ActiveRecordData.raw_4_2_diana_legacy
end
ActiveRecordData.raw_4_2_diana
elsif activerecord_4_1?
ActiveRecordData.raw_4_1_diana
elsif activerecord_4_0?
ActiveRecordData.raw_4_0_diana
elsif activerecord_3_2?
if RUBY_VERSION > '1.9.3'
ActiveRecordData.raw_3_2_diana
else
ActiveRecordData.raw_3_2_diana_legacy
end
ActiveRecordData.raw_3_2_diana
end
raw_object_string.sub!('?', '1992-10-10 12:30:00')
expect(out).to be_similar_to(raw_object_string)
@ -164,21 +150,13 @@ EOS
elsif activerecord_5_0?
ActiveRecordData.raw_5_0_multi
elsif activerecord_4_2?
if RUBY_VERSION > '1.9.3'
ActiveRecordData.raw_4_2_multi
else
ActiveRecordData.raw_4_2_multi_legacy
end
ActiveRecordData.raw_4_2_multi
elsif activerecord_4_1?
ActiveRecordData.raw_4_1_multi
elsif activerecord_4_0?
ActiveRecordData.raw_4_0_multi
elsif activerecord_3_2?
if RUBY_VERSION > '1.9.3'
ActiveRecordData.raw_3_2_multi
else
ActiveRecordData.raw_3_2_multi_legacy
end
ActiveRecordData.raw_3_2_multi
end
raw_object_string.sub!('?', '1992-10-10 12:30:00')
raw_object_string.sub!('?', '2003-05-26 14:15:00')
@ -233,24 +211,14 @@ class SubUser < User {
out = @ap.awesome(User.methods.grep(/first/))
if ActiveRecord::VERSION::STRING >= '3.2'
if RUBY_VERSION >= '2.4.4'
expect(out).to match(/\sfirst\(\*arg.*?\)\s+User/)
elsif RUBY_VERSION >= '1.9'
expect(out).to match(/\sfirst\(\*args,\s&block\)\s+Class \(ActiveRecord::Querying\)/)
else
expect(out).to match(/\sfirst\(\*arg1\)\s+Class \(ActiveRecord::Querying\)/)
end
expect(out).to match(/\sfirst\(\*arg.*?\)\s+User/)
else
expect(out).to match(/\sfirst\(\*arg.*?\)\s+User \(ActiveRecord::Base\)/)
end
# spec 2
out = @ap.awesome(User.methods.grep(/primary_key/))
if RUBY_VERSION >= '2.4.4'
expect(out).to match(/\sprimary_key\(.*?\)\s+User/)
else
expect(out).to match(/\sprimary_key\(.*?\)\s+Class \(ActiveRecord::AttributeMethods::PrimaryKey::ClassMethods\)/)
end
expect(out).to match(/\sprimary_key\(.*?\)\s+User/)
# spec 3
out = @ap.awesome(User.methods.grep(/validate/))
@ -258,11 +226,7 @@ class SubUser < User {
if ActiveRecord::VERSION::MAJOR < 3
expect(out).to match(/\svalidate\(\*arg.*?\)\s+User \(ActiveRecord::Base\)/)
else
if RUBY_VERSION >= '2.4.4'
expect(out).to match(/\svalidate\(\*arg.*?\)\s+User/)
else
expect(out).to match(/\svalidate\(\*arg.*?\)\s+Class \(ActiveModel::Validations::ClassMethods\)/)
end
expect(out).to match(/\svalidate\(\*arg.*?\)\s+User/)
end
end