matey 0.1.1 → 0.1.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +1 -1
- data/COMPONENTS.md +75 -0
- data/Gemfile +1 -12
- data/Gemfile.lock +106 -120
- data/README.md +50 -102
- data/app/components/matey/active_users_component.html.erb +1 -1
- data/app/components/matey/bounce_rate_component.html.erb +35 -0
- data/app/components/matey/bounce_rate_component.rb +22 -0
- data/app/components/matey/new_activity_component.html.erb +1 -1
- data/app/components/matey/new_users_component.html.erb +1 -1
- data/app/components/matey/user_engagement_component.html.erb +27 -0
- data/app/components/matey/user_engagement_component.rb +10 -0
- data/docs/CONTRIBUTING.md +22 -0
- data/images/bounceRateComponent.png +0 -0
- data/lib/matey/version.rb +1 -1
- data/lib/matey.rb +3 -1
- data/matey.gemspec +12 -5
- metadata +42 -10
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5991529e6b95d161fa55e0b72a16fb4d22afd2f1d3fd3e657e6c834b5baca48f
|
4
|
+
data.tar.gz: 7764c92bd83d7d7796b7e8737af3c8a6c5007b444238d4307f82790413da249c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2cdb414b9eef61de45dc70babff6c441ff54cceebe2c3b6f515c79c52c8b3f4678f8e65bd41d3ca03f00317f21d634c5780263e9004eedcb607ecbdc7260cb65
|
7
|
+
data.tar.gz: 91e809d70fead673bfa1d308db1edefb5872da969f322f2ac813569de19d18d08657beb21cd31789fbb6e41f04466dad9b054ceecd36cf785b33c3bdb051f243
|
data/CHANGELOG.md
CHANGED
data/COMPONENTS.md
ADDED
@@ -0,0 +1,75 @@
|
|
1
|
+
# Components
|
2
|
+
|
3
|
+
The following components are available;
|
4
|
+
|
5
|
+
* [NewUsersComponent](#newuserscomponent)
|
6
|
+
* [ActiveUsersComponent](#activeuserscomponent)
|
7
|
+
* [NewActivityComponent](#newactivitycomponent)
|
8
|
+
* [TopVisitedLandingPagesComponent](#topvisitedlandingpagescomponent)
|
9
|
+
* [TopEventsComponent](#topeventscomponent)
|
10
|
+
* [BounceRateComponent](#bounceratecomponent)
|
11
|
+
|
12
|
+
## NewUsersComponent
|
13
|
+
|
14
|
+
![New Users Component](./images/newUsersComponent.png)
|
15
|
+
|
16
|
+
The NewUsersComponent displays the number of new users that have been created within the time window parameter. It also displays the number and percentage change from the previous time period.
|
17
|
+
|
18
|
+
``` ruby
|
19
|
+
<%= render Matey::NewUsersComponent.new(users: User.all, time_window: 2.month) %>
|
20
|
+
```
|
21
|
+
|
22
|
+
Here we are passing in all of our **User** model data for the component to find the new users that were made in the last 2 months, but we can filter this data to only include a specific subset of users and/or a specific time period. The component finds new users created in the past month and shows us the increase/decrease since the last period based on the `created_at` attribute.
|
23
|
+
|
24
|
+
## ActiveUsersComponent
|
25
|
+
|
26
|
+
![ActiveUsersComponent](./images/activeUsersComponent.png)
|
27
|
+
|
28
|
+
The ActiveUsersComponent displays the number of active users that have been created within the time window parameter. It also displays the number and percentage change from the previous time period. This component counts active users as those who have been involved in an Ahoy event in the given time window.
|
29
|
+
|
30
|
+
``` ruby
|
31
|
+
<%= render Matey::ActiveUsersComponent.new(events: Ahoy::Event.all, time_window: 1.month) %>
|
32
|
+
```
|
33
|
+
|
34
|
+
Here we are passing in all of our **Ahoy::Event** model data which is used to determine what users triggered an event in the parameter time period. The component finds the active users created in the past month and shows us the increase/decrease since the last period.
|
35
|
+
|
36
|
+
## NewActivityComponent
|
37
|
+
|
38
|
+
![New Activity Component](./images/newActivityComponent.png)
|
39
|
+
|
40
|
+
The NewActivityComponent component displays the number of Ahoy events that have been created within the time window parameter. It also displays the number and percentage change from the previous time period.
|
41
|
+
|
42
|
+
``` ruby
|
43
|
+
<%= render (Matey::NewActivityComponent.new(events: Ahoy::Event.all, time_window: 1.month)) %>
|
44
|
+
```
|
45
|
+
|
46
|
+
Here we are passing in all of our **Ahoy::Event** model data for the component to count all Ahoy Events, but we can filter this data to only include a specific subset of Ahoy Events or from a specific time period. The component finds the Ahoy events created in the past month and shows us the increase/decrease since the last period.
|
47
|
+
|
48
|
+
## TopVisitedLandingPagesComponent
|
49
|
+
|
50
|
+
![Top Visited Landing Pages Component](./images/topVisitedPages.png)
|
51
|
+
|
52
|
+
The TopVisitedPagesTableComponent component uses **`Ahoy::Visit`** data and displays a list of the top visited paths. Pass in `Ahoy::Visit.all` and the component displays the top landing pages based on the visits that have been created within the time window parameter. The *`limit`* parameter limits the number of results and is `10` by default.
|
53
|
+
|
54
|
+
``` ruby
|
55
|
+
<%= render Matey::TopVisitedPagesTableComponent.new(events: Ahoy::Visit.all, time_window: 1.month, limit: 10) %>
|
56
|
+
```
|
57
|
+
|
58
|
+
## TopEventsComponent
|
59
|
+
|
60
|
+
![Top Events Component](./images/topEventsComponent.png)
|
61
|
+
|
62
|
+
The TopEventsComponent displays a list of the top Ahoy::Events. Pass in the `Ahoy::Event.all` and the component calculates the top events that have been triggered in the given time window. The *`limit`* parameter limits the number of results and is `10` by default.
|
63
|
+
|
64
|
+
``` ruby
|
65
|
+
<%= render(Matey::TopEventsComponent.new(events: Ahoy::Event.all, time_window: 1.month, limit: 10)) %>
|
66
|
+
```
|
67
|
+
|
68
|
+
## BounceRateComponent
|
69
|
+
![Bounce Rate Component](./images/bounceRateComponent.png)
|
70
|
+
|
71
|
+
The BounceRateComponent displays the total bounce rate percentage of the application. That is the number of visits to the application in which the user visited **only** one page and left the site, compared to the total number of visits to the application. It additionally shows a list of the pages with the highest bounces. Pass in the `Ahoy::Event.all` & `Ahoy::Visit.all` parameters and the component calculates the bounce rate of the application and the top 5 pages with the highest bounces. The *`limit`* parameter limits the number of results and is `5` by default.
|
72
|
+
|
73
|
+
``` ruby
|
74
|
+
<%= render(Matey::BounceRateComponent.new(events: Ahoy::Event.all, visits: Ahoy::Visit.all, limit: 5)) %>
|
75
|
+
```
|
data/Gemfile
CHANGED
@@ -3,25 +3,14 @@
|
|
3
3
|
source "https://rubygems.org"
|
4
4
|
gemspec
|
5
5
|
|
6
|
-
# rails_version = "#{ENV['RAILS_VERSION'] || 'main'}"
|
7
6
|
rails_version = (ENV["RAILS_VERSION"] || "~> 7").to_s
|
8
7
|
gem "rails", rails_version == "main" ? {git: "https://github.com/rails/rails", ref: "main"} : rails_version
|
9
|
-
gem "sqlite3", ">= 1.4"
|
10
|
-
|
11
|
-
gem "rake", "~> 13.0"
|
12
|
-
|
13
|
-
gem "rspec", "~> 3.0"
|
14
|
-
gem "rspec-rails", "~> 5.0.0"
|
15
|
-
gem "factory_bot_rails"
|
16
|
-
|
17
|
-
gem "standard", "~> 1.3"
|
18
8
|
|
19
9
|
gem "debug", platforms: %i[mri mingw x64_mingw]
|
20
10
|
|
11
|
+
# compensate for ruby 3 factoring out required gems
|
21
12
|
if RUBY_VERSION >= "3.1"
|
22
13
|
gem "net-imap", require: false
|
23
14
|
gem "net-pop", require: false
|
24
15
|
gem "net-smtp", require: false
|
25
16
|
end
|
26
|
-
|
27
|
-
gem "byebug", "~> 11.1", groups: [:development, :test]
|
data/Gemfile.lock
CHANGED
@@ -1,95 +1,93 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
matey (0.1.
|
4
|
+
matey (0.1.3)
|
5
5
|
ahoy_matey (~> 4.0)
|
6
|
-
view_component (~> 2.
|
6
|
+
view_component (~> 2.74.1)
|
7
7
|
|
8
8
|
GEM
|
9
9
|
remote: https://rubygems.org/
|
10
10
|
specs:
|
11
|
-
actioncable (7.0.
|
12
|
-
actionpack (= 7.0.
|
13
|
-
activesupport (= 7.0.
|
11
|
+
actioncable (7.0.4)
|
12
|
+
actionpack (= 7.0.4)
|
13
|
+
activesupport (= 7.0.4)
|
14
14
|
nio4r (~> 2.0)
|
15
15
|
websocket-driver (>= 0.6.1)
|
16
|
-
actionmailbox (7.0.
|
17
|
-
actionpack (= 7.0.
|
18
|
-
activejob (= 7.0.
|
19
|
-
activerecord (= 7.0.
|
20
|
-
activestorage (= 7.0.
|
21
|
-
activesupport (= 7.0.
|
16
|
+
actionmailbox (7.0.4)
|
17
|
+
actionpack (= 7.0.4)
|
18
|
+
activejob (= 7.0.4)
|
19
|
+
activerecord (= 7.0.4)
|
20
|
+
activestorage (= 7.0.4)
|
21
|
+
activesupport (= 7.0.4)
|
22
22
|
mail (>= 2.7.1)
|
23
23
|
net-imap
|
24
24
|
net-pop
|
25
25
|
net-smtp
|
26
|
-
actionmailer (7.0.
|
27
|
-
actionpack (= 7.0.
|
28
|
-
actionview (= 7.0.
|
29
|
-
activejob (= 7.0.
|
30
|
-
activesupport (= 7.0.
|
26
|
+
actionmailer (7.0.4)
|
27
|
+
actionpack (= 7.0.4)
|
28
|
+
actionview (= 7.0.4)
|
29
|
+
activejob (= 7.0.4)
|
30
|
+
activesupport (= 7.0.4)
|
31
31
|
mail (~> 2.5, >= 2.5.4)
|
32
32
|
net-imap
|
33
33
|
net-pop
|
34
34
|
net-smtp
|
35
35
|
rails-dom-testing (~> 2.0)
|
36
|
-
actionpack (7.0.
|
37
|
-
actionview (= 7.0.
|
38
|
-
activesupport (= 7.0.
|
36
|
+
actionpack (7.0.4)
|
37
|
+
actionview (= 7.0.4)
|
38
|
+
activesupport (= 7.0.4)
|
39
39
|
rack (~> 2.0, >= 2.2.0)
|
40
40
|
rack-test (>= 0.6.3)
|
41
41
|
rails-dom-testing (~> 2.0)
|
42
42
|
rails-html-sanitizer (~> 1.0, >= 1.2.0)
|
43
|
-
actiontext (7.0.
|
44
|
-
actionpack (= 7.0.
|
45
|
-
activerecord (= 7.0.
|
46
|
-
activestorage (= 7.0.
|
47
|
-
activesupport (= 7.0.
|
43
|
+
actiontext (7.0.4)
|
44
|
+
actionpack (= 7.0.4)
|
45
|
+
activerecord (= 7.0.4)
|
46
|
+
activestorage (= 7.0.4)
|
47
|
+
activesupport (= 7.0.4)
|
48
48
|
globalid (>= 0.6.0)
|
49
49
|
nokogiri (>= 1.8.5)
|
50
|
-
actionview (7.0.
|
51
|
-
activesupport (= 7.0.
|
50
|
+
actionview (7.0.4)
|
51
|
+
activesupport (= 7.0.4)
|
52
52
|
builder (~> 3.1)
|
53
53
|
erubi (~> 1.4)
|
54
54
|
rails-dom-testing (~> 2.0)
|
55
55
|
rails-html-sanitizer (~> 1.1, >= 1.2.0)
|
56
|
-
activejob (7.0.
|
57
|
-
activesupport (= 7.0.
|
56
|
+
activejob (7.0.4)
|
57
|
+
activesupport (= 7.0.4)
|
58
58
|
globalid (>= 0.3.6)
|
59
|
-
activemodel (7.0.
|
60
|
-
activesupport (= 7.0.
|
61
|
-
activerecord (7.0.
|
62
|
-
activemodel (= 7.0.
|
63
|
-
activesupport (= 7.0.
|
64
|
-
activestorage (7.0.
|
65
|
-
actionpack (= 7.0.
|
66
|
-
activejob (= 7.0.
|
67
|
-
activerecord (= 7.0.
|
68
|
-
activesupport (= 7.0.
|
59
|
+
activemodel (7.0.4)
|
60
|
+
activesupport (= 7.0.4)
|
61
|
+
activerecord (7.0.4)
|
62
|
+
activemodel (= 7.0.4)
|
63
|
+
activesupport (= 7.0.4)
|
64
|
+
activestorage (7.0.4)
|
65
|
+
actionpack (= 7.0.4)
|
66
|
+
activejob (= 7.0.4)
|
67
|
+
activerecord (= 7.0.4)
|
68
|
+
activesupport (= 7.0.4)
|
69
69
|
marcel (~> 1.0)
|
70
70
|
mini_mime (>= 1.1.0)
|
71
|
-
activesupport (7.0.
|
71
|
+
activesupport (7.0.4)
|
72
72
|
concurrent-ruby (~> 1.0, >= 1.0.2)
|
73
73
|
i18n (>= 1.6, < 2)
|
74
74
|
minitest (>= 5.1)
|
75
75
|
tzinfo (~> 2.0)
|
76
|
-
ahoy_matey (4.0
|
76
|
+
ahoy_matey (4.1.0)
|
77
77
|
activesupport (>= 5.2)
|
78
78
|
device_detector
|
79
79
|
safely_block (>= 0.2.1)
|
80
80
|
ast (2.4.2)
|
81
81
|
builder (3.2.4)
|
82
|
-
byebug (11.1.3)
|
83
82
|
concurrent-ruby (1.1.10)
|
84
83
|
crass (1.0.6)
|
85
|
-
debug (1.
|
84
|
+
debug (1.6.3)
|
86
85
|
irb (>= 1.3.6)
|
87
|
-
reline (>= 0.
|
86
|
+
reline (>= 0.3.1)
|
88
87
|
device_detector (1.0.7)
|
89
88
|
diff-lcs (1.5.0)
|
90
|
-
digest (3.1.0)
|
91
89
|
errbase (0.2.2)
|
92
|
-
erubi (1.
|
90
|
+
erubi (1.11.0)
|
93
91
|
factory_bot (6.2.1)
|
94
92
|
activesupport (>= 5.0.0)
|
95
93
|
factory_bot_rails (6.2.0)
|
@@ -97,13 +95,13 @@ GEM
|
|
97
95
|
railties (>= 5.0.0)
|
98
96
|
globalid (1.0.0)
|
99
97
|
activesupport (>= 5.0)
|
100
|
-
i18n (1.
|
98
|
+
i18n (1.12.0)
|
101
99
|
concurrent-ruby (~> 1.0)
|
102
100
|
io-console (0.5.11)
|
103
|
-
|
104
|
-
irb (1.4.1)
|
101
|
+
irb (1.4.2)
|
105
102
|
reline (>= 0.3.0)
|
106
|
-
|
103
|
+
json (2.6.2)
|
104
|
+
loofah (2.19.0)
|
107
105
|
crass (~> 1.0.2)
|
108
106
|
nokogiri (>= 1.5.9)
|
109
107
|
mail (2.7.1)
|
@@ -111,79 +109,68 @@ GEM
|
|
111
109
|
marcel (1.0.2)
|
112
110
|
method_source (1.0.0)
|
113
111
|
mini_mime (1.1.2)
|
114
|
-
minitest (5.
|
115
|
-
net-imap (0.
|
116
|
-
digest
|
112
|
+
minitest (5.16.3)
|
113
|
+
net-imap (0.3.1)
|
117
114
|
net-protocol
|
118
|
-
|
119
|
-
net-pop (0.1.1)
|
120
|
-
digest
|
115
|
+
net-pop (0.1.2)
|
121
116
|
net-protocol
|
117
|
+
net-protocol (0.1.3)
|
122
118
|
timeout
|
123
|
-
net-
|
124
|
-
io-wait
|
125
|
-
timeout
|
126
|
-
net-smtp (0.3.1)
|
127
|
-
digest
|
119
|
+
net-smtp (0.3.3)
|
128
120
|
net-protocol
|
129
|
-
timeout
|
130
121
|
nio4r (2.5.8)
|
131
|
-
nokogiri (1.13.
|
122
|
+
nokogiri (1.13.9-x86_64-darwin)
|
132
123
|
racc (~> 1.4)
|
133
|
-
nokogiri (1.13.
|
124
|
+
nokogiri (1.13.9-x86_64-linux)
|
134
125
|
racc (~> 1.4)
|
135
126
|
parallel (1.22.1)
|
136
|
-
parser (3.1.1
|
127
|
+
parser (3.1.2.1)
|
137
128
|
ast (~> 2.4.1)
|
138
129
|
racc (1.6.0)
|
139
|
-
rack (2.2.
|
140
|
-
rack-test (
|
141
|
-
rack (>= 1.
|
142
|
-
rails (7.0.
|
143
|
-
actioncable (= 7.0.
|
144
|
-
actionmailbox (= 7.0.
|
145
|
-
actionmailer (= 7.0.
|
146
|
-
actionpack (= 7.0.
|
147
|
-
actiontext (= 7.0.
|
148
|
-
actionview (= 7.0.
|
149
|
-
activejob (= 7.0.
|
150
|
-
activemodel (= 7.0.
|
151
|
-
activerecord (= 7.0.
|
152
|
-
activestorage (= 7.0.
|
153
|
-
activesupport (= 7.0.
|
130
|
+
rack (2.2.4)
|
131
|
+
rack-test (2.0.2)
|
132
|
+
rack (>= 1.3)
|
133
|
+
rails (7.0.4)
|
134
|
+
actioncable (= 7.0.4)
|
135
|
+
actionmailbox (= 7.0.4)
|
136
|
+
actionmailer (= 7.0.4)
|
137
|
+
actionpack (= 7.0.4)
|
138
|
+
actiontext (= 7.0.4)
|
139
|
+
actionview (= 7.0.4)
|
140
|
+
activejob (= 7.0.4)
|
141
|
+
activemodel (= 7.0.4)
|
142
|
+
activerecord (= 7.0.4)
|
143
|
+
activestorage (= 7.0.4)
|
144
|
+
activesupport (= 7.0.4)
|
154
145
|
bundler (>= 1.15.0)
|
155
|
-
railties (= 7.0.
|
146
|
+
railties (= 7.0.4)
|
156
147
|
rails-dom-testing (2.0.3)
|
157
148
|
activesupport (>= 4.2.0)
|
158
149
|
nokogiri (>= 1.6)
|
159
|
-
rails-html-sanitizer (1.4.
|
150
|
+
rails-html-sanitizer (1.4.3)
|
160
151
|
loofah (~> 2.3)
|
161
|
-
railties (7.0.
|
162
|
-
actionpack (= 7.0.
|
163
|
-
activesupport (= 7.0.
|
152
|
+
railties (7.0.4)
|
153
|
+
actionpack (= 7.0.4)
|
154
|
+
activesupport (= 7.0.4)
|
164
155
|
method_source
|
165
156
|
rake (>= 12.2)
|
166
157
|
thor (~> 1.0)
|
167
158
|
zeitwerk (~> 2.5)
|
168
159
|
rainbow (3.1.1)
|
169
160
|
rake (13.0.6)
|
170
|
-
regexp_parser (2.
|
161
|
+
regexp_parser (2.6.0)
|
171
162
|
reline (0.3.1)
|
172
163
|
io-console (~> 0.5)
|
173
164
|
rexml (3.2.5)
|
174
|
-
rspec (3.
|
175
|
-
rspec-
|
176
|
-
|
177
|
-
rspec-mocks (~> 3.11.0)
|
178
|
-
rspec-core (3.11.0)
|
179
|
-
rspec-support (~> 3.11.0)
|
180
|
-
rspec-expectations (3.11.0)
|
165
|
+
rspec-core (3.12.0)
|
166
|
+
rspec-support (~> 3.12.0)
|
167
|
+
rspec-expectations (3.12.0)
|
181
168
|
diff-lcs (>= 1.2.0, < 2.0)
|
182
|
-
rspec-support (~> 3.
|
183
|
-
rspec-mocks (3.
|
169
|
+
rspec-support (~> 3.12.0)
|
170
|
+
rspec-mocks (3.12.0)
|
184
171
|
diff-lcs (>= 1.2.0, < 2.0)
|
185
|
-
rspec-support (~> 3.
|
186
|
-
rspec-rails (5.
|
172
|
+
rspec-support (~> 3.12.0)
|
173
|
+
rspec-rails (5.1.2)
|
187
174
|
actionpack (>= 5.2)
|
188
175
|
activesupport (>= 5.2)
|
189
176
|
railties (>= 5.2)
|
@@ -191,68 +178,67 @@ GEM
|
|
191
178
|
rspec-expectations (~> 3.10)
|
192
179
|
rspec-mocks (~> 3.10)
|
193
180
|
rspec-support (~> 3.10)
|
194
|
-
rspec-support (3.
|
195
|
-
rubocop (1.
|
181
|
+
rspec-support (3.12.0)
|
182
|
+
rubocop (1.35.1)
|
183
|
+
json (~> 2.3)
|
196
184
|
parallel (~> 1.10)
|
197
|
-
parser (>= 3.1.
|
185
|
+
parser (>= 3.1.2.1)
|
198
186
|
rainbow (>= 2.2.2, < 4.0)
|
199
187
|
regexp_parser (>= 1.8, < 3.0)
|
200
|
-
rexml
|
201
|
-
rubocop-ast (>= 1.
|
188
|
+
rexml (>= 3.2.5, < 4.0)
|
189
|
+
rubocop-ast (>= 1.20.1, < 2.0)
|
202
190
|
ruby-progressbar (~> 1.7)
|
203
191
|
unicode-display_width (>= 1.4.0, < 3.0)
|
204
|
-
rubocop-ast (1.
|
192
|
+
rubocop-ast (1.23.0)
|
205
193
|
parser (>= 3.1.1.0)
|
206
|
-
rubocop-performance (1.
|
194
|
+
rubocop-performance (1.14.3)
|
207
195
|
rubocop (>= 1.7.0, < 2.0)
|
208
196
|
rubocop-ast (>= 0.4.0)
|
209
197
|
ruby-progressbar (1.11.0)
|
210
198
|
safely_block (0.3.0)
|
211
199
|
errbase (>= 0.1.1)
|
212
|
-
sprockets (4.
|
200
|
+
sprockets (4.1.1)
|
213
201
|
concurrent-ruby (~> 1.0)
|
214
202
|
rack (> 1, < 3)
|
215
203
|
sprockets-rails (3.2.2)
|
216
204
|
actionpack (>= 4.0)
|
217
205
|
activesupport (>= 4.0)
|
218
206
|
sprockets (>= 3.0.0)
|
219
|
-
sqlite3 (1.
|
220
|
-
|
221
|
-
|
222
|
-
rubocop
|
223
|
-
|
207
|
+
sqlite3 (1.5.3-x86_64-darwin)
|
208
|
+
sqlite3 (1.5.3-x86_64-linux)
|
209
|
+
standard (1.16.1)
|
210
|
+
rubocop (= 1.35.1)
|
211
|
+
rubocop-performance (= 1.14.3)
|
224
212
|
thor (1.2.1)
|
225
|
-
timeout (0.
|
226
|
-
tzinfo (2.0.
|
213
|
+
timeout (0.3.0)
|
214
|
+
tzinfo (2.0.5)
|
227
215
|
concurrent-ruby (~> 1.0)
|
228
|
-
unicode-display_width (2.
|
229
|
-
view_component (2.
|
216
|
+
unicode-display_width (2.3.0)
|
217
|
+
view_component (2.74.1)
|
230
218
|
activesupport (>= 5.0.0, < 8.0)
|
219
|
+
concurrent-ruby (~> 1.0)
|
231
220
|
method_source (~> 1.0)
|
232
221
|
websocket-driver (0.7.5)
|
233
222
|
websocket-extensions (>= 0.1.0)
|
234
223
|
websocket-extensions (0.1.5)
|
235
|
-
zeitwerk (2.
|
224
|
+
zeitwerk (2.6.4)
|
236
225
|
|
237
226
|
PLATFORMS
|
238
227
|
x86_64-darwin-21
|
239
228
|
x86_64-linux
|
240
229
|
|
241
230
|
DEPENDENCIES
|
242
|
-
byebug (~> 11.1)
|
243
231
|
debug
|
244
|
-
|
245
|
-
factory_bot_rails
|
232
|
+
factory_bot_rails (~> 6.0)
|
246
233
|
matey!
|
247
234
|
net-imap
|
248
235
|
net-pop
|
249
236
|
net-smtp
|
250
237
|
rails (~> 7)
|
251
238
|
rake (~> 13.0)
|
252
|
-
rspec (~>
|
253
|
-
rspec-rails (~> 5.0.0)
|
239
|
+
rspec-rails (~> 5.0)
|
254
240
|
sprockets-rails (~> 3.2.2)
|
255
|
-
sqlite3 (
|
241
|
+
sqlite3 (~> 1.0)
|
256
242
|
standard (~> 1.3)
|
257
243
|
|
258
244
|
BUNDLED WITH
|
data/README.md
CHANGED
@@ -4,25 +4,24 @@
|
|
4
4
|
![GitHub issues](https://img.shields.io/github/issues-raw/harled/matey)
|
5
5
|
![GitHub Repo stars](https://img.shields.io/github/stars/harled/matey?logoColor=purple&style=social)
|
6
6
|
|
7
|
-
📈 User Engagement Tracking
|
7
|
+
📈 User Engagement Tracking ViewComponents for [Ahoy](https://github.com/ankane/ahoy) data 🏴☠️
|
8
8
|
|
9
|
-
|
10
|
-
No need to spend time finding what information you need and how to write the queries to set that up.
|
11
|
-
Simply install the gem, input the required data and track how your users are responding to your application!
|
9
|
+
This gem provides a suite of prebuilt [ViewComponents](https://github.com/github/view_component) to observe user engagement in an Ahoy-powered Ruby on Rails application.
|
12
10
|
|
13
|
-
Project Lead: Caitlin Henry
|
14
|
-
[**caitmich**](https://github.com/caitmich) | (*caitlin@harled.ca*)
|
15
|
-
|
16
|
-
This gem assumes that event data is coming from [Ahoy](https://github.com/ankane/ahoy) which is a fantastic library
|
17
|
-
for tracking visits and events. Your project must have Ahoy installed and configured in order to benefit from Matey.
|
18
|
-
|
19
|
-
This gem assumes that you have [Bootstrap 5.1](https://getbootstrap.com/docs/5.1/getting-started/introduction/) loaded in your project. It will work without Bootstrap, however, you will need to provide your own custom styling for the Bootstrap equivalent classes.
|
20
11
|
|
21
12
|
## Installation
|
22
13
|
|
23
|
-
|
14
|
+
`matey` depends on:
|
15
|
+
* [Ahoy](https://github.com/ankane/ahoy) installed, configured and tracking user visit and event data
|
16
|
+
* [Bootstrap 5.1](https://getbootstrap.com/docs/5.1/getting-started/introduction/) available for styling
|
17
|
+
|
18
|
+
Add this line to the Gemfile:
|
24
19
|
|
25
20
|
```ruby
|
21
|
+
# latest from rubygems
|
22
|
+
gem 'matey'
|
23
|
+
|
24
|
+
# or latest from github
|
26
25
|
gem 'matey', github: 'harled/matey', branch: 'main'
|
27
26
|
```
|
28
27
|
|
@@ -30,126 +29,75 @@ And then execute:
|
|
30
29
|
|
31
30
|
$ bundle install
|
32
31
|
|
33
|
-
You will now have the latest version of Matey on your project. Checkout the Usage section to see what components there are and how to use them in your app!
|
34
|
-
|
35
32
|
## Usage
|
36
33
|
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
Some common flows to recognize how the named paramaters work for the components. This is what a Matey view component render line would look like in your view file:
|
42
|
-
|
43
|
-
```
|
44
|
-
<%= render Matey::ComponentName.new(events: Ahoy::Event.all, time_window: 1.week) %>
|
45
|
-
```
|
34
|
+
Once `matey` is installed, the next step is to render a component. The data required varies by component.
|
35
|
+
Below is an example of how the `Matey::ActiveUsersComponent` would be
|
36
|
+
called in an application. This component reports on the number of active users within the past two weeks.
|
46
37
|
|
47
|
-
|
38
|
+
Below the component is called with two named parameters which include `events` (ahoy event data) and
|
39
|
+
the `time_window`, which is the period to report on.
|
48
40
|
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
**Note**: The data the component is completely limited by the extent of your [Ahoy](https://github.com/ankane/ahoy) data. Setting up events on each controller action can be seen [here](https://github.com/ankane/ahoy#ruby) and can be done in the base controller so that all other controllers inherit from here and will create Ahoy events.
|
54
|
-
|
55
|
-
Also, if you have a lot of data, you can cut down the data that you are passing through by reducing the time the events have occurred, however the comparison between the current and previous `time_window` will require two time windows worth of data (ie. for data from last week, this will compare to data from 2 weeks ago)
|
56
|
-
|
57
|
-
### New Users Component
|
58
|
-
|
59
|
-
![New Users Component](./images/newUsersComponent.png)
|
60
|
-
|
61
|
-
The New Users component will calculate the number of new users that have been created in the given time window and show you the amount and percentage change from the previous time period. The code should look like this:
|
62
|
-
|
63
|
-
```
|
64
|
-
<%= render Matey::NewUsersComponent.new(users: User.all, time_window: 2.month) %>
|
41
|
+
```ruby
|
42
|
+
# dashboard.html.erb
|
43
|
+
<%= render Matey::ActiveUsersComponent.new(events: Ahoy::Event.all, time_window: 1.week) %>
|
65
44
|
```
|
66
45
|
|
67
|
-
|
68
|
-
### Active Users
|
46
|
+
It is that simple! There should now be a card displaying the number of active users within the past week.
|
69
47
|
|
70
|
-
|
48
|
+
View the list of available components [here](COMPONENTS.md).
|
71
49
|
|
72
|
-
The
|
50
|
+
**Note**: The more data, the more interesting the components will be. A common and helpful pattern is to capture events on all controller actions. Details on doing this can be found [here](https://github.com/ankane/ahoy#ruby).
|
73
51
|
|
74
|
-
|
75
|
-
<%= render Matey::ActiveUsersComponent.new(events: Ahoy::Event.all, time_window: 1.month) %>
|
76
|
-
```
|
77
|
-
|
78
|
-
Here we are passing in all of our **Ahoy::Event** model data for the component to find the user that were triggered some Ahoy Event, but we can filter this data to only include a specific subset of Ahoy Events or from a specific time period. The component will find the active users created in the past month and show us the increase/decrease since the last period.
|
52
|
+
## Development
|
79
53
|
|
80
|
-
|
54
|
+
After checking out the repository, run the following commands to get started:
|
81
55
|
|
82
|
-
|
56
|
+
```bash
|
57
|
+
# install required packages
|
58
|
+
bin/setup
|
83
59
|
|
84
|
-
|
60
|
+
# run test cases and ensure everything is passing
|
61
|
+
rake spec
|
85
62
|
|
86
|
-
|
87
|
-
|
63
|
+
# an interactive prompt that will allow you to experiment with matey (currently broken!)
|
64
|
+
bin/console
|
88
65
|
```
|
89
66
|
|
90
|
-
|
91
|
-
### Top Visited Landing Pages Component
|
92
|
-
|
93
|
-
![Top Visited Landing Pages Component](./images/topVisitedPages.png)
|
94
|
-
|
95
|
-
The Top Visited Pages Table Component component will take advantage of **`Ahoy::Visit`** and gives you a list of the top visited paths. Just pass in the Ahoy::Visit.all and the component will calculate the top landing pages based on the visits that have been created in the given time window. The *`limit`* parameter limits the number of results and is 10 by default. The implementation should look like:
|
96
|
-
|
97
|
-
```
|
98
|
-
<%= render(Matey::TopVisitedPagesTableComponent.new(events: Ahoy::Visit.all, time_window: 1.month, limit: 10)) %>
|
99
|
-
```
|
67
|
+
To install `matey` and make it available as a regular rubygem, run the following command: `bundle exec rake install`
|
100
68
|
|
101
|
-
###
|
69
|
+
### Sample Application
|
102
70
|
|
103
|
-
|
71
|
+
ViewComponents are pretty hard to test without a Ruby on Rails application. This repository includes a sample application that makes it easy to see how a component renders and make quick adjustments.
|
104
72
|
|
105
|
-
|
73
|
+
To use the sample application:
|
106
74
|
|
107
|
-
|
108
|
-
|
109
|
-
|
75
|
+
1. `cd spec/sample`
|
76
|
+
2. `bundle`
|
77
|
+
3. `rails s`
|
78
|
+
4. Open a browser to `localhost:3000`
|
110
79
|
|
111
|
-
|
112
|
-
*Coming Soon...*
|
113
|
-
### Custom Table Component
|
114
|
-
*Coming Soon...*
|
115
|
-
## Development
|
80
|
+
## Testing
|
116
81
|
|
117
|
-
|
82
|
+
To run the test cases:
|
118
83
|
|
119
|
-
|
84
|
+
1. `rails db:test:prepare`
|
85
|
+
2. `bundle exec rake`
|
120
86
|
|
121
|
-
|
122
|
-
sample application:
|
87
|
+
## Releasing a New Version
|
123
88
|
|
124
|
-
|
125
|
-
2. bundle
|
126
|
-
3. rails s
|
127
|
-
4. Open a browser to localhost:3000
|
89
|
+
To release a new version:
|
128
90
|
|
129
|
-
|
91
|
+
1. Update the version number in `version.rb`
|
92
|
+
2. Run `bundle exec rake release`
|
130
93
|
|
131
|
-
|
94
|
+
The rake task will create a git tag for the version, push git commits and the created tag, and push the `.gem` file to [rubygems.org](https://rubygems.org).
|
132
95
|
|
133
|
-
1. rails db:test:prepare
|
134
|
-
2. bundle exec rake
|
135
96
|
|
136
97
|
## Contributing
|
137
98
|
|
138
|
-
|
139
|
-
|
140
|
-
### Contribution Steps:
|
141
|
-
|
142
|
-
Want to help us out? Here are some steps to make sure you are contributing
|
143
|
-
|
144
|
-
1. Find an issue you like, or create a new issue [here](https://github.com/harled/matey/issues)
|
145
|
-
- Please ask for any questions or clarifications in the associated issues or in new issues! 🤔
|
146
|
-
2. Assign yourself to the issue and create a branch , following GitHub Issue's naming scheme. 🛠️
|
147
|
-
- The naming scheme should follow (#issueNumber-issue-name) ie. (#10-create-new-component)
|
148
|
-
3. Get on your local machine and [ensure you have the repo cloned](https://docs.github.com/en/repositories/creating-and-managing-repositories/cloning-a-repository). Checkout the branch you just made with `git checkout branch-name` and pull the latest merged changes from the repo with `git pull origin main` to make sure you have the most up-to-date code from the repo. 👩💻
|
149
|
-
4. Add your amazing changes along with any documentation you feel would be useful. Then commit and push your changes. 🌟
|
150
|
-
5. Go back to the repo on GitHub and create a pull request! Then wait for an admin of the repo to get back to your pull request, address any comments and once you are finally approved, merge your code into Matey! 🎉
|
99
|
+
Please take a look at our [Contribution Guidelines](https://github.com/harled/matey/blob/main/docs/CONTRIBUTING.md).
|
151
100
|
|
152
|
-
If you want some more tips on contributing to GitHub projects, [check out this resource from Data School](https://www.dataschool.io/how-to-contribute-on-github/).
|
153
101
|
|
154
102
|
## License
|
155
103
|
|
@@ -157,4 +105,4 @@ The gem is available as open source under the terms of the [MIT License](https:/
|
|
157
105
|
|
158
106
|
## Code of Conduct
|
159
107
|
|
160
|
-
Everyone interacting in the Matey project's codebases, issue trackers, chat rooms and mailing lists is expected to follow the [code of conduct](https://github.com/harled/matey/blob/master/CODE_OF_CONDUCT.md).
|
108
|
+
Everyone interacting in the *Matey* project's codebases, issue trackers, chat rooms and mailing lists is expected to follow the [code of conduct](https://github.com/harled/matey/blob/master/CODE_OF_CONDUCT.md).
|
@@ -6,7 +6,7 @@
|
|
6
6
|
</div>
|
7
7
|
<div class="col-auto">
|
8
8
|
<p class="card-text text-end mb-0">
|
9
|
-
<%= (@change_active_number > 0 ? "+" : "") + @change_active_number.to_s + " / " + @change_active_percent.to_s + "%" %>
|
9
|
+
<%= (@change_active_number > 0 ? "+" : "") + @change_active_number.to_s + " / " + @change_active_percent.to_s + "%" %> compared to last period.
|
10
10
|
</p>
|
11
11
|
</div><!-- .col -->
|
12
12
|
</div><!-- .row -->
|
@@ -0,0 +1,35 @@
|
|
1
|
+
<div class="card bg-primary text-light">
|
2
|
+
<div class="card-body">
|
3
|
+
<h5 class = "text-center"><strong>The Bounce Rate of your Application is: <u><%= @percentage_of_visits_that_were_bounced %>%</u></strong></h5>
|
4
|
+
<div>
|
5
|
+
<table class="table table-hover table-borderless table-sm">
|
6
|
+
<tr class="table-dark">
|
7
|
+
<td><strong>Total Number of Bounced Visits:</strong></td>
|
8
|
+
<td class="text-end"><%= @total_number_of_single_event_visits %></td>
|
9
|
+
</tr>
|
10
|
+
<tr class="table-dark">
|
11
|
+
<td><strong>Total Number of Visits:</strong></td>
|
12
|
+
<td class="text-end"><%= @total_number_of_user_visits %></td>
|
13
|
+
</tr>
|
14
|
+
</table>
|
15
|
+
</div>
|
16
|
+
<div>
|
17
|
+
<table class="table table-hover table-borderless table-sm">
|
18
|
+
<thead class="table-dark">
|
19
|
+
<tr>
|
20
|
+
<th>Bounced Page</th>
|
21
|
+
<th class="text-end">Bounce Count</th>
|
22
|
+
</tr>
|
23
|
+
</thead>
|
24
|
+
<tbody class="text-light">
|
25
|
+
<% @most_bounced_pages.each do |controller_name_and_action, count| %>
|
26
|
+
<tr>
|
27
|
+
<td><%= controller_name_and_action %></td>
|
28
|
+
<td class="text-end"><%= count %></td>
|
29
|
+
</tr>
|
30
|
+
<% end %>
|
31
|
+
</tbody>
|
32
|
+
</table>
|
33
|
+
</div>
|
34
|
+
</div>
|
35
|
+
</div>
|
@@ -0,0 +1,22 @@
|
|
1
|
+
require "ahoy_matey"
|
2
|
+
|
3
|
+
class Matey::BounceRateComponent < ApplicationComponent
|
4
|
+
def initialize(events:, visits:, limit: 5)
|
5
|
+
# Determine the total number of user sessions to the website
|
6
|
+
@total_number_of_user_visits = events.pluck(:visit_id).uniq.count
|
7
|
+
|
8
|
+
# First we group by visit_id and scope to visits containing ONLY 1 event
|
9
|
+
@visits_having_only_one_event = events.group(:visit_id).having("count(ahoy_events.id) == 1")
|
10
|
+
# We then count each unique occurence of a visit with 1 event
|
11
|
+
@total_number_of_single_event_visits = @visits_having_only_one_event.uniq.count
|
12
|
+
|
13
|
+
# Determine pages in which the most bounces occur
|
14
|
+
@single_event_visits_landing_page_count = visits.where(id: @visits_having_only_one_event.pluck(:visit_id)).pluck(:landing_page).tally
|
15
|
+
|
16
|
+
# Scope the results to the given limit and sort them in descending order
|
17
|
+
@most_bounced_pages = @single_event_visits_landing_page_count.sort_by { |controller_name_and_action, count| count }.last(limit).reverse
|
18
|
+
|
19
|
+
# Get the percentage as #-One-Page-Visits / Total-#-Of-Visits
|
20
|
+
@percentage_of_visits_that_were_bounced = ((@total_number_of_single_event_visits.to_f / (@total_number_of_user_visits == 0 ? 1 : @total_number_of_user_visits)) * 100).round(1)
|
21
|
+
end
|
22
|
+
end
|
@@ -6,7 +6,7 @@
|
|
6
6
|
</div>
|
7
7
|
<div class="col-auto">
|
8
8
|
<p class="card-text text-end mb-0">
|
9
|
-
<%= (@change_active_number > 0 ? "+" : "") + @change_active_number.to_s + " / " + @change_active_percent.to_s + "%" %>
|
9
|
+
<%= (@change_active_number > 0 ? "+" : "") + @change_active_number.to_s + " / " + @change_active_percent.to_s + "%" %> compared to last period.
|
10
10
|
</p>
|
11
11
|
</div><!-- .col -->
|
12
12
|
</div><!-- .row -->
|
@@ -6,7 +6,7 @@
|
|
6
6
|
</div>
|
7
7
|
<div class="col-auto">
|
8
8
|
<p class="card-text text-end mb-0">
|
9
|
-
<%= (@change_new_number > 0 ? "+" : "") + @change_new_number.to_s + " / " + @change_new_percent.to_s + "%" %>
|
9
|
+
<%= (@change_new_number > 0 ? "+" : "") + @change_new_number.to_s + " / " + @change_new_percent.to_s + "%" %> compared to last period.
|
10
10
|
</p>
|
11
11
|
</div><!-- .col -->
|
12
12
|
</div><!-- .row -->
|
@@ -0,0 +1,27 @@
|
|
1
|
+
<div class="card bg-primary text-light">
|
2
|
+
<div class="card-body">
|
3
|
+
<h5>User Activity for <i>user id: <%=@user_id%></i> since <i><%= time_ago_in_words(@time_window.ago).titleize %></i> ago </h5>
|
4
|
+
<div>
|
5
|
+
<table class="table table-hover table-borderless table-sm">
|
6
|
+
<thead class="table-dark">
|
7
|
+
<tr>
|
8
|
+
<th class="text-start">Event</th>
|
9
|
+
<th class="text-end">Count</th>
|
10
|
+
</tr>
|
11
|
+
</thead>
|
12
|
+
<tbody class="text-light">
|
13
|
+
<% @count_by_event.each do |event, count| %>
|
14
|
+
<tr>
|
15
|
+
<td><%= event %></td>
|
16
|
+
<td class="text-end"><%= count %></td>
|
17
|
+
</tr>
|
18
|
+
<% end %>
|
19
|
+
<tr class="table-dark">
|
20
|
+
<td><strong>Total:</strong></td>
|
21
|
+
<td class="text-end"><%= @count_by_event.sum {|event, count| count} %></td>
|
22
|
+
</tr>
|
23
|
+
</tbody>
|
24
|
+
</table>
|
25
|
+
</div>
|
26
|
+
</div><!-- .card-body -->
|
27
|
+
</div><!-- .card -->
|
@@ -0,0 +1,10 @@
|
|
1
|
+
require "ahoy_matey"
|
2
|
+
|
3
|
+
class Matey::UserEngagementComponent < ApplicationComponent
|
4
|
+
def initialize(events:, user_id:, time_window: 1.week, limit: 10)
|
5
|
+
@events_for_user = events.where_props(user_id: user_id).where(time: time_window.ago..Time.current).group(:name).count
|
6
|
+
@count_by_event = @events_for_user.sort_by { |event, count| count }.last(limit).reverse
|
7
|
+
@time_window = time_window
|
8
|
+
@user_id = user_id
|
9
|
+
end
|
10
|
+
end
|
@@ -0,0 +1,22 @@
|
|
1
|
+
## Welcome to Matey's Contribution Guidelines
|
2
|
+
Bug reports and pull requests are welcome on GitHub at https://github.com/harled/matey.
|
3
|
+
This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [code of conduct.](https://github.com/harled/matey/blob/master/CODE_OF_CONDUCT.md)
|
4
|
+
|
5
|
+
### For New Contributors:
|
6
|
+
Be sure to take a look at the [README](https://github.com/harled/matey/blob/main/README.md) to get a sense of what Matey does and how it works
|
7
|
+
|
8
|
+
### Contribution Steps:
|
9
|
+
Want to help us out? Here are some steps to make sure you are contributing according to our guidelines.
|
10
|
+
|
11
|
+
1. Find an issue you like, or create a new issue [here.](https://github.com/harled/matey/issues)
|
12
|
+
|
13
|
+
Please ask if you have any questions or need clarification on creating a new issue, or related to any existing issue! 🤔
|
14
|
+
|
15
|
+
2. Assign yourself to the issue and create a branch , following GitHub Issue's naming scheme. 🛠️
|
16
|
+
The naming scheme should follow `(#issueNumber-issue-name)` ie. `(#10-create-new-component)`
|
17
|
+
|
18
|
+
3. Get on your local machine and [ensure you have the repo cloned.](https://docs.github.com/en/repositories/creating-and-managing-repositories/cloning-a-repository) Checkout the branch you just made with `git checkout branch-name` and pull the latest merged changes from the repo with `git pull origin main` to make sure you have the most up-to-date code from the repo. 👩💻
|
19
|
+
4. Add your amazing changes along with any documentation you feel would be useful (ie. Update the README if necessary). Then commit and push your changes. 🌟
|
20
|
+
5. Go back to the repo on GitHub and create a pull request! Then wait for an admin of the repo to get back to your pull request, address any comments, and once you are finally approved, merge your code into _Matey!_ 🎉
|
21
|
+
|
22
|
+
If you want some more tips on contributing to GitHub projects, [check out this resource from Data School](https://www.dataschool.io/how-to-contribute-on-github/)
|
Binary file
|
data/lib/matey/version.rb
CHANGED
data/lib/matey.rb
CHANGED
@@ -4,10 +4,12 @@ require_relative "matey/version"
|
|
4
4
|
|
5
5
|
require_relative "../app/components/application_component"
|
6
6
|
require_relative "../app/components/matey/active_users_component"
|
7
|
+
require_relative "../app/components/matey/bounce_rate_component"
|
8
|
+
require_relative "../app/components/matey/new_activity_component"
|
7
9
|
require_relative "../app/components/matey/new_users_component"
|
8
10
|
require_relative "../app/components/matey/top_events_component"
|
9
|
-
require_relative "../app/components/matey/new_activity_component"
|
10
11
|
require_relative "../app/components/matey/top_visited_pages_table_component"
|
12
|
+
require_relative "../app/components/matey/user_engagement_component"
|
11
13
|
|
12
14
|
module Matey
|
13
15
|
class Error < StandardError; end
|
data/matey.gemspec
CHANGED
@@ -3,11 +3,16 @@ require_relative "lib/matey/version"
|
|
3
3
|
Gem::Specification.new do |spec|
|
4
4
|
spec.name = "matey"
|
5
5
|
spec.version = Matey::VERSION
|
6
|
-
|
7
|
-
|
6
|
+
|
7
|
+
# Former authors include:
|
8
|
+
# Suvasan Krishnasamy / suvasan@harled.ca
|
9
|
+
# Caitlin Henry / caitlin@harled.ca
|
10
|
+
|
11
|
+
spec.authors = ["Jon Loos", "Chris Young"]
|
12
|
+
spec.email = ["jon@harled.ca", "chris@harled.ca"]
|
8
13
|
|
9
14
|
spec.summary = "Track user engagement using Ahoy and ViewComponents."
|
10
|
-
spec.description = "ViewComponents that helpful in viewing user engagement metrics from Ahoy."
|
15
|
+
spec.description = "ViewComponents that are helpful in viewing user engagement metrics from Ahoy."
|
11
16
|
spec.homepage = "https://github.com/harled/matey"
|
12
17
|
spec.license = "MIT"
|
13
18
|
spec.required_ruby_version = ">= 2.6.0"
|
@@ -29,14 +34,16 @@ Gem::Specification.new do |spec|
|
|
29
34
|
spec.executables = spec.files.grep(%r{\Aexe/}) { |f| File.basename(f) }
|
30
35
|
spec.require_paths = ["lib"]
|
31
36
|
|
32
|
-
spec.add_dependency "view_component", "~> 2.
|
37
|
+
spec.add_dependency "view_component", "~> 2.74.1"
|
33
38
|
spec.add_dependency "ahoy_matey", "~> 4.0"
|
34
39
|
|
35
40
|
spec.add_development_dependency "rspec-rails", "~> 5.0"
|
36
|
-
spec.add_development_dependency "
|
41
|
+
spec.add_development_dependency "factory_bot_rails", "~> 6.0"
|
37
42
|
spec.add_development_dependency "sprockets-rails", "~> 3.2.2"
|
38
43
|
spec.add_development_dependency "sqlite3", "~> 1.0"
|
39
44
|
spec.add_development_dependency "debug", "~> 1.0"
|
45
|
+
spec.add_development_dependency "standard", "~> 1.3"
|
46
|
+
spec.add_development_dependency "rake", "~> 13.0"
|
40
47
|
|
41
48
|
# For more information and examples about making a new gem, check out our
|
42
49
|
# guide at: https://bundler.io/guides/creating_gem.html
|
metadata
CHANGED
@@ -1,17 +1,15 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: matey
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
|
-
- Suvasan Krishnasamy
|
8
7
|
- Jon Loos
|
9
|
-
- Caitlin Henry
|
10
8
|
- Chris Young
|
11
9
|
autorequire:
|
12
10
|
bindir: exe
|
13
11
|
cert_chain: []
|
14
|
-
date: 2022-04
|
12
|
+
date: 2022-11-04 00:00:00.000000000 Z
|
15
13
|
dependencies:
|
16
14
|
- !ruby/object:Gem::Dependency
|
17
15
|
name: view_component
|
@@ -19,14 +17,14 @@ dependencies:
|
|
19
17
|
requirements:
|
20
18
|
- - "~>"
|
21
19
|
- !ruby/object:Gem::Version
|
22
|
-
version:
|
20
|
+
version: 2.74.1
|
23
21
|
type: :runtime
|
24
22
|
prerelease: false
|
25
23
|
version_requirements: !ruby/object:Gem::Requirement
|
26
24
|
requirements:
|
27
25
|
- - "~>"
|
28
26
|
- !ruby/object:Gem::Version
|
29
|
-
version:
|
27
|
+
version: 2.74.1
|
30
28
|
- !ruby/object:Gem::Dependency
|
31
29
|
name: ahoy_matey
|
32
30
|
requirement: !ruby/object:Gem::Requirement
|
@@ -56,7 +54,7 @@ dependencies:
|
|
56
54
|
- !ruby/object:Gem::Version
|
57
55
|
version: '5.0'
|
58
56
|
- !ruby/object:Gem::Dependency
|
59
|
-
name:
|
57
|
+
name: factory_bot_rails
|
60
58
|
requirement: !ruby/object:Gem::Requirement
|
61
59
|
requirements:
|
62
60
|
- - "~>"
|
@@ -111,11 +109,38 @@ dependencies:
|
|
111
109
|
- - "~>"
|
112
110
|
- !ruby/object:Gem::Version
|
113
111
|
version: '1.0'
|
114
|
-
|
112
|
+
- !ruby/object:Gem::Dependency
|
113
|
+
name: standard
|
114
|
+
requirement: !ruby/object:Gem::Requirement
|
115
|
+
requirements:
|
116
|
+
- - "~>"
|
117
|
+
- !ruby/object:Gem::Version
|
118
|
+
version: '1.3'
|
119
|
+
type: :development
|
120
|
+
prerelease: false
|
121
|
+
version_requirements: !ruby/object:Gem::Requirement
|
122
|
+
requirements:
|
123
|
+
- - "~>"
|
124
|
+
- !ruby/object:Gem::Version
|
125
|
+
version: '1.3'
|
126
|
+
- !ruby/object:Gem::Dependency
|
127
|
+
name: rake
|
128
|
+
requirement: !ruby/object:Gem::Requirement
|
129
|
+
requirements:
|
130
|
+
- - "~>"
|
131
|
+
- !ruby/object:Gem::Version
|
132
|
+
version: '13.0'
|
133
|
+
type: :development
|
134
|
+
prerelease: false
|
135
|
+
version_requirements: !ruby/object:Gem::Requirement
|
136
|
+
requirements:
|
137
|
+
- - "~>"
|
138
|
+
- !ruby/object:Gem::Version
|
139
|
+
version: '13.0'
|
140
|
+
description: ViewComponents that are helpful in viewing user engagement metrics from
|
141
|
+
Ahoy.
|
115
142
|
email:
|
116
|
-
- suvasan@harled.ca
|
117
143
|
- jon@harled.ca
|
118
|
-
- caitlin@harled.ca
|
119
144
|
- chris@harled.ca
|
120
145
|
executables: []
|
121
146
|
extensions: []
|
@@ -128,6 +153,7 @@ files:
|
|
128
153
|
- ".standard.yml"
|
129
154
|
- CHANGELOG.md
|
130
155
|
- CODE_OF_CONDUCT.md
|
156
|
+
- COMPONENTS.md
|
131
157
|
- Gemfile
|
132
158
|
- Gemfile.lock
|
133
159
|
- LICENSE.txt
|
@@ -136,6 +162,8 @@ files:
|
|
136
162
|
- app/components/application_component.rb
|
137
163
|
- app/components/matey/active_users_component.html.erb
|
138
164
|
- app/components/matey/active_users_component.rb
|
165
|
+
- app/components/matey/bounce_rate_component.html.erb
|
166
|
+
- app/components/matey/bounce_rate_component.rb
|
139
167
|
- app/components/matey/new_activity_component.html.erb
|
140
168
|
- app/components/matey/new_activity_component.rb
|
141
169
|
- app/components/matey/new_users_component.html.erb
|
@@ -144,8 +172,12 @@ files:
|
|
144
172
|
- app/components/matey/top_events_component.rb
|
145
173
|
- app/components/matey/top_visited_pages_table_component.html.erb
|
146
174
|
- app/components/matey/top_visited_pages_table_component.rb
|
175
|
+
- app/components/matey/user_engagement_component.html.erb
|
176
|
+
- app/components/matey/user_engagement_component.rb
|
177
|
+
- docs/CONTRIBUTING.md
|
147
178
|
- images/.DS_Store
|
148
179
|
- images/activeUsersComponent.png
|
180
|
+
- images/bounceRateComponent.png
|
149
181
|
- images/newActivityComponent.png
|
150
182
|
- images/newUsersComponent.png
|
151
183
|
- images/topEventsComponent.png
|