shoulda-matchers 3.1.3 → 4.0.0.rc1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.hound/ruby.yml +336 -316
- data/.python-version +1 -0
- data/.rubocop.yml +3 -1
- data/.travis.yml +7 -6
- data/Appraisals +76 -44
- data/CONTRIBUTING.md +137 -66
- data/Gemfile +5 -5
- data/Gemfile.lock +30 -35
- data/MAINTAINING.md +250 -0
- data/MIT-LICENSE +1 -1
- data/NEWS.md +176 -4
- data/README.md +138 -200
- data/Rakefile +7 -0
- data/bin/setup +190 -0
- data/doc_config/yard/templates/default/fulldoc/html/css/global.css +4 -0
- data/doc_config/yard/templates/default/fulldoc/html/full_list.erb +0 -6
- data/doc_config/yard/templates/default/fulldoc/html/js/app.js +0 -17
- data/doc_config/yard/templates/default/fulldoc/html/setup.rb +27 -0
- data/gemfiles/4.2.gemfile +21 -20
- data/gemfiles/4.2.gemfile.lock +143 -140
- data/gemfiles/5.0.gemfile +37 -0
- data/gemfiles/5.0.gemfile.lock +238 -0
- data/gemfiles/5.1.gemfile +38 -0
- data/gemfiles/5.1.gemfile.lock +254 -0
- data/gemfiles/5.2.gemfile +40 -0
- data/gemfiles/5.2.gemfile.lock +273 -0
- data/lib/shoulda/matchers/action_controller/callback_matcher.rb +18 -6
- data/lib/shoulda/matchers/action_controller/permit_matcher.rb +6 -1
- data/lib/shoulda/matchers/action_controller/redirect_to_matcher.rb +1 -1
- data/lib/shoulda/matchers/action_controller/route_matcher.rb +87 -27
- data/lib/shoulda/matchers/active_model/allow_value_matcher.rb +1 -0
- data/lib/shoulda/matchers/active_model/allow_value_matcher/attribute_setter.rb +0 -4
- data/lib/shoulda/matchers/active_model/validate_absence_of_matcher.rb +5 -0
- data/lib/shoulda/matchers/active_model/validate_acceptance_of_matcher.rb +5 -0
- data/lib/shoulda/matchers/active_model/validate_confirmation_of_matcher.rb +26 -11
- data/lib/shoulda/matchers/active_model/validate_exclusion_of_matcher.rb +39 -4
- data/lib/shoulda/matchers/active_model/validate_inclusion_of_matcher.rb +116 -47
- data/lib/shoulda/matchers/active_model/validate_length_of_matcher.rb +127 -38
- data/lib/shoulda/matchers/active_model/validate_numericality_of_matcher.rb +55 -37
- data/lib/shoulda/matchers/active_model/validate_presence_of_matcher.rb +30 -1
- data/lib/shoulda/matchers/active_model/validation_matcher.rb +11 -4
- data/lib/shoulda/matchers/active_model/validation_matcher/build_description.rb +11 -6
- data/lib/shoulda/matchers/active_record.rb +3 -0
- data/lib/shoulda/matchers/active_record/association_matcher.rb +172 -22
- data/lib/shoulda/matchers/active_record/association_matchers/join_table_matcher.rb +1 -1
- data/lib/shoulda/matchers/active_record/association_matchers/option_verifier.rb +11 -6
- data/lib/shoulda/matchers/active_record/association_matchers/optional_matcher.rb +46 -0
- data/lib/shoulda/matchers/active_record/association_matchers/required_matcher.rb +51 -0
- data/lib/shoulda/matchers/active_record/define_enum_for_matcher.rb +268 -38
- data/lib/shoulda/matchers/active_record/have_db_index_matcher.rb +1 -1
- data/lib/shoulda/matchers/active_record/have_secure_token_matcher.rb +111 -0
- data/lib/shoulda/matchers/active_record/validate_uniqueness_of_matcher.rb +207 -79
- data/lib/shoulda/matchers/doublespeak/object_double.rb +5 -1
- data/lib/shoulda/matchers/independent/delegate_method_matcher.rb +100 -21
- data/lib/shoulda/matchers/rails_shim.rb +133 -52
- data/lib/shoulda/matchers/routing.rb +2 -2
- data/lib/shoulda/matchers/util.rb +23 -1
- data/lib/shoulda/matchers/util/word_wrap.rb +6 -2
- data/lib/shoulda/matchers/version.rb +1 -1
- data/script/install_gems_in_all_appraisals +3 -1
- data/script/run_all_tests +3 -1
- data/script/supported_ruby_versions +7 -0
- data/script/update_gem_in_all_appraisals +3 -1
- data/script/update_gems_in_all_appraisals +3 -1
- data/shoulda-matchers.gemspec +3 -3
- data/spec/acceptance/independent_matchers_spec.rb +2 -2
- data/spec/acceptance/multiple_libraries_integration_spec.rb +1 -1
- data/spec/acceptance/rails_integration_spec.rb +2 -2
- data/spec/spec_helper.rb +2 -3
- data/spec/support/acceptance/helpers.rb +2 -0
- data/spec/support/acceptance/helpers/command_helpers.rb +17 -4
- data/spec/support/acceptance/helpers/rails_migration_helpers.rb +21 -0
- data/spec/support/acceptance/helpers/step_helpers.rb +1 -1
- data/spec/support/tests/current_bundle.rb +3 -9
- data/spec/support/tests/filesystem.rb +2 -2
- data/spec/support/unit/attribute.rb +0 -2
- data/spec/support/unit/capture.rb +9 -3
- data/spec/support/unit/helpers/action_pack_versions.rb +22 -0
- data/spec/support/unit/helpers/active_model_versions.rb +4 -0
- data/spec/support/unit/helpers/active_record_versions.rb +22 -2
- data/spec/support/unit/helpers/active_resource_builder.rb +2 -2
- data/spec/support/unit/helpers/controller_builder.rb +1 -1
- data/spec/support/unit/helpers/message_helpers.rb +19 -0
- data/spec/support/unit/helpers/rails_versions.rb +14 -0
- data/spec/support/unit/matchers/fail_with_message_matcher.rb +7 -5
- data/spec/support/unit/matchers/print_warning_including.rb +21 -13
- data/spec/support/unit/model_creation_strategies/active_record.rb +1 -1
- data/spec/support/unit/model_creators/active_record.rb +0 -1
- data/spec/support/unit/model_creators/basic.rb +7 -2
- data/spec/support/unit/rails_application.rb +25 -0
- data/spec/support/unit/record_validating_confirmation_builder.rb +5 -2
- data/spec/support/unit/validation_matcher_scenario.rb +0 -2
- data/spec/unit/shoulda/matchers/action_controller/callback_matcher_spec.rb +18 -18
- data/spec/unit/shoulda/matchers/action_controller/permit_matcher_spec.rb +33 -5
- data/spec/unit/shoulda/matchers/action_controller/render_template_matcher_spec.rb +1 -1
- data/spec/unit/shoulda/matchers/active_model/allow_mass_assignment_of_matcher_spec.rb +80 -78
- data/spec/unit/shoulda/matchers/active_model/allow_value_matcher_spec.rb +7 -9
- data/spec/unit/shoulda/matchers/active_model/validate_absence_of_matcher_spec.rb +28 -4
- data/spec/unit/shoulda/matchers/active_model/validate_acceptance_of_matcher_spec.rb +19 -1
- data/spec/unit/shoulda/matchers/active_model/validate_confirmation_of_matcher_spec.rb +27 -4
- data/spec/unit/shoulda/matchers/active_model/validate_exclusion_of_matcher_spec.rb +62 -5
- data/spec/unit/shoulda/matchers/active_model/validate_inclusion_of_matcher_spec.rb +52 -18
- data/spec/unit/shoulda/matchers/active_model/validate_length_of_matcher_spec.rb +51 -4
- data/spec/unit/shoulda/matchers/active_model/validate_numericality_of_matcher_spec.rb +99 -71
- data/spec/unit/shoulda/matchers/active_model/validate_presence_of_matcher_spec.rb +41 -15
- data/spec/unit/shoulda/matchers/active_record/association_matcher_spec.rb +445 -15
- data/spec/unit/shoulda/matchers/active_record/define_enum_for_matcher_spec.rb +615 -93
- data/spec/unit/shoulda/matchers/active_record/have_secure_token_matcher_spec.rb +169 -0
- data/spec/unit/shoulda/matchers/active_record/validate_uniqueness_of_matcher_spec.rb +167 -97
- data/spec/unit/shoulda/matchers/doublespeak/world_spec.rb +2 -4
- data/spec/unit/shoulda/matchers/independent/delegate_method_matcher_spec.rb +152 -19
- data/spec/unit/shoulda/matchers/routing/route_matcher_spec.rb +258 -94
- data/spec/unit_spec_helper.rb +9 -1
- data/zeus.json +1 -1
- metadata +31 -16
- data/gemfiles/4.0.0.gemfile +0 -38
- data/gemfiles/4.0.0.gemfile.lock +0 -223
- data/gemfiles/4.0.1.gemfile +0 -38
- data/gemfiles/4.0.1.gemfile.lock +0 -225
- data/gemfiles/4.1.gemfile +0 -38
- data/gemfiles/4.1.gemfile.lock +0 -220
- data/script/SUPPORTED_VERSIONS +0 -1
@@ -1,10 +1,14 @@
|
|
1
1
|
module Shoulda
|
2
2
|
module Matchers
|
3
3
|
# @private
|
4
|
-
|
5
|
-
|
4
|
+
module WordWrap
|
5
|
+
def word_wrap(document, options = {})
|
6
|
+
Document.new(document, options).wrap
|
7
|
+
end
|
6
8
|
end
|
7
9
|
|
10
|
+
extend WordWrap
|
11
|
+
|
8
12
|
# @private
|
9
13
|
class Document
|
10
14
|
def initialize(document, indent: 0)
|
data/script/run_all_tests
CHANGED
data/shoulda-matchers.gemspec
CHANGED
@@ -8,7 +8,7 @@ Gem::Specification.new do |s|
|
|
8
8
|
"Matt Jankowski", "Stafford Brunk", "Elliot Winkler"]
|
9
9
|
s.date = Time.now.strftime("%Y-%m-%d")
|
10
10
|
s.email = "support@thoughtbot.com"
|
11
|
-
s.homepage = "
|
11
|
+
s.homepage = "https://matchers.shoulda.io/"
|
12
12
|
s.summary = "Making tests easy on the fingers and eyes"
|
13
13
|
s.license = "MIT"
|
14
14
|
s.description = "Making tests easy on the fingers and eyes"
|
@@ -18,6 +18,6 @@ Gem::Specification.new do |s|
|
|
18
18
|
s.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
|
19
19
|
s.require_paths = ["lib"]
|
20
20
|
|
21
|
-
s.required_ruby_version = '>= 2.
|
22
|
-
s.add_dependency('activesupport', '>= 4.
|
21
|
+
s.required_ruby_version = '>= 2.2.0'
|
22
|
+
s.add_dependency('activesupport', '>= 4.2.0')
|
23
23
|
end
|
@@ -56,7 +56,7 @@ describe 'shoulda-matchers has independent matchers, specifically delegate_metho
|
|
56
56
|
|
57
57
|
expect(result).to indicate_number_of_tests_was_run(1)
|
58
58
|
expect(result).to have_output(
|
59
|
-
'Courier should delegate #deliver to #post_office object'
|
59
|
+
'Courier should delegate #deliver to the #post_office object'
|
60
60
|
)
|
61
61
|
end
|
62
62
|
|
@@ -119,7 +119,7 @@ describe 'shoulda-matchers has independent matchers, specifically delegate_metho
|
|
119
119
|
|
120
120
|
expect(result).to indicate_number_of_tests_was_run(1)
|
121
121
|
expect(result).to have_output(
|
122
|
-
/Courier\s+should delegate #deliver to #post_office object/
|
122
|
+
/Courier\s+should delegate #deliver to the #post_office object/
|
123
123
|
)
|
124
124
|
end
|
125
125
|
end
|
@@ -5,7 +5,7 @@ describe 'shoulda-matchers integrates with multiple libraries' do
|
|
5
5
|
create_rails_application
|
6
6
|
|
7
7
|
write_file 'db/migrate/1_create_users.rb', <<-FILE
|
8
|
-
class CreateUsers <
|
8
|
+
class CreateUsers < #{migration_class_name}
|
9
9
|
def self.up
|
10
10
|
create_table :users do |t|
|
11
11
|
t.string :name
|
@@ -5,7 +5,7 @@ describe 'shoulda-matchers integrates with Rails' do
|
|
5
5
|
create_rails_application
|
6
6
|
|
7
7
|
write_file 'db/migrate/1_create_users.rb', <<-FILE
|
8
|
-
class CreateUsers <
|
8
|
+
class CreateUsers < #{migration_class_name}
|
9
9
|
def self.up
|
10
10
|
create_table :users do |t|
|
11
11
|
t.string :name
|
@@ -26,7 +26,7 @@ describe 'shoulda-matchers integrates with Rails' do
|
|
26
26
|
class ExamplesController < ApplicationController
|
27
27
|
def show
|
28
28
|
@example = 'hello'
|
29
|
-
|
29
|
+
head :ok
|
30
30
|
end
|
31
31
|
end
|
32
32
|
FILE
|
data/spec/spec_helper.rb
CHANGED
@@ -7,15 +7,14 @@ require 'pry-byebug'
|
|
7
7
|
require 'rspec'
|
8
8
|
|
9
9
|
RSpec.configure do |config|
|
10
|
-
config.order = :random
|
11
|
-
|
12
10
|
config.expect_with :rspec do |c|
|
13
11
|
c.syntax = :expect
|
14
12
|
end
|
15
13
|
|
14
|
+
config.order = :random
|
16
15
|
config.default_formatter = 'doc'
|
17
|
-
|
18
16
|
config.mock_with :rspec
|
17
|
+
config.example_status_persistence_file_path = 'spec/examples.txt'
|
19
18
|
end
|
20
19
|
|
21
20
|
$VERBOSE = true
|
@@ -3,6 +3,7 @@ require_relative 'helpers/base_helpers'
|
|
3
3
|
require_relative 'helpers/command_helpers'
|
4
4
|
require_relative 'helpers/gem_helpers'
|
5
5
|
require_relative 'helpers/n_unit_helpers'
|
6
|
+
require_relative 'helpers/rails_migration_helpers'
|
6
7
|
require_relative 'helpers/rails_version_helpers'
|
7
8
|
require_relative 'helpers/rspec_helpers'
|
8
9
|
require_relative 'helpers/ruby_version_helpers'
|
@@ -23,6 +24,7 @@ module AcceptanceTests
|
|
23
24
|
include CommandHelpers
|
24
25
|
include GemHelpers
|
25
26
|
include NUnitHelpers
|
27
|
+
include RailsMigrationHelpers
|
26
28
|
include RailsVersionHelpers
|
27
29
|
include RspecHelpers
|
28
30
|
include RubyVersionHelpers
|
@@ -20,11 +20,8 @@ module AcceptanceTests
|
|
20
20
|
end
|
21
21
|
end
|
22
22
|
|
23
|
-
def
|
23
|
+
def run_command_isolated_from_bundle(*args)
|
24
24
|
run_command(*args) do |runner|
|
25
|
-
runner.command_prefix = 'bundle exec'
|
26
|
-
runner.env['BUNDLE_GEMFILE'] = fs.find_in_project('Gemfile').to_s
|
27
|
-
|
28
25
|
runner.around_command do |run_command|
|
29
26
|
Bundler.with_clean_env(&run_command)
|
30
27
|
end
|
@@ -33,6 +30,22 @@ module AcceptanceTests
|
|
33
30
|
end
|
34
31
|
end
|
35
32
|
|
33
|
+
def run_command_isolated_from_bundle!(*args)
|
34
|
+
run_command_isolated_from_bundle(*args) do |runner|
|
35
|
+
runner.run_successfully = true
|
36
|
+
yield runner if block_given?
|
37
|
+
end
|
38
|
+
end
|
39
|
+
|
40
|
+
def run_command_within_bundle(*args)
|
41
|
+
run_command_isolated_from_bundle(*args) do |runner|
|
42
|
+
runner.command_prefix = 'bundle exec'
|
43
|
+
runner.env['BUNDLE_GEMFILE'] = fs.find_in_project('Gemfile').to_s
|
44
|
+
|
45
|
+
yield runner if block_given?
|
46
|
+
end
|
47
|
+
end
|
48
|
+
|
36
49
|
def run_command_within_bundle!(*args)
|
37
50
|
run_command_within_bundle(*args) do |runner|
|
38
51
|
runner.run_successfully = true
|
@@ -0,0 +1,21 @@
|
|
1
|
+
require_relative 'gem_helpers'
|
2
|
+
|
3
|
+
module AcceptanceTests
|
4
|
+
module RailsMigrationHelpers
|
5
|
+
include RailsVersionHelpers
|
6
|
+
|
7
|
+
def migration_class_name
|
8
|
+
if rails_version >= 5
|
9
|
+
"ActiveRecord::Migration[#{rails_version_for_migration}]"
|
10
|
+
else
|
11
|
+
'ActiveRecord::Migration'
|
12
|
+
end
|
13
|
+
end
|
14
|
+
|
15
|
+
private
|
16
|
+
|
17
|
+
def rails_version_for_migration
|
18
|
+
rails_version.to_s.split('.')[0..1].join('.')
|
19
|
+
end
|
20
|
+
end
|
21
|
+
end
|
@@ -32,18 +32,12 @@ EOT
|
|
32
32
|
available_appraisals.sort.last
|
33
33
|
end
|
34
34
|
|
35
|
-
private
|
36
|
-
|
37
35
|
def available_appraisals
|
38
|
-
|
39
|
-
|
40
|
-
Appraisal::File.each do |appraisal|
|
41
|
-
appraisals << appraisal.name
|
42
|
-
end
|
43
|
-
|
44
|
-
appraisals
|
36
|
+
Appraisal::AppraisalFile.each.map(&:name)
|
45
37
|
end
|
46
38
|
|
39
|
+
private
|
40
|
+
|
47
41
|
def current_appraisal
|
48
42
|
if appraisal_in_use?
|
49
43
|
File.basename(path, ".gemfile")
|
@@ -2,9 +2,9 @@ require 'fileutils'
|
|
2
2
|
|
3
3
|
module Tests
|
4
4
|
class Filesystem
|
5
|
-
PROJECT_NAME = 'test-project'
|
5
|
+
PROJECT_NAME = 'test-project'.freeze
|
6
6
|
ROOT_DIRECTORY = Pathname.new('../../../..').expand_path(__FILE__)
|
7
|
-
TEMP_DIRECTORY =
|
7
|
+
TEMP_DIRECTORY = Pathname.new('/tmp/shoulda-matchers-acceptance')
|
8
8
|
PROJECT_DIRECTORY = TEMP_DIRECTORY.join(PROJECT_NAME)
|
9
9
|
|
10
10
|
def root_directory
|
@@ -2,7 +2,9 @@ module Kernel
|
|
2
2
|
# #capture, #silence_stream, and #silence_stderr are deprecated after Rails
|
3
3
|
# 4.2 and will be removed in 5.0, so just override them completely here
|
4
4
|
|
5
|
-
|
5
|
+
if method_defined?(:capture)
|
6
|
+
undef_method :capture
|
7
|
+
end
|
6
8
|
|
7
9
|
def capture(stream)
|
8
10
|
stream = stream.to_s
|
@@ -20,7 +22,9 @@ module Kernel
|
|
20
22
|
stream_io.reopen(origin_stream)
|
21
23
|
end
|
22
24
|
|
23
|
-
|
25
|
+
if method_defined?(:silence_stream)
|
26
|
+
undef_method :silence_stream
|
27
|
+
end
|
24
28
|
|
25
29
|
def silence_stream(stream)
|
26
30
|
old_stream = stream.dup
|
@@ -32,7 +36,9 @@ module Kernel
|
|
32
36
|
old_stream.close
|
33
37
|
end
|
34
38
|
|
35
|
-
|
39
|
+
if method_defined?(:silence_stderr)
|
40
|
+
undef_method :silence_stderr
|
41
|
+
end
|
36
42
|
|
37
43
|
def silence_stderr
|
38
44
|
silence_stream(STDERR) { yield }
|
@@ -0,0 +1,22 @@
|
|
1
|
+
module UnitTests
|
2
|
+
module ActionPackVersions
|
3
|
+
extend self
|
4
|
+
|
5
|
+
def self.configure_example_group(example_group)
|
6
|
+
example_group.include(self)
|
7
|
+
example_group.extend(self)
|
8
|
+
end
|
9
|
+
|
10
|
+
def action_pack_gte_5?
|
11
|
+
action_pack_version >= 5
|
12
|
+
end
|
13
|
+
|
14
|
+
def action_pack_lt_5?
|
15
|
+
action_pack_version < 5
|
16
|
+
end
|
17
|
+
|
18
|
+
def action_pack_version
|
19
|
+
Tests::Version.new(ActionPack::VERSION::STRING)
|
20
|
+
end
|
21
|
+
end
|
22
|
+
end
|
@@ -9,16 +9,36 @@ module UnitTests
|
|
9
9
|
Tests::Version.new(::ActiveRecord::VERSION::STRING)
|
10
10
|
end
|
11
11
|
|
12
|
-
def
|
13
|
-
|
12
|
+
def active_record_enum_supports_prefix_and_suffix?
|
13
|
+
active_record_version >= 5
|
14
14
|
end
|
15
15
|
|
16
16
|
def active_record_supports_has_secure_password?
|
17
17
|
active_record_version >= 3.1
|
18
18
|
end
|
19
19
|
|
20
|
+
def active_record_supports_has_secure_token?
|
21
|
+
active_record_version >= 5.0
|
22
|
+
end
|
23
|
+
|
20
24
|
def active_record_supports_array_columns?
|
21
25
|
active_record_version > 4.2
|
22
26
|
end
|
27
|
+
|
28
|
+
def active_record_supports_relations?
|
29
|
+
active_record_version >= 4
|
30
|
+
end
|
31
|
+
|
32
|
+
def active_record_supports_more_dependent_options?
|
33
|
+
active_record_version >= 4
|
34
|
+
end
|
35
|
+
|
36
|
+
def active_record_uniqueness_supports_array_columns?
|
37
|
+
active_record_version < 5
|
38
|
+
end
|
39
|
+
|
40
|
+
def active_record_supports_optional_for_associations?
|
41
|
+
active_record_version >= 5
|
42
|
+
end
|
23
43
|
end
|
24
44
|
end
|
@@ -22,7 +22,7 @@ module UnitTests
|
|
22
22
|
def build_fake_response(opts = {}, &block)
|
23
23
|
action = opts[:action] || 'example'
|
24
24
|
partial = opts[:partial] || '_partial'
|
25
|
-
block ||= lambda {
|
25
|
+
block ||= lambda { head :ok }
|
26
26
|
controller_class = define_controller('Examples') do
|
27
27
|
layout false
|
28
28
|
define_method(action, &block)
|
@@ -0,0 +1,19 @@
|
|
1
|
+
module UnitTests
|
2
|
+
module MessageHelpers
|
3
|
+
include Shoulda::Matchers::WordWrap
|
4
|
+
|
5
|
+
def self.configure_example_group(example_group)
|
6
|
+
example_group.include(self)
|
7
|
+
end
|
8
|
+
|
9
|
+
def format_message(message, one_line: false)
|
10
|
+
stripped_message = message.strip_heredoc.strip
|
11
|
+
|
12
|
+
if one_line
|
13
|
+
stripped_message.tr("\n", " ").squeeze(" ")
|
14
|
+
else
|
15
|
+
word_wrap(stripped_message)
|
16
|
+
end
|
17
|
+
end
|
18
|
+
end
|
19
|
+
end
|
@@ -1,5 +1,7 @@
|
|
1
1
|
module UnitTests
|
2
2
|
module RailsVersions
|
3
|
+
extend self
|
4
|
+
|
3
5
|
def self.configure_example_group(example_group)
|
4
6
|
example_group.include(self)
|
5
7
|
example_group.extend(self)
|
@@ -17,6 +19,10 @@ module UnitTests
|
|
17
19
|
rails_version =~ '~> 4.0'
|
18
20
|
end
|
19
21
|
|
22
|
+
def rails_lte_4?
|
23
|
+
rails_version <= 4
|
24
|
+
end
|
25
|
+
|
20
26
|
def rails_gte_4_1?
|
21
27
|
rails_version >= 4.1
|
22
28
|
end
|
@@ -24,5 +30,13 @@ module UnitTests
|
|
24
30
|
def rails_gte_4_2?
|
25
31
|
rails_version >= 4.2
|
26
32
|
end
|
33
|
+
|
34
|
+
def rails_lt_5?
|
35
|
+
rails_version < 5
|
36
|
+
end
|
37
|
+
|
38
|
+
def rails_5_x?
|
39
|
+
rails_version =~ '~> 5.0'
|
40
|
+
end
|
27
41
|
end
|
28
42
|
end
|