Skip to content

Commit

Permalink
[Devops] Build.Gradle Changes (#100)
Browse files Browse the repository at this point in the history
* Model: Add backup property to UserPrefs model

Add backup file path to user preferences model.

Modified equals to compare backup location

Modified string builder to include backup path

* [Tests] Update JsonUserPrefsStorageTest

Modify ExtraValues json test file
Add `addressBookBackupFilePath` to typical user prefs json test file

* [Model] Add UserPrefs to Model

[Model]
UserPrefs is required to be in model manager as commands run can affect user preferences which should be part of model.

Refer to original AB4 architecture diagram

Added getUserPref method to Model interface

Fix UserPref model returning wrong path in getAddressBookBackupFilePath

[Tests]
Fix Stubbed ModelManager in AddCommandTest

* Add backup methods to AddressBookStorage

Make AddressBookStorage and XmlAddressBookStorage have the required backup methods

* Remove UserPrefs comparison from ModelManager

As long as AddressBook data are equal, userprefs can be different which is okay

* Additional tests for XmlAddressBookStorage

* Add basic backup command

Backup Command currently calls model.backupAddressBook, perhaps we should raise a backup request event from command direct and get handled by storage manager directly as we do not need to modify the model

* Add sample tests for backup command

* CheckStyle Fixes

* More CheckStyle Fixes

* More checkstyle fixes :(

* Make backup generic to allow future extensions

More tests
Bug Fixes

* Resolve conflicts

* Checkstyle fixes

* Add tests to fix coverage

* Fix BackupCommandParser tests

* Fixs bugs

* Last try to fix test on linux

* Remove test

Impossible to make exception to be thrown on linux even with mocking for invalid paths

* Remove unused imports

* Implement online backup

Create generic online storage module
Implement working backup to github gist
Modify backup command to accept github backup

* Checkstyle and Bug Fixes

* Temp Bug Fix

* Add UI to Github backup

Runs worker thread when uploading to github gists

Ui popups with error if invalid access token provided and detected inside worker task.
If success, UI updated with success message and provides url to uploaded Gist

* Add Restore Command

Local and Github Restore added
Bug fixes
TODO: Save gist id on backup into userprefs
Added UI

* Checkstyle Fixes

* Update src/main/java/seedu/address/commons/events/storage/DataRestoreExceptionEvent.java

* Fix SLAP violations

* Optimise code flow for Restore Command

Restore Command fires event directly handled by StorageManager which fires off an AddressBookLocalRestoreEvent handled by the ModelManage to indicate backup storage successfully read from.

* Bug Fix

* Fix previously removed tests

* Improvements

Online Restore actually works properly
Modify userprefs in anticipation to improve user experience

* Bug Fixs, Checkstyle Fixes

* Checkstyle fixes

Fix local backup and restore
Temporarily disable custom backup and restore locations

* Update ExpenseBook.java

* Update XmlExpenseBookStorage.java

* Update XmlSerializableExpenseBook.java

* Update RestoreCommand.java

* Update UserPrefs.java

* Update ExpenseBookStorage.java

* Update Storage.java

* Update Storage.java

* Update SampleDataTest.java

* Update ModelManager.java

* Update XmlAdaptedExpense.java

* Update ExpenseBuilder.java

* Update PersonBuilder.java

* Update AddressBookSystemTest.java

* Update TypicalExpenses.java

* Add UI feedback for backup restore

Further optimise backup code to fix DRY violations

* Fix restore command help text and add documentation

* Optimise & Fixes

* Docs and fixes

* Update docs/images/backup-example.png

* Update docs/DeveloperGuide.adoc

* Add backupcommand and backupcommandparser tests

* CheckStyle Fixes & Documentation changes

* Fixes

* Update src/main/java/seedu/address/logic/commands/RestoreCommand.java

* Fixes and add tests

* Add Docs and Tests

* Update docs/DeveloperGuide.adoc

* Update src/test/data/GithubStorageTest/ValidExpenseBook.bak

* Add backup restore code for all data books

Bug fix

* Update src/test/java/seedu/address/logic/commands/RestoreCommandTest.java

* Update build.gradle

* Update GithubStorageTest.java
  • Loading branch information
QzSG committed Oct 31, 2018
1 parent 9e3a2c9 commit f648d7f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion build.gradle
Expand Up @@ -83,7 +83,7 @@ dependencies {
}

shadowJar {
archiveName = 'addressbook.jar'
archiveName = 'StudentPlanner.jar'

destinationDir = file("${buildDir}/jar/")
}
Expand Down

0 comments on commit f648d7f

Please sign in to comment.