Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove last references to Walkman. Add constructor to AndroidTapeRoot #29

Merged
merged 1 commit into from
May 10, 2017
Merged
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
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
PROJECT_DESCRIPTION=OkReplay lets you record and replay OkHttp network interaction your Android application.
GROUP=com.airbnb.okreplay
VERSION_NAME=1.0.4-SNAPSHOT
VERSION_NAME=1.1.0-SNAPSHOT
POM_URL=https://github.com/airbnb/okreplay
POM_SCM_URL=https://github.com/airbnb/okreplay
POM_SCM_CONNECTION=scm:git://github.com/airbnb/okreplay.git
Expand Down
2 changes: 1 addition & 1 deletion gradle/dependencies.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ ext {
mockWebServer: "com.squareup.okhttp3:mockwebserver:$versions.okhttpVersion",
snakeYaml : "org.yaml:snakeyaml:1.16",
kotlinStdLib : "org.jetbrains.kotlin:kotlin-stdlib:$versions.kotlinVersion",
okreplayPlugin: "com.airbnb.walkman:gradle-plugin:$versions.okreplayVersion",
okreplayPlugin: "com.airbnb.okreplay:gradle-plugin:$versions.okreplayVersion",
kotlinPlugin : "org.jetbrains.kotlin:kotlin-gradle-plugin:$versions.kotlinVersion",
truth : 'com.google.truth:truth:0.30',
robolectric : "org.robolectric:robolectric:3.3.2",
Expand Down
2 changes: 2 additions & 0 deletions okreplay-espresso/src/main/kotlin/okreplay/AndroidTapeRoot.kt
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ import java.lang.RuntimeException
/** Provides a directory for OkReplay to store its tapes in. */
class AndroidTapeRoot(private val assetManager: AssetManager, testName: String) :
DefaultTapeRoot(getSdcardDir(assetManager.context, testName)) {
constructor(context: Context, klass: Class<*>) : this(AssetManager(context), klass.simpleName)

internal val assetsDirPrefix = "tapes/$testName"

override fun readerFor(tapeFileName: String) =
Expand Down
2 changes: 1 addition & 1 deletion okreplay-sample/build.gradle
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
apply plugin: 'com.android.application'
apply plugin: 'kotlin-android'
apply plugin: 'walkman'
apply plugin: 'okreplay'

android {
compileSdkVersion androidConfig.compileSdkVersion
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ public class ExampleInstrumentedBarTest {
private final ActivityTestRule<MainActivity> activityTestRule =
new ActivityTestRule<>(MainActivity.class);
private final OkReplayConfig configuration = new OkReplayConfig.Builder()
.tapeRoot(new AndroidTapeRoot(new AssetManager(getContext()), getClass().getSimpleName()))
.tapeRoot(new AndroidTapeRoot(getContext(), getClass()))
.defaultMode(TapeMode.READ_ONLY)
.sslEnabled(true)
.interceptor(graph.getOkReplayInterceptor())
Expand Down