Merge pull request #1614 from gssbzn/drop-old-ruby
Drop EOL Ruby versions
This commit is contained in:
commit
f5758fcd82
44
.travis.yml
44
.travis.yml
|
@ -2,14 +2,12 @@ sudo: false
|
|||
cache: bundler
|
||||
language: ruby
|
||||
rvm:
|
||||
- 2.0.0
|
||||
- 2.1.10
|
||||
- 2.2.7
|
||||
- 2.3.4
|
||||
- 2.4.1
|
||||
- 2.5.0
|
||||
- 2.3.8
|
||||
- 2.4.5
|
||||
- 2.5.3
|
||||
- ruby-head
|
||||
- jruby-9.1.14.0
|
||||
- jruby-9.1.17.0
|
||||
- jruby-9.2.0.0
|
||||
gemfile:
|
||||
- gemfiles/Gemfile.rails-5-0-stable
|
||||
- gemfiles/Gemfile.rails-5-1-stable
|
||||
|
@ -18,38 +16,10 @@ gemfile:
|
|||
matrix:
|
||||
allow_failures:
|
||||
- rvm: ruby-head
|
||||
exclude:
|
||||
- rvm: 2.0.0
|
||||
- rvm: jruby-9.1.17.0
|
||||
gemfile: Gemfile
|
||||
- rvm: 2.1.10
|
||||
- rvm: jruby-9.2.0.0
|
||||
gemfile: Gemfile
|
||||
- rvm: jruby-9.1.14.0
|
||||
gemfile: Gemfile
|
||||
- rvm: 1.9.3
|
||||
gemfile: gemfiles/Gemfile.rails-5-0-stable
|
||||
- rvm: 2.0.0
|
||||
gemfile: gemfiles/Gemfile.rails-5-0-stable
|
||||
- rvm: 2.1.10
|
||||
gemfile: gemfiles/Gemfile.rails-5-0-stable
|
||||
- rvm: jruby-9.1.14.0
|
||||
gemfile: gemfiles/Gemfile.rails-5-0-stable
|
||||
- rvm: jruby-9.1.14.0
|
||||
gemfile: gemfiles/Gemfile.rails-5-1-stable # rack 2.0.1 requires Ruby version >= 2.2.2; any sol'n for jruby?
|
||||
- rvm: 1.9.3
|
||||
gemfile: gemfiles/Gemfile.rails-5-1-stable # rack 2.0.1 requires Ruby version >= 2.2.2
|
||||
- rvm: 2.0.0
|
||||
gemfile: gemfiles/Gemfile.rails-5-1-stable # rack 2.0.1 requires Ruby version >= 2.2.2
|
||||
- rvm: 2.1.10
|
||||
gemfile: gemfiles/Gemfile.rails-5-1-stable # rack 2.0.1 requires Ruby version >= 2.2.2
|
||||
- rvm: jruby-9.1.14.0
|
||||
gemfile: gemfiles/Gemfile.rails-5-2-stable # rack 2.0.1 requires Ruby version >= 2.2.2; any sol'n for jruby?
|
||||
- rvm: 1.9.3
|
||||
gemfile: gemfiles/Gemfile.rails-5-2-stable # rack 2.0.1 requires Ruby version >= 2.2.2
|
||||
- rvm: 2.0.0
|
||||
gemfile: gemfiles/Gemfile.rails-5-2-stable # rack 2.0.1 requires Ruby version >= 2.2.2
|
||||
- rvm: 2.1.10
|
||||
gemfile: gemfiles/Gemfile.rails-5-2-stable # rack 2.0.1 requires Ruby version >= 2.2.2
|
||||
|
||||
notifications:
|
||||
email: false
|
||||
slack:
|
||||
|
|
|
@ -3,6 +3,7 @@
|
|||
### Enhancements
|
||||
* Guess input type more carefully. [@sringling](https://github.com/sringling)
|
||||
* Allow custom error on forms without model. [@victorperez](https://github.com/victorperez)
|
||||
* Do not support Ruby < 2.3 anymore. [@gssbzn](https://github.com/gssbzn)
|
||||
|
||||
### Bug fix
|
||||
* Improve disabled option to input_field. [@betelgeuse](https://github.com/betelgeuse)
|
||||
|
|
|
@ -6,12 +6,7 @@ require 'test_helper'
|
|||
class DateTimeInputWithHtml5Test < ActionView::TestCase
|
||||
test 'input generates a datetime input for datetime attributes if HTML5 compatibility is explicitly enbled' do
|
||||
with_input_for @user, :created_at, :datetime, html5: true
|
||||
|
||||
if ActionPack::VERSION::STRING >= '5'
|
||||
assert_select 'input[type="datetime-local"]'
|
||||
elsif ActionPack::VERSION::STRING < '5'
|
||||
assert_select 'input[type="datetime"]'
|
||||
end
|
||||
assert_select 'input[type="datetime-local"]'
|
||||
end
|
||||
|
||||
test 'input generates a datetime select for datetime attributes' do
|
||||
|
@ -80,12 +75,7 @@ class DateTimeInputWithoutHtml5Test < ActionView::TestCase
|
|||
test 'input generates a datetime input for datetime attributes if HTML5 compatibility is explicitly enabled' do
|
||||
swap_wrapper do
|
||||
with_input_for @user, :created_at, :datetime, html5: true
|
||||
|
||||
if ActionPack::VERSION::STRING >= '5'
|
||||
assert_select 'input[type="datetime-local"]'
|
||||
elsif ActionPack::VERSION::STRING < '5'
|
||||
assert_select 'input[type="datetime"]'
|
||||
end
|
||||
assert_select 'input[type="datetime-local"]'
|
||||
end
|
||||
end
|
||||
|
||||
|
|
|
@ -6,22 +6,14 @@ class PriorityInputTest < ActionView::TestCase
|
|||
test 'input generates a country select field' do
|
||||
with_input_for @user, :country, :country
|
||||
assert_select 'select#user_country'
|
||||
if ActionPack::VERSION::STRING >= '5'
|
||||
assert_select 'select option[value=BR]', 'Brazil'
|
||||
elsif ActionPack::VERSION::STRING < '5'
|
||||
assert_select 'select option[value=Brazil]', 'Brazil'
|
||||
end
|
||||
assert_select 'select option[value=BR]', 'Brazil'
|
||||
assert_no_select 'select option[value=""][disabled=disabled]'
|
||||
end
|
||||
|
||||
test 'input generates a country select with SimpleForm default' do
|
||||
swap SimpleForm, country_priority: [ 'Brazil' ] do
|
||||
with_input_for @user, :country, :country
|
||||
if ActionPack::VERSION::STRING >= '5'
|
||||
assert_select 'select option[value="---------------"][disabled=disabled]'
|
||||
elsif ActionPack::VERSION::STRING < '5'
|
||||
assert_select 'select option[value=""][disabled=disabled]'
|
||||
end
|
||||
assert_select 'select option[value="---------------"][disabled=disabled]'
|
||||
end
|
||||
end
|
||||
|
||||
|
|
|
@ -43,18 +43,6 @@ class StringInputTest < ActionView::TestCase
|
|||
assert_select 'input.string[minlength="5"]'
|
||||
end
|
||||
|
||||
if ActionPack::VERSION::STRING < '5'
|
||||
test 'input does not get maxlength from validation when tokenizer present' do
|
||||
with_input_for @validating_user, :action, :string
|
||||
assert_no_select 'input.string[maxlength]'
|
||||
end
|
||||
|
||||
test 'input does not get minlength from validation when tokenizer present' do
|
||||
with_input_for @validating_user, :action, :string
|
||||
assert_no_select 'input.string[minlength]'
|
||||
end
|
||||
end
|
||||
|
||||
test 'input gets maxlength from validation when :is option present' do
|
||||
with_input_for @validating_user, :home_picture, :string
|
||||
assert_select 'input.string[maxlength="12"]'
|
||||
|
|
|
@ -277,9 +277,6 @@ class ValidatingUser < User
|
|||
only_integer: true
|
||||
validates_length_of :name, maximum: 25, minimum: 5
|
||||
validates_length_of :description, in: 15..50
|
||||
if ActionPack::VERSION::STRING < '5'
|
||||
validates_length_of :action, maximum: 10, tokenizer: ->(str) { str.scan(/\w+/) }
|
||||
end
|
||||
validates_length_of :home_picture, is: 12
|
||||
|
||||
def min_amount
|
||||
|
|
Loading…
Reference in New Issue