Skip to content

Commit

Permalink
Merge pull request #945 from rspec/remove_186_support
Browse files Browse the repository at this point in the history
Remove 186 support
  • Loading branch information
JonRowe committed Jun 14, 2013
2 parents 14d3f7a + e6011c5 commit f835cdf
Show file tree
Hide file tree
Showing 11 changed files with 15 additions and 102 deletions.
6 changes: 5 additions & 1 deletion Changelog.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
### Dev
### Development

Breaking Changes for 3.0.0:

* Remove explicit support for 1.8.6 (Jon Rowe)

Enhancements

Expand Down
1 change: 0 additions & 1 deletion cucumber.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
<%
exclusions = []
exclusions << ' --tags ~@no-jruby' if RUBY_PLATFORM == 'java'
exclusions << ' --tags ~@no-ruby-186' if RUBY_VERSION == '1.8.6'
%>
default: --require features --strict --format progress --tags ~@wip<%= exclusions.join %> features
wip: --require features --tags @wip:3 --wip features
4 changes: 2 additions & 2 deletions features/Upgrade.md
Original file line number Diff line number Diff line change
Expand Up @@ -123,10 +123,10 @@ Use :if and :unless keys to conditionally run examples with simple boolean
expressions:

describe "something" do
it "does something", :if => RUBY_VERSION == 1.8.6 do
it "does something", :if => RUBY_VERSION == 1.8.7 do
# ...
end
it "does something", :unless => RUBY_VERSION == 1.8.6 do
it "does something", :unless => RUBY_VERSION == 1.8.7 do
# ...
end
end
Expand Down
2 changes: 0 additions & 2 deletions lib/rspec/core.rb
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,6 @@
require_rspec['core/filter_manager']
require_rspec['core/dsl']
require_rspec['core/extensions/kernel']
require_rspec['core/extensions/instance_eval_with_args']
require_rspec['core/extensions/module_eval_with_args']
require_rspec['core/extensions/ordered']
require_rspec['core/deprecation']
require_rspec['core/backward_compatibility']
Expand Down
4 changes: 2 additions & 2 deletions lib/rspec/core/example.rb
Original file line number Diff line number Diff line change
Expand Up @@ -243,8 +243,8 @@ def instance_eval_with_rescue(context = nil, &block)
end

# @private
def instance_eval_with_args(*args, &block)
@example_group_instance.instance_eval_with_args(*args, &block)
def instance_exec(*args, &block)
@example_group_instance.instance_exec(*args, &block)
end

private
Expand Down
4 changes: 1 addition & 3 deletions lib/rspec/core/example_group.rb
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,9 @@ module Core
# is declared.
class ExampleGroup
extend MetadataHashBuilder::WithDeprecationWarning
extend Extensions::ModuleEvalWithArgs
extend Hooks

include MemoizedHelpers
include Extensions::InstanceEvalWithArgs
include Pending
include SharedExampleGroup

Expand Down Expand Up @@ -161,7 +159,7 @@ def self.find_and_eval_shared(label, name, *args, &customization_block)
raise ArgumentError, "Could not find shared #{label} #{name.inspect}" unless
shared_block = shared_example_groups[name]

module_eval_with_args(*args, &shared_block)
module_exec(*args, &shared_block)
module_eval(&customization_block) if customization_block
end

Expand Down
44 changes: 0 additions & 44 deletions lib/rspec/core/extensions/instance_eval_with_args.rb

This file was deleted.

38 changes: 0 additions & 38 deletions lib/rspec/core/extensions/module_eval_with_args.rb

This file was deleted.

2 changes: 1 addition & 1 deletion lib/rspec/core/hooks.rb
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ def with(example, initial_procsy)
def run
inject(@initial_procsy) do |procsy, around_hook|
Example.procsy(procsy.metadata) do
@example.instance_eval_with_args(procsy, &around_hook.block)
@example.instance_exec(procsy, &around_hook.block)
end
end.call
end
Expand Down
10 changes: 2 additions & 8 deletions lib/rspec/core/rake_task.rb
Original file line number Diff line number Diff line change
Expand Up @@ -151,14 +151,8 @@ def run_task(verbose)

private

if "".respond_to?(:shellescape)
def shellescape(string)
string.shellescape
end
else # 1.8.6's shellwords doesn't provide shellescape :(.
def shellescape(string)
string.gsub(/"/, '\"').gsub(/'/, "\\\\'")
end
def shellescape(string)
string.shellescape
end

def files_to_run
Expand Down
2 changes: 2 additions & 0 deletions rspec-core.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@ Gem::Specification.new do |s|
s.rdoc_options = ["--charset=UTF-8"]
s.require_path = "lib"

s.required_ruby_version = '>= 1.8.7'

s.add_development_dependency "rake", "~> 10.0.0"
s.add_development_dependency "cucumber", "~> 1.1.9"
s.add_development_dependency "aruba", "~> 0.5"
Expand Down

0 comments on commit f835cdf

Please sign in to comment.