Skip to content

Commit

Permalink
Add ruby 3.0.0 and Rails 6 to travis matrix - and also use a stable w…
Browse files Browse the repository at this point in the history
…asabi version
  • Loading branch information
bogdanRada committed Feb 21, 2021
1 parent d84c462 commit e14bdc5
Show file tree
Hide file tree
Showing 7 changed files with 50 additions and 8 deletions.
2 changes: 2 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -67,5 +67,7 @@ rvm:
- 2.4.7
- 2.5.6
- 2.6.5
- 2.7.1
- 3.0.0
notifications:
email: false
10 changes: 8 additions & 2 deletions Appraisals
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ if RUBY_VERSION <= "2.4.0"
gem 'actionpack' , '4.2.7.1'
end
end
if RUBY_VERSION >= '2.2.0' && ENV['BUNDLER_VERSION'].to_s <= '2.0'
if RUBY_VERSION >= '2.2.0' && RUBY_VERSION < '3.0.0' && ENV['BUNDLER_VERSION'].to_s <= '2.0'
appraise "rails-5.0.0" do
gem "rails", "5.0.0"
end
Expand All @@ -40,7 +40,7 @@ if RUBY_VERSION >= '2.2.0' && ENV['BUNDLER_VERSION'].to_s <= '2.0'
end
end

if RUBY_VERSION >= '2.2.0' && ENV['BUNDLER_VERSION'].to_s >= '2.0'
if RUBY_VERSION >= '2.2.0' && RUBY_VERSION < '3.0.0' && ENV['BUNDLER_VERSION'].to_s >= '2.0'
appraise "rails-5.2.0" do
gem "rails", "5.2.0"
end
Expand All @@ -57,3 +57,9 @@ if RUBY_VERSION >= '2.2.0' && ENV['BUNDLER_VERSION'].to_s >= '2.0'
gem "rails", "6.0.1"
end
end

if RUBY_VERSION >= '3.0.0' && ENV['BUNDLER_VERSION'].to_s >= '2.0'
appraise "rails-6.1.3" do
gem "rails", "6.1.3"
end
end
8 changes: 8 additions & 0 deletions gemfiles/rails_6.1.3.gemfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# This file was generated by Appraisal

source "http://rubygems.org"

gem "wash_out", git: "https://github.com/inossidabile/wash_out.git"
gem "rails", "6.1.3"

gemspec path: "../"
4 changes: 2 additions & 2 deletions install-travis-bundler.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ echo "Trying to compare rails ${rails_version:="1"} with 5.2"
if (( $(echo "${rails_version%.*} >= 5.2" |bc -l) )); then
echo "Installing Bundler v2"
gem uninstall -v '< 2.0' -i "$(rvm gemdir)"@global -ax bundler --force || true
gem install bundler -v '2.0.1'
export MY_BUNDLER_VERSION="_2.0.1_"
gem install bundler -v '2.2.11'
export MY_BUNDLER_VERSION="_2.2.11_"
else
echo "Installing Bundler v1"
gem uninstall -v '>= 2' -i "$(rvm gemdir)"@global -ax bundler --force || true
Expand Down
2 changes: 1 addition & 1 deletion lib/washout_builder/version.rb
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ module VERSION
# the minor version of the gem
MINOR = 0
# the tiny version of the gem
TINY = 3
TINY = 4
# if the version should be a prerelease
PRE = nil

Expand Down
25 changes: 25 additions & 0 deletions spec/spec_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -154,3 +154,28 @@ def silence_stream(stream)
old_stream.close
end
end

# TODO: remove this when wasabi will update their code
require 'uri'
if !defined?(::URI.unescape)
::URI.class_eval do
# this was removed in this commit
# https://github.com/ruby/uri/commit/61c6a47ebf1f2726b60a2bbd70964d64e14b1f98
# so we are adding it back because we need to be compatible with wasabi on ruby 3.0.0
module UriEscapeBackport

def escape(*arg)
::URI::DEFAULT_PARSER.escape(*arg)
end

alias encode escape

def unescape(*arg)
::URI::DEFAULT_PARSER.unescape(*arg)
end

alias decode unescape
end
extend UriEscapeBackport
end
end
7 changes: 4 additions & 3 deletions washout_builder.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,14 @@ Gem::Specification.new do |s|

s.add_runtime_dependency 'wash_out', '>= 0.9.1', '>= 0.9.1'
s.add_runtime_dependency 'activesupport', '>= 4.0', '>= 4.0'

s.add_development_dependency 'wasabi', '~> 3.5', '>= 3.5'

# wasabi >= 3.6.0 does not work well with savon
s.add_development_dependency 'wasabi', '< 3.6.0'
s.add_development_dependency 'savon', '~> 2.11', '>= 2.11'
s.add_development_dependency 'httpi', '~> 2.4', '>= 2.4'
s.add_development_dependency 'nokogiri', '~> 1.7', '>= 1.7'

s.add_development_dependency 'rspec-rails','4.0.0.beta3'
s.add_development_dependency 'rspec-rails','4.0.2'
s.add_development_dependency 'appraisal', '~> 2.1', '>= 2.1'
s.add_development_dependency 'simplecov', '~> 0.12', '>= 0.12'
s.add_development_dependency 'simplecov-summary', '~> 0.0.5', '>= 0.0.5'
Expand Down

0 comments on commit e14bdc5

Please sign in to comment.