mirror of
https://github.com/awesome-print/awesome_print
synced 2023-03-27 23:22:34 -04:00
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:
parent
0d7b6debde
commit
d425b2b59d
7 changed files with 27 additions and 81 deletions
|
@ -2,8 +2,6 @@ language: ruby
|
||||||
cache: bundler
|
cache: bundler
|
||||||
|
|
||||||
rvm:
|
rvm:
|
||||||
- 2.3
|
|
||||||
- 2.4
|
|
||||||
- 2.5
|
- 2.5
|
||||||
- 2.6
|
- 2.6
|
||||||
|
|
||||||
|
@ -11,12 +9,9 @@ before_install:
|
||||||
- gem install bundler
|
- gem install bundler
|
||||||
|
|
||||||
gemfile:
|
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.0.gemfile
|
||||||
- gemfiles/rails_5.1.gemfile
|
- gemfiles/rails_5.1.gemfile
|
||||||
- gemfiles/rails_5.2.gemfile
|
- gemfiles/rails_5.2.gemfile
|
||||||
- gemfiles/mongoid_4.0.gemfile
|
|
||||||
- gemfiles/mongoid_5.0.gemfile
|
- gemfiles/mongoid_5.0.gemfile
|
||||||
- gemfiles/mongoid_6.0.gemfile
|
- gemfiles/mongoid_6.0.gemfile
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,6 @@
|
||||||
## master (unreleased)
|
## 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]
|
- Fixes spec suite to properly work via travis, gets a clean build [@imajes, others]
|
||||||
- Adds support for ActiveModel::Errors [@dshinzie] - [#301]
|
- Adds support for ActiveModel::Errors [@dshinzie] - [#301]
|
||||||
- removes use of `strip_heredoc` from specs as it's a rails dep [@kstephens] - [#303]
|
- removes use of `strip_heredoc` from specs as it's a rails dep [@kstephens] - [#303]
|
||||||
|
|
|
@ -51,6 +51,7 @@ Special thanks goes to awesome team of contributors, namely:
|
||||||
* Barry Allard -- https://github.com/steakknife
|
* Barry Allard -- https://github.com/steakknife
|
||||||
* Benoit Daloze -- http://github.com/eregon
|
* Benoit Daloze -- http://github.com/eregon
|
||||||
* Brandon Zylstra -- https://github.com/brandondrew
|
* Brandon Zylstra -- https://github.com/brandondrew
|
||||||
|
* Bryan Hanks, PMP -- https://github.com/bryanh
|
||||||
* Dan Lynn -- https://github.com/danlynn
|
* Dan Lynn -- https://github.com/danlynn
|
||||||
* Daniel Johnson -- https://github.com/adhd360
|
* Daniel Johnson -- https://github.com/adhd360
|
||||||
* Daniel Bretoi -- http://github.com/danielb2
|
* Daniel Bretoi -- http://github.com/danielb2
|
||||||
|
|
|
@ -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
|
exposing their internal structure with proper indentation. Rails ActiveRecord
|
||||||
objects and usage within Rails templates are supported via included mixins.
|
objects and usage within Rails templates are supported via included mixins.
|
||||||
|
|
||||||
__NOTE__: awesome_print v1.2.0 is the last release supporting Ruby versions
|
__NOTE__: awesome_print v1.9.0 may not work on Ruby versions 2.4 or older or Rails versions 4.2 or older.
|
||||||
prior to v1.9.3 and Rails versions prior to v3.0. The upcoming awesome_print
|
The upcoming awesome_print v2.0 will *require* Ruby v1.9.3 or later and Rails v3.0 or later.
|
||||||
v2.0 will *require* Ruby v1.9.3 or later and Rails v3.0 or later.
|
|
||||||
|
|
||||||
### Installation ###
|
### Installation ###
|
||||||
# Installing as Ruby gem
|
# Installing as Ruby gem
|
||||||
|
|
|
@ -1,7 +0,0 @@
|
||||||
# This file was generated by Appraisal
|
|
||||||
|
|
||||||
source "https://rubygems.org"
|
|
||||||
|
|
||||||
gem "mongoid", "~> 4.0.0"
|
|
||||||
|
|
||||||
gemspec path: "../"
|
|
|
@ -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: "../"
|
|
|
@ -21,11 +21,11 @@ RSpec.describe 'AwesomePrint/ActiveRecord', skip: -> { !ExtVerifier.has_rails? }
|
||||||
:rank => 1
|
:rank => 1
|
||||||
}
|
}
|
||||||
EOS
|
EOS
|
||||||
if RUBY_VERSION < '1.9'
|
|
||||||
str.sub!('?', 'Sat Oct 10 12:30:00 UTC 1992')
|
expect(RUBY_VERSION).to be >= '2.5'
|
||||||
else
|
|
||||||
str.sub!('?', '1992-10-10 12:30:00 UTC')
|
str.sub!('?', '1992-10-10 12:30:00 UTC')
|
||||||
end
|
|
||||||
expect(out).to be_similar_to(str)
|
expect(out).to be_similar_to(str)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -49,13 +49,10 @@ RSpec.describe 'AwesomePrint/ActiveRecord', skip: -> { !ExtVerifier.has_rails? }
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
EOS
|
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!('??', '1992-10-10 12:30:00 UTC')
|
||||||
str.sub!('?!', '2003-05-26 14:15:00 UTC')
|
str.sub!('?!', '2003-05-26 14:15:00 UTC')
|
||||||
end
|
|
||||||
expect(out).to be_similar_to(str)
|
expect(out).to be_similar_to(str)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -81,13 +78,10 @@ RSpec.describe 'AwesomePrint/ActiveRecord', skip: -> { !ExtVerifier.has_rails? }
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
EOS
|
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!('??', '1992-10-10 12:30:00 UTC')
|
||||||
str.sub!('?!', '2003-05-26 14:15:00 UTC')
|
str.sub!('?!', '2003-05-26 14:15:00 UTC')
|
||||||
end
|
|
||||||
expect(out).to be_similar_to(str)
|
expect(out).to be_similar_to(str)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
@ -133,21 +127,13 @@ EOS
|
||||||
elsif activerecord_5_0?
|
elsif activerecord_5_0?
|
||||||
ActiveRecordData.raw_5_0_diana
|
ActiveRecordData.raw_5_0_diana
|
||||||
elsif activerecord_4_2?
|
elsif activerecord_4_2?
|
||||||
if RUBY_VERSION > '1.9.3'
|
|
||||||
ActiveRecordData.raw_4_2_diana
|
ActiveRecordData.raw_4_2_diana
|
||||||
else
|
|
||||||
ActiveRecordData.raw_4_2_diana_legacy
|
|
||||||
end
|
|
||||||
elsif activerecord_4_1?
|
elsif activerecord_4_1?
|
||||||
ActiveRecordData.raw_4_1_diana
|
ActiveRecordData.raw_4_1_diana
|
||||||
elsif activerecord_4_0?
|
elsif activerecord_4_0?
|
||||||
ActiveRecordData.raw_4_0_diana
|
ActiveRecordData.raw_4_0_diana
|
||||||
elsif activerecord_3_2?
|
elsif activerecord_3_2?
|
||||||
if RUBY_VERSION > '1.9.3'
|
|
||||||
ActiveRecordData.raw_3_2_diana
|
ActiveRecordData.raw_3_2_diana
|
||||||
else
|
|
||||||
ActiveRecordData.raw_3_2_diana_legacy
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
raw_object_string.sub!('?', '1992-10-10 12:30:00')
|
raw_object_string.sub!('?', '1992-10-10 12:30:00')
|
||||||
expect(out).to be_similar_to(raw_object_string)
|
expect(out).to be_similar_to(raw_object_string)
|
||||||
|
@ -164,21 +150,13 @@ EOS
|
||||||
elsif activerecord_5_0?
|
elsif activerecord_5_0?
|
||||||
ActiveRecordData.raw_5_0_multi
|
ActiveRecordData.raw_5_0_multi
|
||||||
elsif activerecord_4_2?
|
elsif activerecord_4_2?
|
||||||
if RUBY_VERSION > '1.9.3'
|
|
||||||
ActiveRecordData.raw_4_2_multi
|
ActiveRecordData.raw_4_2_multi
|
||||||
else
|
|
||||||
ActiveRecordData.raw_4_2_multi_legacy
|
|
||||||
end
|
|
||||||
elsif activerecord_4_1?
|
elsif activerecord_4_1?
|
||||||
ActiveRecordData.raw_4_1_multi
|
ActiveRecordData.raw_4_1_multi
|
||||||
elsif activerecord_4_0?
|
elsif activerecord_4_0?
|
||||||
ActiveRecordData.raw_4_0_multi
|
ActiveRecordData.raw_4_0_multi
|
||||||
elsif activerecord_3_2?
|
elsif activerecord_3_2?
|
||||||
if RUBY_VERSION > '1.9.3'
|
|
||||||
ActiveRecordData.raw_3_2_multi
|
ActiveRecordData.raw_3_2_multi
|
||||||
else
|
|
||||||
ActiveRecordData.raw_3_2_multi_legacy
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
raw_object_string.sub!('?', '1992-10-10 12:30:00')
|
raw_object_string.sub!('?', '1992-10-10 12:30:00')
|
||||||
raw_object_string.sub!('?', '2003-05-26 14:15: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/))
|
out = @ap.awesome(User.methods.grep(/first/))
|
||||||
|
|
||||||
if ActiveRecord::VERSION::STRING >= '3.2'
|
if ActiveRecord::VERSION::STRING >= '3.2'
|
||||||
if RUBY_VERSION >= '2.4.4'
|
|
||||||
expect(out).to match(/\sfirst\(\*arg.*?\)\s+User/)
|
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
|
|
||||||
else
|
else
|
||||||
expect(out).to match(/\sfirst\(\*arg.*?\)\s+User \(ActiveRecord::Base\)/)
|
expect(out).to match(/\sfirst\(\*arg.*?\)\s+User \(ActiveRecord::Base\)/)
|
||||||
end
|
end
|
||||||
|
|
||||||
# spec 2
|
# spec 2
|
||||||
out = @ap.awesome(User.methods.grep(/primary_key/))
|
out = @ap.awesome(User.methods.grep(/primary_key/))
|
||||||
if RUBY_VERSION >= '2.4.4'
|
|
||||||
expect(out).to match(/\sprimary_key\(.*?\)\s+User/)
|
expect(out).to match(/\sprimary_key\(.*?\)\s+User/)
|
||||||
else
|
|
||||||
expect(out).to match(/\sprimary_key\(.*?\)\s+Class \(ActiveRecord::AttributeMethods::PrimaryKey::ClassMethods\)/)
|
|
||||||
end
|
|
||||||
|
|
||||||
# spec 3
|
# spec 3
|
||||||
out = @ap.awesome(User.methods.grep(/validate/))
|
out = @ap.awesome(User.methods.grep(/validate/))
|
||||||
|
@ -258,11 +226,7 @@ class SubUser < User {
|
||||||
if ActiveRecord::VERSION::MAJOR < 3
|
if ActiveRecord::VERSION::MAJOR < 3
|
||||||
expect(out).to match(/\svalidate\(\*arg.*?\)\s+User \(ActiveRecord::Base\)/)
|
expect(out).to match(/\svalidate\(\*arg.*?\)\s+User \(ActiveRecord::Base\)/)
|
||||||
else
|
else
|
||||||
if RUBY_VERSION >= '2.4.4'
|
|
||||||
expect(out).to match(/\svalidate\(\*arg.*?\)\s+User/)
|
expect(out).to match(/\svalidate\(\*arg.*?\)\s+User/)
|
||||||
else
|
|
||||||
expect(out).to match(/\svalidate\(\*arg.*?\)\s+Class \(ActiveModel::Validations::ClassMethods\)/)
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in a new issue