active_material 2.1.0 → 2.1.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: 5d199f290d9505ddc520ac11343fd3dd45a174608691f30c50f6d53da7f94f81
4
- data.tar.gz: a217138c6d68dcd47787ef2f9053baac7bfa1960d829de626d66280025c3d19d
3
+ metadata.gz: 0befeef9159040b47e03da4f2d258451c580a0d9ab33b2e0c10e249e8a7ac556
4
+ data.tar.gz: 550bc54c62434b4c81b1156a7d402283f22e497051b4d47a660ae5631be40790
5
5
  SHA512:
6
- metadata.gz: 1f68d12ea2b2a4672184b69ab562593e585fd521ba939c08a4c68622c84f9f56be7522fcb628345294d924e93634cd15306b1324572bf9fc05100ac27b75ee0f
7
- data.tar.gz: e32ee1cb4376485d5fcec9878a507b841f74524e8b2938bf20f0d162218d396ee78b1d23d7b2fa1d84768922769d362f3e2740892eca6c9224d88c4a8d654313
6
+ metadata.gz: d0d4ed26ce6857b0837e759b8113e3a6f598a80b6880b79669d9303fdf3f8d320366f2618048ebead4452c0c27cf09490c704c3a0d7fa89edce07c93bcf3a2d6
7
+ data.tar.gz: 9174bfa663d0b9ae7718de7558883adc9ff8df4c82dc7195e1fa0ee7c1b5fa5dfd3e95e42c25cf872d2a75092ac4f9594614b856b067798291c3ef9d46b999e3
@@ -0,0 +1,2 @@
1
+ pin "active_material"
2
+ pin "active_material/actions-toggle"
@@ -3,10 +3,24 @@ module ActiveMaterial
3
3
  def build_active_admin_head
4
4
  within super do
5
5
  uri = URI.parse(ActiveMaterial::Rails::Engine.config.active_material.font_url)
6
- link(rel: "preconnect", href: uri.origin)
7
- link(rel: "preconnect", href: uri.origin, crossorigin: true)
6
+ origin = extract_origin(uri)
7
+
8
+ link(rel: "preconnect", href: origin)
9
+ link(rel: "preconnect", href: origin, crossorigin: true)
8
10
  link(rel: "stylesheet", href: uri.to_s)
9
11
  end
10
12
  end
13
+
14
+ private
15
+
16
+ def extract_origin(uri)
17
+ origin = "#{uri.scheme}://#{uri.host}"
18
+ origin += ":#{uri.port}" if uri.port && !default_port?(uri)
19
+ origin
20
+ end
21
+
22
+ def default_port?(uri)
23
+ (uri.scheme == 'http' && uri.port == 80) || (uri.scheme == 'https' && uri.port == 443)
24
+ end
11
25
  end
12
26
  end
@@ -1,3 +1,3 @@
1
1
  module ActiveMaterial
2
- VERSION = "2.1.0"
2
+ VERSION = "2.1.2"
3
3
  end
data/package.json ADDED
@@ -0,0 +1,23 @@
1
+ {
2
+ "name": "active_material",
3
+ "version": "2.1.1",
4
+ "description": "ActiveAdmin skin based on Google's Material Design.",
5
+ "main": "src/javascripts/active_material.js",
6
+ "directories": {
7
+ "lib": "lib"
8
+ },
9
+ "scripts": {
10
+ },
11
+ "repository": {
12
+ "type": "git",
13
+ "url": "git+https://github.com/dkniffin/active_material.git"
14
+ },
15
+ "author": "Derek Kniffin",
16
+ "license": "MIT",
17
+ "bugs": {
18
+ "url": "https://github.com/dkniffin/active_material/issues"
19
+ },
20
+ "homepage": "https://github.com/dkniffin/active_material#readme",
21
+ "dependencies": {},
22
+ "devDependencies": {}
23
+ }
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: active_material
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.1.0
4
+ version: 2.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Derek Kniffin
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2024-07-16 00:00:00.000000000 Z
11
+ date: 2024-08-07 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -130,9 +130,11 @@ files:
130
130
  - app/assets/stylesheets/active_material/values/elevation.scss
131
131
  - app/assets/stylesheets/active_material/values/fonts.scss
132
132
  - app/assets/stylesheets/active_material/values/units.scss
133
+ - config/importmap.rb
133
134
  - lib/active_material.rb
134
135
  - lib/active_material/font_loader.rb
135
136
  - lib/active_material/version.rb
137
+ - package.json
136
138
  homepage: ''
137
139
  licenses:
138
140
  - MIT