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

Add VersionManager abstractization (breaking change) #155

Merged
merged 2 commits into from
Jul 12, 2017

Conversation

decebals
Copy link
Member

See #154 for motivation.

@coveralls
Copy link

coveralls commented Jul 11, 2017

Coverage Status

Coverage increased (+0.07%) to 54.794% when pulling e3ff846 on version_manager into 49bd1f5 on master.

@decebals
Copy link
Member Author

This PR comes with a VersionManager interface:

/**
 * Manager responsible for versions of plugins.
 *
 * @author Decebal Suiu
 */
public interface VersionManager {

    /**
     * Check if a {@code constraint} and a {@code version} match.
     *
     * @param constraint
     * @param version
     * @return
     */
    boolean satisfies(String constraint, String version);

}

The default implementation is DefaultVersionManager and it uses SemVer. You are not forced to use SemVer in your projects. If you want something custom, then override createVersionManager method from AbstractPluginManager and supply your implementation.

Note This PR comes with a breaking change.

Copy link
Member

@janhoy janhoy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Probably a good change. Did a quick look only.

@coveralls
Copy link

coveralls commented Jul 12, 2017

Coverage Status

Coverage increased (+0.07%) to 54.794% when pulling 80cf2b3 on version_manager into 49bd1f5 on master.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants