Skip to content

Instantly share code, notes, and snippets.

@shigeya
Created October 20, 2012 23:53
Show Gist options
  • Save shigeya/3925285 to your computer and use it in GitHub Desktop.
Save shigeya/3925285 to your computer and use it in GitHub Desktop.
Rails3: patch to scan spec directory for rake notes
You don't need this patch if you're on Rails 4 (set environment variable instead)
*** /Users/shigeya/.rvm/gems/ruby-1.9.3-p286@aimm3/gems/railties-3.2.8/lib/rails/source_annotation_extractor.rb.FCS Sun Oct 21 08:52:47 2012
--- /Users/shigeya/.rvm/gems/ruby-1.9.3-p286@aimm3/gems/railties-3.2.8/lib/rails/source_annotation_extractor.rb Sun Oct 21 08:53:12 2012
***************
*** 47,53 ****
# Returns a hash that maps filenames under +dirs+ (recursively) to arrays
# with their annotations.
! def find(dirs=%w(app config lib script test))
dirs.inject({}) { |h, dir| h.update(find_in(dir)) }
end
--- 47,53 ----
# Returns a hash that maps filenames under +dirs+ (recursively) to arrays
# with their annotations.
! def find(dirs=%w(app config lib script test spec))
dirs.inject({}) { |h, dir| h.update(find_in(dir)) }
end
@pkrefta
Copy link

pkrefta commented Apr 23, 2015

@shigeya - which environment should i set in Rails 4 to achieve this ? 😄

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment