react_on_rails 15.0.0.rc.2 → 16.0.0
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/CHANGELOG.md +65 -36
- data/CLAUDE.md +90 -0
- data/CODING_AGENTS.md +312 -0
- data/CONTRIBUTING.md +378 -3
- data/Gemfile.lock +2 -1
- data/LICENSE.md +16 -4
- data/LICENSES/README.md +14 -0
- data/REACT-ON-RAILS-PRO-LICENSE.md +129 -0
- data/README.md +2 -2
- data/TODO.md +135 -0
- data/eslint.config.ts +2 -0
- data/lib/generators/USAGE +4 -5
- data/lib/generators/react_on_rails/base_generator.rb +263 -57
- data/lib/generators/react_on_rails/bin/dev +38 -22
- data/lib/generators/react_on_rails/dev_tests_generator.rb +1 -0
- data/lib/generators/react_on_rails/generator_helper.rb +31 -1
- data/lib/generators/react_on_rails/generator_messages.rb +138 -17
- data/lib/generators/react_on_rails/install_generator.rb +222 -20
- data/lib/generators/react_on_rails/react_no_redux_generator.rb +6 -5
- data/lib/generators/react_on_rails/react_with_redux_generator.rb +37 -13
- data/lib/generators/react_on_rails/templates/base/base/Procfile.dev +5 -0
- data/lib/generators/react_on_rails/templates/base/base/Procfile.dev-prod-assets +8 -0
- data/lib/generators/react_on_rails/templates/base/base/Procfile.dev-static-assets +2 -0
- data/lib/generators/react_on_rails/templates/base/base/app/javascript/bundles/HelloWorld/components/HelloWorld.jsx +0 -5
- data/lib/generators/react_on_rails/templates/base/base/app/javascript/packs/server-bundle.js +1 -8
- data/lib/generators/react_on_rails/templates/base/base/app/javascript/src/HelloWorld/ror_components/HelloWorld.client.jsx +21 -0
- data/lib/generators/react_on_rails/templates/base/base/app/javascript/src/HelloWorld/ror_components/HelloWorld.module.css +4 -0
- data/lib/generators/react_on_rails/templates/base/base/app/javascript/src/HelloWorld/ror_components/HelloWorld.server.jsx +5 -0
- data/lib/generators/react_on_rails/templates/base/base/app/views/hello_world/index.html.erb.tt +1 -1
- data/lib/generators/react_on_rails/templates/base/base/app/views/layouts/hello_world.html.erb +4 -2
- data/lib/generators/react_on_rails/templates/base/base/babel.config.js.tt +5 -2
- data/lib/generators/react_on_rails/templates/base/base/bin/dev +46 -0
- data/lib/generators/react_on_rails/templates/base/base/config/initializers/react_on_rails.rb.tt +3 -3
- data/lib/generators/react_on_rails/templates/base/base/config/shakapacker.yml +76 -7
- data/lib/generators/react_on_rails/templates/base/base/config/webpack/commonWebpackConfig.js.tt +1 -1
- data/lib/generators/react_on_rails/templates/base/base/config/webpack/development.js.tt +8 -8
- data/lib/generators/react_on_rails/templates/base/base/config/webpack/production.js.tt +2 -2
- data/lib/generators/react_on_rails/templates/base/base/config/webpack/test.js.tt +2 -2
- data/lib/generators/react_on_rails/templates/dev_tests/spec/system/hello_world_spec.rb +0 -2
- data/lib/generators/react_on_rails/templates/redux/base/app/javascript/bundles/HelloWorld/components/HelloWorld.jsx +0 -6
- data/lib/generators/react_on_rails/templates/redux/base/app/javascript/bundles/HelloWorld/components/HelloWorld.module.css +4 -0
- data/lib/generators/react_on_rails/templates/redux/base/app/javascript/bundles/HelloWorld/startup/HelloWorldApp.server.jsx +5 -0
- data/lib/react_on_rails/configuration.rb +5 -5
- data/lib/react_on_rails/controller.rb +5 -3
- data/lib/react_on_rails/dev/file_manager.rb +78 -0
- data/lib/react_on_rails/dev/pack_generator.rb +27 -0
- data/lib/react_on_rails/dev/process_manager.rb +61 -0
- data/lib/react_on_rails/dev/server_manager.rb +330 -0
- data/lib/react_on_rails/dev.rb +20 -0
- data/lib/react_on_rails/engine.rb +6 -0
- data/lib/react_on_rails/git_utils.rb +12 -2
- data/lib/react_on_rails/helper.rb +61 -17
- data/lib/react_on_rails/packer_utils.rb +4 -18
- data/lib/react_on_rails/packs_generator.rb +134 -8
- data/lib/react_on_rails/react_component/render_options.rb +2 -2
- data/lib/react_on_rails/server_rendering_js_code.rb +0 -1
- data/lib/react_on_rails/server_rendering_pool/ruby_embedded_java_script.rb +1 -0
- data/lib/react_on_rails/test_helper/webpack_assets_status_checker.rb +1 -0
- data/lib/react_on_rails/utils.rb +16 -1
- data/lib/react_on_rails/version.rb +1 -1
- data/lib/react_on_rails/version_syntax_converter.rb +1 -1
- data/lib/react_on_rails.rb +1 -0
- data/lib/tasks/generate_packs.rake +20 -0
- data/react_on_rails.gemspec +1 -0
- metadata +40 -11
- data/REACT-ON-RAILS-PRO-LICENSE +0 -95
- data/lib/generators/react_on_rails/adapt_for_older_shakapacker_generator.rb +0 -41
- data/lib/generators/react_on_rails/bin/dev-static +0 -30
- data/lib/generators/react_on_rails/templates/base/base/Procfile.dev-static.tt +0 -9
- data/lib/generators/react_on_rails/templates/base/base/Procfile.dev.tt +0 -5
- data/lib/generators/react_on_rails/templates/base/base/app/javascript/packs/registration.js.tt +0 -8
- /data/lib/generators/react_on_rails/templates/base/base/config/webpack/{webpackConfig.js.tt → generateWebpackConfigs.js.tt} +0 -0
- /data/lib/generators/react_on_rails/templates/redux/base/app/javascript/bundles/HelloWorld/startup/{HelloWorldApp.jsx → HelloWorldApp.client.jsx} +0 -0
@@ -1,11 +1,13 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
3
|
require "fileutils"
|
4
|
+
require "set"
|
4
5
|
|
5
6
|
module ReactOnRails
|
6
7
|
# rubocop:disable Metrics/ClassLength
|
7
8
|
class PacksGenerator
|
8
9
|
CONTAINS_CLIENT_OR_SERVER_REGEX = /\.(server|client)($|\.)/
|
10
|
+
COMPONENT_EXTENSIONS = /\.(jsx?|tsx?)$/
|
9
11
|
MINIMUM_SHAKAPACKER_VERSION = "6.5.1"
|
10
12
|
|
11
13
|
def self.instance
|
@@ -16,13 +18,20 @@ module ReactOnRails
|
|
16
18
|
return unless ReactOnRails.configuration.auto_load_bundle
|
17
19
|
|
18
20
|
add_generated_pack_to_server_bundle
|
21
|
+
|
22
|
+
# Clean any non-generated files from directories
|
23
|
+
clean_non_generated_files_with_feedback
|
24
|
+
|
19
25
|
are_generated_files_present_and_up_to_date = Dir.exist?(generated_packs_directory_path) &&
|
20
26
|
File.exist?(generated_server_bundle_file_path) &&
|
21
27
|
!stale_or_missing_packs?
|
22
28
|
|
23
|
-
|
29
|
+
if are_generated_files_present_and_up_to_date
|
30
|
+
puts Rainbow("✅ Generated packs are up to date, no regeneration needed").green
|
31
|
+
return
|
32
|
+
end
|
24
33
|
|
25
|
-
|
34
|
+
clean_generated_directories_with_feedback
|
26
35
|
generate_packs
|
27
36
|
end
|
28
37
|
|
@@ -182,9 +191,112 @@ module ReactOnRails
|
|
182
191
|
"#{generated_nonentrypoints_path}/#{generated_server_bundle_file_name}.js"
|
183
192
|
end
|
184
193
|
|
185
|
-
def
|
186
|
-
|
187
|
-
|
194
|
+
def clean_non_generated_files_with_feedback
|
195
|
+
directories_to_clean = [generated_packs_directory_path, generated_server_bundle_directory_path].compact.uniq
|
196
|
+
expected_files = build_expected_files_set
|
197
|
+
|
198
|
+
puts Rainbow("🧹 Cleaning non-generated files...").yellow
|
199
|
+
|
200
|
+
total_deleted = directories_to_clean.sum do |dir_path|
|
201
|
+
clean_unexpected_files_from_directory(dir_path, expected_files)
|
202
|
+
end
|
203
|
+
|
204
|
+
display_cleanup_summary(total_deleted)
|
205
|
+
end
|
206
|
+
|
207
|
+
def build_expected_files_set
|
208
|
+
expected_pack_files = Set.new
|
209
|
+
common_component_to_path.each_value { |path| expected_pack_files << generated_pack_path(path) }
|
210
|
+
client_component_to_path.each_value { |path| expected_pack_files << generated_pack_path(path) }
|
211
|
+
|
212
|
+
if ReactOnRails.configuration.server_bundle_js_file.present?
|
213
|
+
expected_server_bundle = generated_server_bundle_file_path
|
214
|
+
end
|
215
|
+
|
216
|
+
{ pack_files: expected_pack_files, server_bundle: expected_server_bundle }
|
217
|
+
end
|
218
|
+
|
219
|
+
def clean_unexpected_files_from_directory(dir_path, expected_files)
|
220
|
+
return 0 unless Dir.exist?(dir_path)
|
221
|
+
|
222
|
+
existing_files = Dir.glob("#{dir_path}/**/*").select { |f| File.file?(f) }
|
223
|
+
unexpected_files = find_unexpected_files(existing_files, dir_path, expected_files)
|
224
|
+
|
225
|
+
if unexpected_files.any?
|
226
|
+
delete_unexpected_files(unexpected_files, dir_path)
|
227
|
+
unexpected_files.length
|
228
|
+
else
|
229
|
+
puts Rainbow(" No unexpected files found in #{dir_path}").cyan
|
230
|
+
0
|
231
|
+
end
|
232
|
+
end
|
233
|
+
|
234
|
+
def find_unexpected_files(existing_files, dir_path, expected_files)
|
235
|
+
existing_files.reject do |file|
|
236
|
+
if dir_path == generated_server_bundle_directory_path
|
237
|
+
file == expected_files[:server_bundle]
|
238
|
+
else
|
239
|
+
expected_files[:pack_files].include?(file)
|
240
|
+
end
|
241
|
+
end
|
242
|
+
end
|
243
|
+
|
244
|
+
def delete_unexpected_files(unexpected_files, dir_path)
|
245
|
+
puts Rainbow(" Deleting #{unexpected_files.length} unexpected files from #{dir_path}:").cyan
|
246
|
+
unexpected_files.each do |file|
|
247
|
+
puts Rainbow(" - #{File.basename(file)}").blue
|
248
|
+
File.delete(file)
|
249
|
+
end
|
250
|
+
end
|
251
|
+
|
252
|
+
def display_cleanup_summary(total_deleted)
|
253
|
+
if total_deleted.positive?
|
254
|
+
puts Rainbow("🗑️ Deleted #{total_deleted} unexpected files total").red
|
255
|
+
else
|
256
|
+
puts Rainbow("✨ No unexpected files to delete").green
|
257
|
+
end
|
258
|
+
end
|
259
|
+
|
260
|
+
def clean_generated_directories_with_feedback
|
261
|
+
directories_to_clean = [
|
262
|
+
generated_packs_directory_path,
|
263
|
+
generated_server_bundle_directory_path
|
264
|
+
].compact.uniq
|
265
|
+
|
266
|
+
puts Rainbow("🧹 Cleaning generated directories...").yellow
|
267
|
+
|
268
|
+
total_deleted = directories_to_clean.sum { |dir_path| clean_directory_with_feedback(dir_path) }
|
269
|
+
|
270
|
+
if total_deleted.positive?
|
271
|
+
puts Rainbow("🗑️ Deleted #{total_deleted} generated files total").red
|
272
|
+
else
|
273
|
+
puts Rainbow("✨ No files to delete, directories are clean").green
|
274
|
+
end
|
275
|
+
end
|
276
|
+
|
277
|
+
def clean_directory_with_feedback(dir_path)
|
278
|
+
return create_directory_with_feedback(dir_path) unless Dir.exist?(dir_path)
|
279
|
+
|
280
|
+
files = Dir.glob("#{dir_path}/**/*").select { |f| File.file?(f) }
|
281
|
+
|
282
|
+
if files.any?
|
283
|
+
puts Rainbow(" Deleting #{files.length} files from #{dir_path}:").cyan
|
284
|
+
files.each { |file| puts Rainbow(" - #{File.basename(file)}").blue }
|
285
|
+
FileUtils.rm_rf(dir_path)
|
286
|
+
FileUtils.mkdir_p(dir_path)
|
287
|
+
files.length
|
288
|
+
else
|
289
|
+
puts Rainbow(" Directory #{dir_path} is already empty").cyan
|
290
|
+
FileUtils.rm_rf(dir_path)
|
291
|
+
FileUtils.mkdir_p(dir_path)
|
292
|
+
0
|
293
|
+
end
|
294
|
+
end
|
295
|
+
|
296
|
+
def create_directory_with_feedback(dir_path)
|
297
|
+
puts Rainbow(" Directory #{dir_path} does not exist, creating...").cyan
|
298
|
+
FileUtils.mkdir_p(dir_path)
|
299
|
+
0
|
188
300
|
end
|
189
301
|
|
190
302
|
def server_bundle_entrypoint
|
@@ -198,6 +310,13 @@ module ReactOnRails
|
|
198
310
|
"#{source_entry_path}/generated"
|
199
311
|
end
|
200
312
|
|
313
|
+
def generated_server_bundle_directory_path
|
314
|
+
return nil if ReactOnRails.configuration.make_generated_server_bundle_the_entrypoint
|
315
|
+
|
316
|
+
source_entrypoint_parent = Pathname(ReactOnRails::PackerUtils.packer_source_entry_path).parent
|
317
|
+
"#{source_entrypoint_parent}/generated"
|
318
|
+
end
|
319
|
+
|
201
320
|
def relative_component_path_from_generated_pack(ror_component_path)
|
202
321
|
component_file_pathname = Pathname.new(ror_component_path)
|
203
322
|
component_generated_pack_path = generated_pack_path(ror_component_path)
|
@@ -228,14 +347,20 @@ module ReactOnRails
|
|
228
347
|
paths.to_h { |path| [component_name(path), path] }
|
229
348
|
end
|
230
349
|
|
350
|
+
def filter_component_files(paths)
|
351
|
+
paths.grep(COMPONENT_EXTENSIONS)
|
352
|
+
end
|
353
|
+
|
231
354
|
def common_component_to_path
|
232
355
|
common_components_paths = Dir.glob("#{components_search_path}/*").grep_v(CONTAINS_CLIENT_OR_SERVER_REGEX)
|
233
|
-
|
356
|
+
filtered_paths = filter_component_files(common_components_paths)
|
357
|
+
component_name_to_path(filtered_paths)
|
234
358
|
end
|
235
359
|
|
236
360
|
def client_component_to_path
|
237
361
|
client_render_components_paths = Dir.glob("#{components_search_path}/*.client.*")
|
238
|
-
|
362
|
+
filtered_client_paths = filter_component_files(client_render_components_paths)
|
363
|
+
client_specific_components = component_name_to_path(filtered_client_paths)
|
239
364
|
|
240
365
|
duplicate_components = common_component_to_path.slice(*client_specific_components.keys)
|
241
366
|
duplicate_components.each_key { |component| raise_client_component_overrides_common(component) }
|
@@ -245,7 +370,8 @@ module ReactOnRails
|
|
245
370
|
|
246
371
|
def server_component_to_path
|
247
372
|
server_render_components_paths = Dir.glob("#{components_search_path}/*.server.*")
|
248
|
-
|
373
|
+
filtered_server_paths = filter_component_files(server_render_components_paths)
|
374
|
+
server_specific_components = component_name_to_path(filtered_server_paths)
|
249
375
|
|
250
376
|
duplicate_components = common_component_to_path.slice(*server_specific_components.keys)
|
251
377
|
duplicate_components.each_key { |component| raise_server_component_overrides_common(component) }
|
@@ -95,8 +95,8 @@ module ReactOnRails
|
|
95
95
|
retrieve_configuration_value_for(:logging_on_server)
|
96
96
|
end
|
97
97
|
|
98
|
-
def
|
99
|
-
retrieve_configuration_value_for(:
|
98
|
+
def immediate_hydration
|
99
|
+
retrieve_configuration_value_for(:immediate_hydration)
|
100
100
|
end
|
101
101
|
|
102
102
|
def to_s
|
@@ -10,6 +10,7 @@ module ReactOnRails
|
|
10
10
|
module TestHelper
|
11
11
|
class WebpackAssetsStatusChecker
|
12
12
|
include Utils::Required
|
13
|
+
|
13
14
|
# source_path is typically configured in the (shaka/web)packer.yml file
|
14
15
|
# for `source_path`
|
15
16
|
# or for legacy React on Rails, it's /client, where all client files go
|
data/lib/react_on_rails/utils.rb
CHANGED
@@ -7,7 +7,7 @@ require "active_support"
|
|
7
7
|
require "active_support/core_ext/string"
|
8
8
|
|
9
9
|
module ReactOnRails
|
10
|
-
module Utils
|
10
|
+
module Utils # rubocop:disable Metrics/ModuleLength
|
11
11
|
TRUNCATION_FILLER = "\n... TRUNCATED #{
|
12
12
|
Rainbow('To see the full output, set FULL_TEXT_ERRORS=true.').red
|
13
13
|
} ...\n".freeze
|
@@ -213,6 +213,21 @@ module ReactOnRails
|
|
213
213
|
end
|
214
214
|
end
|
215
215
|
|
216
|
+
def self.react_on_rails_pro_licence_valid?
|
217
|
+
return @react_on_rails_pro_licence_valid if defined?(@react_on_rails_pro_licence_valid)
|
218
|
+
|
219
|
+
@react_on_rails_pro_licence_valid = begin
|
220
|
+
return false unless react_on_rails_pro?
|
221
|
+
|
222
|
+
# Maintain compatibility with legacy versions of React on Rails Pro:
|
223
|
+
# Earlier releases did not require license validation, as they were distributed as private gems.
|
224
|
+
# This check ensures that the method works correctly regardless of the installed version.
|
225
|
+
return true unless ReactOnRailsPro::Utils.respond_to?(:licence_valid?)
|
226
|
+
|
227
|
+
ReactOnRailsPro::Utils.licence_valid?
|
228
|
+
end
|
229
|
+
end
|
230
|
+
|
216
231
|
def self.rsc_support_enabled?
|
217
232
|
return false unless react_on_rails_pro?
|
218
233
|
|
@@ -5,7 +5,7 @@ require_relative "version"
|
|
5
5
|
module ReactOnRails
|
6
6
|
class VersionSyntaxConverter
|
7
7
|
def rubygem_to_npm(rubygem_version = ReactOnRails::VERSION)
|
8
|
-
regex_match = rubygem_version.match(/(\d+\.\d+\.\d+)[
|
8
|
+
regex_match = rubygem_version.match(/(\d+\.\d+\.\d+)[.-]?(.+)?/)
|
9
9
|
return "#{regex_match[1]}-#{regex_match[2]}" if regex_match[2]
|
10
10
|
|
11
11
|
regex_match[1].to_s
|
data/lib/react_on_rails.rb
CHANGED
@@ -3,9 +3,29 @@
|
|
3
3
|
namespace :react_on_rails do
|
4
4
|
desc <<~DESC
|
5
5
|
If there is a file inside any directory matching config.components_subdirectory, this command generates corresponding packs.
|
6
|
+
|
7
|
+
This task will:
|
8
|
+
- Clean out existing generated directories (javascript/generated and javascript/packs/generated)
|
9
|
+
- List all files being deleted for transparency
|
10
|
+
- Generate new pack files for discovered React components
|
11
|
+
- Skip generation if files are already up to date
|
12
|
+
|
13
|
+
Generated directories:
|
14
|
+
- app/javascript/packs/generated/ (client pack files)
|
15
|
+
- app/javascript/generated/ (server bundle files)
|
6
16
|
DESC
|
7
17
|
|
8
18
|
task generate_packs: :environment do
|
19
|
+
puts Rainbow("🚀 Starting React on Rails pack generation...").bold
|
20
|
+
puts Rainbow("📁 Auto-load bundle: #{ReactOnRails.configuration.auto_load_bundle}").cyan
|
21
|
+
puts Rainbow("📂 Components subdirectory: #{ReactOnRails.configuration.components_subdirectory}").cyan
|
22
|
+
puts ""
|
23
|
+
|
24
|
+
start_time = Time.now
|
9
25
|
ReactOnRails::PacksGenerator.instance.generate_packs_if_stale
|
26
|
+
end_time = Time.now
|
27
|
+
|
28
|
+
puts ""
|
29
|
+
puts Rainbow("✨ Pack generation completed in #{((end_time - start_time) * 1000).round(1)}ms").green
|
10
30
|
end
|
11
31
|
end
|
data/react_on_rails.gemspec
CHANGED
@@ -31,6 +31,7 @@ Gem::Specification.new do |s|
|
|
31
31
|
s.add_dependency "execjs", "~> 2.5"
|
32
32
|
s.add_dependency "rails", ">= 5.2"
|
33
33
|
s.add_dependency "rainbow", "~> 3.0"
|
34
|
+
s.add_dependency "shakapacker", ">= 6.0"
|
34
35
|
|
35
36
|
s.add_development_dependency "gem-release"
|
36
37
|
s.post_install_message = '
|
metadata
CHANGED
@@ -1,13 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: react_on_rails
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version:
|
4
|
+
version: 16.0.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Justin Gordon
|
8
|
+
autorequire:
|
8
9
|
bindir: exe
|
9
10
|
cert_chain: []
|
10
|
-
date:
|
11
|
+
date: 2025-09-17 00:00:00.000000000 Z
|
11
12
|
dependencies:
|
12
13
|
- !ruby/object:Gem::Dependency
|
13
14
|
name: addressable
|
@@ -79,6 +80,20 @@ dependencies:
|
|
79
80
|
- - "~>"
|
80
81
|
- !ruby/object:Gem::Version
|
81
82
|
version: '3.0'
|
83
|
+
- !ruby/object:Gem::Dependency
|
84
|
+
name: shakapacker
|
85
|
+
requirement: !ruby/object:Gem::Requirement
|
86
|
+
requirements:
|
87
|
+
- - ">="
|
88
|
+
- !ruby/object:Gem::Version
|
89
|
+
version: '6.0'
|
90
|
+
type: :runtime
|
91
|
+
prerelease: false
|
92
|
+
version_requirements: !ruby/object:Gem::Requirement
|
93
|
+
requirements:
|
94
|
+
- - ">="
|
95
|
+
- !ruby/object:Gem::Version
|
96
|
+
version: '6.0'
|
82
97
|
- !ruby/object:Gem::Dependency
|
83
98
|
name: gem-release
|
84
99
|
requirement: !ruby/object:Gem::Requirement
|
@@ -101,6 +116,8 @@ extensions: []
|
|
101
116
|
extra_rdoc_files: []
|
102
117
|
files:
|
103
118
|
- CHANGELOG.md
|
119
|
+
- CLAUDE.md
|
120
|
+
- CODING_AGENTS.md
|
104
121
|
- CONTRIBUTING.md
|
105
122
|
- Dockerfile_tests
|
106
123
|
- Gemfile
|
@@ -108,21 +125,21 @@ files:
|
|
108
125
|
- Gemfile.lock
|
109
126
|
- KUDOS.md
|
110
127
|
- LICENSE.md
|
128
|
+
- LICENSES/README.md
|
111
129
|
- NEWS.md
|
112
130
|
- PROJECTS.md
|
113
|
-
- REACT-ON-RAILS-PRO-LICENSE
|
131
|
+
- REACT-ON-RAILS-PRO-LICENSE.md
|
114
132
|
- README.md
|
115
133
|
- Rakefile
|
116
134
|
- SUMMARY.md
|
135
|
+
- TODO.md
|
117
136
|
- app/helpers/react_on_rails_helper.rb
|
118
137
|
- docker-compose.yml
|
119
138
|
- eslint.config.ts
|
120
139
|
- knip.ts
|
121
140
|
- lib/generators/USAGE
|
122
|
-
- lib/generators/react_on_rails/adapt_for_older_shakapacker_generator.rb
|
123
141
|
- lib/generators/react_on_rails/base_generator.rb
|
124
142
|
- lib/generators/react_on_rails/bin/dev
|
125
|
-
- lib/generators/react_on_rails/bin/dev-static
|
126
143
|
- lib/generators/react_on_rails/dev_tests_generator.rb
|
127
144
|
- lib/generators/react_on_rails/generator_helper.rb
|
128
145
|
- lib/generators/react_on_rails/generator_messages.rb
|
@@ -130,27 +147,31 @@ files:
|
|
130
147
|
- lib/generators/react_on_rails/react_no_redux_generator.rb
|
131
148
|
- lib/generators/react_on_rails/react_with_redux_generator.rb
|
132
149
|
- lib/generators/react_on_rails/templates/.eslintrc
|
133
|
-
- lib/generators/react_on_rails/templates/base/base/Procfile.dev
|
134
|
-
- lib/generators/react_on_rails/templates/base/base/Procfile.dev
|
150
|
+
- lib/generators/react_on_rails/templates/base/base/Procfile.dev
|
151
|
+
- lib/generators/react_on_rails/templates/base/base/Procfile.dev-prod-assets
|
152
|
+
- lib/generators/react_on_rails/templates/base/base/Procfile.dev-static-assets
|
135
153
|
- lib/generators/react_on_rails/templates/base/base/app/controllers/hello_world_controller.rb
|
136
154
|
- lib/generators/react_on_rails/templates/base/base/app/javascript/bundles/HelloWorld/components/HelloWorld.jsx
|
137
155
|
- lib/generators/react_on_rails/templates/base/base/app/javascript/bundles/HelloWorld/components/HelloWorld.module.css
|
138
156
|
- lib/generators/react_on_rails/templates/base/base/app/javascript/bundles/HelloWorld/components/HelloWorldServer.js
|
139
|
-
- lib/generators/react_on_rails/templates/base/base/app/javascript/packs/registration.js.tt
|
140
157
|
- lib/generators/react_on_rails/templates/base/base/app/javascript/packs/server-bundle.js
|
158
|
+
- lib/generators/react_on_rails/templates/base/base/app/javascript/src/HelloWorld/ror_components/HelloWorld.client.jsx
|
159
|
+
- lib/generators/react_on_rails/templates/base/base/app/javascript/src/HelloWorld/ror_components/HelloWorld.module.css
|
160
|
+
- lib/generators/react_on_rails/templates/base/base/app/javascript/src/HelloWorld/ror_components/HelloWorld.server.jsx
|
141
161
|
- lib/generators/react_on_rails/templates/base/base/app/views/hello_world/index.html.erb.tt
|
142
162
|
- lib/generators/react_on_rails/templates/base/base/app/views/layouts/hello_world.html.erb
|
143
163
|
- lib/generators/react_on_rails/templates/base/base/babel.config.js.tt
|
164
|
+
- lib/generators/react_on_rails/templates/base/base/bin/dev
|
144
165
|
- lib/generators/react_on_rails/templates/base/base/config/initializers/react_on_rails.rb.tt
|
145
166
|
- lib/generators/react_on_rails/templates/base/base/config/shakapacker.yml
|
146
167
|
- lib/generators/react_on_rails/templates/base/base/config/webpack/clientWebpackConfig.js.tt
|
147
168
|
- lib/generators/react_on_rails/templates/base/base/config/webpack/commonWebpackConfig.js.tt
|
148
169
|
- lib/generators/react_on_rails/templates/base/base/config/webpack/development.js.tt
|
170
|
+
- lib/generators/react_on_rails/templates/base/base/config/webpack/generateWebpackConfigs.js.tt
|
149
171
|
- lib/generators/react_on_rails/templates/base/base/config/webpack/production.js.tt
|
150
172
|
- lib/generators/react_on_rails/templates/base/base/config/webpack/serverWebpackConfig.js.tt
|
151
173
|
- lib/generators/react_on_rails/templates/base/base/config/webpack/test.js.tt
|
152
174
|
- lib/generators/react_on_rails/templates/base/base/config/webpack/webpack.config.js.tt
|
153
|
-
- lib/generators/react_on_rails/templates/base/base/config/webpack/webpackConfig.js.tt
|
154
175
|
- lib/generators/react_on_rails/templates/dev_tests/.eslintrc
|
155
176
|
- lib/generators/react_on_rails/templates/dev_tests/.rspec
|
156
177
|
- lib/generators/react_on_rails/templates/dev_tests/spec/rails_helper.rb
|
@@ -159,14 +180,21 @@ files:
|
|
159
180
|
- lib/generators/react_on_rails/templates/dev_tests/spec/system/hello_world_spec.rb
|
160
181
|
- lib/generators/react_on_rails/templates/redux/base/app/javascript/bundles/HelloWorld/actions/helloWorldActionCreators.js
|
161
182
|
- lib/generators/react_on_rails/templates/redux/base/app/javascript/bundles/HelloWorld/components/HelloWorld.jsx
|
183
|
+
- lib/generators/react_on_rails/templates/redux/base/app/javascript/bundles/HelloWorld/components/HelloWorld.module.css
|
162
184
|
- lib/generators/react_on_rails/templates/redux/base/app/javascript/bundles/HelloWorld/constants/helloWorldConstants.js
|
163
185
|
- lib/generators/react_on_rails/templates/redux/base/app/javascript/bundles/HelloWorld/containers/HelloWorldContainer.js
|
164
186
|
- lib/generators/react_on_rails/templates/redux/base/app/javascript/bundles/HelloWorld/reducers/helloWorldReducer.js
|
165
|
-
- lib/generators/react_on_rails/templates/redux/base/app/javascript/bundles/HelloWorld/startup/HelloWorldApp.jsx
|
187
|
+
- lib/generators/react_on_rails/templates/redux/base/app/javascript/bundles/HelloWorld/startup/HelloWorldApp.client.jsx
|
188
|
+
- lib/generators/react_on_rails/templates/redux/base/app/javascript/bundles/HelloWorld/startup/HelloWorldApp.server.jsx
|
166
189
|
- lib/generators/react_on_rails/templates/redux/base/app/javascript/bundles/HelloWorld/store/helloWorldStore.js
|
167
190
|
- lib/react_on_rails.rb
|
168
191
|
- lib/react_on_rails/configuration.rb
|
169
192
|
- lib/react_on_rails/controller.rb
|
193
|
+
- lib/react_on_rails/dev.rb
|
194
|
+
- lib/react_on_rails/dev/file_manager.rb
|
195
|
+
- lib/react_on_rails/dev/pack_generator.rb
|
196
|
+
- lib/react_on_rails/dev/process_manager.rb
|
197
|
+
- lib/react_on_rails/dev/server_manager.rb
|
170
198
|
- lib/react_on_rails/engine.rb
|
171
199
|
- lib/react_on_rails/error.rb
|
172
200
|
- lib/react_on_rails/git_utils.rb
|
@@ -222,7 +250,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
222
250
|
- !ruby/object:Gem::Version
|
223
251
|
version: '0'
|
224
252
|
requirements: []
|
225
|
-
rubygems_version: 3.
|
253
|
+
rubygems_version: 3.5.22
|
254
|
+
signing_key:
|
226
255
|
specification_version: 4
|
227
256
|
summary: Rails with react server rendering with webpack.
|
228
257
|
test_files: []
|
data/REACT-ON-RAILS-PRO-LICENSE
DELETED
@@ -1,95 +0,0 @@
|
|
1
|
-
React on Rails Pro License
|
2
|
-
For React on Rails Pro, not the open source version. For open source, see https://github.com/shakacode/react_on_rails/blob/master/LICENSE.md.
|
3
|
-
|
4
|
-
Copyright (c) 2018, 2019 Justin Gordon and ShakaCode, http://www.shakacode.com
|
5
|
-
|
6
|
-
All rights reserved.
|
7
|
-
|
8
|
-
|
9
|
-
END-USER LICENSE AGREEMENT
|
10
|
-
|
11
|
-
------------------------------------------------------------------------------
|
12
|
-
|
13
|
-
IMPORTANT: THIS SOFTWARE END-USER LICENSE AGREEMENT ("EULA") IS A LEGAL AGREEMENT (“Agreement”) BETWEEN YOU (THE CUSTOMER, EITHER AS AN INDIVIDUAL OR, IF PURCHASED OR OTHERWISE ACQUIRED BY OR FOR AN ENTITY, AS AN ENTITY) AND ShakaCode. READ IT CAREFULLY BEFORE COMPLETING THE INSTALLATION PROCESS AND USING React on Rails Pro AND RELATED SOFTWARE COMPONENTS (“SOFTWARE”). IT PROVIDES A LICENSE TO USE THE SOFTWARE AND CONTAINS WARRANTY INFORMATION AND LIABILITY DISCLAIMERS. BY INSTALLING AND USING THE SOFTWARE, YOU ARE CONFIRMING YOUR ACCEPTANCE OF THE SOFTWARE AND AGREEING TO BECOME BOUND BY THE TERMS OF THIS AGREEMENT.
|
14
|
-
|
15
|
-
------------------------------------------------------------------------------
|
16
|
-
|
17
|
-
In order to use the Software under this Agreement, you must receive a “Source URL” at the time of purchase, in accordance with the scope of use and other terms specified for each type of Software and as set forth in this Section 1 of this Agreement.
|
18
|
-
|
19
|
-
1. License Grant
|
20
|
-
|
21
|
-
1.1 General Use. This Agreement grants you a non-exclusive, non-transferable, limited license to the use rights for the Software, without the right to grant sublicenses, subject to the terms and conditions in this Agreement. The Software is licensed, not sold.
|
22
|
-
|
23
|
-
1.2 Unlimited Organization License. You may install the Software on an unlimited number of Hosts. “Host” means any physical or virtual machine which is controlled by you. You may concurrently run the software on an unlimited number of Hosts, with each host running an unlimited number of Workers.
|
24
|
-
|
25
|
-
1.3 Archive Copies. You are entitled to make a reasonable amount of copies of the Software for archival purposes. Each copy must reproduce all copyright and other proprietary rights notices on or in the Software Product.
|
26
|
-
|
27
|
-
1.4 Electronic Delivery. All Software and license documentation shall be delivered by electronic means unless otherwise specified on the applicable invoice or at the time of purchase. Software shall be deemed delivered when it is made available for download by you (“Delivery”).
|
28
|
-
|
29
|
-
2. Modifications. ShakaCode shall provide you with source code so that you can create Modifications of the original software. “Modification” means: (a) any addition to or deletion from the contents of a file included in the original Software or previous Modifications created by You, or (b) any new file that contains any part of the original Software or previous Modifications. While you retain all rights to any original work authored by you as part of the Modifications, We continue to own all copyright and other intellectual property rights in the Software.
|
30
|
-
|
31
|
-
3. Restricted Uses.
|
32
|
-
|
33
|
-
3.1 You shall not (and shall not allow any third party to): (a) decompile, disassemble, or otherwise reverse engineer the Software or attempt to reconstruct or discover any source code, underlying ideas, algorithms, file formats or programming interfaces of the Software by any means whatsoever (except and only to the extent that applicable law prohibits or restricts reverse engineering restrictions); (b) distribute, sell, sublicense, rent, lease or use the Software for time sharing, hosting, service provider or like purposes, except as expressly permitted under this Agreement; (c) redistribute the Software or Modifications other than by including the Software or a portion thereof within your own product, which must have substantially different functionality than the Software or Modifications and must not allow any third party to use the Software or Modifications, or any portions thereof, for software development or application development purposes; (d) redistribute the Software as part of a product, "appliance" or "virtual server"; (e) redistribute the Software on any server which is not directly under your control; (f) remove any product identification, proprietary, copyright or other notices contained in the Software; (g) modify any part of the Software, create a derivative work of any part of the Software (except as permitted in Section 4), or incorporate the Software, except to the extent expressly authorized in writing by ShakaCode; (h) publicly disseminate performance information or analysis (including, without limitation, benchmarks) from any source relating to the Software; (i) utilize any equipment, device, software, or other means designed to circumvent or remove any form of Source URL or copy protection used by ShakaCode in connection with the Software, or use the Software together with any authorization code, Source URL, serial number, or other copy protection device not supplied by ShakaCode; (j) use the Software to develop a product which is competitive with any ShakaCode product offerings; or (k) use unauthorized Source URLS or keycode(s) or distribute or publish Source URLs or keycode(s), except as may be expressly permitted by ShakaCode in writing. If your unique Source URL is ever published, ShakaCode reserves the right to terminate your access without notice.
|
34
|
-
|
35
|
-
3.2 UNDER NO CIRCUMSTANCES MAY YOU USE THE SOFTWARE AS PART OF A PRODUCT OR SERVICE THAT PROVIDES SIMILAR FUNCTIONALITY TO THE SOFTWARE ITSELF.
|
36
|
-
|
37
|
-
4. Ownership. Notwithstanding anything to the contrary contained herein, except for the limited license rights expressly provided herein, ShakaCode and its suppliers have and will retain all rights, title and interest (including, without limitation, all patent, copyright, trademark, trade secret and other intellectual property rights) in and to the Software and all copies, modifications and derivative works thereof (including any changes which incorporate any of your ideas, feedback or suggestions). You acknowledge that you are obtaining only a limited license right to the Software, and that irrespective of any use of the words “purchase”, “sale” or like terms hereunder no ownership rights are being conveyed to you under this Agreement or otherwise.
|
38
|
-
|
39
|
-
5. Fees and Payment. The Software license fees will be due and payable in full as set forth in the applicable invoice or at the time of purchase. If the Software does not function properly within two weeks of purchase, please contact us within those two weeks for a refund. You shall be responsible for all taxes, withholdings, duties and levies arising from the order (excluding taxes based on the net income of ShakaCode).
|
40
|
-
|
41
|
-
6. Support, Maintenance and Services. Subject to the terms and conditions of this Agreement, as set forth in your invoice, and as set forth in the attached Master Service Agreement included with the purchase of your license subscription.
|
42
|
-
|
43
|
-
7. Term of Agreement.
|
44
|
-
|
45
|
-
7.1 Term. This Agreement is effective as of the Delivery of the Software and expires at such time as all license and service subscriptions hereunder have expired in accordance with their own terms (the “Term”). For clarification, the term of your license under this Agreement may be perpetual, limited for Evaluation Version, or designated as a fixed-term license in the Invoice, and shall be specified at your time of purchase. Either party may terminate this Agreement (including all related Invoices) if the other party: (a) fails to cure any material breach of this Agreement within thirty (30) days after written notice of such breach, provided that ShakaCode may terminate this Agreement immediately upon any breach of Section 3 or if you exceed any other restrictions contained in Section 1, unless otherwise specified in this agreement; (b) ceases operation without a successor; or (c) seeks protection under any bankruptcy, receivership, trust deed, creditors arrangement, composition or comparable proceeding, or if any such proceeding is instituted against such party (and not dismissed within sixty (60) days)). Termination is not an exclusive remedy and the exercise by either party of any remedy under this Agreement will be without prejudice to any other remedies it may have under this Agreement, by law, or otherwise.
|
46
|
-
|
47
|
-
7.2 Termination. Upon any termination of this Agreement, you shall cease any and all use of any Software and destroy all copies thereof.
|
48
|
-
|
49
|
-
7.3 Expiration of License. Upon the expiration of any term under this Agreement, (a) all Software updates and services pursuant to the license shall cease, (b) you may only continue to run existing installations of the Software, (c) you may not install the Software on any additional Hosts, and (d) any new installation of the Software shall require the purchase of a new license subscription from ShakaCode.
|
50
|
-
|
51
|
-
8. Disclaimer of Warranties. The Software is provided "as is," with all faults, defects and errors, and without warranty of any kind. ShakaCode does not warrant that the Software will be free of bugs, errors, viruses or other defects, and ShakaCode shall have no liability of any kind for the use of or inability to use the Software, the Software content or any associated service, and you acknowledge that it is not technically practicable for ShakaCode to do so.
|
52
|
-
|
53
|
-
To the maximum extent permitted by applicable law, ShakaCode disclaims all warranties, express, implied, arising by law or otherwise, regarding the Software, the Software content and their respective performance or suitability for your intended use, including without limitation any implied warranty of merchantability, fitness for a particular purpose.
|
54
|
-
|
55
|
-
9. Limitation of Liability.
|
56
|
-
|
57
|
-
In no event will ShakaCode be liable for any direct, indirect, consequential, incidental, special, exemplary, or punitive damages or liabilities whatsoever arising from or relating to the Software, the Software content or this Agreement, whether based on contract, tort (including negligence), strict liability or other theory, even if ShakaCode has been advised of the possibility of such damages.
|
58
|
-
|
59
|
-
In no event will ShakaCode's liability exceed the Software license price as indicated in the invoice. The existence of more than one claim will not enlarge or extend this limit.
|
60
|
-
|
61
|
-
10. Remedies. Your exclusive remedy and ShakaCode’ entire liability for breach of this Agreement shall be limited, at ShakaCode’ sole and exclusive discretion, to (a) replacement of any defective software or documentation; or (b) refund of the license fee paid to ShakaCode, payable in accordance with ShakaCode's refund policy.
|
62
|
-
|
63
|
-
11. Acknowledgements.
|
64
|
-
|
65
|
-
11.1 Consent to the Use of Data. You agree that ShakaCode and its affiliates may collect and use technical information gathered as part of the product support services. ShakaCode may use this information solely to improve products and services and will not disclose this information in a form that personally identifies you.
|
66
|
-
|
67
|
-
11.2 Verification. We or a certified auditor acting on our behalf, may, upon its reasonable request and at its expense, audit you with respect to the use of the Software. Such audit may be conducted by mail, electronic means or through an in-person visit to your place of business. Any such in-person audit shall be conducted during regular business hours at your facilities and shall not unreasonably interfere with your business activities. We shall not remove, copy, or redistribute any electronic material during the course of an audit. If an audit reveals that you are using the Software in a way that is in material violation of the terms of the EULA, then you shall pay our reasonable costs of conducting the audit. In the case of a material violation, you agree to pay Us any amounts owing that are attributable to the unauthorized use. In the alternative, We reserve the right, at our sole option, to terminate the licenses for the Software.
|
68
|
-
|
69
|
-
11.3 Government End Users. If the Software and related documentation are supplied to or purchased by or on behalf of the United States Government, then the Software is deemed to be "commercial software" as that term is used in the Federal Acquisition Regulation system. Rights of the United States shall not exceed the minimum rights set forth in FAR 52.227-19 for "restricted computer software". All other terms and conditions of this Agreement apply.
|
70
|
-
|
71
|
-
12. Third Party Software. Examples included in Software may provide links to third party libraries or code (collectively “Third Party Software”) to implement various functions. Third Party Software does not comprise part of the Software. In some cases, access to Third Party Software may be included along with the Software delivery as a convenience for demonstration purposes. Such source code and libraries may be included in the “…/examples” source tree delivered with the Software and do not comprise the Software. Licensee acknowledges (1) that some part of Third Party Software may require additional licensing of copyright and patents from the owners of such, and (2) that distribution of any of the Software referencing or including any portion of a Third Party Software may require appropriate licensing from such third parties.
|
72
|
-
|
73
|
-
13. Miscellaneous
|
74
|
-
|
75
|
-
13.1 Entire Agreement. This Agreement sets forth our entire agreement with respect to the Software and the subject matter hereof and supersedes all prior and contemporaneous understandings and agreements whether written or oral.
|
76
|
-
|
77
|
-
13.2 Amendment. ShakaCode reserves the right, in its sole discretion, to amend this Agreement from time. Amendments to this Agreement can be located at: https://github.com/shakacode/react_on_rails/blob/master/REACT-ON-RAILS-PRO-LICENSE.
|
78
|
-
|
79
|
-
13.3 Assignment. You may not assign this Agreement or any of its rights under this Agreement without the prior written consent of ShakaCode and any attempted assignment without such consent shall be void.
|
80
|
-
|
81
|
-
13.4 Export Compliance. You agree to comply with all applicable laws and regulations, including laws, regulations, orders or other restrictions on export, re-export or redistribution of software.
|
82
|
-
|
83
|
-
13.5 Indemnification. You agree to defend, indemnify, and hold harmless ShakaCode from and against any lawsuits, claims, losses, damages, fines and expenses (including attorneys' fees and costs) arising out of your use of the Software or breach of this Agreement.
|
84
|
-
|
85
|
-
13.6 Governing Law. This Agreement is governed by the laws of the State of Hawaii and the United States without regard to conflicts of laws provisions thereof, and without regard to the United Nations Convention on the International Sale of Goods or the Uniform Computer Information Transactions Act, as currently enacted by any jurisdiction or as may be codified or amended from time to time by any jurisdiction. The jurisdiction and venue for actions related to the subject matter hereof shall be the state of Hawaii and United States federal courts located in Kahului, Hawaii, and both parties hereby submit to the personal jurisdiction of such courts.
|
86
|
-
|
87
|
-
13.7 Attorneys’ Fees and Costs. The prevailing party in any action to enforce this Agreement will be entitled to recover its attorneys’ fees and costs in connection with such action.
|
88
|
-
|
89
|
-
13.8 Severability. If any provision of this Agreement is held by a court of competent jurisdiction to be invalid, illegal, or unenforceable, the remainder of this Agreement will remain in full force and effect.
|
90
|
-
|
91
|
-
13.9 Waiver. Failure or neglect by either party to enforce at any time any of the provisions of this licence Agreement shall not be construed or deemed to be a waiver of that party's rights under this Agreement.
|
92
|
-
|
93
|
-
13.10 Headings. The headings of sections and paragraphs of this Agreement are for convenience of reference only and are not intended to restrict, affect or be of any weight in the interpretation or construction of the provisions of such sections or paragraphs.
|
94
|
-
|
95
|
-
14. Contact Information. If you have any questions about this EULA, or if you want to contact ShakaCode for any reason, please direct correspondence to justin@shakacode.com.
|
@@ -1,41 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
require "rails/generators"
|
4
|
-
require_relative "generator_helper"
|
5
|
-
|
6
|
-
module ReactOnRails
|
7
|
-
module Generators
|
8
|
-
class AdaptForOlderShakapackerGenerator < Rails::Generators::Base
|
9
|
-
include GeneratorHelper
|
10
|
-
Rails::Generators.hide_namespace(namespace)
|
11
|
-
|
12
|
-
def change_spelling_to_webpacker
|
13
|
-
puts "Change spelling to webpacker v7"
|
14
|
-
files = %w[
|
15
|
-
Procfile.dev
|
16
|
-
Procfile.dev-static
|
17
|
-
config/shakapacker.yml
|
18
|
-
config/initializers/react_on_rails.rb
|
19
|
-
]
|
20
|
-
files.each { |file| gsub_file(file, "shakapacker", "webpacker") }
|
21
|
-
end
|
22
|
-
|
23
|
-
def rename_config_file
|
24
|
-
puts "Rename to config/webpacker.yml"
|
25
|
-
puts "Renaming shakapacker.yml into webpacker.yml"
|
26
|
-
FileUtils.mv("config/shakapacker.yml", "config/webpacker.yml")
|
27
|
-
end
|
28
|
-
|
29
|
-
def modify_requiring_webpack_config_in_js
|
30
|
-
puts "Update commonWebpackConfig.js to follow the Shakapacker v6 interface"
|
31
|
-
file = "config/webpack/commonWebpackConfig.js"
|
32
|
-
gsub_file(file, "const baseClientWebpackConfig = generateWebpackConfig();\n\n", "")
|
33
|
-
gsub_file(
|
34
|
-
file,
|
35
|
-
"const { generateWebpackConfig, merge } = require('shakapacker');",
|
36
|
-
"const { webpackConfig: baseClientWebpackConfig, merge } = require('shakapacker');"
|
37
|
-
)
|
38
|
-
end
|
39
|
-
end
|
40
|
-
end
|
41
|
-
end
|
@@ -1,30 +0,0 @@
|
|
1
|
-
#!/usr/bin/env ruby
|
2
|
-
# frozen_string_literal: true
|
3
|
-
|
4
|
-
def installed?(process)
|
5
|
-
IO.popen "#{process} -v"
|
6
|
-
rescue Errno::ENOENT
|
7
|
-
false
|
8
|
-
end
|
9
|
-
|
10
|
-
def run(process)
|
11
|
-
system "#{process} start -f Procfile.dev-static"
|
12
|
-
rescue Errno::ENOENT
|
13
|
-
warn <<~MSG
|
14
|
-
ERROR:
|
15
|
-
Please ensure `Procfile.dev-static` exists in your project!
|
16
|
-
MSG
|
17
|
-
exit!
|
18
|
-
end
|
19
|
-
|
20
|
-
if installed? "overmind"
|
21
|
-
run "overmind"
|
22
|
-
elsif installed? "foreman"
|
23
|
-
run "foreman"
|
24
|
-
else
|
25
|
-
warn <<~MSG
|
26
|
-
NOTICE:
|
27
|
-
For this script to run, you need either 'overmind' or 'foreman' installed on your machine. Please try this script after installing one of them.
|
28
|
-
MSG
|
29
|
-
exit!
|
30
|
-
end
|