fix: I had to implement a private const_missing for Harmcrest module
Project: http://git-wip-us.apache.org/repos/asf/buildr/repo Commit: http://git-wip-us.apache.org/repos/asf/buildr/commit/02a12cc0 Tree: http://git-wip-us.apache.org/repos/asf/buildr/tree/02a12cc0 Diff: http://git-wip-us.apache.org/repos/asf/buildr/diff/02a12cc0 Branch: refs/heads/master Commit: 02a12cc0baebdb33816589e906625364c6f20928 Parents: eb0dfce Author: Jean-Philippe CARUANA <[email protected]> Authored: Thu Jul 31 12:03:33 2014 +0200 Committer: Jean-Philippe CARUANA <[email protected]> Committed: Thu Jul 31 12:03:33 2014 +0200 ---------------------------------------------------------------------- lib/buildr/java/tests.rb | 7 +++++++ 1 file changed, 7 insertions(+) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/buildr/blob/02a12cc0/lib/buildr/java/tests.rb ---------------------------------------------------------------------- diff --git a/lib/buildr/java/tests.rb b/lib/buildr/java/tests.rb index 1f86aab..8925d95 100644 --- a/lib/buildr/java/tests.rb +++ b/lib/buildr/java/tests.rb @@ -134,6 +134,13 @@ module Buildr #:nodoc: @dependencies ||= ["org.hamcrest:hamcrest-core:jar:#{version}", "org.hamcrest:hamcrest-library:jar:#{version}"] end + private + def const_missing(const) + return super unless const == :REQUIRES # TODO: remove in 1.5 + Buildr.application.deprecated "Please use Harmcrest.dependencies/.version instead of Harmcrest::REQUIRES/VERSION" + dependencies + end + end end
