vega 0.3.1 → 0.4.0

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: 910224c90daca83128bd03303309f86e84a5ddd709db65630c2b9bf7948e0c7c
4
- data.tar.gz: 7f8773556565b0ddaab7668e41f38cd9fa1a88cea51e4199e4997494340cfb6f
3
+ metadata.gz: 9f85c3aa151c65606522c672d8d2a52911bdf075b9f69c6ecb0fe6f385cf72cf
4
+ data.tar.gz: c732f2817d85f970a0070eb4dae07b2f4a045b745ee89696184d9c7c133efa6e
5
5
  SHA512:
6
- metadata.gz: 2b73aa8eeb149fe75bfeb2edfb316de4ba209be855a7b1ad0200da13cf97a9ef365ed8ea5d590e734a071fde51c3bfc10d122a28002a9d70a62fccdd563d9230
7
- data.tar.gz: 175848178fa7ade33c0a1401037fce8c2abb1f164bb3f820f27fd69ecb4e2742adfd67177044fde6928e21d23db02d783cb9eb16b1a83360ee1058b38d2b12dd
6
+ metadata.gz: 6bc45e4277c4459515f4c5194d37e5f32106ae466469889f50b30868d95c725c9f45667e04c0b481ffaef3ac3c6c50c9247211f2e435cbf7c97511d0a369d042
7
+ data.tar.gz: 50e04b60a43f22caf073e45b1d6bf68161274843aab1caef192349bdf53a441b0807b592a21b5026b0b2d8ada81378325f6f9e23b4f5f077ba525c7849a61ec1
data/CHANGELOG.md CHANGED
@@ -1,3 +1,12 @@
1
+ ## 0.4.0 (2024-10-22)
2
+
3
+ - Updated Vega-Lite to 5.21.0 and Vega-Embed to 6.26.0
4
+ - Dropped support for Ruby < 3.1 and Rails < 7
5
+
6
+ ## 0.3.2 (2024-06-30)
7
+
8
+ - Updated Vega to 5.30.0, Vega-Lite to 5.19.0, and Vega-Embed to 6.25.0
9
+
1
10
  ## 0.3.1 (2023-02-21)
2
11
 
3
12
  - Updated Vega-Lite to 5.6.1 and Vega-Embed to 6.21.3
