turbo-rails 0.7.9 → 0.7.10
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/install/turbo_with_asset_pipeline.rb +0 -2
- data/lib/install/turbo_with_webpacker.rb +0 -2
- data/lib/tasks/turbo_tasks.rake +17 -1
- data/lib/turbo/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 41cfe42f850783258d151d4d6ed872633cbb2a7f2ba3c20ad434af326c65dd15
|
4
|
+
data.tar.gz: cff176c51977f6c1ba19c31eb36d97ea1958394e7fcde6a489f0d53ec9a74b3b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6a8c79d8a32ce7a36aa3f289cd222600d3040bdd5cebaca4836c2fb659ac6e6d847ab02299290429b434a530b7397d9580628edaaba13b088e59c641174ab994
|
7
|
+
data.tar.gz: 58eea1099a495e6987a8197630b9c9e6386af8e2016d0cceb92555ca2ce5fba19e6f32eba2244a14751ef9879b92c6793fdc1e1dd6e0b639678ed4c757680a47
|
data/lib/tasks/turbo_tasks.rake
CHANGED
@@ -1,4 +1,18 @@
|
|
1
|
-
def run_turbo_install_template(path)
|
1
|
+
def run_turbo_install_template(path)
|
2
|
+
system "#{RbConfig.ruby} ./bin/rails app:template LOCATION=#{File.expand_path("../install/#{path}.rb", __dir__)}"
|
3
|
+
end
|
4
|
+
|
5
|
+
def redis_installed?
|
6
|
+
system('which redis-server')
|
7
|
+
end
|
8
|
+
|
9
|
+
def switch_on_redis_if_available
|
10
|
+
if redis_installed?
|
11
|
+
Rake::Task["turbo:install:redis"].invoke
|
12
|
+
else
|
13
|
+
puts "Run turbo:install:redis to switch on Redis and use it in development for turbo streams"
|
14
|
+
end
|
15
|
+
end
|
2
16
|
|
3
17
|
namespace :turbo do
|
4
18
|
desc "Install Turbo into the app"
|
@@ -14,11 +28,13 @@ namespace :turbo do
|
|
14
28
|
desc "Install Turbo into the app with asset pipeline"
|
15
29
|
task :asset_pipeline do
|
16
30
|
run_turbo_install_template "turbo_with_asset_pipeline"
|
31
|
+
switch_on_redis_if_available
|
17
32
|
end
|
18
33
|
|
19
34
|
desc "Install Turbo into the app with webpacker"
|
20
35
|
task :webpacker do
|
21
36
|
run_turbo_install_template "turbo_with_webpacker"
|
37
|
+
switch_on_redis_if_available
|
22
38
|
end
|
23
39
|
|
24
40
|
desc "Switch on Redis and use it in development"
|
data/lib/turbo/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: turbo-rails
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.7.
|
4
|
+
version: 0.7.10
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Sam Stephenson
|
@@ -10,7 +10,7 @@ authors:
|
|
10
10
|
autorequire:
|
11
11
|
bindir: bin
|
12
12
|
cert_chain: []
|
13
|
-
date: 2021-
|
13
|
+
date: 2021-09-01 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: rails
|