forked from BenFradet/gsheets4s
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
12 changed files
with
118 additions
and
87 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
automerge: ['update/*'] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
name: label_and_automerge | ||
on: | ||
pull_request: | ||
types: | ||
- labeled | ||
- unlabeled | ||
- synchronize | ||
- opened | ||
- edited | ||
- ready_for_review | ||
- reopened | ||
- unlocked | ||
pull_request_review: | ||
types: | ||
- submitted | ||
check_suite: | ||
types: | ||
- completed | ||
status: {} | ||
jobs: | ||
|
||
automerge: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- id: automerge | ||
name: automerge | ||
uses: "pascalgn/[email protected]" | ||
env: | ||
GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}" | ||
pr-labeler: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: TimonVS/pr-labeler-action@v3 | ||
with: | ||
configuration-path: .github/pr-labeler.yml # optional, .github/pr-labeler.yml is the default value | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
name: Scala CI | ||
|
||
on: | ||
push: | ||
branches: [ "master" ] | ||
pull_request: | ||
branches: [ "master" ] | ||
|
||
permissions: | ||
contents: read | ||
|
||
jobs: | ||
build: | ||
|
||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Set up JDK 8 | ||
uses: actions/setup-java@v3 | ||
with: | ||
java-version: '8' | ||
distribution: 'temurin' | ||
cache: 'sbt' | ||
- name: Run tests | ||
run: sbt test |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,2 @@ | ||
target/ | ||
.idea/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,5 @@ | ||
inThisBuild(List( | ||
organization := "com.github.benfradet", | ||
homepage := Some(url("https://github.com/BenFradet/gsheets4s")), | ||
licenses := List("Apache-2.0" -> url("http://www.apache.org/licenses/LICENSE-2.0")), | ||
developers := List( | ||
Developer( | ||
"BenFradet", | ||
"Ben Fradet", | ||
"[email protected]", | ||
url("https://benfradet.github.io") | ||
) | ||
) | ||
)) | ||
name := "ctp-gsheets4s" | ||
organization := "com.itv" | ||
|
||
lazy val compilerOptions = Seq( | ||
"-deprecation", | ||
|
@@ -19,12 +8,9 @@ lazy val compilerOptions = Seq( | |
"-language:existentials", | ||
"-language:higherKinds", | ||
"-unchecked", | ||
"-Yno-adapted-args", | ||
"-Ywarn-dead-code", | ||
"-Ywarn-numeric-widen", | ||
"-Ywarn-unused-import", | ||
"-Xfuture", | ||
"-Ypartial-unification" | ||
"-Xfuture" | ||
) | ||
|
||
lazy val baseSettings = Seq( | ||
|
@@ -55,8 +41,9 @@ lazy val gsheets4s = project.in(file(".")) | |
libraryDependencies ++= Seq( | ||
"org.typelevel" %% "cats-core" % catsVersion, | ||
"org.typelevel" %% "cats-effect" % catsEffectVersion, | ||
"com.typesafe.scala-logging" %% "scala-logging" % "3.9.5", | ||
"eu.timepit" %% "refined" % refinedVersion, | ||
"io.lemonlabs" %% "scala-uri" % scalaUriVersion, | ||
"io.lemonlabs" %% "scala-uri" % scalaUriVersion | ||
) ++ Seq( | ||
"io.circe" %% "circe-core", | ||
"io.circe" %% "circe-generic", | ||
|
@@ -74,3 +61,13 @@ lazy val gsheets4s = project.in(file(".")) | |
"eu.timepit" %% "refined-scalacheck" % refinedVersion | ||
).map(_ % "test") | ||
) | ||
|
||
gitVersioningSnapshotLowerBound in ThisBuild := "0.4.0" | ||
|
||
resolvers += "Artifactory Realm" at "https://itvrepos.jfrog.io/itvrepos/fp-scala-libs/" | ||
|
||
credentials += Credentials(Path.userHome / ".ivy2" / "fp-scala-libs.credentials") | ||
|
||
publishArtifact := true | ||
publishArtifact in Test := false | ||
publishTo := Some("Artifactory Realm" at "https://itvrepos.jfrog.io/itvrepos/fp-scala-libs/") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
addSbtPlugin("org.scoverage" % "sbt-scoverage" % "1.6.1") | ||
addSbtPlugin("com.github.sbt" % "sbt-ci-release" % "1.5.9") | ||
addSbtPlugin("io.github.davidgregory084" % "sbt-tpolecat" % "0.1.20") | ||
resolvers += Resolver.bintrayIvyRepo("rallyhealth", "sbt-plugins") | ||
addSbtPlugin("com.rallyhealth.sbt" % "sbt-git-versioning" % "1.6.0") | ||
|
||
addSbtPlugin("org.scoverage" % "sbt-scoverage" % "1.9.3") |
6 changes: 3 additions & 3 deletions
6
src/main/scala/gsheets4s/interpreters/RestSpreadsheetsValues.scala
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,23 +1,23 @@ | ||
package gsheets4s | ||
package interpreters | ||
|
||
import cats.syntax.show._ | ||
import io.circe.generic.auto._ | ||
import io.lemonlabs.uri.typesafe.dsl._ | ||
|
||
import algebras.SpreadsheetsValues | ||
import http._ | ||
import model._ | ||
|
||
class RestSpreadsheetsValues[F[_]](client: HttpClient[F]) extends SpreadsheetsValues[F] { | ||
def get(spreadsheetID: String, range: A1Notation): F[Either[GsheetsError, ValueRange]] = | ||
client.get(spreadsheetID / "values" / range) | ||
client.get(io.lemonlabs.uri.Url.parse(s"$spreadsheetID/values/${range.show}")) | ||
|
||
def update( | ||
spreadsheetID: String, | ||
range: A1Notation, | ||
updates: ValueRange, | ||
valueInputOption: ValueInputOption | ||
): F[Either[GsheetsError, UpdateValuesResponse]] = | ||
client.put(spreadsheetID / "values" / range, updates, | ||
client.put(io.lemonlabs.uri.Url.parse(s"$spreadsheetID/values/${range.show}"), updates, | ||
List(("valueInputOption", valueInputOption.value))) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters