trusty-cms 6.0.3 → 6.0.5

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: fd070d2a1f939233a8e702c0bca79d3642bbc42968b0f8ec119cd7da09f443be
4
- data.tar.gz: b2da94658488d9005dfa919f1be59296f691cd65143b7badb2878118909e351c
3
+ metadata.gz: 5e18272551dce1a329a35f2392d27ab7db0a2b5add8a97817675566af694c574
4
+ data.tar.gz: eceba4ff32ac87ce60d9a3a09d4293bc8c5b492ca4054a377ffa9cf80839b1c8
5
5
  SHA512:
6
- metadata.gz: 57aa2f3b55e1f1c45396ba0ad1d7d0fba25d0fa48a2bf9da705b90ee28bc4764174bc5ee977fe814cb8b4c33df50f13082f96e837b8ae8feba3bf4d1ce3f5f10
7
- data.tar.gz: a2451eda0132fce61f848c770dd066c3b28451fc6d3336984221a19cc209504d591a7ba041aaccb3453743c00703e3c09be37eafa6f25dfce5a5fa5d9a67c22b
6
+ metadata.gz: 42b6a79322a0316b30e3b47f8fcb59854fa5b9aff6c93c6fe0bbdf07191cb38887cc70b46461cc5dd9a51443c0f41f08d0f8900a5fdea360cd7cc2e8f8d24252
7
+ data.tar.gz: 29a6abd9a87189113fe66ca8680e26bcddea84af5582eafd991c5de2cd7ee581553308ff259249e52100cc456e45f461adadc5af90971b4b425f258b7a20e32a
data/Gemfile CHANGED
@@ -21,7 +21,7 @@ group :development, :test do
21
21
  gem 'mysql2'
22
22
  gem 'poltergeist', '~> 1.18.1'
23
23
  gem 'pry-byebug'
24
- gem 'psych', '5.1.0'
24
+ gem 'psych', '5.1.1.1'
25
25
  gem 'rails-observers'
26
26
  gem 'rspec-rails'
27
27
  gem 'simplecov'
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- trusty-cms (6.0.3)
4
+ trusty-cms (6.0.4)
5
5
  RedCloth (= 4.3.2)
6
6
  activestorage-validator
7
7
  acts_as_list (>= 0.9.5, < 1.2.0)
@@ -28,87 +28,80 @@ PATH
28
28
  stringex (>= 2.7.1, < 2.9.0)
29
29
  tzinfo (>= 1.2.3, < 2.1.0)
30
30
  uglifier (>= 3.2, < 5.0)
31
- uuidtools (>= 2.1.5, < 2.3.0)
32
31
  will_paginate (>= 3, < 5)
33
32
 
34
33
  GEM
35
34
  remote: https://rubygems.org/
36
35
  specs:
37
36
  RedCloth (4.3.2)
38
- actioncable (7.0.8)
39
- actionpack (= 7.0.8)
40
- activesupport (= 7.0.8)
37
+ actioncable (6.1.7.6)
38
+ actionpack (= 6.1.7.6)
39
+ activesupport (= 6.1.7.6)
41
40
  nio4r (~> 2.0)
42
41
  websocket-driver (>= 0.6.1)
43
- actionmailbox (7.0.8)
44
- actionpack (= 7.0.8)
45
- activejob (= 7.0.8)
46
- activerecord (= 7.0.8)
47
- activestorage (= 7.0.8)
48
- activesupport (= 7.0.8)
42
+ actionmailbox (6.1.7.6)
43
+ actionpack (= 6.1.7.6)
44
+ activejob (= 6.1.7.6)
45
+ activerecord (= 6.1.7.6)
46
+ activestorage (= 6.1.7.6)
47
+ activesupport (= 6.1.7.6)
49
48
  mail (>= 2.7.1)
