Skip to content

Commit

Permalink
fixed failing test. added rollbar
Browse files Browse the repository at this point in the history
  • Loading branch information
GASSZ001 authored and GASSZ001 committed May 29, 2017
1 parent b9e66bd commit 3d7b632
Show file tree
Hide file tree
Showing 7 changed files with 24 additions and 119 deletions.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -45,4 +45,4 @@ captures/
.idea/workspace.xml

# Keystore files
# *.jks
*.jks
41 changes: 0 additions & 41 deletions .travis.yml

This file was deleted.

40 changes: 0 additions & 40 deletions circle.yml

This file was deleted.

12 changes: 6 additions & 6 deletions sampleApp/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -157,9 +157,9 @@ dependencies {
// testCompile 'org.mockito:mockito-core:2.0.57-beta'
}

//apply from: "$project.rootDir/tools/script-git-version.gradle"
//apply from: "$project.rootDir/tools/script-findbugs.gradle"
//apply from: "$project.rootDir/tools/script-pmd.gradle"
//apply from: "$project.rootDir/tools/script-java-code-coverage.gradle"
//apply from: "$project.rootDir/tools/script-infer.gradle"
//apply from: "$project.rootDir/tools/script-check-style.gradle"
apply from: "$project.rootDir/tools/script-git-version.gradle"
apply from: "$project.rootDir/tools/script-findbugs.gradle"
apply from: "$project.rootDir/tools/script-pmd.gradle"
apply from: "$project.rootDir/tools/script-java-code-coverage.gradle"
apply from: "$project.rootDir/tools/script-infer.gradle"
apply from: "$project.rootDir/tools/script-check-style.gradle"
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,16 @@
import android.util.Base64;
import android.util.Log;

import com.rollbar.android.Rollbar;
import com.zeyad.usecases.api.DataServiceConfig;
import com.zeyad.usecases.api.DataServiceFactory;

import java.security.MessageDigest;
import java.util.concurrent.TimeUnit;

import io.flowup.FlowUp;
import io.reactivex.Completable;
import io.reactivex.schedulers.Schedulers;
import io.realm.Realm;
import io.realm.RealmConfiguration;
import io.realm.rx.RealmObservableFactory;
Expand Down Expand Up @@ -83,21 +86,18 @@ private static boolean checkDebuggable(Context context) {
public void onCreate() {
initializeStrictMode();
super.onCreate();
// if (LeakCanary.isInAnalyzerProcess(this)) {
// // This process is dedicated to LeakCanary for heap analysis.
// // You should not init your app in this process.
// return;
// }
// LeakCanary.install(this);
// checkAppTampering(sInstance);
Completable.fromAction(() -> {
checkAppTampering(this);
initializeFlowUp();
Rollbar.init(this, "c8c8b4cb1d4f4650a77ae1558865ca87", "production");
}).subscribeOn(Schedulers.io()).subscribe(() -> {
}, Throwable::printStackTrace);
initializeRealm();
DataServiceFactory.init(new DataServiceConfig.Builder(this)
.baseUrl(API_BASE_URL)
.withCache(3, TimeUnit.MINUTES)
.withRealm()
.build());
initializeStetho();
initializeFlowUp();
}

private void initializeStrictMode() {
Expand All @@ -123,21 +123,6 @@ private void initializeRealm() {
.build());
}

private void initializeStetho() {
// Stetho.initialize(Stetho.newInitializerBuilder(this)
// .enableDumpapp(Stetho.defaultDumperPluginsProvider(this))
// .enableWebKitInspector(RealmInspectorModulesProvider.builder(this).build())
// .build());
// RealmInspectorModulesProvider.builder(this)
// .withFolder(getCacheDir())
//// .withEncryptionKey("encrypted.realm", key)
// .withMetaTables()
// .withDescendingOrder()
// .withLimit(1000)
// .databaseNamePattern(Pattern.compile(".+\\.realm"))
// .build();
}

private void initializeFlowUp() {
FlowUp.Builder.with(this)
.apiKey(getString(R.string.flow_up_api_key))
Expand Down
13 changes: 7 additions & 6 deletions usecases/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,7 @@ dependencies {
compile('com.github.lowlevel-studios:storo:1.1.0') {
transitive = true
}
compile 'com.rollbar:rollbar-android:0.2.1'
// Testing
testCompile 'junit:junit:4.12'
testCompile "com.android.support:support-annotations:$supportLibraryVersion"
Expand Down Expand Up @@ -217,12 +218,12 @@ bintray {
}
}

//apply from: "$project.rootDir/tools/script-git-version.gradle"
//apply from: "$project.rootDir/tools/script-findbugs.gradle"
//apply from: "$project.rootDir/tools/script-pmd.gradle"
//apply from: "$project.rootDir/tools/script-java-code-coverage.gradle"
//apply from: "$project.rootDir/tools/script-infer.gradle"
//apply from: "$project.rootDir/tools/script-check-style.gradle"
apply from: "$project.rootDir/tools/script-git-version.gradle"
apply from: "$project.rootDir/tools/script-findbugs.gradle"
apply from: "$project.rootDir/tools/script-pmd.gradle"
apply from: "$project.rootDir/tools/script-java-code-coverage.gradle"
apply from: "$project.rootDir/tools/script-infer.gradle"
apply from: "$project.rootDir/tools/script-check-style.gradle"

//apply from: 'https://raw.githubusercontent.com/nuuneoi/JCenter/master/installv1.gradle'
//apply from: 'https://raw.githubusercontent.com/nuuneoi/JCenter/master/bintrayv1.gradle'
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ public static RestApi init(@Nullable OkHttpClient.Builder okHttpBuilder) {
@NonNull
static HttpLoggingInterceptor provideHttpLoggingInterceptor() {
return new HttpLoggingInterceptor(message -> Log.d("NetworkInfo", message))
.setLevel(BuildConfig.DEBUG ? HttpLoggingInterceptor.Level.BODY : HttpLoggingInterceptor.Level.HEADERS);
.setLevel(BuildConfig.DEBUG ? HttpLoggingInterceptor.Level.BODY : HttpLoggingInterceptor.Level.NONE);
}

private static Interceptor provideCacheInterceptor() {
Expand Down

0 comments on commit 3d7b632

Please sign in to comment.