svelte-on-rails 22.5.3 → 22.5.4

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 956d441cb147f816e089c8d524941dbce2fea72cdb90917054d3e01af43fdd04
4
- data.tar.gz: bca954afa4a9a82b211ee76636abbef038dd2a7ae2bd951df82644a460515bd6
3
+ metadata.gz: 1a6a1c4758093d4ee7080494a52d0a3709728dc830b7f0c261841363100ea593
4
+ data.tar.gz: 18d316a0a47d9c780d3169acd3edc525f4a097864302182b1398173ffd26aba7
5
5
  SHA512:
6
- metadata.gz: 9caf26fece953877f1fe2dcf82592553d391732acdeb0775e9d0f520a739758c561b5b454bb51c109a75a8abfb87aab1cc1711aed8e72a4917a98d2544bf0ec1
7
- data.tar.gz: f8a37fd78306cb4755813c7ce783e97c77be4833894b2b226783077c36fa694136459cca27e4755243fe03c372dd919bf7d3a2cf9805fd7e43392f3439a395c6
6
+ metadata.gz: af06be9fb96620f83701d90eb2745dc551329f25b1fceedf55e02f42150361f4d491b0ae5fb1279639761449a08dbab73861711c6776178d294bc84343f012c9
7
+ data.tar.gz: c8c362043c2872cb7b4bf8b89de643daca6accfca5d5d7937ed726f3f49dea6babe3b5501c43a9c497be5eb843b4195832b0cf1a97e3e856d9e836605a3feda6
@@ -33,7 +33,7 @@ module SvelteOnRails
33
33
  @socket_namespace = [
34
34
  "svelte",
35
35
  Rails.application.class.module_parent_name[0..15],
36
- SsrClientControlChannel.short_env
36
+ Rails.env
37
37
  ].join("-")
38
38
  @socket_path = socket_path_fresh
39
39
 
@@ -453,13 +453,13 @@ module SvelteOnRails
453
453
  # Sits next to the SSR socket in tmp/sockets, or in the /tmp/svelte
454
454
  # fallback directory when Rails.root pushes total length over 103 chars.
455
455
  def self.socket_path
456
- primary = Rails.root.join("tmp", "sockets", "svelte-ctl-#{short_env}.sock")
456
+ primary = Rails.root.join("tmp", "sockets", "svelte-ctl-#{Rails.env}.sock")
457
457
  if primary.to_s.length <= 103
458
458
  FileUtils.mkdir_p(File.dirname(primary))
459
459
  return primary
460
460
  end
461
461
 
462
- Pathname.new("/tmp/svelte-#{short_env}-ctl-#{Digest::XXH64.hexdigest(Rails.root.to_s)}.sock")
462
+ Pathname.new("/tmp/svelte-#{Rails.env}-ctl-#{Digest::XXH64.hexdigest(Rails.root.to_s)}.sock")
463
463
  end
464
464
 
465
465
  # enable communication by rake task for admin purposes
@@ -527,20 +527,6 @@ module SvelteOnRails
527
527
 
528
528
  end
529
529
 
530
- def self.short_env
531
-
532
- name = Rails.env.to_s
533
-
534
- short = {
535
- "development" => "dev",
536
- "production" => "prod",
537
- "staging" => "stage",
538
- }[name]
539
-
540
- return name unless short
541
- return name if Rails.root.join("config", "environments", "#{short}.rb").exist?
542
- short
543
- end
544
530
  end
545
531
 
546
532
  class SsrError < StandardError; end
@@ -70,7 +70,7 @@ namespace :svelte_on_rails do
70
70
 
71
71
  namespace :ssr_client do
72
72
 
73
- desc 'For development: to simulate when a client did not start on deploy (Then, on the first request of a svelte component - if not cached! - it must start)'
73
+ desc 'For development(and only ONE WORKER! for multiple puma workers it doesnt work!): to simulate when a client did not start on deploy (Then, on the first request of a svelte component - if not cached! - it must start)'
74
74
  task :stop do
75
75
  r = get_from_ssr_client(:stop)
76
76
  if r['success']
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: svelte-on-rails
3
3
  version: !ruby/object:Gem::Version
4
- version: 22.5.3
4
+ version: 22.5.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Christian Sedlmair