Skip to content

Commit

Permalink
just change the version to 1.0
Browse files Browse the repository at this point in the history
  • Loading branch information
johnscancella committed Jun 18, 2018
1 parent 61c50c8 commit e5b0c5d
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
*/
public interface VersionChecker {
Logger logger = LoggerFactory.getLogger(VersionChecker.class);
Version LATEST_BAGIT_VERSION = new Version(0, 97);
Version LATEST_BAGIT_VERSION = Version.LATEST_BAGIT_VERSION();
ResourceBundle messages = ResourceBundle.getBundle("MessageBundle");

/*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ public final class BagCreator {
private static final ResourceBundle messages = ResourceBundle.getBundle("MessageBundle");
private static final String DATE_FORMAT = "yyyy-MM-dd";
private static final Version DOT_BAGIT_VERSION = new Version(2, 0);
private static final Version LATEST_NON_DOT_BAGIT_VERSION = new Version(0, 97);
private static final Version LATEST_NON_DOT_BAGIT_VERSION = Version.LATEST_BAGIT_VERSION();

private BagCreator(){}

Expand Down
4 changes: 4 additions & 0 deletions src/main/java/gov/loc/repository/bagit/domain/Version.java
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,10 @@ public Version(final int major, final int minor){
this.minor = minor;
this.cachedToString = major + "." + minor;
}

public static Version LATEST_BAGIT_VERSION(){
return new Version(1, 0);
}

@Override
public String toString() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ public void testBagInPlace() throws IOException, NoSuchAlgorithmException{

Bag bag = BagCreator.bagInPlace(folder, Arrays.asList(StandardSupportedAlgorithms.MD5), false);

Assertions.assertEquals(new Version(0, 97), bag.getVersion());
Assertions.assertEquals(Version.LATEST_BAGIT_VERSION(), bag.getVersion());

Path expectedManifest = folder.resolve("manifest-md5.txt");
Assertions.assertTrue(Files.exists(expectedManifest));
Expand Down Expand Up @@ -66,7 +66,7 @@ public void testBagInPlaceIncludingHidden() throws IOException, NoSuchAlgorithmE

Bag bag = BagCreator.bagInPlace(folder, Arrays.asList(StandardSupportedAlgorithms.MD5), true);

Assertions.assertEquals(new Version(0, 97), bag.getVersion());
Assertions.assertEquals(Version.LATEST_BAGIT_VERSION(), bag.getVersion());

Path expectedManifest = folder.resolve("manifest-md5.txt");
Assertions.assertTrue(Files.exists(expectedManifest));
Expand Down

0 comments on commit e5b0c5d

Please sign in to comment.