Skip to content

Commit 387e80a

Browse files
merged sonar-ruby-plugin
2 parents a8033b0 + 53d8d81 commit 387e80a

28 files changed

Lines changed: 1728 additions & 681 deletions

.gitignore

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
target
2-
*.iws
3-
*.iml
4-
*.ipr
1+
target/
52
.classpath
63
.project
7-
out
8-
*.log
4+
.settings/
5+
META-INF/
6+
bin/
7+
build.properties
8+

README.md

Lines changed: 0 additions & 10 deletions
This file was deleted.

pom.xml

100644100755
Lines changed: 141 additions & 78 deletions
Original file line numberDiff line numberDiff line change
@@ -1,84 +1,147 @@
11
<?xml version="1.0" encoding="UTF-8"?>
2-
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
3-
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
4-
5-
<modelVersion>4.0.0</modelVersion>
6-
<groupId>com.pica</groupId>
7-
<artifactId>sonar-ruby-plugin</artifactId>
8-
<packaging>sonar-plugin</packaging>
9-
<version>1.0</version>
10-
<name>Ruby Plugin</name>
11-
<description>Adds Sonar support for the Ruby language</description>
2+
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
3+
<modelVersion>4.0.0</modelVersion>
124

13-
<distributionManagement>
14-
<repository>
15-
<uniqueVersion>false</uniqueVersion>
16-
<id>pica-releases</id>
17-
<name>Pica Release Repository</name>
18-
<url>http://mvnrepository.picagroup.net/nexus/content/repositories/releases/</url>
19-
</repository>
20-
<snapshotRepository>
21-
<uniqueVersion>true</uniqueVersion>
22-
<id>pica-snapshots</id>
23-
<name>Pica Snapshot Repository</name>
24-
<url>http://mvnrepository.picagroup.net/nexus/content/repositories/snapshots/</url>
25-
</snapshotRepository>
26-
</distributionManagement>
5+
<groupId>com.godaddy.sonar</groupId>
6+
<artifactId>sonar-ruby-plugin</artifactId>
7+
<packaging>sonar-plugin</packaging>
8+
<version>1.0.0-SNAPSHOT</version>
279

28-
<dependencies>
29-
<dependency>
30-
<groupId>org.codehaus.sonar</groupId>
31-
<artifactId>sonar-plugin-api</artifactId>
32-
<version>3.1.1</version>
33-
</dependency>
34-
<dependency>
35-
<groupId>com.pica</groupId>
36-
<artifactId>ruby-metrics-parsers</artifactId>
37-
<version>1.0</version>
38-
</dependency>
39-
<dependency>
40-
<groupId>org.codehaus.sonar</groupId>
41-
<artifactId>sonar-testing-harness</artifactId>
42-
<version>3.1.1</version>
43-
<scope>test</scope>
44-
</dependency>
45-
</dependencies>
10+
<name>Sonar Ruby Plugin</name>
11+
<description>Plugin to report ruby code coverage into sonar</description>
4612

