Skip to content
Browse files

Remove 'yammer' from package names

  • Loading branch information...
1 parent 43082b6 commit 57f07bd70c64448af862f95cd445e445c709a897 @jeffellis committed
Showing with 40 additions and 42 deletions.
  1. +2 −2 README.md
  2. +9 −11 YammerMetricsGrailsPlugin.groovy
  3. +1 −1 example-app/grails-app/conf/BootStrap.groovy
  4. +1 −1 example-app/grails-app/conf/BuildConfig.groovy
  5. +3 −3 example-app/grails-app/controllers/metricstest/PegController.groovy
  6. +3 −3 grails-app/conf/BuildConfig.groovy
  7. +1 −1 ...y/org/grails/plugins/{yammermetrics → metrics}/groovy/HealthCheckServletContextInitializer.groovy
  8. +1 −1 src/groovy/org/grails/plugins/{yammermetrics → metrics}/groovy/HealthChecks.groovy
  9. +2 −2 src/groovy/org/grails/plugins/{yammermetrics → metrics}/groovy/Metered.groovy
  10. +2 −2 src/groovy/org/grails/plugins/{yammermetrics → metrics}/groovy/Metrics.groovy
  11. +2 −2 ...roovy/org/grails/plugins/{yammermetrics → metrics}/groovy/MetricsServletContextInitializer.groovy
  12. +2 −2 src/groovy/org/grails/plugins/{yammermetrics → metrics}/groovy/Timed.groovy
  13. +1 −1 src/groovy/org/grails/plugins/{yammermetrics → metrics}/groovy/Timer.groovy
  14. +2 −2 src/groovy/org/grails/plugins/{yammermetrics → metrics}/groovy/ast/YMeteredASTTransformation.groovy
  15. +2 −2 src/groovy/org/grails/plugins/{yammermetrics → metrics}/groovy/ast/YTimedASTTransformation.groovy
  16. +1 −1 test/unit/com/codahale/metrics/groovy/HistogramTest.groovy
  17. +1 −1 test/unit/com/codahale/metrics/groovy/MeterTest.groovy
  18. +3 −3 test/unit/com/codahale/metrics/groovy/SampleObject.groovy
  19. +1 −1 test/unit/com/codahale/metrics/groovy/TimedTest.groovy
