Skip to content

Commit

Permalink
Don't bother testing against 1.9.1 anymore.
Browse files Browse the repository at this point in the history
I don't plan to have VCR 2.0 support 1.9.1 and this allows us to cleanup a lot of special case code for 1.9.1.
  • Loading branch information
myronmarston committed Sep 11, 2011
1 parent 0aa78d3 commit 1a22b73
Show file tree
Hide file tree
Showing 29 changed files with 23 additions and 652 deletions.
3 changes: 0 additions & 3 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -31,13 +31,10 @@ group :extras do

platforms :mri_18 do
gem 'ruby-debug'
gem 'linecache', '0.43' # later versions do not work on 1.8.6
end

platforms :mri_19 do
gem 'linecache19', '0.5.11' # 0.5.12 cannot install on 1.9.1, and 0.5.11 appears to work with both 1.9.1 & 1.9.2
gem 'ruby-debug19'
gem 'ruby-debug-base19', RUBY_VERSION == '1.9.1' ? '0.11.23' : '~> 0.11.24'
end unless RUBY_VERSION == '1.9.3'
end

26 changes: 1 addition & 25 deletions features/step_definitions/cli_steps.rb
Original file line number Diff line number Diff line change
@@ -1,32 +1,8 @@
require 'vcr'

module VCRHelpers
YAML_REGEX_FOR_1_9_1 = Regexp.union(*[
' request',
' method',
' uri',
' body',
' headers',
' response',
' status',
' code',
' message',
' body',
' http_version'
].uniq)

def normalize_cassette_yaml(content)
return content unless RUBY_VERSION == '1.9.1'

# Ruby 1.9.1 serializes YAML a bit different, so
# we deal with that difference and add leading colons here.
content = content.gsub(YAML_REGEX_FOR_1_9_1) do |match|
match.sub(/^ +/, '\0:')
end
end

def normalize_cassette_structs(content)
content = normalize_cassette_yaml(content)
structs = YAML.load(content)

# Remove non-deterministic headers
Expand Down Expand Up @@ -69,7 +45,7 @@ def modify_file(file_name, orig_text, new_text)
end

Given /^a previously recorded cassette file "([^"]*)" with:$/ do |file_name, content|
write_file(file_name, normalize_cassette_yaml(content))
write_file(file_name, content)
end

Given /^(\d+) days have passed since the cassette was recorded$/ do |day_count|
Expand Down
7 changes: 0 additions & 7 deletions script/FullBuildRakeFile
Original file line number Diff line number Diff line change
Expand Up @@ -37,13 +37,6 @@ task :print_ruby_description do
end

task :bundle_install => :ensure_bundler_installed do
# Unfortunately, there is no version of ruby-debug that installs cleanly on 1.9.1 and 1.9.2.
# Our Gemfile specifies different versions using conditionals, but we still need to bundle update
# to get bundler to use the different versions.
if RUBY_VERSION =~ /^1\.9/
sh "bundle update ruby-debug-base19"
end

sh "bundle install"
end

Expand Down
2 changes: 1 addition & 1 deletion script/full_build
Original file line number Diff line number Diff line change
@@ -1 +1 @@
rvm 1.8.6,1.8.7,1.9.1,1.9.2,ree,rbx rake -f script/FullBuildRakeFile build | tee tmp/full_build.out
rvm 1.8.7,1.9.2,ree,rbx rake -f script/FullBuildRakeFile build | tee tmp/full_build.out
File renamed without changes.
29 changes: 0 additions & 29 deletions spec/fixtures/1.9.1/0_3_1_cassette.yml

This file was deleted.

110 changes: 0 additions & 110 deletions spec/fixtures/1.9.1/cassette_spec/example.yml

This file was deleted.

109 changes: 0 additions & 109 deletions spec/fixtures/1.9.1/cassette_spec/with_localhost_requests.yml

This file was deleted.

Loading

0 comments on commit 1a22b73

Please sign in to comment.