rails_analytics 1.0.1 → 1.0.3

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: 92e6a629e6fa091ee178510f84758cde171ca77d176c55cadb73194f391032cb
4
- data.tar.gz: 2dd7feca06a5f089d464bc12f2bcb7a8aa6c2858456912f23b97c24a998b3ec4
3
+ metadata.gz: f985132b2aa456db104a03635f1d8334772e8a5c8e3902319d111082d7a5f5b5
4
+ data.tar.gz: 8b4b04a1bab3a4c15b0cff8f44892146f5469713e325266054e8e23131937c8e
5
5
  SHA512:
6
- metadata.gz: 3a05238c010c1d852cbfb65352f428fe21d7f43132857d5413f2f61a1a789437e542efc6e1c3058dbb629bf8c0adb79c380320cf44e60efa627cf0689af9eb2e
7
- data.tar.gz: 20a4ab660dbb06baf656d9741cb5980a93f549adef06dfa1ba8f8cb245a0cc8fa82b8159af25153a3137fe2a7de2b9418adc3c4499a0576eba2c60fdd5c4dcb7
6
+ metadata.gz: 277a1e2be087cae4e5f511af0c3f3d56051ad625fadfe643356ae0697fbe6f353c8eef2a9e59c842899d051abdc232a93eea22f1faa4e631fb8fbe4ee0e29a1f
7
+ data.tar.gz: c1968ddf6c68fc5dee7856f61ffc94345da3855ee2d0d4188ca04756802ca47afbb252770014e96c567490180be008dedd87244e7c980b669f507c53c44e519a
data/README.md CHANGED
@@ -42,8 +42,8 @@ dependencies.
42
42
  3. The engine verifies the token, **masks the IP** (before anything hits disk),
43
43
  derives a **daily anonymity key**, and stores a `Visit` row. Custom events are
44
44
  stored as `Event` rows linked to the visit.
45
- 4. The **dashboard** in `/rails_analytics` shows aggregated metrics from pure SQL
46
- queries in three views: overview, events, and visits.
45
+ 4. The **dashboard** at `/analytics` (default `mount_path`) shows aggregated metrics from
46
+ pure SQL queries in three views: overview, events, and visits.
47
47
 
48
48
  ## Requirements
49
49
 
@@ -236,7 +236,8 @@ cd test/dummy
236
236
  bin/rails server
237
237
  ```
238
238
 
239
- Then open:
239
+ Then open (the bundled dummy mounts the engine at **`/rails_analytics`** as an example of a
240
+ custom mount — the gem's default is `/analytics`):
240
241
 
241
242
  | URL | What you'll see |
242
243
  |-----|-----------------|
@@ -5,7 +5,7 @@
5
5
  <meta charset="utf-8">
6
6
  <meta name="viewport" content="width=device-width, initial-scale=1">
7
7
  <title><%= t("rails_analytics.title") %></title>
8
- <link rel="stylesheet" href="<%= request.base_url %>/rails_analytics/dashboard.css" media="all">
8
+ <link rel="stylesheet" href="<%= rails_analytics.dashboard_css_path %>" media="all">
9
9
  </head>
10
10
  <body>
11
11
  <header class="ra-header">
data/config/routes.rb CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  RailsAnalytics::Engine.routes.draw do
4
4
  get "tracker.js" => "analytics#tracker"
5
- get "dashboard.css" => "analytics#dashboard_css"
5
+ get "dashboard.css" => "analytics#dashboard_css", as: "dashboard_css"
6
6
  post "collect" => "analytics#collect"
7
7
  get "token" => "analytics#token"
8
8
  root to: "dashboards#overview"
@@ -5,7 +5,8 @@ RailsAnalytics.configure do |config|
5
5
  # Pode ser um Symbol (ex: :authenticate_admin!) ou um callable (ex: -> { current_user&.admin? }).
6
6
  config.auth_callback = :authenticate_admin!
7
7
 
8
- # Caminho onde o engine será montado no routes.rb.
8
+ # Caminho onde o engine é montado (debe coincidir com el mount en config/routes.rb).
9
+ # Padrão: "/analytics". Puedes cambiarlo libremente (ex: "/admin/analytics").
9
10
  config.mount_path = "/analytics"
10
11
 
11
12
  # Período padrão para as consultas do dashboard (ex: 30.days).
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module RailsAnalytics
4
- VERSION = "1.0.1"
4
+ VERSION = "1.0.3"
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rails_analytics
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.1
4
+ version: 1.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - br4zz4