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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 0afaf17b7f3a39dfff97f5accb2a08ffc32ab365e6ee14ed1733ffdd1eae0753
4
- data.tar.gz: d9cb83c890f0805d8af97a89444aedb5bacc847d47d31460c88bb6e7dd0ca14a
3
+ metadata.gz: cfd76532d1cd7a3cd24ff905c6db5e59d2834bf460938343050eb46f95ef3ebb
4
+ data.tar.gz: 49b14a0ef0c07e3b93e3ba90eff8e39ff445001344e3a73c4e53efc02604afa1
5
5
  SHA512:
6
- metadata.gz: 415fe0ea0e8a57c11a8907773da2c3f55075c7b5b19efcf436f8493e5eb69c267ac5431d0c3d6954b3795e76322efec9a345fe01832a29aef2c91518b1e8e381
7
- data.tar.gz: a287193c8385988039e12808ec8851523aaaab49d549281ab105f8a00968690eff3db17284e8e8162202b0a91d99218a334d4a020d604551415614b68b62dc98
6
+ metadata.gz: e5260560ffc942d07a28fb25e6d9c79c62a0790440a6e5bd005fb758d3db8eab1b2b0a9970b0d679abf47463c49d7e2dcdf14babb79da26002f40b62d3bc9997
7
+ data.tar.gz: d186240220796370e98378a65b5867734cadfb1dae11d952a86165805a7d430151e9d86f4c13e38ff7333c89098d79a9116bd80cf9d70f1ff25d66ee388df310
data/.ruby-version CHANGED
@@ -1 +1 @@
1
- 2.6.5
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.33.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.1)
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.0.2.1)
20
- actionpack (= 6.0.2.1)
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.0.2.1)
24
- actionpack (= 6.0.2.1)
25
- activejob (= 6.0.2.1)
26
- activerecord (= 6.0.2.1)
27
- activestorage (= 6.0.2.1)
28
- activesupport (= 6.0.2.1)
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.0.2.1)
31
- actionpack (= 6.0.2.1)
32
- actionview (= 6.0.2.1)
33
- activejob (= 6.0.2.1)
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.0.2.1)
37
- actionview (= 6.0.2.1)
38
- activesupport (= 6.0.2.1)
39
- rack (~> 2.0, >= 2.0.8)
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.0.2.1)
44
- actionpack (= 6.0.2.1)
45
- activerecord (= 6.0.2.1)
46
- activestorage (= 6.0.2.1)
47
- activesupport (= 6.0.2.1)
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.0.2.1)
50
- activesupport (= 6.0.2.1)
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.0.2.1)
56
- activesupport (= 6.0.2.1)
57
+ activejob (6.1.4)
58
+ activesupport (= 6.1.4)
57
59
  globalid (>= 0.3.6)
58
- activemodel (6.0.2.1)
59
- activesupport (= 6.0.2.1)
60
- activerecord (6.0.2.1)
61
- activemodel (= 6.0.2.1)
62
- activesupport (= 6.0.2.1)
63
- activestorage (6.0.2.1)
64
- actionpack (= 6.0.2.1)
65
- activejob (= 6.0.2.1)
66
- activerecord (= 6.0.2.1)
67
- marcel (~> 0.3.1)
68
- activesupport (6.0.2.1)
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 (>= 0.7, < 2)
71
- minitest (~> 5.1)
72
- tzinfo (~> 1.1)
73
- zeitwerk (~> 2.2)
74
- addressable (2.7.0)
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.6)
88
+ concurrent-ruby (1.1.9)
85
89
  crass (1.0.6)
86
- erubi (1.9.0)
87
- execjs (2.7.0)
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.2)
95
+ i18n (1.8.10)
92
96
  concurrent-ruby (~> 1.0)
93
- jquery-rails (4.3.5)
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.0)
101
+ kaminari (1.2.1)
98
102
  activesupport (>= 4.1.0)
99
- kaminari-actionview (= 1.2.0)
100
- kaminari-activerecord (= 1.2.0)
101
- kaminari-core (= 1.2.0)
102
- kaminari-actionview (1.2.0)
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.0)
105
- kaminari-activerecord (1.2.0)
108
+ kaminari-core (= 1.2.1)
109
+ kaminari-activerecord (1.2.1)
106
110
  activerecord
