rocket_cms 0.33.0 → 0.36.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.ruby-version +1 -1
- data/Gemfile.lock +102 -99
- data/lib/generators/rocket_cms/templates/Capfile +1 -0
- data/lib/generators/rocket_cms/templates/deploy.erb +3 -0
- data/lib/generators/rocket_cms/templates/package.json +29 -30
- data/lib/generators/rocket_cms/templates/webpack.config.js +14 -8
- data/lib/rocket_cms/version.rb +1 -1
- data/rocket_cms.gemspec +1 -1
- data/template.rb +77 -30
- metadata +8 -8
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: cfd76532d1cd7a3cd24ff905c6db5e59d2834bf460938343050eb46f95ef3ebb
|
4
|
+
data.tar.gz: 49b14a0ef0c07e3b93e3ba90eff8e39ff445001344e3a73c4e53efc02604afa1
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e5260560ffc942d07a28fb25e6d9c79c62a0790440a6e5bd005fb758d3db8eab1b2b0a9970b0d679abf47463c49d7e2dcdf14babb79da26002f40b62d3bc9997
|
7
|
+
data.tar.gz: d186240220796370e98378a65b5867734cadfb1dae11d952a86165805a7d430151e9d86f4c13e38ff7333c89098d79a9116bd80cf9d70f1ff25d66ee388df310
|
data/.ruby-version
CHANGED
@@ -1 +1 @@
|
|
1
|
-
2.6.
|
1
|
+
2.6.6
|
data/Gemfile.lock
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
rocket_cms (0.
|
4
|
+
rocket_cms (0.36.0)
|
5
5
|
addressable
|
6
6
|
coffee-rails
|
7
7
|
jquery-rails
|
8
8
|
kaminari
|
9
9
|
manual_slug
|
10
|
-
rails (>= 5.1, < 6.
|
10
|
+
rails (>= 5.1, < 6.2)
|
11
11
|
smart_excerpt
|
12
12
|
stringex
|
13
13
|
thor
|
@@ -16,62 +16,66 @@ PATH
|
|
16
16
|
GEM
|
17
17
|
remote: https://rubygems.org/
|
18
18
|
specs:
|
19
|
-
actioncable (6.
|
20
|
-
actionpack (= 6.
|
19
|
+
actioncable (6.1.4)
|
20
|
+
actionpack (= 6.1.4)
|
21
|
+
activesupport (= 6.1.4)
|
21
22
|
nio4r (~> 2.0)
|
22
23
|
websocket-driver (>= 0.6.1)
|
23
|
-
actionmailbox (6.
|
24
|
-
actionpack (= 6.
|
25
|
-
activejob (= 6.
|
26
|
-
activerecord (= 6.
|
27
|
-
activestorage (= 6.
|
28
|
-
activesupport (= 6.
|
24
|
+
actionmailbox (6.1.4)
|
25
|
+
actionpack (= 6.1.4)
|
26
|
+
activejob (= 6.1.4)
|
27
|
+
activerecord (= 6.1.4)
|
28
|
+
activestorage (= 6.1.4)
|
29
|
+
activesupport (= 6.1.4)
|
29
30
|
mail (>= 2.7.1)
|
30
|
-
actionmailer (6.
|
31
|
-
actionpack (= 6.
|
32
|
-
actionview (= 6.
|
33
|
-
activejob (= 6.
|
31
|
+
actionmailer (6.1.4)
|
32
|
+
actionpack (= 6.1.4)
|
33
|
+
actionview (= 6.1.4)
|
34
|
+
activejob (= 6.1.4)
|
35
|
+
activesupport (= 6.1.4)
|
34
36
|
mail (~> 2.5, >= 2.5.4)
|
35
37
|
rails-dom-testing (~> 2.0)
|
36
|
-
actionpack (6.
|
37
|
-
actionview (= 6.
|
38
|
-
activesupport (= 6.
|
39
|
-
rack (~> 2.0, >= 2.0.
|
38
|
+
actionpack (6.1.4)
|
39
|
+
actionview (= 6.1.4)
|
40
|
+
activesupport (= 6.1.4)
|
41
|
+
rack (~> 2.0, >= 2.0.9)
|
40
42
|
rack-test (>= 0.6.3)
|
41
43
|
rails-dom-testing (~> 2.0)
|
42
44
|
rails-html-sanitizer (~> 1.0, >= 1.2.0)
|
43
|
-
actiontext (6.
|
44
|
-
actionpack (= 6.
|
45
|
-
activerecord (= 6.
|
46
|
-
activestorage (= 6.
|
47
|
-
activesupport (= 6.
|
45
|
+
actiontext (6.1.4)
|
46
|
+
actionpack (= 6.1.4)
|
47
|
+
activerecord (= 6.1.4)
|
48
|
+
activestorage (= 6.1.4)
|
49
|
+
activesupport (= 6.1.4)
|
48
50
|
nokogiri (>= 1.8.5)
|
49
|
-
actionview (6.
|
50
|
-
activesupport (= 6.
|
51
|
+
actionview (6.1.4)
|
52
|
+
activesupport (= 6.1.4)
|
51
53
|
builder (~> 3.1)
|
52
54
|
erubi (~> 1.4)
|
53
55
|
rails-dom-testing (~> 2.0)
|
54
56
|
rails-html-sanitizer (~> 1.1, >= 1.2.0)
|
55
|
-
activejob (6.
|
56
|
-
activesupport (= 6.
|
57
|
+
activejob (6.1.4)
|
58
|
+
activesupport (= 6.1.4)
|
57
59
|
globalid (>= 0.3.6)
|
58
|
-
activemodel (6.
|
59
|
-
activesupport (= 6.
|
60
|
-
activerecord (6.
|
61
|
-
activemodel (= 6.
|
62
|
-
activesupport (= 6.
|
63
|
-
activestorage (6.
|
64
|
-
actionpack (= 6.
|
65
|
-
activejob (= 6.
|
66
|
-
activerecord (= 6.
|
67
|
-
|
68
|
-
|
60
|
+
activemodel (6.1.4)
|
61
|
+
activesupport (= 6.1.4)
|
62
|
+
activerecord (6.1.4)
|
63
|
+
activemodel (= 6.1.4)
|
64
|
+
activesupport (= 6.1.4)
|
65
|
+
activestorage (6.1.4)
|
66
|
+
actionpack (= 6.1.4)
|
67
|
+
activejob (= 6.1.4)
|
68
|
+
activerecord (= 6.1.4)
|
69
|
+
activesupport (= 6.1.4)
|
70
|
+
marcel (~> 1.0.0)
|
71
|
+
mini_mime (>= 1.1.0)
|
72
|
+
activesupport (6.1.4)
|
69
73
|
concurrent-ruby (~> 1.0, >= 1.0.2)
|
70
|
-
i18n (>=
|
71
|
-
minitest (
|
72
|
-
tzinfo (~>
|
73
|
-
zeitwerk (~> 2.
|
74
|
-
addressable (2.
|
74
|
+
i18n (>= 1.6, < 2)
|
75
|
+
minitest (>= 5.1)
|
76
|
+
tzinfo (~> 2.0)
|
77
|
+
zeitwerk (~> 2.3)
|
78
|
+
addressable (2.8.0)
|
75
79
|
public_suffix (>= 2.0.2, < 5.0)
|
76
80
|
builder (3.2.4)
|
77
81
|
coffee-rails (5.0.0)
|
@@ -81,100 +85,99 @@ GEM
|
|
81
85
|
coffee-script-source
|
82
86
|
execjs
|
83
87
|
coffee-script-source (1.12.2)
|
84
|
-
concurrent-ruby (1.1.
|
88
|
+
concurrent-ruby (1.1.9)
|
85
89
|
crass (1.0.6)
|
86
|
-
erubi (1.
|
87
|
-
execjs (2.
|
90
|
+
erubi (1.10.0)
|
91
|
+
execjs (2.8.1)
|
88
92
|
globalid (0.4.2)
|
89
93
|
activesupport (>= 4.2.0)
|
90
94
|
htmlentities (4.3.4)
|
91
|
-
i18n (1.8.
|
95
|
+
i18n (1.8.10)
|
92
96
|
concurrent-ruby (~> 1.0)
|
93
|
-
jquery-rails (4.
|
97
|
+
jquery-rails (4.4.0)
|
94
98
|
rails-dom-testing (>= 1, < 3)
|
95
99
|
railties (>= 4.2.0)
|
96
100
|
thor (>= 0.14, < 2.0)
|
97
|
-
kaminari (1.2.
|
101
|
+
kaminari (1.2.1)
|
98
102
|
activesupport (>= 4.1.0)
|
99
|
-
kaminari-actionview (= 1.2.
|
100
|
-
kaminari-activerecord (= 1.2.
|
101
|
-
kaminari-core (= 1.2.
|
102
|
-
kaminari-actionview (1.2.
|
103
|
+
kaminari-actionview (= 1.2.1)
|
104
|
+
kaminari-activerecord (= 1.2.1)
|
105
|
+
kaminari-core (= 1.2.1)
|
106
|
+
kaminari-actionview (1.2.1)
|
103
107
|
actionview
|
104
|
-
kaminari-core (= 1.2.
|
105
|
-
kaminari-activerecord (1.2.
|
108
|
+
kaminari-core (= 1.2.1)
|
109
|
+
kaminari-activerecord (1.2.1)
|
106
110
|
activerecord
|
107
|
-
kaminari-core (= 1.2.
|
108
|
-
kaminari-core (1.2.
|
109
|
-
loofah (2.
|
111
|
+
kaminari-core (= 1.2.1)
|
112
|
+
kaminari-core (1.2.1)
|
113
|
+
loofah (2.10.0)
|
110
114
|
crass (~> 1.0.2)
|
111
115
|
nokogiri (>= 1.5.9)
|
112
116
|
mail (2.7.1)
|
113
117
|
mini_mime (>= 0.1.1)
|
114
118
|
manual_slug (0.4.0)
|
115
119
|
activesupport
|
116
|
-
marcel (0.
|
117
|
-
|
118
|
-
|
119
|
-
|
120
|
-
|
121
|
-
|
122
|
-
|
123
|
-
|
124
|
-
|
125
|
-
|
126
|
-
|
127
|
-
rack (2.2.
|
120
|
+
marcel (1.0.1)
|
121
|
+
method_source (1.0.0)
|
122
|
+
mini_mime (1.1.0)
|
123
|
+
mini_portile2 (2.5.3)
|
124
|
+
minitest (5.14.4)
|
125
|
+
nio4r (2.5.7)
|
126
|
+
nokogiri (1.11.7)
|
127
|
+
mini_portile2 (~> 2.5.0)
|
128
|
+
racc (~> 1.4)
|
129
|
+
public_suffix (4.0.6)
|
130
|
+
racc (1.5.2)
|
131
|
+
rack (2.2.3)
|
128
132
|
rack-test (1.1.0)
|
129
133
|
rack (>= 1.0, < 3)
|
130
|
-
rails (6.
|
131
|
-
actioncable (= 6.
|
132
|
-
actionmailbox (= 6.
|
133
|
-
actionmailer (= 6.
|
134
|
-
actionpack (= 6.
|
135
|
-
actiontext (= 6.
|
136
|
-
actionview (= 6.
|
137
|
-
activejob (= 6.
|
138
|
-
activemodel (= 6.
|
139
|
-
activerecord (= 6.
|
140
|
-
activestorage (= 6.
|
141
|
-
activesupport (= 6.
|
142
|
-
bundler (>= 1.
|
143
|
-
railties (= 6.
|
134
|
+
rails (6.1.4)
|
135
|
+
actioncable (= 6.1.4)
|
136
|
+
actionmailbox (= 6.1.4)
|
137
|
+
actionmailer (= 6.1.4)
|
138
|
+
actionpack (= 6.1.4)
|
139
|
+
actiontext (= 6.1.4)
|
140
|
+
actionview (= 6.1.4)
|
141
|
+
activejob (= 6.1.4)
|
142
|
+
activemodel (= 6.1.4)
|
143
|
+
activerecord (= 6.1.4)
|
144
|
+
activestorage (= 6.1.4)
|
145
|
+
activesupport (= 6.1.4)
|
146
|
+
bundler (>= 1.15.0)
|
147
|
+
railties (= 6.1.4)
|
144
148
|
sprockets-rails (>= 2.0.0)
|
145
149
|
rails-dom-testing (2.0.3)
|
146
150
|
activesupport (>= 4.2.0)
|
147
151
|
nokogiri (>= 1.6)
|
148
152
|
rails-html-sanitizer (1.3.0)
|
149
153
|
loofah (~> 2.3)
|
150
|
-
railties (6.
|
151
|
-
actionpack (= 6.
|
152
|
-
activesupport (= 6.
|
154
|
+
railties (6.1.4)
|
155
|
+
actionpack (= 6.1.4)
|
156
|
+
activesupport (= 6.1.4)
|
153
157
|
method_source
|
154
|
-
rake (>= 0.
|
155
|
-
thor (
|
156
|
-
rake (13.0.
|
158
|
+
rake (>= 0.13)
|
159
|
+
thor (~> 1.0)
|
160
|
+
rake (13.0.6)
|
157
161
|
smart_excerpt (0.1.6)
|
158
162
|
activesupport
|
159
163
|
htmlentities
|
160
|
-
sprockets (4.0.
|
164
|
+
sprockets (4.0.2)
|
161
165
|
concurrent-ruby (~> 1.0)
|
162
166
|
rack (> 1, < 3)
|
163
|
-
sprockets-rails (3.2.
|
167
|
+
sprockets-rails (3.2.2)
|
164
168
|
actionpack (>= 4.0)
|
165
169
|
activesupport (>= 4.0)
|
166
170
|
sprockets (>= 3.0.0)
|
167
171
|
stringex (2.8.5)
|
168
|
-
thor (1.0
|
169
|
-
|
170
|
-
|
171
|
-
thread_safe (~> 0.1)
|
172
|
+
thor (1.1.0)
|
173
|
+
tzinfo (2.0.4)
|
174
|
+
concurrent-ruby (~> 1.0)
|
172
175
|
validates_email_format_of (1.6.3)
|
173
176
|
i18n
|
174
|
-
websocket-driver (0.7.
|
177
|
+
websocket-driver (0.7.5)
|
175
178
|
websocket-extensions (>= 0.1.0)
|
176
|
-
websocket-extensions (0.1.
|
177
|
-
zeitwerk (2.
|
179
|
+
websocket-extensions (0.1.5)
|
180
|
+
zeitwerk (2.4.2)
|
178
181
|
|
179
182
|
PLATFORMS
|
180
183
|
ruby
|
@@ -18,6 +18,7 @@ require 'capistrano/puma'
|
|
18
18
|
install_plugin Capistrano::Puma
|
19
19
|
install_plugin Capistrano::Puma::Workers
|
20
20
|
install_plugin Capistrano::Puma::Jungle
|
21
|
+
install_plugin Capistrano::Puma::Systemd
|
21
22
|
|
22
23
|
require "capistrano/scm/git"
|
23
24
|
install_plugin Capistrano::SCM::Git
|
@@ -13,6 +13,9 @@ set :use_sudo, false
|
|
13
13
|
set :puma_state, -> { File.join(shared_path, 'tmp', 'puma', 'state') }
|
14
14
|
set :puma_pid, -> { File.join(shared_path, 'tmp', 'puma', 'pid') }
|
15
15
|
set :puma_conf, -> { File.join(current_path, 'config', 'puma.rb') }
|
16
|
+
set :puma_preload_app, false
|
17
|
+
set :puma_service_unit_name, "puma"
|
18
|
+
set :puma_systemctl_user, :user
|
16
19
|
|
17
20
|
Rake::Task["puma:check"].clear
|
18
21
|
Rake::Task["puma:config"].clear
|
@@ -5,39 +5,38 @@
|
|
5
5
|
"private": true,
|
6
6
|
"repository": "git@rscz.ru:rocket-science/<%= app_name.downcase %>.git",
|
7
7
|
"dependencies": {
|
8
|
-
"@
|
9
|
-
"@
|
10
|
-
"
|
11
|
-
"@babel/
|
12
|
-
"@babel/
|
13
|
-
"@babel/
|
14
|
-
"@
|
15
|
-
"@
|
16
|
-
"
|
17
|
-
"
|
18
|
-
"
|
19
|
-
"
|
20
|
-
"
|
21
|
-
"
|
22
|
-
"css-
|
23
|
-
"
|
24
|
-
"
|
25
|
-
"
|
26
|
-
"html-loader": "^0.5.5",
|
27
|
-
"node-sass": "^4.0.0",
|
8
|
+
"@babel/core": "^7.14.6",
|
9
|
+
"@babel/plugin-proposal-class-properties": "^7.14.5",
|
10
|
+
"@babel/plugin-proposal-function-bind": "^7.14.5",
|
11
|
+
"@babel/plugin-transform-runtime": "^7.14.5",
|
12
|
+
"@babel/preset-env": "^7.14.7",
|
13
|
+
"@babel/preset-react": "^7.14.5",
|
14
|
+
"@rails/actioncable": "^6.1.4",
|
15
|
+
"@rails/ujs": "^6.1.4",
|
16
|
+
"autoprefixer": "^10.3.1",
|
17
|
+
"babel-loader": "^8.2.2",
|
18
|
+
"compression-webpack-plugin": "^8.0.1",
|
19
|
+
"core-js": "^3.15.2",
|
20
|
+
"css-hot-loader": "^1.4.4",
|
21
|
+
"css-loader": "^5.2.7",
|
22
|
+
"extract-css-chunks-webpack-plugin": "^4.9.0",
|
23
|
+
"file-loader": "^6.2.0",
|
24
|
+
"html-loader": "^2.1.2",
|
25
|
+
"node-sass": "^6.0.1",
|
28
26
|
"normalize.css": "^8.0.1",
|
29
|
-
"postcss-functions": "^
|
30
|
-
"postcss-loader": "^
|
31
|
-
"sass-loader": "^
|
32
|
-
"style-loader": "^1.0
|
33
|
-
"
|
34
|
-
"
|
35
|
-
"webpack
|
36
|
-
"webpack-
|
37
|
-
"webpack-
|
27
|
+
"postcss-functions": "^4.0.2",
|
28
|
+
"postcss-loader": "^6.1.1",
|
29
|
+
"sass-loader": "^12.1.0",
|
30
|
+
"style-loader": "^3.1.0",
|
31
|
+
"turbolinks": "^5.2.0",
|
32
|
+
"url-loader": "^4.1.1",
|
33
|
+
"webpack": "^5.44.0",
|
34
|
+
"webpack-cli": "^4.7.2",
|
35
|
+
"webpack-dev-server": "^3.11.2",
|
36
|
+
"webpack-manifest-plugin": "^3.1.1"
|
38
37
|
},
|
39
38
|
"scripts": {
|
40
39
|
"build": "webpack --config config/webpack.config.js",
|
41
|
-
"start": "webpack
|
40
|
+
"start": "webpack serve --config config/webpack.config.js --progress --hot --inline"
|
42
41
|
}
|
43
42
|
}
|
@@ -2,7 +2,7 @@
|
|
2
2
|
|
3
3
|
var path = require('path');
|
4
4
|
var webpack = require('webpack');
|
5
|
-
var
|
5
|
+
var { WebpackManifestPlugin } = require('webpack-manifest-plugin');
|
6
6
|
|
7
7
|
var autoprefixer = require('autoprefixer');
|
8
8
|
var CompressionPlugin = require("compression-webpack-plugin");
|
@@ -55,7 +55,8 @@ var config = {
|
|
55
55
|
{
|
56
56
|
loader: ExtractCssChunks.loader,
|
57
57
|
options: {
|
58
|
-
|
58
|
+
modules: false,
|
59
|
+
hmr: production ? false : true,
|
59
60
|
// Force reload all
|
60
61
|
//reloadAll: true,
|
61
62
|
}
|
@@ -71,7 +72,15 @@ var config = {
|
|
71
72
|
loader: "postcss-loader",
|
72
73
|
},
|
73
74
|
{
|
74
|
-
loader: "sass-loader"
|
75
|
+
loader: "sass-loader",
|
76
|
+
options: {
|
77
|
+
sassOptions: {
|
78
|
+
includePaths: [
|
79
|
+
path.resolve(__dirname, "..", "webpack"),
|
80
|
+
//path.resolve(__dirname, "..", "node_modules"),
|
81
|
+
]
|
82
|
+
}
|
83
|
+
},
|
75
84
|
}
|
76
85
|
]
|
77
86
|
},
|
@@ -108,7 +117,7 @@ var config = {
|
|
108
117
|
}
|
109
118
|
),
|
110
119
|
new CleanUpExtractCssChunks(),
|
111
|
-
new
|
120
|
+
new WebpackManifestPlugin({
|
112
121
|
writeToFileEmit: true,
|
113
122
|
//basePath: "",
|
114
123
|
publicPath: production ? "/webpack/" : 'http://' + host + ':' + devServerPort + '/webpack/',
|
@@ -118,6 +127,7 @@ var config = {
|
|
118
127
|
],
|
119
128
|
optimization: {
|
120
129
|
minimize: production,
|
130
|
+
moduleIds: production ? 'deterministic' : 'named',
|
121
131
|
splitChunks: {
|
122
132
|
cacheGroups: {
|
123
133
|
default: false,
|
@@ -149,10 +159,6 @@ if (production) {
|
|
149
159
|
);
|
150
160
|
config.output.publicPath = '/webpack/';
|
151
161
|
} else {
|
152
|
-
config.plugins.push(
|
153
|
-
new webpack.NamedModulesPlugin(),
|
154
|
-
)
|
155
|
-
|
156
162
|
config.devServer = {
|
157
163
|
port: devServerPort,
|
158
164
|
disableHostCheck: true,
|
data/lib/rocket_cms/version.rb
CHANGED
data/rocket_cms.gemspec
CHANGED
@@ -20,7 +20,7 @@ Gem::Specification.new do |spec|
|
|
20
20
|
spec.add_development_dependency 'bundler'
|
21
21
|
spec.add_development_dependency 'rake'
|
22
22
|
|
23
|
-
spec.add_dependency 'rails', '>= 5.1', '< 6.
|
23
|
+
spec.add_dependency 'rails', '>= 5.1', '< 6.2'
|
24
24
|
spec.add_dependency 'jquery-rails'
|
25
25
|
spec.add_dependency 'coffee-rails'
|
26
26
|
#spec.add_dependency 'turbolinks'
|
data/template.rb
CHANGED
@@ -3,8 +3,11 @@ version = rails_spec.version.to_s
|
|
3
3
|
|
4
4
|
mongoid = options[:skip_active_record]
|
5
5
|
yarn = !options[:skip_yarn]
|
6
|
-
is_dev = options[:template].
|
6
|
+
is_dev = !options[:template].start_with?("http")
|
7
7
|
spring = !options[:skip_spring]
|
8
|
+
if is_dev
|
9
|
+
rocket_cms_path = File.realpath(options[:template] + "/..")
|
10
|
+
end
|
8
11
|
|
9
12
|
if Gem::Version.new(version) < Gem::Version.new('6.0.0')
|
10
13
|
puts "You are using an old version of Rails (#{version})"
|
@@ -24,15 +27,14 @@ git_source(:github) do |repo_name|
|
|
24
27
|
"https://github.com/#{repo_name}.git"
|
25
28
|
end
|
26
29
|
'}
|
27
|
-
gem 'rails', '6.0
|
30
|
+
gem 'rails', '~> 6.1.0'
|
28
31
|
gem 'rails-i18n'
|
29
|
-
#{if mongoid then "gem 'mongoid', '~>
|
32
|
+
#{if mongoid then "gem 'mongoid', '~> 7.2.0'" else "gem 'pg', '>= 0.18', '< 2.0'" end}
|
30
33
|
gem 'turbolinks' #required for redirects even if using via webpack
|
31
34
|
|
32
|
-
|
33
35
|
#{
|
34
|
-
"#{if mongoid then "gem 'rocket_cms_mongoid', path: '
|
35
|
-
gem 'rocket_cms', path: '
|
36
|
+
"#{if mongoid then "gem 'rocket_cms_mongoid', path: '#{rocket_cms_path}'" else "gem 'rocket_cms_activerecord', path: '#{rocket_cms_path}'" end}
|
37
|
+
gem 'rocket_cms', path: '#{rocket_cms_path}'" if is_dev}
|
36
38
|
#{"#{if mongoid then "gem 'rocket_cms_mongoid'" else "gem 'rocket_cms_activerecord'" end}" if !is_dev}
|
37
39
|
|
38
40
|
gem 'glebtv-ckeditor'
|
@@ -52,7 +54,7 @@ gem 'cancancan'
|
|
52
54
|
#{if mongoid then "gem 'cancancan'" end}
|
53
55
|
|
54
56
|
gem 'cloner'
|
55
|
-
gem 'puma'
|
57
|
+
gem 'puma', github: 'AnatolyShirykalov/puma', branch: '5.3.2'
|
56
58
|
|
57
59
|
gem 'sentry-raven'
|
58
60
|
|
@@ -87,16 +89,21 @@ group :development do
|
|
87
89
|
gem 'capistrano-rails', require: false
|
88
90
|
end
|
89
91
|
|
90
|
-
group :test do
|
92
|
+
group :development, :test do
|
93
|
+
gem "factory_bot_rails"
|
91
94
|
gem 'rspec-rails'
|
92
|
-
gem 'email_spec'
|
93
95
|
#{if mongoid then " gem 'mongoid-rspec'" else "" end}
|
94
|
-
gem 'ffaker'
|
95
|
-
gem 'factory_bot_rails'
|
96
|
-
|
97
96
|
gem 'capybara'
|
98
|
-
|
97
|
+
# https://github.com/mattheworiordan/capybara-screenshot/issues/243
|
98
|
+
gem 'capybara-screenshot'
|
99
|
+
gem 'selenium-webdriver', '4.0.0.beta4'
|
100
|
+
gem 'webdrivers'
|
99
101
|
gem 'database_cleaner'
|
102
|
+
#{if mongoid then " gem 'database_cleaner-mongoid'" else "" end}
|
103
|
+
#gem 'database_cleaner-redis'
|
104
|
+
gem 'ffaker'
|
105
|
+
gem 'timecop'
|
106
|
+
gem "pry-rails"
|
100
107
|
gem 'childprocess'
|
101
108
|
end
|
102
109
|
|
@@ -157,14 +164,14 @@ ORM: #{if mongoid then 'Mongoid' else 'ActiveRecord' end}
|
|
157
164
|
|
158
165
|
To run (windows):
|
159
166
|
```
|
160
|
-
|
167
|
+
yarn start
|
161
168
|
bundle exec rails s webrick
|
162
169
|
```
|
163
170
|
|
164
171
|
|
165
172
|
To run (nix/mac):
|
166
173
|
```
|
167
|
-
|
174
|
+
yarn start
|
168
175
|
puma
|
169
176
|
```
|
170
177
|
|
@@ -386,7 +393,7 @@ class Shrine
|
|
386
393
|
case id
|
387
394
|
when Integer
|
388
395
|
str_id = "%09d".freeze % id
|
389
|
-
str_id.scan(
|
396
|
+
str_id.scan(/\\d{3}/).join("/".freeze)
|
390
397
|
when String
|
391
398
|
id.scan(/.{3}/).first(3).join("/".freeze)
|
392
399
|
else
|
@@ -397,7 +404,7 @@ class Shrine
|
|
397
404
|
|
398
405
|
def transform_class_name(class_name)
|
399
406
|
if opts[:custom_pretty_location][:class_underscore]
|
400
|
-
class_name.gsub(/([A-Z]+)([A-Z][a-z])/, '
|
407
|
+
class_name.gsub(/([A-Z]+)([A-Z][a-z])/, '\\1_\\2').gsub(/([a-z])([A-Z])/, '\\1_\\2').downcase
|
401
408
|
else
|
402
409
|
class_name.downcase
|
403
410
|
end
|
@@ -546,7 +553,7 @@ if rails_env == 'development'
|
|
546
553
|
else
|
547
554
|
# https://github.com/seuros/capistrano-puma/blob/642d141ee502546bd5a43a76cd9f6766dc0fcc7a/lib/capistrano/templates/puma.rb.erb#L25
|
548
555
|
prune_bundler
|
549
|
-
preload_app!
|
556
|
+
preload_app! false
|
550
557
|
# Change to match your CPU core count
|
551
558
|
workers 1
|
552
559
|
#{'shared_dir = "#{base_dir}/shared"'}
|
@@ -561,6 +568,7 @@ else
|
|
561
568
|
#{'pidfile "#{shared_dir}/tmp/puma/pid"'}
|
562
569
|
#{'state_path "#{shared_dir}/tmp/puma/state"'}
|
563
570
|
activate_control_app
|
571
|
+
reopen_logs
|
564
572
|
on_restart do
|
565
573
|
puts 'Refreshing Gemfile'
|
566
574
|
#{'ENV["BUNDLE_GEMFILE"] = "#{current_dir}/Gemfile" unless rails_env == \'development\''}
|
@@ -809,18 +817,57 @@ TEXT
|
|
809
817
|
end
|
810
818
|
|
811
819
|
create_file "spec/support/capybara.rb" do <<-TEXT
|
812
|
-
|
813
|
-
|
814
|
-
|
815
|
-
|
816
|
-
|
817
|
-
|
818
|
-
|
819
|
-
|
820
|
-
|
821
|
-
|
822
|
-
|
823
|
-
|
820
|
+
if ENV['CI']
|
821
|
+
Selenium::WebDriver::Chrome.path = '/usr/bin/google-chrome-stable'
|
822
|
+
else
|
823
|
+
begin
|
824
|
+
Selenium::WebDriver::Chrome.path = '/usr/bin/chromium'
|
825
|
+
rescue Selenium::WebDriver::Error::WebDriverError
|
826
|
+
end
|
827
|
+
end
|
828
|
+
|
829
|
+
Capybara.register_driver :chrome_root do |app|
|
830
|
+
service = ::Selenium::WebDriver::Service.chrome#(args: { verbose: true, log_path: 'chromedriver.log' })
|
831
|
+
options = ::Selenium::WebDriver::Chrome::Options.new
|
832
|
+
options.args << '--headless' unless ENV['NO_HEADLESS']
|
833
|
+
options.args << '--no-sandbox'
|
834
|
+
options.args << '--window-size=1280,1024'
|
835
|
+
|
836
|
+
Capybara::Selenium::Driver.new(app, browser: :chrome, options: options, service: service)
|
837
|
+
end
|
838
|
+
# не работает, установлено выше
|
839
|
+
# Capybara::Screenshot.webkit_options = { width: 1280, height: 1024 }
|
840
|
+
|
841
|
+
if ENV['CHROME_VISIBLE']
|
842
|
+
Capybara.javascript_driver = :selenium_chrome
|
843
|
+
else
|
844
|
+
Capybara.javascript_driver = :chrome_root
|
845
|
+
end
|
846
|
+
Capybara.default_driver = :rack_test
|
847
|
+
Capybara.default_max_wait_time = 15
|
848
|
+
Capybara.register_server :puma do |app, port, host|
|
849
|
+
require 'rack/handler/puma'
|
850
|
+
Rack::Handler::Puma.run(app, Host: host, Port: port, Threads: "1:1")
|
851
|
+
end
|
852
|
+
|
853
|
+
Capybara.configure do |config|
|
854
|
+
config.app_host = "http://\#{Rails.application.secrets.host}"
|
855
|
+
config.server = :puma
|
856
|
+
config.server_port = 9332
|
857
|
+
config.run_server = true
|
858
|
+
config.always_include_port = true
|
859
|
+
end
|
860
|
+
|
861
|
+
|
862
|
+
Capybara::Screenshot.register_driver(:selenium_chrome) do |driver, path|
|
863
|
+
driver.browser.save_screenshot(path)
|
864
|
+
end
|
865
|
+
Capybara::Screenshot.register_driver(:chrome_root) do |driver, path|
|
866
|
+
driver.browser.save_screenshot(path)
|
867
|
+
end
|
868
|
+
|
869
|
+
Capybara::Screenshot.autosave_on_failure = true
|
870
|
+
|
824
871
|
TEXT
|
825
872
|
end
|
826
873
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rocket_cms
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.36.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- glebtv
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2021-07-14 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -47,7 +47,7 @@ dependencies:
|
|
47
47
|
version: '5.1'
|
48
48
|
- - "<"
|
49
49
|
- !ruby/object:Gem::Version
|
50
|
-
version: '6.
|
50
|
+
version: '6.2'
|
51
51
|
type: :runtime
|
52
52
|
prerelease: false
|
53
53
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -57,7 +57,7 @@ dependencies:
|
|
57
57
|
version: '5.1'
|
58
58
|
- - "<"
|
59
59
|
- !ruby/object:Gem::Version
|
60
|
-
version: '6.
|
60
|
+
version: '6.2'
|
61
61
|
- !ruby/object:Gem::Dependency
|
62
62
|
name: jquery-rails
|
63
63
|
requirement: !ruby/object:Gem::Requirement
|
@@ -349,7 +349,7 @@ homepage: https://gitlab.com/rocket-science/rocket_cms
|
|
349
349
|
licenses:
|
350
350
|
- MIT
|
351
351
|
metadata: {}
|
352
|
-
post_install_message:
|
352
|
+
post_install_message:
|
353
353
|
rdoc_options: []
|
354
354
|
require_paths:
|
355
355
|
- lib
|
@@ -364,8 +364,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
364
364
|
- !ruby/object:Gem::Version
|
365
365
|
version: '0'
|
366
366
|
requirements: []
|
367
|
-
rubygems_version: 3.
|
368
|
-
signing_key:
|
367
|
+
rubygems_version: 3.0.3
|
368
|
+
signing_key:
|
369
369
|
specification_version: 4
|
370
370
|
summary: Please DO NOT use this gem directly, use rocket_cms_mongoid or rocket_cms_activerecord
|
371
371
|
instead!
|