mirror of
https://github.com/heartcombo/simple_form.git
synced 2022-11-09 12:19:26 -05:00
Remove support from Rails 4.0, 4.1 and 4.2
We won't support version less than Rails 5.0 anymore in Simple Form.
This commit is contained in:
parent
d1a383bd6f
commit
ffc13c9925
7 changed files with 6 additions and 84 deletions
|
@ -10,9 +10,6 @@ rvm:
|
|||
- ruby-head
|
||||
- jruby-9.1.14.0
|
||||
gemfile:
|
||||
- gemfiles/Gemfile.rails-4-0-stable
|
||||
- gemfiles/Gemfile.rails-4-1-stable
|
||||
- gemfiles/Gemfile.rails-4-2-stable
|
||||
- gemfiles/Gemfile.rails-5-0-stable
|
||||
- gemfiles/Gemfile.rails-5-1-stable
|
||||
- Gemfile
|
||||
|
@ -24,10 +21,6 @@ matrix:
|
|||
gemfile: Gemfile
|
||||
- rvm: 2.1.10
|
||||
gemfile: Gemfile
|
||||
- rvm: 2.4.0
|
||||
gemfile: gemfiles/Gemfile.rails-4-1-stable # activesupport 4.1 depends on json 1.8.3 which does not compile with Ruby 2.4.0
|
||||
- rvm: ruby-head
|
||||
gemfile: gemfiles/Gemfile.rails-4-1-stable # activesupport 4.1 depends on json 1.8.3 which does not compile with Ruby 2.4.0
|
||||
- rvm: jruby-9.1.14.0
|
||||
gemfile: Gemfile
|
||||
- rvm: 1.9.3
|
||||
|
|
|
@ -1,17 +0,0 @@
|
|||
source 'https://rubygems.org'
|
||||
|
||||
gemspec path: '..'
|
||||
|
||||
platforms :rbx do
|
||||
gem 'rubysl', '~> 2.0'
|
||||
gem 'rubinius-developer_tools'
|
||||
end
|
||||
|
||||
gem 'country_select', '~> 1.1.1'
|
||||
gem 'railties', github: 'rails/rails', branch: '4-0-stable'
|
||||
gem 'activemodel', github: 'rails/rails', branch: '4-0-stable'
|
||||
gem 'actionpack', github: 'rails/rails', branch: '4-0-stable'
|
||||
gem 'rake'
|
||||
gem 'tzinfo'
|
||||
gem 'rdoc'
|
||||
gem 'nokogiri', '~> 1.6.8'
|
|
@ -1,16 +0,0 @@
|
|||
source 'https://rubygems.org'
|
||||
|
||||
gemspec :path => '..'
|
||||
|
||||
platforms :rbx do
|
||||
gem 'rubysl', '~> 2.0'
|
||||
gem 'rubinius-developer_tools'
|
||||
end
|
||||
|
||||
gem 'country_select', '~> 1.1.1'
|
||||
gem 'railties', github: 'rails/rails', branch: '4-1-stable'
|
||||
gem 'activemodel', github: 'rails/rails', branch: '4-1-stable'
|
||||
gem 'actionpack', github: 'rails/rails', branch: '4-1-stable'
|
||||
gem 'rake'
|
||||
gem 'tzinfo'
|
||||
gem 'nokogiri', '~> 1.6.8'
|
|
@ -1,16 +0,0 @@
|
|||
source 'https://rubygems.org'
|
||||
|
||||
gemspec :path => '..'
|
||||
|
||||
platforms :rbx do
|
||||
gem 'rubysl', '~> 2.0'
|
||||
gem 'rubinius-developer_tools'
|
||||
end
|
||||
|
||||
gem 'country_select', '~> 1.1.1'
|
||||
gem 'railties', github: 'rails/rails', branch: '4-2-stable'
|
||||
gem 'activemodel', github: 'rails/rails', branch: '4-2-stable'
|
||||
gem 'actionpack', github: 'rails/rails', branch: '4-2-stable'
|
||||
gem 'rake'
|
||||
gem 'tzinfo'
|
||||
gem 'nokogiri', '~> 1.6.8'
|
|
@ -28,19 +28,9 @@ module SimpleForm
|
|||
length_validator.options[:tokenizer]
|
||||
end
|
||||
|
||||
# Use validation with tokenizer if version of Rails is less than 5,
|
||||
# if not validate without the tokenizer, if version is greater than Rails 4.
|
||||
if ActionPack::VERSION::STRING < '5'
|
||||
def maximum_length_value_from(length_validator)
|
||||
if length_validator && !has_tokenizer?(length_validator)
|
||||
length_validator.options[:is] || length_validator.options[:maximum]
|
||||
end
|
||||
end
|
||||
elsif ActionPack::VERSION::STRING >= '5'
|
||||
def maximum_length_value_from(length_validator)
|
||||
if length_validator
|
||||
length_validator.options[:is] || length_validator.options[:maximum]
|
||||
end
|
||||
def maximum_length_value_from(length_validator)
|
||||
if length_validator
|
||||
length_validator.options[:is] || length_validator.options[:maximum]
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
@ -28,19 +28,9 @@ module SimpleForm
|
|||
length_validator.options[:tokenizer]
|
||||
end
|
||||
|
||||
# Use validation with tokenizer if version of Rails is less than 5,
|
||||
# if not validate without the tokenizer, if version is greater than Rails 4.
|
||||
if ActionPack::VERSION::STRING < '5'
|
||||
def minimum_length_value_from(length_validator)
|
||||
if length_validator && !has_tokenizer?(length_validator)
|
||||
length_validator.options[:is] || length_validator.options[:minimum]
|
||||
end
|
||||
end
|
||||
elsif ActionPack::VERSION::STRING >= '5'
|
||||
def minimum_length_value_from(length_validator)
|
||||
if length_validator
|
||||
length_validator.options[:is] || length_validator.options[:minimum]
|
||||
end
|
||||
def minimum_length_value_from(length_validator)
|
||||
if length_validator
|
||||
length_validator.options[:is] || length_validator.options[:minimum]
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
@ -264,8 +264,6 @@ class WrapperTest < ActionView::TestCase
|
|||
end
|
||||
|
||||
test "input with aria attributes will merge with wrapper_options' aria" do
|
||||
skip unless ActionPack::VERSION::MAJOR == '4' && ActionPack::VERSION::MINOR >= '2'
|
||||
|
||||
swap_wrapper :default, custom_wrapper_with_input_aria_modal do
|
||||
with_concat_form_for @user do |f|
|
||||
concat f.input :name, input_html: { aria: { modal: 'another-aria', target: 'merge-aria' } }
|
||||
|
|
Loading…
Reference in a new issue