remove deprecated code as expected for 1.5
diff --git a/CHANGELOG b/CHANGELOG
index d567532..679ece9 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -12,6 +12,12 @@
* Change: Added jekyll-textile-converter 0.1.0 to generate the site.
* Change: Move to default on Scala 2.11.
* Change: Remove Buildr::Project#on_define, deprecated in 1.3
+* Change: Remove JavaWrapper, deprecated in 1.3
+* Change: Remove JUnit::REQUIRES, deprecated in 1.3.3
+* Change: Remove TestNG::REQUIRES, deprecated in 1.3.3
+* Change: Remove Buildr::Ant::REQUIRES, deprecated in version 1.3.3
+* Change: Remove Buildr::CompileTask#classpath, deprecated in version 1.3
+* Change: Remove Buildr::TestTask responding to :using with .using('foo','bar'), deprecated in version 1.3
* Added: Travis badge to README.rdoc
* Added: Added Rubygems badges to README.rdoc
* Added: BUILDR-577 Allow remote repo to be added with http basic auth support. Submitted by Michael Guymon.
diff --git a/lib/buildr/core/compile.rb b/lib/buildr/core/compile.rb
index 957f4cb..a206f5f 100644
--- a/lib/buildr/core/compile.rb
+++ b/lib/buildr/core/compile.rb
@@ -277,18 +277,6 @@
self
end
- # *Deprecated*: Use dependencies instead.
- def classpath
- Buildr.application.deprecated 'Use dependencies instead.'
- dependencies
- end
-
- # *Deprecated*: Use dependencies= instead.
- def classpath=(artifacts)
- Buildr.application.deprecated 'Use dependencies= instead.'
- self.dependencies = artifacts
- end
-
# Compilation dependencies.
attr_accessor :dependencies
diff --git a/lib/buildr/core/test.rb b/lib/buildr/core/test.rb
index 0777289..031d96d 100644
--- a/lib/buildr/core/test.rb
+++ b/lib/buildr/core/test.rb
@@ -357,13 +357,11 @@
def using(*args)
args.pop.each { |key, value| options[key.to_sym] = value } if Hash === args.last
args.each do |name|
+ info name
if TestFramework.has?(name)
self.framework = name
elsif name == :integration
options[:integration] = true
- else
- Buildr.application.deprecated "Please replace with using(:#{name}=>true)"
- options[name.to_sym] = true
end
end
self
diff --git a/lib/buildr/java/ant.rb b/lib/buildr/java/ant.rb
index 4078061..44cff37 100644
--- a/lib/buildr/java/ant.rb
+++ b/lib/buildr/java/ant.rb
@@ -37,12 +37,6 @@
@dependencies ||= ["org.apache.ant:ant:jar:#{version}", "org.apache.ant:ant-launcher:jar:#{version}"]
end
- private
- def const_missing(const)
- return super unless const == :REQUIRES # TODO: remove in 1.5
- Buildr.application.deprecated "Please use Ant.dependencies/.version instead of Ant::REQUIRES/VERSION"
- dependencies
- end
end
diff --git a/lib/buildr/java/deprecated.rb b/lib/buildr/java/deprecated.rb
index bc10b49..2164fc0 100644
--- a/lib/buildr/java/deprecated.rb
+++ b/lib/buildr/java/deprecated.rb
@@ -15,48 +15,6 @@
module Java #:nodoc:
- # *Deprecated:* In earlier versions, Java.wrapper served as a wrapper around RJB/JRuby.
- # From this version forward, we apply with JRuby style for importing Java classes:
- # Java.java.lang.String.new('hai!')
- # You still need to call Java.load before using any Java code: it resolves, downloads
- # and installs various dependencies that are required on the classpath before calling
- # any Java code (e.g. Ant and its tasks).
- class JavaWrapper
-
- include Singleton
-
- # *Deprecated:* Append to Java.classpath directly.
- def classpath
- Buildr.application.deprecated 'Append to Java.classpath instead.'
- ::Java.classpath
- end
-
- def classpath=(paths)
- fail 'Deprecated: Append to Java.classpath, you cannot replace the classpath.'
- end
-
- # *Deprecated:* No longer necessary.
- def setup
- Buildr.application.deprecated 'See documentation for new way to access Java code.'
- yield self if block_given?
- end
-
- # *Deprecated:* Use Java.load instead.
- def load
- Buildr.application.deprecated 'Use Java.load instead.'
- ::Java.load
- end
-
- alias :onload :setup
-
- # *Deprecated:* Use Java.pkg.pkg.ClassName to import a Java class.
- def import(class_name)
- Buildr.application.deprecated 'Use Java.pkg.pkg.ClassName to import a Java class.'
- ::Java.instance_eval(class_name)
- end
- end
-
-
class << self
# *Deprecated*: Use Java::Commands.java instead.
@@ -97,24 +55,6 @@
ENV['JAVA_HOME']
end
- # *Deprecated:* In earlier versions, Java.wrapper served as a wrapper around RJB/JRuby.
- # From this version forward, we apply with JRuby style for importing Java classes:
- # Java.java.lang.String.new('hai!')
- # You still need to call Java.load before using any Java code: it resolves, downloads
- # and installs various dependencies that are required on the classpath before calling
- # any Java code (e.g. Ant and its tasks).
- def wrapper
- Buildr.application.deprecated 'See documentation for new way to access Java code.'
- if block_given?
- Java.load
- yield JavaWrapper.instance
- else
- JavaWrapper.instance
- end
- end
-
- alias :rjb :wrapper
-
end
diff --git a/lib/buildr/java/tests.rb b/lib/buildr/java/tests.rb
index 95eed54..92ecc0a 100644
--- a/lib/buildr/java/tests.rb
+++ b/lib/buildr/java/tests.rb
@@ -205,13 +205,6 @@
def ant_taskdef #:nodoc:
"org.apache.ant:ant-junit:jar:#{Ant.version}"
end
-
- private
- def const_missing(const)
- return super unless const == :REQUIRES # TODO: remove in 1.5
- Buildr.application.deprecated 'Please use JUnit.dependencies/.version instead of JUnit::REQUIRES/VERSION'
- dependencies
- end
end
def tests(dependencies) #:nodoc:
@@ -308,13 +301,6 @@
return ["org.testng:testng:jar:jdk15:#{version}"] + JMock.dependencies if version < "6.0"
["org.testng:testng:jar:#{version}",'com.beust:jcommander:jar:1.27'] + JMock.dependencies
end
-
- private
- def const_missing(const)
- return super unless const == :REQUIRES # TODO: remove in 1.5
- Buildr.application.deprecated 'Please use TestNG.dependencies/.version instead of TestNG::REQUIRES/VERSION'
- dependencies
- end
end
def tests(dependencies) #:nodoc:
diff --git a/spec/core/compile_spec.rb b/spec/core/compile_spec.rb
index 08fba32..69e5037 100644
--- a/spec/core/compile_spec.rb
+++ b/spec/core/compile_spec.rb
@@ -234,12 +234,6 @@
compile_task.dependencies.should == project('bar').packages
end
- it 'should be accessible as classpath up to version 1.5 since it was deprecated in version 1.3' do
- Buildr::VERSION.should < '1.5'
- lambda { compile_task.classpath = jars }.should change(compile_task, :dependencies).to(jars)
- lambda { compile_task.dependencies = [] }.should change(compile_task, :classpath).to([])
- end
-
end
diff --git a/spec/core/test_spec.rb b/spec/core/test_spec.rb
index 4c48cf2..7166c96 100644
--- a/spec/core/test_spec.rb
+++ b/spec/core/test_spec.rb
@@ -141,13 +141,6 @@
test_task.options[:bar].should eql('BAR')
end
- it 'should respond to :using with deprecated parameter style and set value options to true, up to version 1.5 since this usage was deprecated in version 1.3' do
- Buildr::VERSION.should < '1.5'
- test_task.using('foo', 'bar')
- test_task.options[:foo].should eql(true)
- test_task.options[:bar].should eql(true)
- end
-
it 'should start without pre-selected test framework' do
test_task.framework.should be_nil
end
diff --git a/spec/java/ant_spec.rb b/spec/java/ant_spec.rb
index e183f3c..384d6c2 100644
--- a/spec/java/ant_spec.rb
+++ b/spec/java/ant_spec.rb
@@ -29,9 +29,4 @@
end
end
- it 'should have REQUIRES up to version 1.5 since it was deprecated in version 1.3.3' do
- Buildr::VERSION.should < '1.5'
- lambda { Ant::REQUIRES }.should_not raise_error
- end
-
end
diff --git a/spec/java/java_spec.rb b/spec/java/java_spec.rb
index a6c2226..ade6619 100644
--- a/spec/java/java_spec.rb
+++ b/spec/java/java_spec.rb
@@ -127,12 +127,4 @@
after do
ENV['JAVA_HOME'] = @old_home
end
-end
-
-
-describe Java::JavaWrapper do
- it 'should be removed in version 1.5 since it was deprecated in version 1.3' do
- Buildr::VERSION.should < '1.5'
- lambda { Java::JavaWrapper }.should_not raise_error
- end
-end
+end
\ No newline at end of file
diff --git a/spec/java/tests_spec.rb b/spec/java/tests_spec.rb
index 067a301..a6b1648 100644
--- a/spec/java/tests_spec.rb
+++ b/spec/java/tests_spec.rb
@@ -40,11 +40,6 @@
project('foo').test.dependencies.should include(artifact("junit:junit:jar:#{JUnit.version}"))
end
- it 'should have REQUIRES up to version 1.5 since it was deprecated in 1.3.3' do
- Buildr::VERSION.should < '1.5'
- lambda { JUnit::REQUIRES }.should_not raise_error
- end
-
it 'should pick JUnit version from junit build settings' do
Buildr::JUnit.instance_eval { @dependencies = nil }
write 'build.yaml', 'junit: 1.2.3'
diff --git a/spec/spec_helpers.rb b/spec/spec_helpers.rb
index 5ff98d9..2979ee6 100644
--- a/spec/spec_helpers.rb
+++ b/spec/spec_helpers.rb
@@ -302,7 +302,7 @@
def suppress_stdout
stdout = $stdout
- $stdout = StringIO.new
+ #$stdout = StringIO.new
begin
yield
ensure