Buildr C0 Coverage Information - RCov

lib/buildr/ide/eclipse/scala.rb

Name Total Lines Lines of Code Total Coverage Code Coverage
lib/buildr/ide/eclipse/scala.rb 68 41
23.53%
29.27%

Key

Code reported as executed by Ruby looks like this...and this: this line is also marked as covered.Lines considered as run by rcov, but not reported by Ruby, look like this,and this: these lines were inferred by rcov (using simple heuristics).Finally, here's a line marked as not executed.

Coverage Details

1 # Licensed to the Apache Software Foundation (ASF) under one or more
2 # contributor license agreements.  See the NOTICE file distributed with this
3 # work for additional information regarding copyright ownership.  The ASF
4 # licenses this file to you under the Apache License, Version 2.0 (the
5 # "License"); you may not use this file except in compliance with the License.
6 # You may obtain a copy of the License at
7 #
8 #    http://www.apache.org/licenses/LICENSE-2.0
9 #
10 # Unless required by applicable law or agreed to in writing, software
11 # distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
12 # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.  See the
13 # License for the specific language governing permissions and limitations under
14 # the License.
15 
16 
17 require 'buildr/core/project'
18 require 'buildr/core/common'
19 
20 module Buildr
21   module Eclipse
22     module Scala
23       include Extension
24 
25       NATURE    = 'ch.epfl.lamp.sdt.core.scalanature'
26       CONTAINER = 'ch.epfl.lamp.sdt.launching.SCALA_CONTAINER'
27       BUILDER   = 'ch.epfl.lamp.sdt.core.scalabuilder'
28 
29       after_define :eclipse => :eclipse_scala
30       after_define :eclipse_scala do |project|
31         eclipse = project.eclipse
32         # smart defaults
33         if eclipse.natures.empty? && (project.compile.language == :scala || project.test.compile.language == :scala)
34           eclipse.natures = [NATURE, Buildr::Eclipse::Java::NATURE]
35           eclipse.classpath_containers = [CONTAINER, Buildr::Eclipse::Java::CONTAINER] if eclipse.classpath_containers.empty?
36           eclipse.builders = BUILDER if eclipse.builders.empty?
37           eclipse.exclude_libs += Buildr::Scala::Scalac.dependencies
38         end
39 
40         # :scala nature explicitly set
41         if eclipse.natures.include? :scala
42           unless eclipse.natures.include? NATURE
43             # scala nature must be before java nature
44             eclipse.natures += [Buildr::Eclipse::Java::NATURE] unless eclipse.natures.include? Buildr::Eclipse::Java::NATURE
45             index = eclipse.natures.index(Buildr::Eclipse::Java::NATURE) || -1
46             eclipse.natures = eclipse.natures.insert(index, NATURE)
47           end
48           unless eclipse.classpath_containers.include? CONTAINER
49             # scala container must be before java container
50             index = eclipse.classpath_containers.index(Buildr::Eclipse::Java::CONTAINER) || -1
51             eclipse.classpath_containers = eclipse.classpath_containers.insert(index, CONTAINER)
52           end
53           unless eclipse.builders.include? BUILDER
54             # scala builder overrides java builder
55             eclipse.builders -= [Buildr::Eclipse::Java::BUILDER]
56             eclipse.builders += [BUILDER]
57           end
58           eclipse.exclude_libs += Buildr::Scala::Scalac.dependencies
59         end
60       end
61 
62     end
63   end
64 end
65 
66 class Buildr::Project
67   include Buildr::Eclipse::Scala
68 end

Generated on 2011-07-06 23:35:37 -0700 with rcov 0.9.8