Skip to content
This repository has been archived by the owner on May 4, 2020. It is now read-only.

Commit

Permalink
setting up 'buildr' with this project
Browse files Browse the repository at this point in the history
  • Loading branch information
andrey committed Sep 10, 2010
1 parent 02d43e3 commit 10a15ca
Show file tree
Hide file tree
Showing 4 changed files with 33 additions and 5 deletions.
2 changes: 2 additions & 0 deletions .gitignore
@@ -0,0 +1,2 @@
reports
target
26 changes: 26 additions & 0 deletions buildfile
@@ -0,0 +1,26 @@
Buildr.settings.build['scala.version'] = "2.8.0"

require 'buildr/scala'


VERSION_NUMBER = "1.0.0"
GROUP = "redis-client-scala-netty"
COPYRIGHT = "Fotolog, Inc"

repositories.remote << 'http://scala-tools.org/repo-releases/'
repositories.remote << "http://www.ibiblio.org/maven2/"
repositories.remote << 'http://repository.jboss.org/maven2/'

desc "The Redis-client-scala-netty project"
define "redis-client-scala-netty" do

project.version = VERSION_NUMBER
project.group = GROUP
manifest["Fotolog"] = COPYRIGHT

compile.with 'org.jboss.netty:netty:jar:3.1.5.GA'
compile.with 'apache-log4j:log4j:jar:1.2.15'

package :jar

end
4 changes: 2 additions & 2 deletions src/main/scala/com/fotolog/redis/RedisClient.scala
Expand Up @@ -26,12 +26,12 @@ object KeyType {

object Conversions {
import RedisClientTypes._
import com.google.protobuf.Message

// implicit def getValueFromTheFuture[T](f: Future[T]): T = f.get()
// implicit def convertProtobufToByteArray(m: Message): BinVal = m.toByteArray

implicit def convertStringToByteArray(s: String): BinVal = s.getBytes
implicit def convertByteArrayToString(b: BinVal): String = new String(b)
implicit def convertProtobufToByteArray(m: Message): BinVal = m.toByteArray
}

object RedisClient {
Expand Down
6 changes: 3 additions & 3 deletions src/test/scala/com/fotolog/redis/RedisClientTest.scala
@@ -1,12 +1,12 @@
package com.fotolog.redis

import com.fotolog.junit.FotologTestCase
import junit.framework.TestCase

import org.junit._
import Assert._
import Conversions._

class RedisClientTest extends FotologTestCase {
class RedisClientTest extends TestCase {
val c = RedisClient()

override def setUp() = super.setUp; c.flushall
Expand Down Expand Up @@ -126,4 +126,4 @@ class RedisClientTest extends FotologTestCase {
assertTrue(c.hdel("hk", "foo"))
assertFalse(c.hexists("hk", "foo"))
}
}
}

0 comments on commit 10a15ca

Please sign in to comment.