data/README.md CHANGED
@@ -6,7 +6,7 @@ Interactive charts for Ruby, powered by [Vega](https://vega.github.io/vega/) and
6
6
 
7
7
  Works with Rails, iRuby, and other frameworks
8
8
 
9
- [![Build Status](https://github.com/ankane/vega-ruby/workflows/build/badge.svg?branch=master)](https://github.com/ankane/vega-ruby/actions)
9
+ [![Build Status](https://github.com/ankane/vega-ruby/actions/workflows/build.yml/badge.svg)](https://github.com/ankane/vega-ruby/actions)
10
10
 
11
11
  ## Installation
12
12
 
@@ -18,14 +18,14 @@ gem "vega"
18
18
 
19
19
  Then follow the instructions for how you plan to use it:
20
20
 
21
- - [Rails 7 / Importmap](#rails-7--importmap)
22
- - [Rails 7 / esbuild or Webpack](#rails-7--esbuild-or-webpack)
23
- - [Rails 6 / Webpacker](#rails-6--webpacker)
24
- - [Rails 5 / Sprockets](#rails-5--sprockets)
21
+ - [Importmap](#importmap) (Rails 7 default)
22
+ - [esbuild or Webpack](#esbuild-or-webpack)
23
+ - [Webpacker](#webpacker) (Rails 6 default)
24
+ - [Sprockets](#sprockets)
25
25
  - [iRuby](#iruby)
26
26
  - [Other](#other)
27
27
 
28
- ### Rails 7 / Importmap
28
+ ### Importmap
29
29
 
30
30
  Add to `config/importmap.rb`:
31
31
 
@@ -45,7 +45,7 @@ import "vega-embed"
45
45
  window.dispatchEvent(new Event("vega:load"))
46
46
  ```
47
47
 
48
- ### Rails 7 / esbuild or Webpack
48
+ ### esbuild or Webpack
49
49
 
50
50
  Run:
51
51
 
@@ -62,7 +62,7 @@ window.vegaEmbed = embed
62
62
  window.dispatchEvent(new Event("vega:load"))
63
63
  ```
64
64
 
65
- ### Rails 6 / Webpacker
65
+ ### Webpacker
66
66
 
67
67
  Run:
68
68
 
@@ -76,7 +76,7 @@ And add to `app/javascript/packs/application.js`:
76
76
  window.vegaEmbed = require("vega-embed").default
77
77
  ```
78
78
 
79
- ### Rails 5 / Sprockets
79
+ ### Sprockets
80
80
 
81
81
  Add to `app/assets/javascripts/application.js`:
82
82
 
@@ -418,7 +418,7 @@ Automatically add a nonce when configured in Rails with:
418
418
 
419
419
  By default, the Vega parser uses the Function constructor, which [can cause issues with CSP](https://vega.github.io/vega/usage/interpreter/).
420
420
 
421
- For Rails 7 / Importmap, add to `config/importmap.rb`:
421
+ For Importmap, add to `config/importmap.rb`:
422
422
 
423
423
  ```ruby
424
424
  pin "vega-interpreter", to: "vega-interpreter.js"
@@ -430,13 +430,13 @@ And add to `app/javascript/application.js`:
430
430
  import "vega-interpreter"
431
431
  ```
432
432
 
433
- For Rails 6 / Webpacker, run:
433
+ For Webpacker, run:
434
434
 
435
435
  ```sh
436
436
  yarn add vega-interpreter
437
437
  ```
438
438
 
439
- For Rails 5 / Sprockets, add to `app/assets/javascripts/application.js`:
439
+ For Sprockets, add to `app/assets/javascripts/application.js`:
440
440
 
441
441
  ```js
442
442
  //= require vega-interpreter
data/lib/vega/engine.rb CHANGED
@@ -4,7 +4,7 @@ module Vega
4
4
 
5
5
  # for importmap
6
6
  initializer "vega.importmap" do |app|
7
- if defined?(Importmap)
7
+ if app.config.respond_to?(:assets) && defined?(Importmap) && defined?(Sprockets)
8
8
  app.config.assets.precompile << "vega-embed.js"
9
9
  app.config.assets.precompile << "vega-interpreter.js"
10
10
  app.config.assets.precompile << "vega-lite.js"
data/lib/vega/spec.rb CHANGED
@@ -34,10 +34,10 @@ module Vega
34
34
  <script>
35
35
  require.config({
36
36
  paths: {
37
- 'vega': 'https://cdn.jsdelivr.net/npm/vega@5.22.1/build/vega.min',
38
- 'vega-util': 'https://cdn.jsdelivr.net/npm/vega-util@1.17.0/build/vega-util.min',
39
- 'vega-lite': 'https://cdn.jsdelivr.net/npm/vega-lite@5.6.1/build/vega-lite.min',
40
- 'vega-embed': 'https://cdn.jsdelivr.net/npm/vega-embed@6.21.3/build/vega-embed.min'
37
+ 'vega': 'https://cdn.jsdelivr.net/npm/vega@5.30.0/build/vega.min',
38
+ 'vega-util': 'https://cdn.jsdelivr.net/npm/vega-util@1.17.2/build/vega-util.min',
39
+ 'vega-lite': 'https://cdn.jsdelivr.net/npm/vega-lite@5.21.0/build/vega-lite.min',
40
+ 'vega-embed': 'https://cdn.jsdelivr.net/npm/vega-embed@6.26.0/build/vega-embed.min'
41
41
  }
42
42
  });
43
43
  require(['vega', 'vega-util', 'vega-lite', 'vega-embed'], function(vega, vegaUtil, vegaLite, vegaEmbed) {
data/lib/vega/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Vega
2
- VERSION = "0.3.1"
2
+ VERSION = "0.4.0"
3
3
  end
data/lib/vega.rb CHANGED
@@ -4,16 +4,16 @@ require "json"
4
4
  require "securerandom"
5
5
 
6
6
  # modules
7
- require "vega/method_helpers"
8
- require "vega/base_chart"
9
- require "vega/chart"
10
- require "vega/lite_chart"
11
- require "vega/spec"
12
- require "vega/helper"
13
- require "vega/version"
7
+ require_relative "vega/method_helpers"
8
+ require_relative "vega/base_chart"
9
+ require_relative "vega/chart"
10
+ require_relative "vega/lite_chart"
11
+ require_relative "vega/spec"
12
+ require_relative "vega/helper"
13
+ require_relative "vega/version"
14
14
 
15
15
  # integrations
16
- require "vega/engine" if defined?(Rails)
16
+ require_relative "vega/engine" if defined?(Rails)
17
17
 
18
18
  module Vega
19
19
  class << self
@@ -1,4 +1,4 @@
1
- Copyright (c) 2015-2018, University of Washington Interactive Data Lab
1
+ Copyright (c) 2015-2023, University of Washington Interactive Data Lab
2
2
  All rights reserved.
3
3
 
4
4
  Redistribution and use in source and binary forms, with or without
@@ -1,4 +1,4 @@
1
- Copyright (c) 2015-2021, University of Washington Interactive Data Lab
1
+ Copyright (c) 2015-2023, University of Washington Interactive Data Lab
2
2
  All rights reserved.
3
3
 
4
4
  Redistribution and use in source and binary forms, with or without