Skip to content
This repository
Browse code

regression fix, and 0.5.3 release

  • Loading branch information...
commit 7e72d5f6da43d0330a2000dc36a1356628e5b08a 1 parent b22aa31
Tim Harper timcharper authored
6 History.txt
... ... @@ -1,3 +1,9 @@
  1 +== 0.5.3 2009-06-08
  2 +
  3 + === Bugfixes
  4 +
  5 + * Spork.expanded_caller was flawed, and was causing a very strange regression fix where Spork.each_run block wouldn't load if it happened to occur on line 65.
  6 +
1 7 == 0.5.2 2009-06-08
2 8
3 9 === New Features
2  VERSION.yml
... ... @@ -1,4 +1,4 @@
1 1 ---
2 2 :major: 0
3 3 :minor: 5
4   -:patch: 2
  4 +:patch: 3
2  lib/spork.rb
@@ -51,7 +51,7 @@ def exec_each_run(&block)
51 51 def expanded_caller(caller_line)
52 52 file, line = caller_line.split(":")
53 53 line.gsub(/:.+/, '')
54   - File.expand_path(Dir.pwd, file) + ":" + line
  54 + File.expand_path(file, Dir.pwd) + ":" + line
55 55 end
56 56
57 57 def trap_method(klass, method_name)
2  lib/spork/app_framework/rails.rb
@@ -63,7 +63,7 @@ def delay_application_controller_loading
63 63 def auto_reestablish_db_connection
64 64 if Object.const_defined?(:ActiveRecord)
65 65 Spork.each_run do
66   - # spec/rails is very aggressive about overriding RAILS_ENV and will switch it back to test after the cucumber env was loaded
  66 + # rails lib/test_help.rb is very aggressive about overriding RAILS_ENV and will switch it back to test after the cucumber env was loaded
67 67 reset_rails_env
68 68 ActiveRecord::Base.establish_connection
69 69 end
4 spec/spork_spec.rb
@@ -55,4 +55,8 @@ def spec_helper_simulator
55 55 Spork.each_run { }
56 56 spec_helper_simulator.should == [:prefork, :each_run]
57 57 end
  58 +
  59 + it "expands a caller line, preserving the line number" do
  60 + Spork.expanded_caller("/boo/../yah.rb:31").should == "/yah.rb:31"
  61 + end
58 62 end
2  spork.gemspec
@@ -2,7 +2,7 @@
2 2
3 3 Gem::Specification.new do |s|
4 4 s.name = %q{spork}
5   - s.version = "0.5.2"
  5 + s.version = "0.5.3"
6 6
7 7 s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
8 8 s.authors = ["Tim Harper"]

0 comments on commit 7e72d5f

Please sign in to comment.
Something went wrong with that request. Please try again.