Rogue 2.0 and Lift 2.5-M1

103 views
Skip to first unread message

Maarten Koopmans

unread,
Oct 16, 2012, 5:55:52 AM10/16/12
to rogue...@googlegroups.com
Hi,

I am new to Rogue - is there a howto on the subject (or otherwise I'd be happy with Rogu 1.1.x and Lift 2.5-M1 as well :-)

Thanks!

--Maarten

Jason Liszka

unread,
Oct 16, 2012, 11:19:55 AM10/16/12
to rogue...@googlegroups.com
Hi!

Rogue 2.0 should be a drop-in replacement for rogue 1.1.x. The README in the v2 branch on github should be enough to get you started... although I just noticed that it doesn't specify what import statement to use to get all the implicits that makes it work. Just pushed a fix!

So, just define your Lift Records as you would in Lift normally, then import com.foursquare.rogue.LiftRogue._, and then you can start using statements like

val records = MyRecord.where(_.someField eqs someValue).fetch()

QueryTest.scala and EndToEndTest.scala have a ton of examples to help you get started. Let me know if you have questions!

Jason

Maarten Koopmans

unread,
Oct 16, 2012, 11:44:41 AM10/16/12
to rogue...@googlegroups.com
Hi!

Firstly.... thanks. I saw the import and the sbt dependencies, do you know if they work with Lift 2.5-M1? 

Of course I can test mysel as well and will report back tomorrow (I'm in Europe). Again, thanks for the awesome work. 

--Maarten

Op dinsdag 16 oktober 2012 17:20:16 UTC+2 schreef Jason Liszka het volgende:

Jason Liszka

unread,
Oct 16, 2012, 12:01:14 PM10/16/12
to rogue...@googlegroups.com
I haven't tried it with Lift 2.5-M1, but please let me know if it works and I'll update the docs. We're using 2.4 at foursquare.

Thanks for trying it out! Appreciate your feedback :)

Jason

Maarten Koopmans

unread,
Oct 17, 2012, 5:51:14 AM10/17/12
to rogue...@googlegroups.com
works nicely, with this added to build.sbt:

libraryDependencies ++= {
  val liftVersion = "2.5-M1"
  Seq(
    "net.liftweb"       %% "lift-webkit"        % liftVersion        % "compile",
    "net.liftmodules"   %% "lift-jquery-module" % (liftVersion + "-1.0"),
    "org.eclipse.jetty" % "jetty-webapp"        % "8.1.7.v20120910"  % "container,test",
    "org.eclipse.jetty.orbit" % "javax.servlet" % "3.0.0.v201112011016" % "container,test" artifacts Artifact("javax.servlet", "jar", "jar"),
    "ch.qos.logback"    % "logback-classic"     % "1.0.6",
    "org.specs2"        %% "specs2"             % "1.12.1"           % "test",
"com.foursquare" %% "rogue-field"         % "2.0.0-beta14" intransitive(),
"com.foursquare" %% "rogue-core"          % "2.0.0-beta14" intransitive(),
"com.foursquare" %% "rogue-lift"          % "2.0.0-beta14" intransitive(),
"net.liftweb" %% "lift-mongodb-record" % liftVersion)
}


--Maarten

Op dinsdag 16 oktober 2012 18:01:35 UTC+2 schreef Jason Liszka het volgende:
Reply all
Reply to author
Forward
0 new messages