50
- net-imap
51
- net-pop
52
- net-smtp
53
- actionmailer (7.0.8)
54
- actionpack (= 7.0.8)
55
- actionview (= 7.0.8)
56
- activejob (= 7.0.8)
57
- activesupport (= 7.0.8)
49
+ actionmailer (6.1.7.6)
50
+ actionpack (= 6.1.7.6)
51
+ actionview (= 6.1.7.6)
52
+ activejob (= 6.1.7.6)
53
+ activesupport (= 6.1.7.6)
58
54
  mail (~> 2.5, >= 2.5.4)
59
- net-imap
60
- net-pop
61
- net-smtp
62
55
  rails-dom-testing (~> 2.0)
63
- actionpack (7.0.8)
64
- actionview (= 7.0.8)
65
- activesupport (= 7.0.8)
66
- rack (~> 2.0, >= 2.2.4)
56
+ actionpack (6.1.7.6)
57
+ actionview (= 6.1.7.6)
58
+ activesupport (= 6.1.7.6)
59
+ rack (~> 2.0, >= 2.0.9)
67
60
  rack-test (>= 0.6.3)
68
61
  rails-dom-testing (~> 2.0)
69
62
  rails-html-sanitizer (~> 1.0, >= 1.2.0)
70
- actiontext (7.0.8)
71
- actionpack (= 7.0.8)
72
- activerecord (= 7.0.8)
73
- activestorage (= 7.0.8)
74
- activesupport (= 7.0.8)
75
- globalid (>= 0.6.0)
63
+ actiontext (6.1.7.6)
64
+ actionpack (= 6.1.7.6)
65
+ activerecord (= 6.1.7.6)
66
+ activestorage (= 6.1.7.6)
67
+ activesupport (= 6.1.7.6)
76
68
  nokogiri (>= 1.8.5)
77
- actionview (7.0.8)
78
- activesupport (= 7.0.8)
69
+ actionview (6.1.7.6)
70
+ activesupport (= 6.1.7.6)
79
71
  builder (~> 3.1)
80
72
  erubi (~> 1.4)
81
73
  rails-dom-testing (~> 2.0)
82
74
  rails-html-sanitizer (~> 1.1, >= 1.2.0)
83
- activejob (7.0.8)
84
- activesupport (= 7.0.8)
75
+ activejob (6.1.7.6)
76
+ activesupport (= 6.1.7.6)
85
77
  globalid (>= 0.3.6)
86
- activemodel (7.0.8)
87
- activesupport (= 7.0.8)
88
- activerecord (7.0.8)
89
- activemodel (= 7.0.8)
90
- activesupport (= 7.0.8)
91
- activestorage (7.0.8)
92
- actionpack (= 7.0.8)
93
- activejob (= 7.0.8)
94
- activerecord (= 7.0.8)
95
- activesupport (= 7.0.8)
78
+ activemodel (6.1.7.6)
79
+ activesupport (= 6.1.7.6)
80
+ activerecord (6.1.7.6)
81
+ activemodel (= 6.1.7.6)
82
+ activesupport (= 6.1.7.6)
83
+ activestorage (6.1.7.6)
84
+ actionpack (= 6.1.7.6)
85
+ activejob (= 6.1.7.6)
86
+ activerecord (= 6.1.7.6)
87
+ activesupport (= 6.1.7.6)
96
88
  marcel (~> 1.0)
97
89
  mini_mime (>= 1.1.0)
98
90
  activestorage-validator (0.3.0)
99
91
  rails (>= 6.1.0)
100
- activesupport (7.0.8)
92
+ activesupport (6.1.7.6)
101
93
  concurrent-ruby (~> 1.0, >= 1.0.2)
102
94
  i18n (>= 1.6, < 2)
103
95
  minitest (>= 5.1)
104
96
  tzinfo (~> 2.0)
97
+ zeitwerk (~> 2.3)
105
98
  acts_as_list (1.1.0)
106
99
  activerecord (>= 4.2)
107
100
  acts_as_tree (2.9.1)
108
101
  activerecord (>= 3.0.0)