47-
<properties>
48-
<sonar.version>2.7</sonar.version>
49-
<sonar.pluginClass>com.pica.sonarplugins.ruby.RubyPlugin</sonar.pluginClass>
50-
<sonar.runtimeVersion>2.7</sonar.runtimeVersion>
51-
<sonar.pluginName>Ruby</sonar.pluginName>
52-
</properties>
13+
<properties>
14+
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
15+
16+
<sonar.buildVersion>3.5.1</sonar.buildVersion>
17+
<jdk.min.version>1.5</jdk.min.version>
18+
</properties>
19+
20+
<dependencies>
21+
<dependency>
22+
<groupId>org.codehaus.sonar</groupId>
23+
<artifactId>sonar-plugin-api</artifactId>
24+
<version>${sonar.buildVersion}</version>
25+
<scope>provided</scope>
26+
</dependency>
27+
28+
<!-- unit tests -->
29+
<dependency>
30+
<groupId>org.codehaus.sonar</groupId>
31+
<artifactId>sonar-testing-harness</artifactId>
32+
<version>${sonar.buildVersion}</version>
33+
<scope>test</scope>
34+
</dependency>
35+
<dependency>
36+
<groupId>junit</groupId>
37+
<artifactId>junit</artifactId>
38+
<version>4.11</version>
39+
<scope>test</scope>
40+
</dependency>
41+
<dependency>
42+
<groupId>org.easymock</groupId>
43+
<artifactId>easymock</artifactId>
44+
<version>2.5</version>
45+
<scope>test</scope>
46+
</dependency>
47+
<dependency>
48+
<groupId>org.easytesting</groupId>
49+
<artifactId>fest-assert</artifactId>
50+
<version>1.4</version>
51+
<scope>test</scope>
52+
</dependency>
53+
<dependency>
54+
<groupId>org.apache.maven</groupId>
55+
<artifactId>maven-project</artifactId>
56+
<version>2.2.1</version>
57+
<scope>test</scope>
58+
</dependency>
59+
</dependencies>
60+
61+
<build>
62+
<plugins>
63+
<plugin>
64+
<groupId>org.codehaus.sonar</groupId>
65+
<artifactId>sonar-packaging-maven-plugin</artifactId>
66+
<version>1.7</version>
67+
<extensions>true</extensions>
68+
<configuration>
69+
<pluginClass>com.godaddy.sonar.ruby.RubyPlugin</pluginClass>
70+
</configuration>
71+
</plugin>
72+
<plugin>
73+
<groupId>org.apache.maven.plugins</groupId>
74+
<artifactId>maven-compiler-plugin</artifactId>
75+
<version>2.5.1</version>
76+
<configuration>
77+
<source>${jdk.min.version}</source>
78+
<target>${jdk.min.version}</target>
79+
</configuration>
80+
</plugin>
81+
<plugin>
82+
<!-- UTF-8 bundles are not supported by Java, so they must be converted during build -->
83+
<groupId>org.codehaus.mojo</groupId>
84+
<artifactId>native2ascii-maven-plugin</artifactId>
85+
<version>1.0-beta-1</version>
86+
<executions>
87+
<execution>
88+
<goals>
89+
<goal>native2ascii</goal>
90+
</goals>
91+
</execution>
92+
</executions>
93+
</plugin>
94+
</plugins>
95+
<pluginManagement>
96+
<plugins>
97+
<!--This plugin's configuration is used to store Eclipse m2e settings only. It has no influence on the Maven build itself.-->
98+
<plugin>
99+
<groupId>org.eclipse.m2e</groupId>
100+
<artifactId>lifecycle-mapping</artifactId>
101+
<version>1.0.0</version>
102+
<configuration>
103+
<lifecycleMappingMetadata>
104+
<pluginExecutions>
105+
<pluginExecution>
106+
<pluginExecutionFilter>
107+
<groupId>
108+
org.codehaus.sonar
109+
</groupId>
110+
<artifactId>
111+
sonar-packaging-maven-plugin
112+
</artifactId>
113+
<versionRange>[1.3,)</versionRange>
114+
<goals>
115+
<goal>check-dependencies</goal>
116+
</goals>
117+
</pluginExecutionFilter>
118+
<action>
119+
<ignore></ignore>
120+
</action>
121+
</pluginExecution>
122+
<pluginExecution>
123+
<pluginExecutionFilter>
124+
<groupId>org.codehaus.mojo</groupId>
125+
<artifactId>
126+
native2ascii-maven-plugin
127+
</artifactId>
128+
<versionRange>
129+
[1.0-beta-1,)
130+
</versionRange>
131+
<goals>
132+
<goal>native2ascii</goal>
133+
</goals>
134+
</pluginExecutionFilter>
135+
<action>
136+
<ignore></ignore>
137+
</action>
138+
</pluginExecution>
139+
</pluginExecutions>
140+
</lifecycleMappingMetadata>
141+
</configuration>
142+
</plugin>
143+
</plugins>
144+
</pluginManagement>
145+
</build>
53146

54-
<build>
55-
<plugins>
56-
<plugin>
57-
<groupId>org.codehaus.sonar</groupId>
58-
<artifactId>sonar-packaging-maven-plugin</artifactId>
59-
<version>1.0</version>
60-
<extensions>true</extensions>
61-
<configuration>
62-
<pluginClass>com.pica.sonarplugins.ruby.RubyPlugin</pluginClass>
63-
</configuration>
64-
</plugin>
65-
<plugin>
66-
<groupId>org.apache.maven.plugins</groupId>
67-
<artifactId>maven-release-plugin</artifactId>
68-
<configuration>
69-
<goals>deploy</goals>
70-
</configuration>
71-
</plugin>
72-
<plugin>
73-
<groupId>org.apache.maven.plugins</groupId>
74-
<artifactId>maven-compiler-plugin</artifactId>
75-
<version>2.0.2</version>
76-
<configuration>
77-
<source>1.6</source>
78-
<target>1.6</target>
79-
<encoding>UTF-8</encoding>
80-
</configuration>
81-
</plugin>
82-
</plugins>
83-
</build>
84147
</project>
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
package com.godaddy.sonar.ruby;
2+
3+
import com.godaddy.sonar.ruby.core.Ruby;
4+
import com.godaddy.sonar.ruby.core.RubySourceImporter;
5+
import com.godaddy.sonar.ruby.simplecovrcov.SimpleCovRcovJsonParserImpl;
6+
import com.godaddy.sonar.ruby.simplecovrcov.SimpleCovRcovSensor;
7+
8+
import org.sonar.api.Extension;
9+
import org.sonar.api.Properties;
10+
import org.sonar.api.SonarPlugin;
11+
12+
import java.util.ArrayList;
13+
import java.util.List;
14+
15+
/**
16+
* This class is the entry point for all extensions
17+
*/
18+
@Properties({ })
19+
public final class RubyPlugin extends SonarPlugin {
20+
21+
public List<Class<? extends Extension>> getExtensions() {
22+
List<Class<? extends Extension>> extensions = new ArrayList<Class<? extends Extension>>();
23+
extensions.add(Ruby.class);
24+
25+
// simplecov
26+
extensions.add(SimpleCovRcovSensor.class);
27+
extensions.add(SimpleCovRcovJsonParserImpl.class);
28+
extensions.add(RubySourceImporter.class);
29+
return extensions;
30+
}
31+
}

src/main/java/com/pica/sonarplugins/ruby/core/Ruby.java renamed to src/main/java/com/godaddy/sonar/ruby/core/Ruby.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
package com.pica.sonarplugins.ruby.core;
1+
package com.godaddy.sonar.ruby.core;
22

33
import org.sonar.api.resources.AbstractLanguage;
44

0 commit comments

Comments
 (0)