lib/guard/rspec/deprecator.rb in guard-rspec-4.0.4 vs lib/guard/rspec/deprecator.rb in guard-rspec-4.1.0

- old
+ new

@@ -14,17 +14,19 @@ def warns_about_deprecated_options _spec_opts_env _version_option _exclude_option _use_cmd_option + _keep_failed_option + _focus_on_failed_option end private def _spec_opts_env return if ENV['SPEC_OPTS'].nil? - UI.warning "The SPEC_OPTS environment variable is present. This can conflict with guard-rspec, particularly notifications." + UI.warning "The SPEC_OPTS environment variable is present. This can conflict with guard-rspec." end def _version_option return unless options.key?(:version) _deprectated('The :version option is deprecated. Only RSpec ~> 2.14 is now supported.') @@ -38,9 +40,19 @@ def _use_cmd_option %w[color drb fail_fast formatter env bundler binstubs rvm cli spring turnip zeus foreman].each do |option| next unless options.key?(option.to_sym) _deprectated("The :#{option} option is deprecated. Please customize the new :cmd option to fit your need.") end + end + + def _keep_failed_option + return unless options.key?(:keep_failed) + _deprectated('The :keep_failed option is deprecated. Please set new :failed_mode option value to :keep instead. https://github.com/guard/guard-rspec#list-of-available-options') + end + + def _focus_on_failed_option + return unless options.key?(:focus_on_failed) + _deprectated('The :focus_on_failed option is deprecated. Focus mode is the default and can be changed using new :failed_mode option. https://github.com/guard/guard-rspec#list-of-available-options') end def _deprectated(message) UI.warning %{Guard::RSpec DEPRECATION WARNING: #{message}} end