109
102
  addressable (2.8.1)
110
103
  public_suffix (>= 2.0.2, < 6.0)
111
- bcrypt (3.1.18)
104
+ bcrypt (3.1.19)
112
105
  builder (3.2.4)
113
106
  byebug (11.1.3)
114
107
  capybara (3.35.3)
@@ -138,7 +131,7 @@ GEM
138
131
  date (3.3.3)
139
132
  delocalize (1.2.0)
140
133
  rails (>= 2)
141
- devise (4.9.2)
134
+ devise (4.9.3)
142
135
  bcrypt (~> 3.0)
143
136
  orm_adapter (~> 0.1)
144
137
  railties (>= 4.1.0)
@@ -203,7 +196,7 @@ GEM
203
196
  mini_mime (1.1.5)
204
197
  mini_racer (0.6.3)
205
198
  libv8-node (~> 16.10.0.0)
206
- minitest (5.20.0)
199
+ minitest (5.15.0)
207
200
  multi_xml (0.6.0)
208
201
  multipart-post (2.2.3)
209
202
  mysql2 (0.5.5)
@@ -217,9 +210,9 @@ GEM
217
210
  net-smtp (0.4.0)
218
211
  net-protocol
219
212
  nio4r (2.5.9)
220
- nokogiri (1.15.4-x86_64-darwin)
213
+ nokogiri (1.12.5-x86_64-darwin)
221
214
  racc (~> 1.4)
222
- nokogiri (1.15.4-x86_64-linux)
215
+ nokogiri (1.12.5-x86_64-linux)
223
216
  racc (~> 1.4)
224
217
  orm_adapter (0.5.0)
225
218
  poltergeist (1.18.1)
@@ -232,51 +225,50 @@ GEM
232
225
  pry-byebug (3.9.0)
233
226
  byebug (~> 11.0)
234
227
  pry (~> 0.13.0)
235
- psych (5.1.0)
228
+ psych (5.1.1.1)
236
229
  stringio
237
230
  public_suffix (4.0.7)
238
- racc (1.7.1)
231
+ racc (1.7.2)
239
232
  rack (2.2.8)
240
233
  rack-cache (1.14.0)
241
234
  rack (>= 0.4)
242
235
  rack-test (2.1.0)
243
236
  rack (>= 1.3)
244
237
  radius (0.7.5)
245
- rails (7.0.8)
246
- actioncable (= 7.0.8)
247
- actionmailbox (= 7.0.8)
248
- actionmailer (= 7.0.8)
249
- actionpack (= 7.0.8)
250
- actiontext (= 7.0.8)
251
- actionview (= 7.0.8)
252
- activejob (= 7.0.8)
253
- activemodel (= 7.0.8)
254
- activerecord (= 7.0.8)
255
- activestorage (= 7.0.8)
256
- activesupport (= 7.0.8)
238
+ rails (6.1.7.6)
239
+ actioncable (= 6.1.7.6)
240
+ actionmailbox (= 6.1.7.6)
241
+ actionmailer (= 6.1.7.6)
242
+ actionpack (= 6.1.7.6)
243
+ actiontext (= 6.1.7.6)
244
+ actionview (= 6.1.7.6)
245
+ activejob (= 6.1.7.6)
246
+ activemodel (= 6.1.7.6)
247
+ activerecord (= 6.1.7.6)
248
+ activestorage (= 6.1.7.6)
249
+ activesupport (= 6.1.7.6)
257
250
  bundler (>= 1.15.0)
258
- railties (= 7.0.8)
251
+ railties (= 6.1.7.6)
252
+ sprockets-rails (>= 2.0.0)
259
253
  rails-dom-testing (2.2.0)
260
254
  activesupport (>= 5.0.0)
261
255
  minitest
262
256
  nokogiri (>= 1.6)
