class Buildr::Scala::Specs2
Constants
- VERSION
Public Class Methods
artifact()
click to toggle source
# File lib/buildr/scala/bdd.rb, line 44 def artifact case when Buildr.settings.build['scala.specs2.artifact'] Buildr.settings.build['scala.specs2.artifact'] else if Buildr::Scala.version < '2.11' "specs2_#{Buildr::Scala.version_without_build_number}" else "specs2_#{Buildr::Scala.version_major_minor}" end end end
dependencies()
click to toggle source
Calls superclass method
# File lib/buildr/scala/bdd.rb, line 91 def dependencies unless @dependencies super # Add utility classes and other dependencies options = { :scopes => [nil, 'compile', 'runtime', 'provided', 'optional'], :optional => true } @dependencies |= [ File.join(File.dirname(__FILE__)) ] + Buildr.transitive(specs, options) + scalaz_dependencies + Check.dependencies + JUnit.dependencies + Scalac.dependencies end @dependencies end
scalaz_dependencies()
click to toggle source
# File lib/buildr/scala/bdd.rb, line 65 def scalaz_dependencies if Buildr::Scala.version?('2.8') [] elsif Buildr::Scala.version < '2.11' default_version = '6.0.1' custom_version = Buildr.settings.build['scala.specs2-scalaz'] version = (custom_version =~ /:/) ? Buildr.artifact(custom_version).version : default_version artifact = Buildr.settings.build['scala.specs2-scalaz.artifact'] || "specs2-scalaz-core_#{Buildr::Scala.version_without_build}" custom_spec = Buildr.settings.build['scala.specs2-scalaz'] spec = [ (custom_spec =~ /:/) ? custom_spec : "org.specs2:#{artifact}:jar:#{version}" ] Buildr.transitive(spec, :scopes => [nil, 'compile', 'runtime', 'provided', 'optional'], :optional => true) else default_version = '7.2.2' custom_version = Buildr.settings.build['scala.specs2-scalaz'] version = (custom_version =~ /:/) ? Buildr.artifact(custom_version).version : default_version artifact = Buildr.settings.build['scala.specs2-scalaz.artifact'] || "scalaz-core_#{Buildr::Scala.version_major_minor}" custom_spec = Buildr.settings.build['scala.specs2-scalaz'] spec = [ (custom_spec =~ /:/) ? custom_spec : "org.scalaz:#{artifact}:jar:#{version}" ] [Buildr.transitive(spec, :scopes => [nil, 'compile', 'runtime', 'provided', 'optional'], :optional => true), 'org.scala-lang.modules:scala-xml_2.11:jar:1.0.1'] end end
specs()
click to toggle source
# File lib/buildr/scala/bdd.rb, line 39 def specs custom = Buildr.settings.build['scala.specs2'] [ (custom =~ /:/) ? custom : "org.specs2:#{artifact}:pom:#{version}" ] end
type()
click to toggle source
# File lib/buildr/scala/bdd.rb, line 57 def type if Buildr::Scala.version < '2.11' 'jar' else 'pom' end end
version()
click to toggle source
# File lib/buildr/scala/bdd.rb, line 34 def version custom = Buildr.settings.build['scala.specs2'] (custom =~ /:/) ? Buildr.artifact(custom).version : VERSION end
Public Instance Methods
tests(dependencies)
click to toggle source
# File lib/buildr/scala/bdd.rb, line 135 def tests(dependencies) filter_classes(dependencies, :interfaces => %w(org.specs2.Specification org.specs2.mutable.Specification)) end