View
4 README.md
@@ -50,7 +50,7 @@ class SomeService{
Timed the Grails Way
```
class SomeService{
- @org.grails.plugins.yammermetrics.groovy.Timed
+ @org.grails.plugins.metrics.groovy.Timed
public String serve(def foo, def bar) {
return "OK"
}
@@ -86,7 +86,7 @@ Metered the Grails Way
```
class SomeService{
- @org.grails.plugins.yammermetrics.groovy.Metered
+ @org.grails.plugins.metrics.groovy.Metered
public String serve(def foo, def bar) {
return "OK"
}
View
20 YammerMetricsGrailsPlugin.groovy
@@ -1,11 +1,9 @@
import com.codahale.metrics.servlets.MetricsServlet
import grails.util.Holders
-import org.grails.plugins.yammermetrics.groovy.HealthCheckServletContextInitializer
-import org.grails.plugins.yammermetrics.groovy.HealthCheckServletContextInitializer
-import org.grails.plugins.yammermetrics.groovy.MetricsServletContextInitializer
+import org.grails.plugins.metrics.groovy.HealthCheckServletContextInitializer
+import org.grails.plugins.metrics.groovy.MetricsServletContextInitializer
import javax.servlet.ServletContextEvent
-import java.util.concurrent.TimeUnit
/*
* Copyright 2013 Jeff Ellis
@@ -52,7 +50,7 @@ See the source code documentation on Github for more details.
def contextParamElement = xml.'context-param'[count - 1]
- def unit = Holders.getConfig().yammermetrics.servlet.rateUnit
+ def unit = Holders.getConfig().metrics.servlet.rateUnit
if(unit instanceof String) {
contextParamElement + {
'context-param' {
@@ -62,7 +60,7 @@ See the source code documentation on Github for more details.
}
}
- unit = Holders.getConfig().yammermetrics.servlet.durationUnit
+ unit = Holders.getConfig().metrics.servlet.durationUnit
if(unit instanceof String) {
contextParamElement + {
'context-param' {
@@ -81,11 +79,11 @@ See the source code documentation on Github for more details.
servletElement + {
'servlet' {
- 'servlet-name'("YammerMetrics")
+ 'servlet-name'("Metrics")
'servlet-class'("com.codahale.metrics.servlets.AdminServlet")
}
}
- println "***\nYammerMetrics servlet injected into web.xml"
+ println "***\nMetrics servlet injected into web.xml"
}
count = xml.'servlet-mapping'.size()
@@ -98,14 +96,14 @@ See the source code documentation on Github for more details.
servletMappingElement + {
'servlet-mapping' {
- 'servlet-name'("YammerMetrics")
+ 'servlet-name'("Metrics")
'url-pattern'(servletUrlPattern)
}
}
- println "YammerMetrics Admin servlet-mapping (for $servletUrlPattern) injected into web.xml\n***"
+ println "Metrics Admin servlet-mapping (for $servletUrlPattern) injected into web.xml\n***"
}
} else{
- println "Skipping YammerMetrics Admin servlet mapping\n***"
+ println "Skipping Metrics Admin servlet mapping\n***"
}
}
View
2 example-app/grails-app/conf/BootStrap.groovy
@@ -1,5 +1,5 @@
import metricstest.AlwaysHealthyCheck
-import org.grails.plugins.yammermetrics.groovy.HealthChecks
+import org.grails.plugins.metrics.groovy.HealthChecks
class BootStrap {
View
2 example-app/grails-app/conf/BuildConfig.groovy
@@ -7,7 +7,7 @@ grails.project.source.level = 1.6
// Inline the metrics plugin for easy testing
grails.plugin.location.'yammer-metrics' = "../."
-yammermetrics.version = System.getProperty( "yammermetrics.version", "3.0.1" )
+yammermetrics.version = System.getProperty( "metrics.version", "3.0.1" )
grails.project.dependency.resolution = {
View
6 example-app/grails-app/controllers/metricstest/PegController.groovy
@@ -3,9 +3,9 @@ package metricstest
import com.codahale.metrics.Counter
import com.codahale.metrics.Gauge
import com.codahale.metrics.Histogram
-import org.grails.plugins.yammermetrics.groovy.Metered
-import org.grails.plugins.yammermetrics.groovy.Metrics
-import org.grails.plugins.yammermetrics.groovy.Timed
+import org.grails.plugins.metrics.groovy.Metered
+import org.grails.plugins.metrics.groovy.Metrics
+import org.grails.plugins.metrics.groovy.Timed
class PegController {
View
6 grails-app/conf/BuildConfig.groovy
@@ -6,7 +6,7 @@ grails.project.class.dir = "target/classes"
grails.project.test.class.dir = "target/test-classes"
grails.project.test.reports.dir = "target/test-reports"
-yammermetrics.version = "3.0.1"
+metrics.core.version = "3.0.1"
grails.project.dependency.resolution = {
// inherit Grails' default dependencies
@@ -48,8 +48,8 @@ grails.project.dependency.resolution = {
dependencies {
// specify dependencies here under either 'build', 'compile', 'runtime', 'test' or 'provided' scopes eg.
- runtime "com.codahale.metrics:metrics-core:${yammermetrics.version}"
- runtime "com.codahale.metrics:metrics-servlets:${yammermetrics.version}"
+ runtime "com.codahale.metrics:metrics-core:${metrics.core.version}"
+ runtime "com.codahale.metrics:metrics-servlets:${metrics.core.version}"
}
}
View
2 ...althCheckServletContextInitializer.groovy → ...althCheckServletContextInitializer.groovy
@@ -1,4 +1,4 @@
-package org.grails.plugins.yammermetrics.groovy
+package org.grails.plugins.metrics.groovy
import com.codahale.metrics.health.HealthCheckRegistry
import com.codahale.metrics.servlets.HealthCheckServlet
View
2 .../yammermetrics/groovy/HealthChecks.groovy → ...lugins/metrics/groovy/HealthChecks.groovy
@@ -1,4 +1,4 @@
-package org.grails.plugins.yammermetrics.groovy
+package org.grails.plugins.metrics.groovy
import com.codahale.metrics.health.HealthCheck
import com.codahale.metrics.health.HealthCheckRegistry
View
4 ...ugins/yammermetrics/groovy/Metered.groovy → ...ils/plugins/metrics/groovy/Metered.groovy
@@ -1,4 +1,4 @@
-package org.grails.plugins.yammermetrics.groovy
+package org.grails.plugins.metrics.groovy
import org.codehaus.groovy.transform.GroovyASTTransformationClass
@@ -13,7 +13,7 @@ import java.lang.annotation.Target
*/
@Retention(RetentionPolicy.SOURCE)
@Target([ElementType.METHOD])
-@GroovyASTTransformationClass(["org.grails.plugins.yammermetrics.groovy.ast.YMeteredASTTransformation"])
+@GroovyASTTransformationClass(["org.grails.plugins.metrics.groovy.ast.YMeteredASTTransformation"])
public @interface Metered {
String name() default "";
View
4 ...ugins/yammermetrics/groovy/Metrics.groovy → ...ils/plugins/metrics/groovy/Metrics.groovy
@@ -1,4 +1,4 @@
-package org.grails.plugins.yammermetrics.groovy
+package org.grails.plugins.metrics.groovy
import com.codahale.metrics.Counter
import com.codahale.metrics.Histogram
@@ -20,7 +20,7 @@ class Metrics {
private static final MetricRegistry builtInRegistry = new MetricRegistry()
// ignore org.springsource.loaded.ri.ReflectiveInterceptor when not running as a war, and ignore this class for convenience
- static final List<String> extraIgnoredPackages = ["org.springsource.loaded.ri", "org.grails.plugins.yammermetrics.groovy"]
+ static final List<String> extraIgnoredPackages = ["org.springsource.loaded.ri", "org.grails.plugins.metrics.groovy"]
private static String expandNameToIncludeCallingClass(String metricName) {
Class callingClass = ReflectionUtils.getCallingClass(0, extraIgnoredPackages)
View
4 ...y/MetricsServletContextInitializer.groovy → ...y/MetricsServletContextInitializer.groovy
@@ -1,4 +1,4 @@
-package org.grails.plugins.yammermetrics.groovy
+package org.grails.plugins.metrics.groovy
import com.codahale.metrics.MetricRegistry
import com.codahale.metrics.servlets.MetricsServlet
@@ -26,7 +26,7 @@ class MetricsServletContextInitializer extends MetricsServlet.ContextListener {
}
private TimeUnit getUnitFromConfig(String propertyName) {
- def unit = Holders.config.yammermetrics.servlet[propertyName]
+ def unit = Holders.config.metrics.servlet[propertyName]
if (unit instanceof String) {
return TimeUnit.valueOf(unit.toUpperCase(Locale.US))
}
View
4 ...plugins/yammermetrics/groovy/Timed.groovy → ...rails/plugins/metrics/groovy/Timed.groovy
@@ -1,4 +1,4 @@
-package org.grails.plugins.yammermetrics.groovy
+package org.grails.plugins.metrics.groovy
import org.codehaus.groovy.transform.GroovyASTTransformationClass
@@ -13,7 +13,7 @@ import java.lang.annotation.Target
*/
@Retention(RetentionPolicy.SOURCE)
@Target([ElementType.METHOD])
-@GroovyASTTransformationClass(["org.grails.plugins.yammermetrics.groovy.ast.YTimedASTTransformation"])
+@GroovyASTTransformationClass(["org.grails.plugins.metrics.groovy.ast.YTimedASTTransformation"])
public @interface Timed {
String name() default "";
View
2 ...plugins/yammermetrics/groovy/Timer.groovy → ...rails/plugins/metrics/groovy/Timer.groovy
@@ -1,7 +1,7 @@
/*
* Copyright 2013 Jeff Ellis
*/
-package org.grails.plugins.yammermetrics.groovy
+package org.grails.plugins.metrics.groovy
import org.apache.commons.logging.LogFactory
View
4 ...oovy/ast/YMeteredASTTransformation.groovy → ...oovy/ast/YMeteredASTTransformation.groovy
@@ -1,4 +1,4 @@
-package org.grails.plugins.yammermetrics.groovy.ast
+package org.grails.plugins.metrics.groovy.ast
import org.apache.log4j.Logger
import org.codehaus.groovy.ast.stmt.ExpressionStatement
@@ -6,7 +6,7 @@ import org.codehaus.groovy.control.CompilePhase
import org.codehaus.groovy.control.SourceUnit
import org.codehaus.groovy.transform.ASTTransformation
import org.codehaus.groovy.transform.GroovyASTTransformation
-import org.grails.plugins.yammermetrics.groovy.Metrics
+import org.grails.plugins.metrics.groovy.Metrics
import java.lang.reflect.Modifier
View
4 ...groovy/ast/YTimedASTTransformation.groovy → ...groovy/ast/YTimedASTTransformation.groovy
@@ -1,4 +1,4 @@
-package org.grails.plugins.yammermetrics.groovy.ast
+package org.grails.plugins.metrics.groovy.ast
import org.apache.log4j.Logger
import org.codehaus.groovy.ast.stmt.BlockStatement
@@ -10,7 +10,7 @@ import org.codehaus.groovy.syntax.Token
import org.codehaus.groovy.syntax.Types
import org.codehaus.groovy.transform.ASTTransformation
import org.codehaus.groovy.transform.GroovyASTTransformation
-import org.grails.plugins.yammermetrics.groovy.Metrics
+import org.grails.plugins.metrics.groovy.Metrics
import java.lang.reflect.Modifier
View
2 test/unit/com/codahale/metrics/groovy/HistogramTest.groovy
@@ -2,7 +2,7 @@ package com.codahale.metrics.groovy
import com.codahale.metrics.Histogram
import com.codahale.metrics.SlidingTimeWindowReservoir
-import org.grails.plugins.yammermetrics.groovy.Metrics
+import org.grails.plugins.metrics.groovy.Metrics
import java.util.concurrent.TimeUnit
View
2 test/unit/com/codahale/metrics/groovy/MeterTest.groovy
@@ -1,7 +1,7 @@
package com.codahale.metrics.groovy
import com.codahale.metrics.Meter
-import org.grails.plugins.yammermetrics.groovy.Metrics
+import org.grails.plugins.metrics.groovy.Metrics
class MeterTest extends GroovyTestCase {
SampleObject sample
View
6 test/unit/com/codahale/metrics/groovy/SampleObject.groovy
@@ -1,8 +1,8 @@
package com.codahale.metrics.groovy
-import org.grails.plugins.yammermetrics.groovy.Metrics
-import org.grails.plugins.yammermetrics.groovy.Metered
-import org.grails.plugins.yammermetrics.groovy.Timed
+import org.grails.plugins.metrics.groovy.Metrics
+import org.grails.plugins.metrics.groovy.Metered
+import org.grails.plugins.metrics.groovy.Timed
class SampleObject {
View
2 test/unit/com/codahale/metrics/groovy/TimedTest.groovy
@@ -1,7 +1,7 @@
package com.codahale.metrics.groovy
import com.codahale.metrics.Timer
-import org.grails.plugins.yammermetrics.groovy.Metrics
+import org.grails.plugins.metrics.groovy.Metrics
class TimedTest extends GroovyTestCase {
SampleObject sample

0 comments on commit 57f07bd

Please sign in to comment.
Something went wrong with that request. Please try again.