hotwire-spark 0.1.8 → 0.1.9

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,4 +1,3 @@
1
- import { Application } from "@hotwired/stimulus"
2
1
  import { log } from "../logger.js"
3
2
  import { cacheBustedUrl, reloadHtmlDocument } from "../helpers.js"
4
3
 
@@ -11,7 +10,7 @@ export class StimulusReloader {
11
10
  constructor(document, filePattern = /./) {
12
11
  this.document = document
13
12
  this.filePattern = filePattern
14
- this.application = window.Stimulus || Application.start()
13
+ this.application = window.Stimulus
15
14
  }
16
15
 
17
16
  async reload() {
@@ -1,5 +1,5 @@
1
1
  class Hotwire::Spark::ActionCable::Server < ActionCable::Server::Base
2
- def initialize(config: nil)
2
+ def initialize
3
3
  config = ::ActionCable::Server::Base.config.dup
4
4
  config.connection_class = -> { ::ActionCable::Connection::Base }
5
5
  super(config: config)
@@ -18,6 +18,10 @@ module Hotwire::Spark
18
18
  end
19
19
  end
20
20
 
21
+ initializer "hotwire_spark.assets" do |application|
22
+ application.config.assets.precompile << "hotwire_spark.js"
23
+ end
24
+
21
25
  initializer "hotwire_spark.install" do |application|
22
26
  Hotwire::Spark.install_into application if Hotwire::Spark.enabled?
23
27
  end
@@ -1,6 +1,4 @@
1
1
  class Hotwire::Spark::Installer
2
- attr_reader :file_watcher
3
-
4
2
  def initialize(application)
5
3
  @application = application
6
4
  end
@@ -11,10 +9,6 @@ class Hotwire::Spark::Installer
11
9
  monitor_paths
12
10
  end
13
11
 
14
- def configure_middleware
15
- middleware.use Hotwire::Spark::Middleware
16
- end
17
-
18
12
  private
19
13
  attr_reader :application
20
14
  delegate :middleware, to: :application
@@ -25,6 +19,10 @@ class Hotwire::Spark::Installer
25
19
  end
26
20
  end
27
21
 
22
+ def configure_middleware
23
+ middleware.use Hotwire::Spark::Middleware
24
+ end
25
+
28
26
  def monitor_paths
29
27
  register_monitored_paths
30
28
  file_watcher.start
@@ -1,5 +1,5 @@
1
1
  module Hotwire
2
2
  module Spark
3
- VERSION = "0.1.8"
3
+ VERSION = "0.1.9"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: hotwire-spark
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.8
4
+ version: 0.1.9
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jorge Manrubia
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2024-12-21 00:00:00.000000000 Z
11
+ date: 2024-12-22 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails
@@ -142,13 +142,13 @@ files:
142
142
  - lib/hotwire/spark/middleware.rb
143
143
  - lib/hotwire/spark/version.rb
144
144
  - lib/tasks/hotwire_spark_tasks.rake
145
- homepage: https://github.com/basecamp/hotwire_spark
145
+ homepage: https://github.com/hotwired/spark
146
146
  licenses:
147
147
  - MIT
148
148
  metadata:
149
- homepage_uri: https://github.com/basecamp/hotwire_spark
150
- source_code_uri: https://github.com/basecamp/hotwire_spark
151
- changelog_uri: https://github.com/basecamp/hotwire_spark
149
+ homepage_uri: https://github.com/hotwired/spark
150
+ source_code_uri: https://github.com/hotwired/spark
151
+ changelog_uri: https://github.com/hotwired/spark
152
152
  post_install_message:
153
153
  rdoc_options: []
154
154
  require_paths: