rails_live_reload 0.3.4 → 0.3.6

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: 9719946dc13f20a304dd1d9c70238c2219252bd2a4c1b012bdb66f5c8ed1f8f0
4
- data.tar.gz: 843756b9a273ddd189eff2ac6f77b0e44535d4b261e098bb70a9c900bb2e9287
3
+ metadata.gz: fe3a0f4113f0b1bab7c56e466d40a55e4d6c730a1a5403a81b395c4acec6851b
4
+ data.tar.gz: 46b451a628be2d0d4c653aed136b93b855259ae897e696e5b85964f4b9338677
5
5
  SHA512:
6
- metadata.gz: 0bf3875244b09962a7da0a1269853215365a57b9ce22b29a09332e43a538b2483f96287480c345a455a7b3d83b63200cb3b2ea34e0cbfa015d8697ef154a446a
7
- data.tar.gz: 54a32215cdb6ae7c7811f46a6b6452aa5e86d9470d4d01732c10469ea5354197e5539806c9d703a67da391a39471a1c78025c9b4d28266c97cd68db4cf60dade
6
+ metadata.gz: 17c3e1f2ad82ba341f7aaa5b447bb0857e325e07ad1b9076685349a5183811830c398cdac54f35aa29a734cdbe0c1f43f06f608001dffef8ed97a4b48f3bbdf2
7
+ data.tar.gz: '0585b2eddb81b8aec7510eed21a080ef97daf21300ed64cac6c8e9b5ffaa5b8df2e6c98564a49cd5eec990882a95e31e4866c5e82816fd22a65f109eecad2f79'
data/README.md CHANGED
@@ -41,24 +41,14 @@ $ bundle
41
41
 
42
42
  ## Configuration
43
43
 
44
- ### Create initializer `config/initializers/rails_live_reload.rb`:
44
+ run command:
45
45
 
46
46
 
47
- ```ruby
48
- RailsLiveReload.configure do |config|
49
- # config.url = "/rails/live/reload"
50
-
51
- # Default watched folders & files
52
- # config.watch %r{app/views/.+\.(erb|haml|slim)$}
53
- # config.watch %r{(app|vendor)/(assets|javascript)/\w+/(.+\.(css|js|html|png|jpg|ts|jsx)).*}, reload: :always
54
-
55
- # More examples:
56
- # config.watch %r{app/helpers/.+\.rb}, reload: :always
57
- # config.watch %r{config/locales/.+\.yml}, reload: :always
58
-
59
- # config.enabled = Rails.env.development?
60
- end if defined?(RailsLiveReload)
47
+ ```bash
48
+ rails generate rails_live_reload:install
61
49
  ```
50
+ The generator will install an initializer which describes `RailsLiveReload` configuration options.
51
+
62
52
 
63
53
  ## How it works
64
54
 
@@ -76,6 +66,9 @@ The default configuration assumes that you either use asset pipeline, or that yo
76
66
 
77
67
  You are welcome to contribute. See list of `TODO's` below.
78
68
 
69
+ [<img src="https://opensource-heroes.com/svg/embed/railsjazz/rails_live_reload"
70
+ />](https://opensource-heroes.com/svg/embed/railsjazz/rails_live_reload)
71
+
79
72
  ## TODO
80
73
 
81
74
  - reload CSS without reloading the whole page?
@@ -0,0 +1,11 @@
1
+ require 'rails/generators'
2
+
3
+ module RailsLiveReload
4
+ class InstallGenerator < Rails::Generators::Base
5
+ source_root File.expand_path("../../templates", __FILE__)
6
+
7
+ def copy_initializer
8
+ template "rails_live_reload.rb", "config/initializers/rails_live_reload.rb"
9
+ end
10
+ end
11
+ end
@@ -0,0 +1,15 @@
1
+ # frozen_string_literal: true
2
+
3
+ RailsLiveReload.configure do |config|
4
+ # config.url = "/rails/live/reload"
5
+
6
+ # Default watched folders & files
7
+ # config.watch %r{app/views/.+\.(erb|haml|slim)$}
8
+ # config.watch %r{(app|vendor)/(assets|javascript)/\w+/(.+\.(css|js|html|png|jpg|ts|jsx)).*}, reload: :always
9
+
10
+ # More examples:
11
+ # config.watch %r{app/helpers/.+\.rb}, reload: :always
12
+ # config.watch %r{config/locales/.+\.yml}, reload: :always
13
+
14
+ # config.enabled = Rails.env.development?
15
+ end if defined?(RailsLiveReload)
@@ -1,6 +1,6 @@
1
1
  module RailsLiveReload
2
2
  class Railtie < ::Rails::Engine
3
- if RailsLiveReload.enabled? && defined?(::Rails::Server)
3
+ if RailsLiveReload.enabled? && (defined?(::Rails::Server) || ENV['SERVER_PROCESS'])
4
4
  initializer "rails_live_reload.middleware" do |app|
5
5
  if ::Rails::VERSION::MAJOR.to_i >= 5
6
6
  app.middleware.insert_after ActionDispatch::Executor, RailsLiveReload::Middleware::Base
@@ -1,5 +1,5 @@
1
1
  /*!
2
- Rails Live Reload 0.3.4
2
+ Rails Live Reload 0.3.6
3
3
  Copyright © 2023 RailsJazz
4
4
  https://railsjazz.com
5
5
  */
@@ -1,3 +1,3 @@
1
1
  module RailsLiveReload
2
- VERSION = "0.3.4"
2
+ VERSION = "0.3.6"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rails_live_reload
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.4
4
+ version: 0.3.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Igor Kasyanchuk
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2023-04-22 00:00:00.000000000 Z
12
+ date: 2024-03-04 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: railties
@@ -93,6 +93,8 @@ files:
93
93
  - MIT-LICENSE
94
94
  - README.md
95
95
  - Rakefile
96
+ - lib/generators/rails_live_reload/install_generator.rb
97
+ - lib/generators/templates/rails_live_reload.rb
96
98
  - lib/rails_live_reload.rb
97
99
  - lib/rails_live_reload/checker.rb
98
100
  - lib/rails_live_reload/command.rb
@@ -131,7 +133,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
131
133
  - !ruby/object:Gem::Version
132
134
  version: '0'
133
135
  requirements: []
134
- rubygems_version: 3.4.8
136
+ rubygems_version: 3.5.4
135
137
  signing_key:
136
138
  specification_version: 4
137
139
  summary: Ruby on Rails Live Reload