geoblacklight 4.2.0 → 4.3.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/workflows/ruby.yml +1 -1
- data/app/frontend/entrypoints/application.js +1 -1
- data/app/frontend/openlayers/ol_initializer.js +1 -1
- data/app/frontend/stylesheets/openlayers.css +1 -1
- data/geoblacklight.gemspec +1 -1
- data/lib/generators/geoblacklight/install_generator.rb +16 -5
- data/lib/generators/geoblacklight/templates/clover.js +5 -0
- data/lib/generators/geoblacklight/templates/ol.js +5 -0
- data/lib/generators/geoblacklight/templates/package.json +7 -0
- data/lib/generators/geoblacklight/templates/vite.config.ts +19 -0
- data/lib/generators/geoblacklight/templates/vite.rb +4 -0
- data/lib/geoblacklight/engine.rb +0 -24
- data/lib/geoblacklight/version.rb +1 -1
- data/spec/test_app_templates/lib/generators/test_app_generator.rb +9 -0
- metadata +10 -6
- data/app/helpers/geoblacklight/application_helper.rb +0 -8
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 46c8d4fb0425f7226b0b649f1d1c32b57299b683db1296c7dfb981952e4626d1
|
4
|
+
data.tar.gz: 8f64af5a2d95ab6b517860b19db043545eb9a74f7a73aa62ed759473d21449ae
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 641fbb57de92e4006a757ee6d61f1abb447b4939b9fd86ce7e4bbfcaa4e6129a3d7a48effa6bc3a6c1181aaf061824e382c6b15eba143c25b47302abcc7d84aa
|
7
|
+
data.tar.gz: db8fea6b8af4a6749a37c6cddd8ec43088bfeeb03bf16b808d9b1c900cd9a1aabe518af1de0f8b94b4980483d059119ab2f39c93929562c040f9c3e0c12ab7d8
|
data/.github/workflows/ruby.yml
CHANGED
@@ -65,7 +65,7 @@ jobs:
|
|
65
65
|
run: bundle exec rake ci
|
66
66
|
env:
|
67
67
|
RAILS_VERSION: ${{ matrix.rails_version }}
|
68
|
-
ENGINE_CART_RAILS_OPTIONS: '--skip-git --skip-listen --skip-spring --skip-keeps --skip-action-cable --skip-coffee --skip-test'
|
68
|
+
ENGINE_CART_RAILS_OPTIONS: '--skip-git --skip-listen --skip-spring --skip-keeps --skip-action-cable --skip-coffee --skip-test --skip-webpack-install --skip-javascript'
|
69
69
|
SOLR_URL: http://solr:SolrRocks@localhost:8983/solr/blacklight-core
|
70
70
|
- name: Upload coverage artifacts
|
71
71
|
uses: actions/upload-artifact@v2
|
@@ -1 +1 @@
|
|
1
|
-
@import "node_modules/ol/ol.css";
|
1
|
+
@import "../../../node_modules/ol/ol.css";
|
data/geoblacklight.gemspec
CHANGED
@@ -23,7 +23,7 @@ Gem::Specification.new do |spec|
|
|
23
23
|
spec.add_dependency "faraday", "~> 2.0"
|
24
24
|
spec.add_dependency "coderay"
|
25
25
|
spec.add_dependency "deprecation"
|
26
|
-
spec.add_dependency "geo_combine", "~> 0.
|
26
|
+
spec.add_dependency "geo_combine", "~> 0.9"
|
27
27
|
spec.add_dependency "mime-types"
|
28
28
|
spec.add_dependency "handlebars_assets"
|
29
29
|
spec.add_dependency "rgeo-geojson"
|
@@ -116,11 +116,6 @@ module Geoblacklight
|
|
116
116
|
copy_file "base.html.erb", "app/views/layouts/blacklight/base.html.erb"
|
117
117
|
end
|
118
118
|
|
119
|
-
# Vite - Copy config file
|
120
|
-
def copy_config_vite_json
|
121
|
-
copy_file "vite.json", "config/vite.json"
|
122
|
-
end
|
123
|
-
|
124
119
|
# Run bundle with vite install
|
125
120
|
def bundle_install
|
126
121
|
Bundler.with_clean_env do
|
@@ -128,5 +123,21 @@ module Geoblacklight
|
|
128
123
|
run "bundle exec vite install"
|
129
124
|
end
|
130
125
|
end
|
126
|
+
|
127
|
+
# Vite - Config files
|
128
|
+
def copy_config_vite_json
|
129
|
+
copy_file "vite.json", "config/vite.json"
|
130
|
+
copy_file "vite.rb", "config/vite.rb"
|
131
|
+
copy_file "vite.config.ts", "vite.config.ts"
|
132
|
+
copy_file "package.json", "package.json"
|
133
|
+
|
134
|
+
run "yarn install"
|
135
|
+
end
|
136
|
+
|
137
|
+
# Vite - Copy over the Vite entrypoints
|
138
|
+
def copy_vite_entrypoints
|
139
|
+
copy_file "clover.js", "app/frontend/entrypoints/clover.js"
|
140
|
+
copy_file "ol.js", "app/frontend/entrypoints/ol.js"
|
141
|
+
end
|
131
142
|
end
|
132
143
|
end
|
@@ -0,0 +1,19 @@
|
|
1
|
+
import { defineConfig } from 'vite'
|
2
|
+
import rails from 'vite-plugin-rails'
|
3
|
+
|
4
|
+
export default defineConfig({
|
5
|
+
plugins: [
|
6
|
+
rails(),
|
7
|
+
],
|
8
|
+
// GeoBlacklight: Import assets from arbitrary paths.
|
9
|
+
resolve: {
|
10
|
+
alias: {
|
11
|
+
'@gbl/': `${process.env.GBL_ASSETS_PATH}/`,
|
12
|
+
},
|
13
|
+
},
|
14
|
+
server: {
|
15
|
+
fs: {
|
16
|
+
allow: [process.env.GBL_ASSETS_PATH!],
|
17
|
+
},
|
18
|
+
},
|
19
|
+
})
|
data/lib/geoblacklight/engine.rb
CHANGED
@@ -8,33 +8,9 @@ require "geoblacklight/version"
|
|
8
8
|
require "nokogiri"
|
9
9
|
require "mime/types"
|
10
10
|
require "handlebars_assets"
|
11
|
-
require "vite_ruby"
|
12
11
|
|
13
12
|
module Geoblacklight
|
14
13
|
class Engine < ::Rails::Engine
|
15
|
-
delegate :vite_ruby, to: :class
|
16
|
-
|
17
|
-
def self.vite_ruby
|
18
|
-
@vite_ruby ||= ViteRuby.new(root: root)
|
19
|
-
end
|
20
|
-
|
21
|
-
# Expose compiled assets via Rack::Static when running in the host app.
|
22
|
-
config.app_middleware.use(Rack::Static,
|
23
|
-
urls: ["/#{vite_ruby.config.public_output_dir}"],
|
24
|
-
root: root.join(vite_ruby.config.public_dir))
|
25
|
-
|
26
|
-
initializer "vite_rails_engine.proxy" do |app|
|
27
|
-
if vite_ruby.run_proxy?
|
28
|
-
app.middleware.insert_before 0, ViteRuby::DevServerProxy, ssl_verify_none: true, vite_ruby: vite_ruby
|
29
|
-
end
|
30
|
-
end
|
31
|
-
|
32
|
-
initializer "vite_rails_engine.logger" do
|
33
|
-
config.after_initialize do
|
34
|
-
vite_ruby.logger = Rails.logger
|
35
|
-
end
|
36
|
-
end
|
37
|
-
|
38
14
|
# GeoblacklightHelper is needed by all helpers, so we inject it
|
39
15
|
# into action view base here.
|
40
16
|
initializer "geoblacklight.helpers" do
|
@@ -7,6 +7,15 @@ class TestAppGenerator < Rails::Generators::Base
|
|
7
7
|
|
8
8
|
def add_gems
|
9
9
|
gem "blacklight"
|
10
|
+
|
11
|
+
# In CI, Javascript and Webpacker are removed when generating Rails 6.x
|
12
|
+
# applications to enable Vite. Disabling javascript during test app
|
13
|
+
# generation removes Turbolinks. This gem is required and needs to be
|
14
|
+
# re-added.
|
15
|
+
if ENV["RAILS_VERSION"] && Gem::Version.new(ENV["RAILS_VERSION"]) < Gem::Version.new("7.0")
|
16
|
+
gem "turbolinks"
|
17
|
+
end
|
18
|
+
|
10
19
|
Bundler.with_clean_env do
|
11
20
|
run "bundle install"
|
12
21
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: geoblacklight
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 4.
|
4
|
+
version: 4.3.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Mike Graves
|
@@ -11,7 +11,7 @@ authors:
|
|
11
11
|
autorequire:
|
12
12
|
bindir: bin
|
13
13
|
cert_chain: []
|
14
|
-
date: 2024-
|
14
|
+
date: 2024-03-08 00:00:00.000000000 Z
|
15
15
|
dependencies:
|
16
16
|
- !ruby/object:Gem::Dependency
|
17
17
|
name: rails
|
@@ -109,14 +109,14 @@ dependencies:
|
|
109
109
|
requirements:
|
110
110
|
- - "~>"
|
111
111
|
- !ruby/object:Gem::Version
|
112
|
-
version: '0.
|
112
|
+
version: '0.9'
|
113
113
|
type: :runtime
|
114
114
|
prerelease: false
|
115
115
|
version_requirements: !ruby/object:Gem::Requirement
|
116
116
|
requirements:
|
117
117
|
- - "~>"
|
118
118
|
- !ruby/object:Gem::Version
|
119
|
-
version: '0.
|
119
|
+
version: '0.9'
|
120
120
|
- !ruby/object:Gem::Dependency
|
121
121
|
name: mime-types
|
122
122
|
requirement: !ruby/object:Gem::Requirement
|
@@ -559,7 +559,6 @@ files:
|
|
559
559
|
- app/helpers/arcgis_helper.rb
|
560
560
|
- app/helpers/blacklight_helper.rb
|
561
561
|
- app/helpers/carto_helper.rb
|
562
|
-
- app/helpers/geoblacklight/application_helper.rb
|
563
562
|
- app/helpers/geoblacklight/geoblacklight_helper_behavior.rb
|
564
563
|
- app/helpers/geoblacklight_helper.rb
|
565
564
|
- app/models/concerns/geoblacklight/bbox_filter_field.rb
|
@@ -626,9 +625,14 @@ files:
|
|
626
625
|
- lib/generators/geoblacklight/templates/assets/geoblacklight.js
|
627
626
|
- lib/generators/geoblacklight/templates/base.html.erb
|
628
627
|
- lib/generators/geoblacklight/templates/catalog_controller.rb
|
628
|
+
- lib/generators/geoblacklight/templates/clover.js
|
629
|
+
- lib/generators/geoblacklight/templates/ol.js
|
630
|
+
- lib/generators/geoblacklight/templates/package.json
|
629
631
|
- lib/generators/geoblacklight/templates/settings.gbl_v1.yml
|
630
632
|
- lib/generators/geoblacklight/templates/settings.yml
|
633
|
+
- lib/generators/geoblacklight/templates/vite.config.ts
|
631
634
|
- lib/generators/geoblacklight/templates/vite.json
|
635
|
+
- lib/generators/geoblacklight/templates/vite.rb
|
632
636
|
- lib/geoblacklight.rb
|
633
637
|
- lib/geoblacklight/bounding_box.rb
|
634
638
|
- lib/geoblacklight/constants.rb
|
@@ -905,7 +909,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
905
909
|
- !ruby/object:Gem::Version
|
906
910
|
version: 2.5.2
|
907
911
|
requirements: []
|
908
|
-
rubygems_version: 3.4.
|
912
|
+
rubygems_version: 3.4.10
|
909
913
|
signing_key:
|
910
914
|
specification_version: 4
|
911
915
|
summary: A discovery platform for geospatial holdings
|