263
- rails-html-sanitizer (1.6.0)
264
- loofah (~> 2.21)
265
- nokogiri (~> 1.14)
257
+ rails-html-sanitizer (1.5.0)
258
+ loofah (~> 2.19, >= 2.19.1)
266
259
  rails-observers (0.1.5)
267
260
  activemodel (>= 4.0)
268
- railties (7.0.8)
269
- actionpack (= 7.0.8)
270
- activesupport (= 7.0.8)
261
+ railties (6.1.7.6)
262
+ actionpack (= 6.1.7.6)
263
+ activesupport (= 6.1.7.6)
271
264
  method_source
272
265
  rake (>= 12.2)
273
266
  thor (~> 1.0)
274
- zeitwerk (~> 2.5)
275
- rake (13.0.6)
267
+ rake (13.1.0)
276
268
  rdoc (6.5.0)
277
269
  psych (>= 4.0.0)
278
270
  regexp_parser (2.1.1)
279
- responders (3.1.0)
271
+ responders (3.1.1)
280
272
  actionpack (>= 5.2)
281
273
  railties (>= 5.2)
282
274
  roadie (4.0.0)
@@ -328,7 +320,7 @@ GEM
328
320
  activesupport (>= 5.2)
329
321
  sprockets (>= 3.0.0)
330
322
  stringex (2.8.6)
331
- stringio (3.0.5)
323
+ stringio (3.0.6)
332
324
  temple (0.10.0)
333
325
  terrapin (0.6.0)
334
326
  climate_control (>= 0.0.3, < 1.0)
@@ -341,7 +333,6 @@ GEM
341
333
  concurrent-ruby (~> 1.0)
342
334
  uglifier (4.2.0)
343
335
  execjs (>= 0.3.0, < 3)
344
- uuidtools (2.2.0)
345
336
  warden (1.2.9)
346
337
  rack (>= 2.0.9)
347
338
  websocket-driver (0.7.6)
@@ -369,7 +360,7 @@ DEPENDENCIES
369
360
  mysql2
370
361
  poltergeist (~> 1.18.1)
371
362
  pry-byebug
372
- psych (= 5.1.0)
363
+ psych (= 5.1.1.1)
373
364
  rails-observers
374
365
  rspec-rails
375
366
  simplecov
@@ -53,11 +53,12 @@ class Admin::AssetsController < Admin::ResourceController
53
53
  flash[:error] = error
54
54
  end
55
55
  end
56
- if asset_params[:for_attachment]
57
- render partial: 'admin/page_attachments/attachment', collection: @page_attachments
58
- else
59
- response_for :create
60
- end
56
+ end
57
+
58
+ if asset_params[:for_attachment]
59
+ render partial: 'admin/page_attachments/attachment', collection: @page_attachments
60
+ else
61
+ response_for :create
61
62
  end
62
63
  end
63
64
 
data/app/models/asset.rb CHANGED
@@ -186,7 +186,7 @@ class Asset < ActiveRecord::Base
186
186
  end
187
187
 
188
188
  def assign_uuid
189
- self.uuid = UUIDTools::UUID.timestamp_create.to_s unless uuid?
189
+ self.uuid = SecureRandom.uuid unless uuid?
190
190
  end
191
191
 
192
192
  class << self
@@ -1,4 +1,8 @@
1
1
  class FileNotFoundPage < Page
2
+ def cache_timeout
3
+ 5.minutes
4
+ end
5
+
2
6
  def allowed_children
3
7
  []
4
8
  end
@@ -23,8 +27,4 @@ class FileNotFoundPage < Page
23
27
  def response_code
24
28
  404
25
29
  end
26
-
27
- def cache?
28
- false
29
- end
30
30
  end
data/app/models/user.rb CHANGED
@@ -44,6 +44,10 @@ class User < ActiveRecord::Base
44
44
  content_editor
45
45
  end
46
46
 
47
+ def scoped?
48
+ site_id.present?
49
+ end
50
+
47
51
  def locale
48
52
  'en'
49
53
  end
