shimmer 0.0.43 → 0.0.45
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 +4 -4
- data/.editorconfig +1 -1
- data/.rubocop.yml +2 -0
- data/Gemfile.lock +58 -53
- data/README.md +4 -2
- data/config/rubocop_base.yml +4 -0
- data/config/rubocop_extensions/graphql.yml +1 -1
- data/config/rubocop_extensions/rails.yml +1 -1
- data/config/rubocop_extensions/{rspec.yml → rspec-core.yml} +6 -1
- data/lib/shimmer/utils/remote_navigation.rb +2 -2
- data/lib/shimmer/version.rb +1 -1
- data/src/popover.ts +19 -3
- metadata +3 -3
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 292b3d394b60578890364b1d2b98d8d65b23646eaf4a3afb8c4fd8c36fb7e904
|
|
4
|
+
data.tar.gz: d033a360d6654b7dcf2c275ae18efd2ecff648f8fcbc498699c021cb45d52f0a
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: ca7b1a479efc40a6bfffb5cbf76f8ba963aadc6106bfdc9523d430cbb971550e26b5401006347e09c968841c6445957afced348e6de226db289fe8be801ca5d0
|
|
7
|
+
data.tar.gz: a391ee8791405d1f3907d300705f252981805188af2c02b606f272eaefc2655d839c470ee94244424e6e8d72e46bff870e077479e7de6a729cd8292b332d1077
|
data/.editorconfig
CHANGED
data/.rubocop.yml
CHANGED
data/Gemfile.lock
CHANGED
|
@@ -76,15 +76,15 @@ GEM
|
|
|
76
76
|
minitest (>= 5.1)
|
|
77
77
|
securerandom (>= 0.3)
|
|
78
78
|
tzinfo (~> 2.0, >= 2.0.5)
|
|
79
|
-
addressable (2.
|
|
80
|
-
public_suffix (>= 2.0.2, <
|
|
79
|
+
addressable (2.9.0)
|
|
80
|
+
public_suffix (>= 2.0.2, < 8.0)
|
|
81
81
|
annotate (3.2.0)
|
|
82
82
|
activerecord (>= 3.2, < 8.0)
|
|
83
83
|
rake (>= 10.4, < 14.0)
|
|
84
|
-
ast (2.4.
|
|
84
|
+
ast (2.4.3)
|
|
85
85
|
awesome_print (1.9.2)
|
|
86
|
-
base64 (0.
|
|
87
|
-
bigdecimal (
|
|
86
|
+
base64 (0.3.0)
|
|
87
|
+
bigdecimal (4.1.2)
|
|
88
88
|
bindex (0.8.1)
|
|
89
89
|
bootsnap (1.18.4)
|
|
90
90
|
msgpack (~> 1.2)
|
|
@@ -98,12 +98,12 @@ GEM
|
|
|
98
98
|
rack-test (>= 0.6.3)
|
|
99
99
|
regexp_parser (>= 1.5, < 3.0)
|
|
100
100
|
xpath (~> 3.2)
|
|
101
|
-
capybara-playwright-driver (0.5.
|
|
101
|
+
capybara-playwright-driver (0.5.9)
|
|
102
102
|
addressable
|
|
103
103
|
capybara
|
|
104
104
|
playwright-ruby-client (>= 1.16.0)
|
|
105
|
-
concurrent-ruby (1.3.
|
|
106
|
-
connection_pool (
|
|
105
|
+
concurrent-ruby (1.3.6)
|
|
106
|
+
connection_pool (3.0.2)
|
|
107
107
|
crass (1.0.6)
|
|
108
108
|
cssbundling-rails (1.4.1)
|
|
109
109
|
railties (>= 6.0.0)
|
|
@@ -116,15 +116,12 @@ GEM
|
|
|
116
116
|
dotenv-rails (3.1.4)
|
|
117
117
|
dotenv (= 3.1.4)
|
|
118
118
|
railties (>= 6.1)
|
|
119
|
-
drb (2.2.
|
|
119
|
+
drb (2.2.3)
|
|
120
120
|
erubi (1.13.0)
|
|
121
|
-
ffi (1.17.0
|
|
122
|
-
ffi (1.17.0-arm64-darwin)
|
|
123
|
-
ffi (1.17.0-x86_64-darwin)
|
|
124
|
-
ffi (1.17.0-x86_64-linux-gnu)
|
|
121
|
+
ffi (1.17.0)
|
|
125
122
|
globalid (1.2.1)
|
|
126
123
|
activesupport (>= 6.1)
|
|
127
|
-
i18n (1.14.
|
|
124
|
+
i18n (1.14.8)
|
|
128
125
|
concurrent-ruby (~> 1.0)
|
|
129
126
|
image_processing (1.13.0)
|
|
130
127
|
mini_magick (>= 4.9.5, < 5)
|
|
@@ -138,10 +135,10 @@ GEM
|
|
|
138
135
|
activesupport (>= 5.0.0)
|
|
139
136
|
jsbundling-rails (1.3.1)
|
|
140
137
|
railties (>= 6.0.0)
|
|
141
|
-
json (2.
|
|
142
|
-
language_server-protocol (3.17.0.
|
|
138
|
+
json (2.19.8)
|
|
139
|
+
language_server-protocol (3.17.0.5)
|
|
143
140
|
lint_roller (1.1.0)
|
|
144
|
-
logger (1.
|
|
141
|
+
logger (1.7.0)
|
|
145
142
|
loofah (2.22.0)
|
|
146
143
|
crass (~> 1.0.2)
|
|
147
144
|
nokogiri (>= 1.12.0)
|
|
@@ -151,14 +148,15 @@ GEM
|
|
|
151
148
|
net-pop
|
|
152
149
|
net-smtp
|
|
153
150
|
marcel (1.0.4)
|
|
154
|
-
matrix (0.4.
|
|
155
|
-
mime-types (3.
|
|
151
|
+
matrix (0.4.3)
|
|
152
|
+
mime-types (3.7.0)
|
|
156
153
|
logger
|
|
157
|
-
mime-types-data (~> 3.
|
|
158
|
-
mime-types-data (3.
|
|
154
|
+
mime-types-data (~> 3.2025, >= 3.2025.0507)
|
|
155
|
+
mime-types-data (3.2026.0414)
|
|
159
156
|
mini_magick (4.13.2)
|
|
160
157
|
mini_mime (1.1.5)
|
|
161
|
-
|
|
158
|
+
mini_portile2 (2.8.9)
|
|
159
|
+
minitest (5.27.0)
|
|
162
160
|
msgpack (1.7.3)
|
|
163
161
|
net-imap (0.5.0)
|
|
164
162
|
date
|
|
@@ -170,19 +168,20 @@ GEM
|
|
|
170
168
|
net-smtp (0.5.0)
|
|
171
169
|
net-protocol
|
|
172
170
|
nio4r (2.7.3)
|
|
173
|
-
nokogiri (1.
|
|
171
|
+
nokogiri (1.19.3-aarch64-linux-gnu)
|
|
174
172
|
racc (~> 1.4)
|
|
175
|
-
nokogiri (1.
|
|
173
|
+
nokogiri (1.19.3-arm64-darwin)
|
|
176
174
|
racc (~> 1.4)
|
|
177
|
-
nokogiri (1.
|
|
175
|
+
nokogiri (1.19.3-x86_64-darwin)
|
|
178
176
|
racc (~> 1.4)
|
|
179
|
-
nokogiri (1.
|
|
177
|
+
nokogiri (1.19.3-x86_64-linux-gnu)
|
|
180
178
|
racc (~> 1.4)
|
|
181
|
-
parallel (1.
|
|
182
|
-
parser (3.3.
|
|
179
|
+
parallel (1.28.0)
|
|
180
|
+
parser (3.3.11.1)
|
|
183
181
|
ast (~> 2.4.1)
|
|
184
182
|
racc
|
|
185
|
-
playwright-ruby-client (1.
|
|
183
|
+
playwright-ruby-client (1.59.1)
|
|
184
|
+
base64
|
|
186
185
|
concurrent-ruby (>= 1.1.6)
|
|
187
186
|
mime-types (>= 3.0)
|
|
188
187
|
prism (1.2.0)
|
|
@@ -193,14 +192,14 @@ GEM
|
|
|
193
192
|
railties (>= 7.0.0)
|
|
194
193
|
psych (5.1.2)
|
|
195
194
|
stringio
|
|
196
|
-
public_suffix (
|
|
195
|
+
public_suffix (7.0.5)
|
|
197
196
|
puma (6.4.3)
|
|
198
197
|
nio4r (~> 2.0)
|
|
199
198
|
racc (1.8.1)
|
|
200
|
-
rack (3.1.
|
|
199
|
+
rack (3.1.21)
|
|
201
200
|
rack-session (2.0.0)
|
|
202
201
|
rack (>= 3.0.0)
|
|
203
|
-
rack-test (2.
|
|
202
|
+
rack-test (2.2.0)
|
|
204
203
|
rack (>= 1.3)
|
|
205
204
|
rack_session_access (0.2.0)
|
|
206
205
|
builder (>= 2.0.0)
|
|
@@ -243,7 +242,7 @@ GEM
|
|
|
243
242
|
logger
|
|
244
243
|
rdoc (6.7.0)
|
|
245
244
|
psych (>= 4.0.0)
|
|
246
|
-
regexp_parser (2.
|
|
245
|
+
regexp_parser (2.12.0)
|
|
247
246
|
reline (0.5.10)
|
|
248
247
|
io-console (~> 0.5)
|
|
249
248
|
rspec-core (3.13.2)
|
|
@@ -265,30 +264,34 @@ GEM
|
|
|
265
264
|
rspec-retry (0.6.2)
|
|
266
265
|
rspec-core (> 3.3)
|
|
267
266
|
rspec-support (3.13.1)
|
|
268
|
-
rubocop (1.
|
|
267
|
+
rubocop (1.74.0)
|
|
269
268
|
json (~> 2.3)
|
|
270
|
-
language_server-protocol (
|
|
269
|
+
language_server-protocol (~> 3.17.0.2)
|
|
270
|
+
lint_roller (~> 1.1.0)
|
|
271
271
|
parallel (~> 1.10)
|
|
272
272
|
parser (>= 3.3.0.2)
|
|
273
273
|
rainbow (>= 2.2.2, < 4.0)
|
|
274
|
-
regexp_parser (>= 2.
|
|
275
|
-
rubocop-ast (>= 1.
|
|
274
|
+
regexp_parser (>= 2.9.3, < 3.0)
|
|
275
|
+
rubocop-ast (>= 1.38.0, < 2.0)
|
|
276
276
|
ruby-progressbar (~> 1.7)
|
|
277
|
-
unicode-display_width (>= 2.4.0, <
|
|
278
|
-
rubocop-ast (1.
|
|
279
|
-
parser (>= 3.3.
|
|
277
|
+
unicode-display_width (>= 2.4.0, < 4.0)
|
|
278
|
+
rubocop-ast (1.42.0)
|
|
279
|
+
parser (>= 3.3.7.2)
|
|
280
280
|
rubocop-performance (1.22.1)
|
|
281
281
|
rubocop (>= 1.48.1, < 2.0)
|
|
282
282
|
rubocop-ast (>= 1.31.1, < 2.0)
|
|
283
|
-
rubocop-rails (2.
|
|
283
|
+
rubocop-rails (2.30.3)
|
|
284
284
|
activesupport (>= 4.2.0)
|
|
285
|
+
lint_roller (~> 1.1)
|
|
285
286
|
rack (>= 1.1)
|
|
286
|
-
rubocop (>= 1.
|
|
287
|
-
rubocop-ast (>= 1.
|
|
288
|
-
rubocop-rake (0.
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
287
|
+
rubocop (>= 1.72.1, < 2.0)
|
|
288
|
+
rubocop-ast (>= 1.38.0, < 2.0)
|
|
289
|
+
rubocop-rake (0.7.1)
|
|
290
|
+
lint_roller (~> 1.1)
|
|
291
|
+
rubocop (>= 1.72.1)
|
|
292
|
+
rubocop-rspec (3.7.0)
|
|
293
|
+
lint_roller (~> 1.1)
|
|
294
|
+
rubocop (~> 1.72, >= 1.72.1)
|
|
292
295
|
ruby-lsp (0.20.1)
|
|
293
296
|
language_server-protocol (~> 3.17.0)
|
|
294
297
|
prism (>= 1.2, < 2.0)
|
|
@@ -300,7 +303,7 @@ GEM
|
|
|
300
303
|
ruby-vips (2.2.2)
|
|
301
304
|
ffi (~> 1.12)
|
|
302
305
|
logger
|
|
303
|
-
securerandom (0.
|
|
306
|
+
securerandom (0.4.1)
|
|
304
307
|
slim (5.2.1)
|
|
305
308
|
temple (~> 0.10.0)
|
|
306
309
|
tilt (>= 2.1.0)
|
|
@@ -309,10 +312,8 @@ GEM
|
|
|
309
312
|
railties (>= 3.1)
|
|
310
313
|
slim (>= 3.0, < 6.0, != 5.0.0)
|
|
311
314
|
sorbet-runtime (0.5.11611)
|
|
312
|
-
sqlite3 (2.1.1
|
|
313
|
-
|
|
314
|
-
sqlite3 (2.1.1-x86_64-darwin)
|
|
315
|
-
sqlite3 (2.1.1-x86_64-linux-gnu)
|
|
315
|
+
sqlite3 (2.1.1)
|
|
316
|
+
mini_portile2 (~> 2.8.0)
|
|
316
317
|
standard (1.35.0.1)
|
|
317
318
|
language_server-protocol (~> 3.17.0.2)
|
|
318
319
|
lint_roller (~> 1.0)
|
|
@@ -337,7 +338,9 @@ GEM
|
|
|
337
338
|
railties (>= 6.0.0)
|
|
338
339
|
tzinfo (2.0.6)
|
|
339
340
|
concurrent-ruby (~> 1.0)
|
|
340
|
-
unicode-display_width (2.
|
|
341
|
+
unicode-display_width (3.2.0)
|
|
342
|
+
unicode-emoji (~> 4.1)
|
|
343
|
+
unicode-emoji (4.2.0)
|
|
341
344
|
useragent (0.16.10)
|
|
342
345
|
web-console (4.2.1)
|
|
343
346
|
actionview (>= 6.0.0)
|
|
@@ -355,6 +358,8 @@ GEM
|
|
|
355
358
|
PLATFORMS
|
|
356
359
|
aarch64-linux
|
|
357
360
|
arm64-darwin-22
|
|
361
|
+
arm64-darwin-23
|
|
362
|
+
arm64-darwin-25
|
|
358
363
|
x86_64-darwin-22
|
|
359
364
|
x86_64-linux
|
|
360
365
|
|
data/README.md
CHANGED
|
@@ -121,9 +121,9 @@ $sizes: (
|
|
|
121
121
|
- **Desktop**: 890px
|
|
122
122
|
- **Widescreen**: 1280px
|
|
123
123
|
|
|
124
|
-
###
|
|
124
|
+
### RuboCop Base Configuration
|
|
125
125
|
|
|
126
|
-
_Shimmer_ offers an opiniated
|
|
126
|
+
_Shimmer_ offers an opiniated _RuboCop_ base configuration. This configuration inherits itself from _StandardRB_ and aims at remaining as close to it as possible. Why not only use _StandardRB_, since it is so fast and prevents bikeshedding? Well, sadly it does not solve all problems and using _RuboCop_ still integrates a lot easier in most toolsets. However, the idea is to still prevent bikeshedding our _RuboCop_ configuration by making sure that every exception to what's configured in _StandardRB_ is justified (with a comment over its configuration block in `./config/rubocop_base.yml`), reviewed, debated, and agreed upon before being merged.
|
|
127
127
|
|
|
128
128
|
#### Use Shared Configuration In Projects
|
|
129
129
|
|
|
@@ -136,6 +136,8 @@ inherit_gem:
|
|
|
136
136
|
|
|
137
137
|
Then, if there are specific cops you want to use in the specific project you are working on, you still can easily add them. But at least, the base configuration is shared between projects and is itself as close to _StandardRB_ as possible.
|
|
138
138
|
|
|
139
|
+
Since _Shimmer_ uses the newer plugin syntax to load extensions (refer to [the documentation](https://docs.rubocop.org/rubocop/latest/plugins.html)), gems that use _Shimmer_ must depend on _RuboCop_ 1.72 or later.
|
|
140
|
+
|
|
139
141
|
### Static File Serving
|
|
140
142
|
|
|
141
143
|
`ActiveStorage` is great, but serving of files, especially behind a CDN, can be complicated to get right. Shimmer has your back.
|
data/config/rubocop_base.yml
CHANGED
|
@@ -10,6 +10,10 @@ require:
|
|
|
10
10
|
inherit_gem:
|
|
11
11
|
standard: config/base.yml
|
|
12
12
|
|
|
13
|
+
# Name the memoization instance variable the same as the enclosing method.
|
|
14
|
+
Naming/MemoizedInstanceVariableName:
|
|
15
|
+
Enabled: true
|
|
16
|
+
|
|
13
17
|
# String literals should never be mutable.
|
|
14
18
|
Style/FrozenStringLiteralComment:
|
|
15
19
|
Enabled: true
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
plugins:
|
|
2
2
|
- rubocop-rspec
|
|
3
3
|
|
|
4
4
|
RSpec:
|
|
@@ -70,6 +70,11 @@ RSpec/ExampleWording:
|
|
|
70
70
|
RSpec/ExcessiveDocstringSpacing:
|
|
71
71
|
Enabled: true
|
|
72
72
|
|
|
73
|
+
# Force block style for change expectatinos.
|
|
74
|
+
RSpec/ExpectChange:
|
|
75
|
+
Enabled: true
|
|
76
|
+
EnforcedStyle: block
|
|
77
|
+
|
|
73
78
|
# Do stdout expectations right.
|
|
74
79
|
RSpec/ExpectOutput:
|
|
75
80
|
Enabled: true
|
|
@@ -33,8 +33,8 @@ module Shimmer
|
|
|
33
33
|
end
|
|
34
34
|
|
|
35
35
|
helper_method :popover_path
|
|
36
|
-
def popover_path(url, id: nil, selector: nil, placement: nil)
|
|
37
|
-
"javascript:ui.popover.open(#{{url: url, id: id, selector: selector, placement: placement}.compact.to_json})"
|
|
36
|
+
def popover_path(url, id: nil, selector: nil, placement: nil, class_name: nil)
|
|
37
|
+
"javascript:ui.popover.open(#{{url: url, id: id, selector: selector, placement: placement, className: class_name}.compact.to_json})"
|
|
38
38
|
end
|
|
39
39
|
|
|
40
40
|
def shimmer_request?
|
data/lib/shimmer/version.rb
CHANGED
data/src/popover.ts
CHANGED
|
@@ -6,6 +6,7 @@ export interface PopoverOptions {
|
|
|
6
6
|
url: string;
|
|
7
7
|
selector?: HTMLElement | string;
|
|
8
8
|
placement?: Placement;
|
|
9
|
+
className?: string;
|
|
9
10
|
}
|
|
10
11
|
|
|
11
12
|
export class PopoverPresenter {
|
|
@@ -43,7 +44,12 @@ export class Popover {
|
|
|
43
44
|
private popper?: Popper;
|
|
44
45
|
private popoverDiv?: HTMLDivElement;
|
|
45
46
|
|
|
46
|
-
async open({
|
|
47
|
+
async open({
|
|
48
|
+
url,
|
|
49
|
+
selector,
|
|
50
|
+
placement,
|
|
51
|
+
className,
|
|
52
|
+
}: PopoverOptions): Promise<void> {
|
|
47
53
|
const root =
|
|
48
54
|
typeof selector === "string"
|
|
49
55
|
? document.querySelector(selector)
|
|
@@ -51,11 +57,15 @@ export class Popover {
|
|
|
51
57
|
if (!root) {
|
|
52
58
|
return;
|
|
53
59
|
}
|
|
54
|
-
|
|
60
|
+
|
|
61
|
+
const popoverClassName = ["popover", "popover--loading"];
|
|
62
|
+
if (className) {
|
|
63
|
+
popoverClassName.push(className);
|
|
64
|
+
}
|
|
65
|
+
const popoverDiv = createElement(document.body, popoverClassName.join(" "));
|
|
55
66
|
const arrow = createElement(popoverDiv, "popover__arrow");
|
|
56
67
|
arrow.setAttribute("data-popper-arrow", "true");
|
|
57
68
|
const content = createElement(popoverDiv, "popover__content");
|
|
58
|
-
content.innerHTML = await getHTML(url);
|
|
59
69
|
this.popper = createPopper(root, popoverDiv, {
|
|
60
70
|
placement: placement ?? "auto",
|
|
61
71
|
modifiers: [
|
|
@@ -68,7 +78,13 @@ export class Popover {
|
|
|
68
78
|
],
|
|
69
79
|
});
|
|
70
80
|
this.popoverDiv = popoverDiv;
|
|
81
|
+
|
|
71
82
|
document.addEventListener("click", this.clickOutside);
|
|
83
|
+
|
|
84
|
+
const response = await getHTML(url);
|
|
85
|
+
content.innerHTML = response;
|
|
86
|
+
popoverDiv.classList.remove("popover--loading");
|
|
87
|
+
this.popper?.update();
|
|
72
88
|
}
|
|
73
89
|
|
|
74
90
|
async close(): Promise<void> {
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: shimmer
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.0.
|
|
4
|
+
version: 0.0.45
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Jens Ravens
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: exe
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date:
|
|
11
|
+
date: 2026-06-03 00:00:00.000000000 Z
|
|
12
12
|
dependencies: []
|
|
13
13
|
description:
|
|
14
14
|
email:
|
|
@@ -47,7 +47,7 @@ files:
|
|
|
47
47
|
- config/rubocop_base.yml
|
|
48
48
|
- config/rubocop_extensions/graphql.yml
|
|
49
49
|
- config/rubocop_extensions/rails.yml
|
|
50
|
-
- config/rubocop_extensions/rspec.yml
|
|
50
|
+
- config/rubocop_extensions/rspec-core.yml
|
|
51
51
|
- lib/shimmer.rb
|
|
52
52
|
- lib/shimmer/auth.rb
|
|
53
53
|
- lib/shimmer/auth/apple_provider.rb
|