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

Improve how ParselyTracker is accessed #105

Merged
merged 17 commits into from
Jan 29, 2024
Merged

Commits on Jan 18, 2024

  1. feat: introduce ParselyTracker#init

    To clearly distinguish initialization method from getting tracker instance method.
    wzieba committed Jan 18, 2024
    Configuration menu
    Copy the full SHA
    17011a5 View commit details
    Browse the repository at this point in the history
  2. feat: remove sharedInstance method

    And move all methods invocations to static `ParselyTracker`. Throw exception if using `ParselyTracker` methods without prior `init`
    wzieba committed Jan 18, 2024
    Configuration menu
    Copy the full SHA
    9ca9989 View commit details
    Browse the repository at this point in the history
  3. refactor: make ParselyTracker object

    As interface is no longer needed
    wzieba committed Jan 18, 2024
    Configuration menu
    Copy the full SHA
    0243576 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    fa1771a View commit details
    Browse the repository at this point in the history

Commits on Jan 19, 2024

  1. Configuration menu
    Copy the full SHA
    35e9cdd View commit details
    Browse the repository at this point in the history

Commits on Jan 23, 2024

  1. Configuration menu
    Copy the full SHA
    96d3fe9 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    1ddfda1 View commit details
    Browse the repository at this point in the history
  3. fix: do not add @Throws annotation to ensureInitialized

    It's `private` method, not exposed to the client so there's no point in adding this annotation. Also, I don't add it to public methods because I don't want force clients to handle exception each time they want to call SDK.
    wzieba committed Jan 23, 2024
    Configuration menu
    Copy the full SHA
    451d061 View commit details
    Browse the repository at this point in the history
  4. tests: add unit tests for ParselyTracker initialization

    The `ParselyTracker#tearDown` method was added as singleton persisted between unit tests, causing some of them to fail. I could introduce a similar behavior using reflection, but I believe `internal tearDown` method is cleaner and is not problematic as not exposed to the client
    wzieba committed Jan 23, 2024
    Configuration menu
    Copy the full SHA
    0478d9e View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    1e293df View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    b23113a View commit details
    Browse the repository at this point in the history
  7. style: move ParselyNotInitializedException message to exception itself

    To align with other exception and move responsibility from `ParselyTracker`
    wzieba committed Jan 23, 2024
    Configuration menu
    Copy the full SHA
    cf9843d View commit details
    Browse the repository at this point in the history
  8. Configuration menu
    Copy the full SHA
    9f6c637 View commit details
    Browse the repository at this point in the history

Commits on Jan 24, 2024

  1. feat: bring back ParselyTracker interface

    And `ParselyTracker#sharedInstance` method. Allows consumer clients to
    mock the `ParselyTracker` interface in their tests.
    wzieba committed Jan 24, 2024
    Configuration menu
    Copy the full SHA
    fa7a23e View commit details
    Browse the repository at this point in the history

Commits on Jan 29, 2024

  1. Configuration menu
    Copy the full SHA
    bc2b23e View commit details
    Browse the repository at this point in the history
  2. fix: sharedInstance should return ParselyTracker interface

    Instead of internal class `ParselyTrackerInternal`
    wzieba committed Jan 29, 2024
    Configuration menu
    Copy the full SHA
    4fe2b08 View commit details
    Browse the repository at this point in the history
  3. docs: move javadoc comments from internal class to interface

    So they're easily visible for consumers
    wzieba committed Jan 29, 2024
    Configuration menu
    Copy the full SHA
    c45ef7b View commit details
    Browse the repository at this point in the history