@@ -1,4 +1,4 @@
1
- - if current_user.admin? && defined?(Site) && defined?(controller) && controller.sited_model? && controller.template_name == 'index' && Site.several?
1
+ - if current_user.admin? && !current_user.scoped? && defined?(Site) && defined?(controller) && controller.sited_model? && controller.template_name == 'index' && Site.several?
2
2
  .site_chooser
3
3
  %ul.nav
4
4
  %li
@@ -2,6 +2,7 @@ Rails.autoloaders.each do |autoloader|
2
2
  autoloader.inflector.inflect(
3
3
  'clipped_admin_ui' => 'ClippedAdminUI',
4
4
  'admin_ui' => 'AdminUI',
5
+ 'ostruct' => 'OpenStruct',
5
6
  # Add more inflections as needed
6
7
  )
7
8
  end
data/lib/trusty_cms.rb CHANGED
@@ -2,7 +2,7 @@ TRUSTY_CMS_ROOT = File.expand_path(File.join(File.dirname(__FILE__), '..')) unle
2
2
 
3
3
  unless defined? TrustyCms::VERSION
4
4
  module TrustyCms
5
- VERSION = '6.0.3'.freeze
5
+ VERSION = '6.0.5'.freeze
6
6
  end
7
7
  end
8
8
 
data/trusty_cms.gemspec CHANGED
@@ -50,6 +50,5 @@ a general purpose content management system--not merely a blogging engine.'
50
50
  s.add_dependency 'stringex', '>= 2.7.1', '< 2.9.0'
51
51
  s.add_dependency 'tzinfo', '>= 1.2.3', '< 2.1.0'
52
52
  s.add_dependency 'uglifier', '>= 3.2', '< 5.0'
53
- s.add_dependency 'uuidtools', '>= 2.1.5', '< 2.3.0'
54
53
  s.add_dependency 'will_paginate', '>= 3', '< 5'
55
54
  end
@@ -1,5 +1,4 @@
1
1
  require 'acts_as_list'
2
- require 'uuidtools'
3
2
  require 'trusty_cms_clipped_extension/cloud'
4
3
  require 'active_storage/engine'
5
4
  require 'will_paginate/array'
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: trusty-cms
3
3
  version: !ruby/object:Gem::Version
4
- version: 6.0.3
4
+ version: 6.0.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - TrustyCms CMS dev team
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-10-27 00:00:00.000000000 Z
11
+ date: 2023-11-20 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activestorage-validator
@@ -434,26 +434,6 @@ dependencies:
434
434
  - - "<"
435
435
  - !ruby/object:Gem::Version
436
436
  version: '5.0'
437
- - !ruby/object:Gem::Dependency
438
- name: uuidtools
439
- requirement: !ruby/object:Gem::Requirement
440
- requirements:
441
- - - ">="
442
- - !ruby/object:Gem::Version
443
- version: 2.1.5
444
- - - "<"
445
- - !ruby/object:Gem::Version
446
- version: 2.3.0
447
- type: :runtime
448
- prerelease: false
449
- version_requirements: !ruby/object:Gem::Requirement
450
- requirements:
451
- - - ">="
452
- - !ruby/object:Gem::Version
453
- version: 2.1.5
454
- - - "<"
455
- - !ruby/object:Gem::Version
456
- version: 2.3.0
457
437
  - !ruby/object:Gem::Dependency
458
438
  name: will_paginate
459
439
  requirement: !ruby/object:Gem::Requirement
@@ -1153,51 +1133,51 @@ specification_version: 4
1153
1133
  summary: A no-fluff content management system designed for small teams.
1154
1134
  test_files:
1155
1135
  - spec/models/layout_spec.rb
1156
- - spec/features/layouts_spec.rb
1157
- - spec/features/config_spec.rb
1158
- - spec/features/pages_spec.rb
1159
- - spec/support/custom_actions.rb
1160
- - spec/ci/database.mysql.yml
1161
- - spec/controllers/users_controller_spec.rb
1162
- - spec/controllers/application_controller_spec.rb
1163
1136
  - spec/rails_helper.rb