107
- kaminari-core (= 1.2.0)
108
- kaminari-core (1.2.0)
109
- loofah (2.4.0)
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.3.3)
117
- mimemagic (~> 0.3.2)
118
- method_source (0.9.2)
119
- mimemagic (0.3.4)
120
- mini_mime (1.0.2)
121
- mini_portile2 (2.4.0)
122
- minitest (5.14.0)
123
- nio4r (2.5.2)
124
- nokogiri (1.10.8)
125
- mini_portile2 (~> 2.4.0)
126
- public_suffix (4.0.3)
127
- rack (2.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.0.2.1)
131
- actioncable (= 6.0.2.1)
132
- actionmailbox (= 6.0.2.1)
133
- actionmailer (= 6.0.2.1)
134
- actionpack (= 6.0.2.1)
135
- actiontext (= 6.0.2.1)
136
- actionview (= 6.0.2.1)
137
- activejob (= 6.0.2.1)
138
- activemodel (= 6.0.2.1)
139
- activerecord (= 6.0.2.1)
140
- activestorage (= 6.0.2.1)
141
- activesupport (= 6.0.2.1)
142
- bundler (>= 1.3.0)
143
- railties (= 6.0.2.1)
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.0.2.1)
151
- actionpack (= 6.0.2.1)
152
- activesupport (= 6.0.2.1)
154
+ railties (6.1.4)
155
+ actionpack (= 6.1.4)
156
+ activesupport (= 6.1.4)
153
157
  method_source
154
- rake (>= 0.8.7)
155
- thor (>= 0.20.3, < 2.0)
156
- rake (13.0.1)
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.0)
164
+ sprockets (4.0.2)
161
165
  concurrent-ruby (~> 1.0)
162
166
  rack (> 1, < 3)
163
- sprockets-rails (3.2.1)
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.1)
169
- thread_safe (0.3.6)
170
- tzinfo (1.2.6)
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.1)
177
+ websocket-driver (0.7.5)
175
178
  websocket-extensions (>= 0.1.0)
176
- websocket-extensions (0.1.4)
177
- zeitwerk (2.2.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
- "@rails/actioncable": "^6.0.0",
9
- "@rails/ujs": "^6.0.0",
10
- "turbolinks": "^5.2.0",
11
- "@babel/core": "^7.0.0",
12
- "@babel/plugin-proposal-class-properties": "^7.0.0",
13
- "@babel/plugin-proposal-function-bind": "^7.0.0",
14
- "@babel/plugin-transform-runtime": "^7.7.4",
15
- "@babel/polyfill": "^7.0.0",
16
- "@babel/preset-env": "^7.0.0",
17
- "@babel/preset-react": "^7.0.0",
18
- "autoprefixer": "^9.3.1",
19
- "babel-loader": "^8.0.2",
20
- "compression-webpack-plugin": "^3.0.0",
21
- "core-js": "3",
22
- "css-hot-loader": "^1.3.6",
23
- "css-loader": "^3.2.0",
24
- "extract-css-chunks-webpack-plugin": "^4.6.0",
25
- "file-loader": "^4.3.0",
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": "^3.0.0",
30
- "postcss-loader": "^3.0.0",
31
- "sass-loader": "^8.0.0",
32
- "style-loader": "^1.0.0",
33
- "url-loader": "^2.3.0",
34
- "webpack": "^4.25.1",
35
- "webpack-cli": "^3.1.2",
36
- "webpack-dev-server": "^3.1.10",
37
- "webpack-manifest-plugin": "^2.0.4"
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-dev-server --config config/webpack.config.js --hot --inline"
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 ManifestPlugin = require('webpack-manifest-plugin');
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
- hot: production ? false : true,
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 ManifestPlugin({
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,
@@ -1,3 +1,3 @@
1
1
  module RocketCMS
2
- VERSION = '0.33.0'
2
+ VERSION = '0.36.0'
3
3
  end
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.1'
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].index("http").nil?
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.1'
30
+ gem 'rails', '~> 6.1.0'
28
31
  gem 'rails-i18n'
29
- #{if mongoid then "gem 'mongoid', '~> 6.1.0'" else "gem 'pg', '>= 0.18', '< 2.0'" end}
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: '/data/rocket_cms'" else "gem 'rocket_cms_activerecord', path: '/data/rocket_cms'" end}
35
- gem 'rocket_cms', path: '/data/rocket_cms'" if is_dev}
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
- gem 'capybara-webkit'
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
- npm start
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
- npm start
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(/\d{3}/).join("/".freeze)
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])/, '\1_\2').gsub(/([a-z])([A-Z])/, '\1_\2').downcase
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
- require 'capybara/rspec'
813
- require 'capybara/webkit'
814
-
815
- # https://github.com/teamcapybara/capybara/blob/master/lib/capybara.rb#L35
816
- Capybara.configure do |config|
817
- config.default_driver = :webkit
818
- config.javascript_driver = :webkit
819
-
820
- # use the custom server
821
- config.server = :puma
822
- config.run_server = true
823
- end
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.33.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: 2020-02-23 00:00:00.000000000 Z
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.1'
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.1'
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.1.2
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!