capistrano-spa 0.0.1 → 0.0.2
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/README.md +11 -19
- data/capistrano-spa.gemspec +1 -2
- metadata +7 -21
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: e9c4534a824dcb3b0419148d357e88b43c94e2c5
|
|
4
|
+
data.tar.gz: 674f3a7f8c088748c42825528f51c5083f42e65b
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 9331b188967c7045b993e35c180ce0b91da922f2c177879ecb7cc269490875a91ddfdbbcdc6b97a6f080d80433c17c10558c228c41854ee5a17dbf5a152e3b02
|
|
7
|
+
data.tar.gz: b6937fb304f48a71e1c63b401613d4eae5e1dfea3d20ea6804021720ed3c35a8cf694f9ec7394025b36cbb1dc308cfbcc8a2630772a0297f63bd28bee40099a4
|
data/README.md
CHANGED
|
@@ -28,24 +28,6 @@ You need to call the Capistrano task provided by this gem by yourself (this way
|
|
|
28
28
|
|
|
29
29
|
`after 'rsync:stage_done', 'spa:all'`
|
|
30
30
|
|
|
31
|
-
If you need asset pipeline's assets on production, then it's advised to precompile then locally just after running `spa:all`. This way rails assets will get appended to public folder before rsync'ing data to server. As an alternative to `capistrano/rails/migrations`, you can do it like:
|
|
32
|
-
|
|
33
|
-
# Precompile webpack assets locally
|
|
34
|
-
namespace :assets do
|
|
35
|
-
task :compile do
|
|
36
|
-
run_locally do
|
|
37
|
-
with rails_env: fetch(:stage) do
|
|
38
|
-
Dir.chdir fetch(:rsync_stage) do
|
|
39
|
-
execute 'cp config/database.dev.yml config/database.yml'
|
|
40
|
-
execute :bundle, 'exec bin/rails assets:precompile'
|
|
41
|
-
end
|
|
42
|
-
end
|
|
43
|
-
end
|
|
44
|
-
end
|
|
45
|
-
end
|
|
46
|
-
|
|
47
|
-
after 'spa:all', 'assets:compile'
|
|
48
|
-
|
|
49
31
|
#### Configuration
|
|
50
32
|
|
|
51
33
|
* `:spa_repo_url` - required
|
|
@@ -58,9 +40,19 @@ If you need asset pipeline's assets on production, then it's advised to precompi
|
|
|
58
40
|
|
|
59
41
|
#### Notes
|
|
60
42
|
|
|
43
|
+
To precompile rails assets properly, you can either:
|
|
44
|
+
|
|
45
|
+
* do it locally after SPA app is built, for example:
|
|
46
|
+
|
|
47
|
+
`after 'spa:all', 'assets:my_custom_precompile_task'`
|
|
48
|
+
|
|
49
|
+
* or using `capistrano-rails`, but to make it work you need to clear one of it's tasks which is symlinking `public/assets` dir, which we don't want:
|
|
50
|
+
|
|
51
|
+
`Rake::Task["deploy:set_linked_dirs"].clear`
|
|
52
|
+
|
|
61
53
|
If you don't want to use rsync strategy for your rails app, you can skip the last task (`spa:copy_to_rsync_dir`) and move the SPA build to the server by yourself in anyway you like it.
|
|
62
54
|
|
|
63
|
-
Also, depending on your `apache/nginx` server config, `index.html`
|
|
55
|
+
Also, depending on your `apache/nginx` server config, `index.html` should be served automatically, but if it's not on static files whitelist you can either add it to the list or serve `index.html` from controller, like:
|
|
64
56
|
|
|
65
57
|
root "welcome#index"
|
|
66
58
|
|
data/capistrano-spa.gemspec
CHANGED
|
@@ -4,7 +4,7 @@ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
|
|
4
4
|
|
|
5
5
|
Gem::Specification.new do |gem|
|
|
6
6
|
gem.name = "capistrano-spa"
|
|
7
|
-
gem.version = '0.0.
|
|
7
|
+
gem.version = '0.0.2'
|
|
8
8
|
gem.authors = ["Jacek Grzybowski"]
|
|
9
9
|
gem.email = ["jacek213@gmail.com"]
|
|
10
10
|
gem.description = %q{Capistrano tasks for Single Page Apps deployment}
|
|
@@ -18,5 +18,4 @@ Gem::Specification.new do |gem|
|
|
|
18
18
|
gem.require_paths = ["lib"]
|
|
19
19
|
|
|
20
20
|
gem.add_dependency 'capistrano', '~> 3.1'
|
|
21
|
-
gem.add_dependency 'capistrano-bundler', '~> 1.1'
|
|
22
21
|
end
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: capistrano-spa
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.0.
|
|
4
|
+
version: 0.0.2
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Jacek Grzybowski
|
|
8
|
-
autorequire:
|
|
8
|
+
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date:
|
|
11
|
+
date: 2022-08-19 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: capistrano
|
|
@@ -24,20 +24,6 @@ dependencies:
|
|
|
24
24
|
- - "~>"
|
|
25
25
|
- !ruby/object:Gem::Version
|
|
26
26
|
version: '3.1'
|
|
27
|
-
- !ruby/object:Gem::Dependency
|
|
28
|
-
name: capistrano-bundler
|
|
29
|
-
requirement: !ruby/object:Gem::Requirement
|
|
30
|
-
requirements:
|
|
31
|
-
- - "~>"
|
|
32
|
-
- !ruby/object:Gem::Version
|
|
33
|
-
version: '1.1'
|
|
34
|
-
type: :runtime
|
|
35
|
-
prerelease: false
|
|
36
|
-
version_requirements: !ruby/object:Gem::Requirement
|
|
37
|
-
requirements:
|
|
38
|
-
- - "~>"
|
|
39
|
-
- !ruby/object:Gem::Version
|
|
40
|
-
version: '1.1'
|
|
41
27
|
description: Capistrano tasks for Single Page Apps deployment
|
|
42
28
|
email:
|
|
43
29
|
- jacek213@gmail.com
|
|
@@ -58,7 +44,7 @@ homepage: https://github.com/efigence/capistrano-spa
|
|
|
58
44
|
licenses:
|
|
59
45
|
- MIT
|
|
60
46
|
metadata: {}
|
|
61
|
-
post_install_message:
|
|
47
|
+
post_install_message:
|
|
62
48
|
rdoc_options: []
|
|
63
49
|
require_paths:
|
|
64
50
|
- lib
|
|
@@ -73,9 +59,9 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
73
59
|
- !ruby/object:Gem::Version
|
|
74
60
|
version: '0'
|
|
75
61
|
requirements: []
|
|
76
|
-
rubyforge_project:
|
|
77
|
-
rubygems_version: 2.
|
|
78
|
-
signing_key:
|
|
62
|
+
rubyforge_project:
|
|
63
|
+
rubygems_version: 2.4.5.3
|
|
64
|
+
signing_key:
|
|
79
65
|
specification_version: 4
|
|
80
66
|
summary: Capistrano tasks for Single Page Apps deployment
|
|
81
67
|
test_files: []
|