1164
1137
  - spec/spec_helper.rb
1138
+ - spec/controllers/users_controller_spec.rb
1139
+ - spec/controllers/application_controller_spec.rb
1140
+ - spec/support/custom_actions.rb
1141
+ - spec/dummy/db/schema.rb
1142
+ - spec/dummy/yarn.lock
1143
+ - spec/dummy/app/assets/config/manifest.js
1144
+ - spec/dummy/package.json
1165
1145
  - spec/dummy/config.ru
1166
- - spec/dummy/config/application.rb
1167
- - spec/dummy/config/routes.rb
1168
- - spec/dummy/config/initializers/inflections.rb
1146
+ - spec/dummy/config/initializers/wrap_parameters.rb
1147
+ - spec/dummy/config/initializers/assets.rb
1169
1148
  - spec/dummy/config/initializers/filter_parameter_logging.rb
1170
1149
  - spec/dummy/config/initializers/mime_types.rb
1171
1150
  - spec/dummy/config/initializers/cookies_serializer.rb
1172
- - spec/dummy/config/initializers/wrap_parameters.rb
1173
- - spec/dummy/config/initializers/trusty_cms_config.rb
1174
1151
  - spec/dummy/config/initializers/session_store.rb
1152
+ - spec/dummy/config/initializers/trusty_cms_config.rb
1175
1153
  - spec/dummy/config/initializers/backtrace_silencers.rb
1176
- - spec/dummy/config/initializers/assets.rb
1177
- - spec/dummy/config/locales/en.yml
1178
- - spec/dummy/config/environment.rb
1179
- - spec/dummy/config/secrets.yml
1180
- - spec/dummy/config/environments/development.rb
1154
+ - spec/dummy/config/initializers/inflections.rb
1155
+ - spec/dummy/config/application.rb
1181
1156
  - spec/dummy/config/environments/production.rb
1157
+ - spec/dummy/config/environments/development.rb
1182
1158
  - spec/dummy/config/environments/test.rb
1159
+ - spec/dummy/config/locales/en.yml
1183
1160
  - spec/dummy/config/database.yml
1184
1161
  - spec/dummy/config/boot.rb
1185
- - spec/dummy/db/schema.rb
1186
- - spec/dummy/yarn.lock
1162
+ - spec/dummy/config/routes.rb
1163
+ - spec/dummy/config/environment.rb
1164
+ - spec/dummy/config/secrets.yml
1187
1165
  - spec/dummy/README.rdoc
1188
- - spec/dummy/bin/bundle
1189
1166
  - spec/dummy/bin/rails
1167
+ - spec/dummy/bin/bundle
1190
1168
  - spec/dummy/bin/setup
1191
1169
  - spec/dummy/bin/rake
1192
- - spec/dummy/Rakefile
1193
- - spec/dummy/app/assets/config/manifest.js
1194
- - spec/dummy/package.json
1195
1170
  - spec/dummy/public/favicon.ico
1196
- - spec/dummy/public/500.html
1197
1171
  - spec/dummy/public/404.html
1198
1172
  - spec/dummy/public/422.html
1173
+ - spec/dummy/public/500.html
1174
+ - spec/dummy/Rakefile
1175
+ - spec/fixtures/users.yml
1199
1176
  - spec/factories/page.rb
1200
- - spec/factories/user.rb
1201
- - spec/factories/layout.rb
1202
1177
  - spec/factories/page_part.rb
1203
- - spec/fixtures/users.yml
1178
+ - spec/factories/layout.rb
1179
+ - spec/factories/user.rb
1180
+ - spec/features/pages_spec.rb
1181
+ - spec/features/config_spec.rb
1182
+ - spec/features/layouts_spec.rb
1183
+ - spec/ci/database.mysql.yml