activeinsights 0.2.0 → 0.2.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: dadcb3ff31dcb9021bea6a79dbbe8c2e9de03a268a0c82f6a36158bd513c9f2a
4
- data.tar.gz: 6c99fafe1e426fbd8de6fbe53c889e5bd780a4d5b37fdc110665e0eddff0ae0a
3
+ metadata.gz: e8c6d359d683ccf4da16accfa45684989a4f57f9bc9713c0d15c9c0c72927c3e
4
+ data.tar.gz: e14e9c7becaf024f5a5890e04371994948e88c16bd8e1fd4b06aaec20a77162e
5
5
  SHA512:
6
- metadata.gz: 732e3356cdcb0d23798fc0a5c3f6414b3f1f7e1fa5226b1d27b100f58a7081190fdb5dec27ae71b836beee660cd0dfe3e26ed9c1d9d2cb8d089e22787a4ef649
7
- data.tar.gz: 03a8cd017f4fa4b5da97825a2ad2414a4e18b4ec771f14ff38e9bf90d9afa6f40e50f9ea262c90e354fea3baf0d4184bde4aeea15eae77ab7e93dd98666c1a1a
6
+ metadata.gz: 9842e1147eab99529d9f3ec92c5f8bc2ec0dec55658f27fa73c6157aa06ec6d4c4f416763c861aeea718c0de068212c1578265e160fbe88392d11bfa08759445
7
+ data.tar.gz: 91ecb70edb2a74ea793babfb6547496814807157d91ff5dcadb585477b5acf7311fdd51d8a5ab2a269fe07f297d2ede33d584e6cbefdacd9afce87b0e9c33fb3
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
@@ -1,5 +1,13 @@
1
- import "chartkick"
2
- import "Chart.bundle"
1
+ import {Chart, registerables} from "chart.js"
2
+
3
+ Chart.register(...registerables)
4
+
5
+ import "chartjs-adapter-date-fns"
3
6
  import zoomPlugin from 'chartjs-plugin-zoom'
7
+ import Chartkick from "chartkick"
8
+
9
+ window.Chartkick = Chartkick
10
+ window.Chart = Chart
4
11
 
12
+ Chartkick.use(Chart)
5
13
  Chart.register(zoomPlugin)
@@ -5,8 +5,10 @@ require "active_insights"
5
5
  ActiveInsights::Engine.importmap.draw do
6
6
  pin "application", to: "active_insights/application.js"
7
7
 
8
- pin "chartkick", to: "chartkick.js"
9
- pin "Chart.bundle", to: "Chart.bundle.js"
8
+ pin "chartkick", to: "https://ga.jspm.io/npm:chartkick@5.0.1/dist/chartkick.esm.js"
9
+ pin "chart.js", to: "https://ga.jspm.io/npm:chart.js@4.4.1/dist/chart.js"
10
+ 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"
11
+ pin "date-fns", to: "https://ga.jspm.io/npm:date-fns@3.2.0/index.mjs"
10
12
 
11
13
  pin "chartjs-plugin-zoom", to: "https://ga.jspm.io/npm:chartjs-plugin-zoom@2.0.1/dist/chartjs-plugin-zoom.esm.js"
12
14
  pin "hammerjs", to: "https://ga.jspm.io/npm:hammerjs@2.0.8/hammer.js"
@@ -11,6 +11,14 @@ module ActiveInsights
11
11
  end
12
12
  end
13
13
 
14
+ config.active_insights = ActiveSupport::OrderedOptions.new
15
+
16
+ initializer "active_insights.config" do
17
+ config.active_insights.each do |name, value|
18
+ ActiveInsights.public_send(:"#{name}=", value)
19
+ end
20
+ end
21
+
14
22
  initializer "active_insights.importmap", before: "importmap" do |app|
15
23
  app.config.importmap.paths <<
16
24
  Engine.root.join("config/initializers/importmap.rb")
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module ActiveInsights
4
- VERSION = "0.2.0"
4
+ VERSION = "0.2.2"
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.0
4
+ version: 0.2.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Nick Pezza