Skip to content
This repository has been archived by the owner on Aug 27, 2019. It is now read-only.

modernizing sbt build and dependencies #1

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions build.sbt
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
name := "mechanize"
organization := "org.smop"
version := "0.1-SNAPSHOT"

scalaVersion := "2.11.8"

libraryDependencies ++= Seq(
"nu.validator.htmlparser" % "htmlparser" % "1.4",
"org.apache.httpcomponents" % "httpclient" % "4.5.2",
"org.scala-lang.modules" % "scala-xml_2.11" % "1.0.5",
"org.specs2" %% "specs2-core" % "3.8.3" % "test"
)

scalacOptions in Test ++= Seq("-Yrangepos")
8 changes: 0 additions & 8 deletions project/build.properties

This file was deleted.

10 changes: 0 additions & 10 deletions project/build/MechanizeProject.scala

This file was deleted.

9 changes: 6 additions & 3 deletions src/main/scala/org/smop/mechanize/Mechanize.scala
Original file line number Diff line number Diff line change
Expand Up @@ -3,18 +3,21 @@
*/
package org.smop.mechanize

import org.apache.http.impl.client.DefaultHttpClient
import org.apache.http.client.methods.{HttpUriRequest, HttpGet}
import scala.language.postfixOps
import org.apache.http.impl.client.HttpClientBuilder
import org.apache.http.client.methods.{HttpGet, HttpUriRequest}
import org.apache.http.{HttpEntity, HttpResponse}
import java.io.InputStream

import xml.Node
import java.net.URI

import org.xml.sax.InputSource

/** The do-it-all class.
* @param agent the HTTP User Agent */
class Mechanize(var agent: String = "org.smop.mechanize/0.1") {
protected val _httpclient = new DefaultHttpClient
protected val _httpclient = HttpClientBuilder.create().build()

protected var _request: HttpUriRequest = null
protected var _uri: URI = null
Expand Down