path-reporting 0.1.3 → 0.1.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 612edf8ed822d34efd5492f054daccdca4c8c1d667968bbbb6792d970f84f48e
4
- data.tar.gz: 87c775d49a7299a74309e0e34ef024027b9d2d36b7e1cd845a83dcf2d473e55e
3
+ metadata.gz: 134152ef7ea6fed2b3b09883f364a31ebb1e21ef6b5f6cd3db8108ddc750de8a
4
+ data.tar.gz: f059d45004af1ba04ae2b8af2838de5a7fbbaa4575f53873123204546f1190fb
5
5
  SHA512:
6
- metadata.gz: 2eccd9730018b5e4e1468229ebc630e39a539dad448b5d7b71a8aa922a63d7912d56dbca08decf109f287710ac282f36d93d0061480f14df871c8c5e3aa614cd
7
- data.tar.gz: c1f436dae888ddd42d396d9b7cd3f7f50e4a6ad6f9767e8eb4b6b9675bc2afc2f2a72016b5d2a1fc51ad90ca159fad08f02d48b3fe9036da7149afd1d299fe49
6
+ metadata.gz: d9634c2cf01eeaa497d1b3df429568f40bb6d714235aa8f0922b9196376301679c72d5d58f48e8f942f852553712f72a6577edb96e4dfd8e3ccfd5473e5acb36
7
+ data.tar.gz: aeb9e1f444090af5ed104917b222327d3fe8dd95147964b7f8297065252b8d10feb19445cf5df4eb74724aa7807824e67a6939ca82c9aa23793d124e18e886f0
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- path-reporting (0.1.3)
4
+ path-reporting (0.1.4)
5
5
  amplitude-api
6
6
 
7
7
  GEM
data/README.md CHANGED
@@ -42,8 +42,8 @@ Path::Reporting.analytics.record(
42
42
  product_area: Constants::ANALYTICS_PRODUCT_AREA_MATCHING,
43
43
  name: 'Preferred provider multiple valid matches',
44
44
  user: @contact.analytics_friendly_hash,
45
- user_type: Path::Reporting::UserType.PATIENT,
46
- trigger: Path::Reporting::Trigger.PAGE_VIEW,
45
+ user_type: Path::Reporting::UserType::PATIENT,
46
+ trigger: Path::Reporting::Trigger::PAGE_VIEW,
47
47
  metadata: analytics_metadata,
48
48
  )
49
49
  ```
@@ -122,7 +122,7 @@ module Path
122
122
  # product_area: Constants::ANALYTICS_PRODUCT_AREA_MATCHING,
123
123
  # name: 'Preferred provider multiple valid matches',
124
124
  # user: @contact.analytics_friendly_hash,
125
- # user_type: PathReporting::UserType.PATIENT,
125
+ # user_type: PathReporting::UserType::PATIENT,
126
126
  # trigger: PathReporting::Trigger.PAGE_VIEW,
127
127
  # metadata: analytics_metadata,
128
128
  # )
@@ -132,7 +132,7 @@ module Path
132
132
  # product_area: Constants::ANALYTICS_PRODUCT_AREA_MATCHING,
133
133
  # name: 'No preferred provider',
134
134
  # user: @contact.analytics_friendly_hash,
135
- # user_type: PathReporting::UserType.PATIENT,
135
+ # user_type: PathReporting::UserType::PATIENT,
136
136
  # trigger: PathReporting::Trigger.PAGE_VIEW,
137
137
  # )
138
138
  #
@@ -158,8 +158,8 @@ module Path
158
158
  product_area:,
159
159
  name:,
160
160
  user:,
161
- user_type: UserType.PATIENT,
162
- trigger: Trigger.INTERACTION,
161
+ user_type: UserType::PATIENT,
162
+ trigger: Trigger::INTERACTION,
163
163
  metadata: {}
164
164
  )
165
165
  throw Error("No user provided when reporting analytics") if !user || !user[:id]
@@ -4,22 +4,22 @@ module Path
4
4
  module Reporting
5
5
  # The trigger or cause of reporting events
6
6
  class Trigger
7
- class << self
8
- # Interaction: When a direct intentional user action is the cause of
9
- # this event that is not a simple navigation. E.g. Submitted form or
10
- # changed password
11
- INTERACTION = "Interaction"
12
- # Page view: When the event was an indirect result of viewing something.
13
- # E.g. auto-assigning a provider or appointment because the user has an
14
- # existing provider already
15
- # @note Because of usage limits, we do not want to record page views
16
- # as a separate action, this is only for indirect consequences that
17
- # result in a change in something either for the user or for our
18
- # systems
19
- PAGE_VIEW = "Page view"
20
- # Automation: Some automation or tool was the cause of this event
21
- AUTOMATION = "Automation"
7
+ # Interaction: When a direct intentional user action is the cause of
8
+ # this event that is not a simple navigation. E.g. Submitted form or
9
+ # changed password
10
+ INTERACTION = "Interaction"
11
+ # Page view: When the event was an indirect result of viewing something.
12
+ # E.g. auto-assigning a provider or appointment because the user has an
13
+ # existing provider already
14
+ # @note Because of usage limits, we do not want to record page views
15
+ # as a separate action, this is only for indirect consequences that
16
+ # result in a change in something either for the user or for our
17
+ # systems
18
+ PAGE_VIEW = "Page view"
19
+ # Automation: Some automation or tool was the cause of this event
20
+ AUTOMATION = "Automation"
22
21
 
22
+ class << self
23
23
  # @private
24
24
  def triggers
25
25
  [
@@ -4,20 +4,20 @@ module Path
4
4
  module Reporting
5
5
  # User types that data may be recorded for or on
6
6
  class UserType
7
- class << self
8
- # Patient or potential patient
9
- PATIENT = "Patient"
10
- # Provider, which can be any sub-type (e.g. therapist)
11
- PROVIDER = "Provider"
12
- # Insurer, not currently in-use
13
- INSURER = "Insurer"
14
- # Operator or any internal non-developer
15
- OPERATOR = "Operator"
16
- # Developer; mostly relevant for backfills or manual intervention
17
- DEVELOPER = "Developer"
18
- # System, either first-party or third-party
19
- SYSTEM = "System"
7
+ # Patient or potential patient
8
+ PATIENT = "Patient"
9
+ # Provider, which can be any sub-type (e.g. therapist)
10
+ PROVIDER = "Provider"
11
+ # Insurer, not currently in-use
12
+ INSURER = "Insurer"
13
+ # Operator or any internal non-developer
14
+ OPERATOR = "Operator"
15
+ # Developer; mostly relevant for backfills or manual intervention
16
+ DEVELOPER = "Developer"
17
+ # System, either first-party or third-party
18
+ SYSTEM = "System"
20
19
 
20
+ class << self
21
21
  # @private
22
22
  def types
23
23
  [
@@ -33,7 +33,7 @@ module Path
33
33
  # Check if a given item is a valid UserType
34
34
  # @param maybe_type [Any] item to check
35
35
  def valid?(maybe_type)
36
- types.includes? maybe_type
36
+ types.include? maybe_type
37
37
  end
38
38
  end
39
39
  end
@@ -3,6 +3,6 @@
3
3
  module Path
4
4
  module Reporting
5
5
  # Current version of the module
6
- VERSION = "0.1.3"
6
+ VERSION = "0.1.4"
7
7
  end
8
8
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: path-reporting
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.3
4
+ version: 0.1.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Alexis Hushbeck