Skip to content

Commit

Permalink
Renamed SpellsConfig to SpellsConfigModule.
Browse files Browse the repository at this point in the history
  • Loading branch information
agilesteel committed Nov 9, 2015
1 parent 8a86ef8 commit ef9b899
Show file tree
Hide file tree
Showing 6 changed files with 7 additions and 39 deletions.
2 changes: 1 addition & 1 deletion src/main/scala/spells/CustomRendering.scala
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ trait CustomRendering {
implicit def rendered(implicit availableWidthInCharacters: CustomRendering.AvailableWidthInCharacters = CustomRendering.Defaults.AvailableWidthInCharacters): String
}

object CustomRendering extends SpellsConfig {
object CustomRendering extends SpellsConfigModule with AnsiModule {
object Defaults {
object Any extends (Any => CustomRendering) {
final def apply(any: Any): CustomRendering = new CustomRendering {
Expand Down
4 changes: 3 additions & 1 deletion src/main/scala/spells/LocationAwareConfig.scala
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,9 @@ package spells
import com.typesafe.config.Config
import com.typesafe.config.ConfigFactory._

private[spells] trait LocationAwareConfig extends AnsiModule {
private[spells] trait LocationAwareConfig {
this: AnsiModule =>

spellsConfig.checkValid(defaultReference(), "spells")

implicit final lazy val spellsConfig: Config = loadSpellsConfig
Expand Down
3 changes: 1 addition & 2 deletions src/main/scala/spells/LocationAwareProperty.scala
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,7 @@ private[spells] abstract class LocationAwareProperty[T](implicit materialised: (
private[spells] final lazy val location: String =
scala.reflect.NameTransformer
.decode(getClass.getName)
.replace("spells.SpellsConfig$", "")
.replace("SpellsConfig$", "spells.")
.replace("SpellsConfigModule$SpellsConfig$", "")
.split('$')
.mkString(".")

Expand Down
33 changes: 0 additions & 33 deletions src/main/scala/spells/SpellsConfig.scala

This file was deleted.

2 changes: 1 addition & 1 deletion src/main/scala/spells/SpellsModule.scala
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ trait SpellsModule
with ErrorPrintModule
with HumanRenderingModule
with MiscModule
with SpellsConfig
with SpellsConfigModule
with StringOpsModule
with StylePrintModule
with TraversableOpsModule
Expand Down
2 changes: 1 addition & 1 deletion src/main/scala/spells/XRayModule.scala
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import java.util.Calendar
import scala.concurrent.duration._

trait XrayModule {
this: AnsiModule with AnyOpsModule with CalendarOpsModule with DateOpsModule with DurationOpsModule with HumanRenderingModule with StringOpsModule with StylePrintModule with TraversableOpsModule with SpellsConfig =>
this: AnsiModule with AnyOpsModule with CalendarOpsModule with DateOpsModule with DurationOpsModule with HumanRenderingModule with StringOpsModule with StylePrintModule with TraversableOpsModule with SpellsConfigModule =>

final def xrayed[T](expression: => T, description: XrayModule#Description = Xray.Defaults.Description, increaseStackTraceDepthBy: Int = 0)(implicit manifest: Manifest[T], style: AnsiModule.Style = Reset, rendering: T => CustomRendering = CustomRendering.Defaults.Any): XrayModule#XrayReport[T] = {
val stackTraceElement = currentLineStackTraceElement(increaseStackTraceDepthBy - 1)
Expand Down

0 comments on commit ef9b899

Please sign in to comment.