activeinsights 0.2.1 → 0.2.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: 76e005aeac4566e4090e0b0eaf1109f15ebe7b9ad1593bc0fa2182d1dbcdc219
4
- data.tar.gz: 04c8d6d629166c53342b3b49ee6ade131d2aa8b9e4664d9e0f7ee461e7112d6c
3
+ metadata.gz: 005ff0ad5588288c42b05f56cb0134fc33bb90e1bcbb8599e8a97e784d1f0a5b
4
+ data.tar.gz: f34eda95fcb2153ea8edf2aedc04a69a79373e4a0b765a86d5c7b83a6d4d291c
5
5
  SHA512:
6
- metadata.gz: '07459ea24e4941797ce69358fca6a478f17c80a029db7d4fa5b3f99f768b8901867ccda21334f38e89e24ed6877525c008496a52e5b5dd9cb386cac4d30143c1'
7
- data.tar.gz: 262cb9bfb588175b8018159d6eea787c7d8fc9ea9fd5290a0214f82c7a8636cbbee848430cd8b6062beebb267727963f16af4c25c700471b817529e94263cca7
6
+ metadata.gz: 0ea04ce1372e83d7cf3ab78291a44f3c232f74aabe2f099b5c0341aad166797051fd16409a6d838f82b32f99296b986993aace56260133df62e19069239f2599
7
+ data.tar.gz: 517c8dd3c9cded15f006aec6f54ca6b45c33d2b19e7cf780c94d93a4587da8c248c8095730126b2206992904d505c266cf1168cd4eea9f80007b0c4fc68c3e50
data/README.md CHANGED
@@ -45,13 +45,13 @@ You can supply a hash of connection options to `connects_to` set the connection
45
45
  options for the `Request` model.
46
46
 
47
47
  ```ruby
48
- ActiveInsights.connects_to = { database: { writing: :requests, reading: :requests } }
48
+ config.active_insights.connects_to = { database: { writing: :requests, reading: :requests } }
49
49
  ```
50
50
 
51
51
  You can supply an array of ignored endpoints
52
52
 
53
53
  ```ruby
54
- ActiveInsights.ignored_endpoints = ["Rails::HealthController#show"]
54
+ config.active_insights.ignored_endpoints = ["Rails::HealthController#show"]
55
55
  ```
56
56
 
57
57
  ## Development
@@ -2,13 +2,12 @@
2
2
 
3
3
  module ActiveInsights
4
4
  module ApplicationHelper
5
- def active_insights_importmap_tags(entry_point = "application")
5
+ def active_insights_importmap_tags
6
6
  importmap = ActiveInsights::Engine.importmap
7
7
 
8
8
  safe_join [
9
9
  javascript_inline_importmap_tag(importmap.to_json(resolver: self)),
10
10
  javascript_importmap_module_preload_tags(importmap),
11
- javascript_import_module_tag(entry_point)
12
11
  ], "\n"
13
12
  end
14
13
 
@@ -6,6 +6,21 @@
6
6
  <%= csrf_meta_tags %>
7
7
  <%= csp_meta_tag %>
8
8
  <%= active_insights_importmap_tags %>
9
+ <script type="module">
10
+ import {Chart, registerables} from "chart.js";
11
+
12
+ Chart.register(...registerables);
13
+
14
+ import "chartjs-adapter-date-fns";
15
+ import zoomPlugin from "chartjs-plugin-zoom";
16
+ import Chartkick from "chartkick";
17
+
18
+ window.Chartkick = Chartkick;
19
+ window.Chart = Chart;
20
+
21
+ Chartkick.use(Chart);
22
+ Chart.register(zoomPlugin);
23
+ </script>
9
24
 
10
25
  <title>Active Insights</title>
11
26
  <style>
@@ -3,10 +3,10 @@
3
3
  require "active_insights"
4
4
 
5
5
  ActiveInsights::Engine.importmap.draw do
6
- pin "application", to: "active_insights/application.js"
7
-
8
- pin "chartkick", to: "chartkick.js"
9
- pin "Chart.bundle", to: "Chart.bundle.js"
6
+ pin "chartkick", to: "https://ga.jspm.io/npm:chartkick@5.0.1/dist/chartkick.esm.js"
7
+ pin "chart.js", to: "https://ga.jspm.io/npm:chart.js@4.4.1/dist/chart.js"
8
+ pin "chartjs-adapter-date-fns", to: "https://ga.jspm.io/npm:chartjs-adapter-date-fns@3.0.0/dist/chartjs-adapter-date-fns.esm.js"
9
+ pin "date-fns", to: "https://ga.jspm.io/npm:date-fns@3.2.0/index.mjs"
10
10
 
11
11
  pin "chartjs-plugin-zoom", to: "https://ga.jspm.io/npm:chartjs-plugin-zoom@2.0.1/dist/chartjs-plugin-zoom.esm.js"
12
12
  pin "hammerjs", to: "https://ga.jspm.io/npm:hammerjs@2.0.8/hammer.js"
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module ActiveInsights
4
- VERSION = "0.2.1"
4
+ VERSION = "0.2.3"
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: activeinsights
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.1
4
+ version: 0.2.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Nick Pezza
@@ -61,7 +61,6 @@ extra_rdoc_files: []
61
61
  files:
62
62
  - README.md
63
63
  - Rakefile
64
- - app/assets/javascripts/active_insights/application.js
65
64
  - app/controllers/active_insights/application_controller.rb
66
65
  - app/controllers/active_insights/controller_p_values_controller.rb
67
66
  - app/controllers/active_insights/p_values_controller.rb
@@ -1,5 +0,0 @@
1
- import "chartkick"
2
- import "Chart.bundle"
3
- import zoomPlugin from 'chartjs-plugin-zoom'
4
-
5
- Chart.register(zoomPlugin)