rocket_cms 0.31.1 → 0.32.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: 568b2a729dd587b05c734100dfd82922e5370e537bf1d9f511b0cdbe4c528372
4
- data.tar.gz: 2277dc52019bea9bc3a627797e788837f3a02f5ee792f79d995e675a4e84fc08
3
+ metadata.gz: 3ff6c7fbba9482eb4f2d3b0f05517e2a6b5551539b0742b106b9c6e0588efe41
4
+ data.tar.gz: eef37bde3073a67272ef552a88e5dc567238d6d595053631a94b346ef2d23bed
5
5
  SHA512:
6
- metadata.gz: ce8c7515a9d24614449afc52b6cac104240da4a7da39de0cc12ae9553f2b434bf4e1f182e926fd1a6cc61f111e11ee0a27f661855e0ed62e84b6bd6ed5b7af8c
7
- data.tar.gz: 9408ee092f3b11b552b99feaf42b4ddb26179c628dfd56c82e1c0298da26e40405500eb7c341aae676e68b5a503bda7fff6ef011e413a46d0db43db74a7bd9f5
6
+ metadata.gz: f5e45afe8c0ce81d01dec373a158aefe6d4de30d8ec5a1ea1aedad893269ee7e0da004968a7b8765021412db0f34a6af2fa9aa14f2f1e3b37f142f7363f7f153
7
+ data.tar.gz: 8eac157f3014730b9b4cef183cc9d81def6663dc110ebec26583c36a712f02699451e2bc0fb8dab0be73cd111d289ec1e4482708ba385b797e95293f31c51c69
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- rocket_cms (0.31.1)
4
+ rocket_cms (0.32.0)
5
5
  addressable
6
6
  coffee-rails
7
7
  jquery-rails
@@ -16,56 +16,56 @@ PATH
16
16
  GEM
17
17
  remote: https://rubygems.org/
18
18
  specs:
19
- actioncable (6.0.1)
20
- actionpack (= 6.0.1)
19
+ actioncable (6.0.2.1)
20
+ actionpack (= 6.0.2.1)
21
21
  nio4r (~> 2.0)
22
22
  websocket-driver (>= 0.6.1)
23
- actionmailbox (6.0.1)
24
- actionpack (= 6.0.1)
25
- activejob (= 6.0.1)
26
- activerecord (= 6.0.1)
27
- activestorage (= 6.0.1)
28
- activesupport (= 6.0.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)
29
29
  mail (>= 2.7.1)
30
- actionmailer (6.0.1)
31
- actionpack (= 6.0.1)
32
- actionview (= 6.0.1)
33
- activejob (= 6.0.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)
34
34
  mail (~> 2.5, >= 2.5.4)
35
35
  rails-dom-testing (~> 2.0)
36
- actionpack (6.0.1)
37
- actionview (= 6.0.1)
38
- activesupport (= 6.0.1)
39
- rack (~> 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)
40
40
  rack-test (>= 0.6.3)
41
41
  rails-dom-testing (~> 2.0)
42
42
  rails-html-sanitizer (~> 1.0, >= 1.2.0)
43
- actiontext (6.0.1)
44
- actionpack (= 6.0.1)
45
- activerecord (= 6.0.1)
46
- activestorage (= 6.0.1)
47
- activesupport (= 6.0.1)
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)
48
48
  nokogiri (>= 1.8.5)
49
- actionview (6.0.1)
50
- activesupport (= 6.0.1)
49
+ actionview (6.0.2.1)
50
+ activesupport (= 6.0.2.1)
51
51
  builder (~> 3.1)
52
52
  erubi (~> 1.4)
53
53
  rails-dom-testing (~> 2.0)
54
54
  rails-html-sanitizer (~> 1.1, >= 1.2.0)
55
- activejob (6.0.1)
56
- activesupport (= 6.0.1)
55
+ activejob (6.0.2.1)
56
+ activesupport (= 6.0.2.1)
57
57
  globalid (>= 0.3.6)
58
- activemodel (6.0.1)
59
- activesupport (= 6.0.1)
60
- activerecord (6.0.1)
61
- activemodel (= 6.0.1)
62
- activesupport (= 6.0.1)
63
- activestorage (6.0.1)
64
- actionpack (= 6.0.1)
65
- activejob (= 6.0.1)
66
- activerecord (= 6.0.1)
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
67
  marcel (~> 0.3.1)
68
- activesupport (6.0.1)
68
+ activesupport (6.0.2.1)
69
69
  concurrent-ruby (~> 1.0, >= 1.0.2)
70
70
  i18n (>= 0.7, < 2)
71
71
  minitest (~> 5.1)
@@ -73,7 +73,7 @@ GEM
73
73
  zeitwerk (~> 2.2)
74
74
  addressable (2.7.0)
75
75
  public_suffix (>= 2.0.2, < 5.0)
76
- builder (3.2.3)
76
+ builder (3.2.4)
77
77
  coffee-rails (5.0.0)
78
78
  coffee-script (>= 2.2.0)
79
79
  railties (>= 5.2.0)
@@ -81,31 +81,31 @@ GEM
81
81
  coffee-script-source
82
82
  execjs
83
83
  coffee-script-source (1.12.2)
84
- concurrent-ruby (1.1.5)
85
- crass (1.0.5)
84
+ concurrent-ruby (1.1.6)
85
+ crass (1.0.6)
86
86
  erubi (1.9.0)
87
87
  execjs (2.7.0)
88
88
  globalid (0.4.2)
89
89
  activesupport (>= 4.2.0)
90
90
  htmlentities (4.3.4)
91
- i18n (1.7.0)
91
+ i18n (1.8.2)
92
92
  concurrent-ruby (~> 1.0)
93
93
  jquery-rails (4.3.5)
94
94
  rails-dom-testing (>= 1, < 3)
95
95
  railties (>= 4.2.0)
96
96
  thor (>= 0.14, < 2.0)
97
- kaminari (1.1.1)
97
+ kaminari (1.2.0)
98
98
  activesupport (>= 4.1.0)
99
- kaminari-actionview (= 1.1.1)
100
- kaminari-activerecord (= 1.1.1)
101
- kaminari-core (= 1.1.1)
102
- kaminari-actionview (1.1.1)
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
103
  actionview
104
- kaminari-core (= 1.1.1)
105
- kaminari-activerecord (1.1.1)
104
+ kaminari-core (= 1.2.0)
105
+ kaminari-activerecord (1.2.0)
106
106
  activerecord
107
- kaminari-core (= 1.1.1)
108
- kaminari-core (1.1.1)
107
+ kaminari-core (= 1.2.0)
108
+ kaminari-core (1.2.0)
109
109
  loofah (2.4.0)
110
110
  crass (~> 1.0.2)
111
111
  nokogiri (>= 1.5.9)
@@ -116,40 +116,40 @@ GEM
116
116
  marcel (0.3.3)
117
117
  mimemagic (~> 0.3.2)
118
118
  method_source (0.9.2)
119
- mimemagic (0.3.3)
119
+ mimemagic (0.3.4)
120
120
  mini_mime (1.0.2)
121
121
  mini_portile2 (2.4.0)
122
- minitest (5.13.0)
122
+ minitest (5.14.0)
123
123
  nio4r (2.5.2)
124
- nokogiri (1.10.5)
124
+ nokogiri (1.10.8)
125
125
  mini_portile2 (~> 2.4.0)
126
- public_suffix (4.0.1)
127
- rack (2.0.7)
126
+ public_suffix (4.0.3)
127
+ rack (2.2.2)
128
128
  rack-test (1.1.0)
129
129
  rack (>= 1.0, < 3)
130
- rails (6.0.1)
131
- actioncable (= 6.0.1)
132
- actionmailbox (= 6.0.1)
133
- actionmailer (= 6.0.1)
134
- actionpack (= 6.0.1)
135
- actiontext (= 6.0.1)
136
- actionview (= 6.0.1)
137
- activejob (= 6.0.1)
138
- activemodel (= 6.0.1)
139
- activerecord (= 6.0.1)
140
- activestorage (= 6.0.1)
141
- activesupport (= 6.0.1)
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
142
  bundler (>= 1.3.0)
143
- railties (= 6.0.1)
143
+ railties (= 6.0.2.1)
144
144
  sprockets-rails (>= 2.0.0)
145
145
  rails-dom-testing (2.0.3)
146
146
  activesupport (>= 4.2.0)
147
147
  nokogiri (>= 1.6)
148
148
  rails-html-sanitizer (1.3.0)
149
149
  loofah (~> 2.3)
150
- railties (6.0.1)
151
- actionpack (= 6.0.1)
152
- activesupport (= 6.0.1)
150
+ railties (6.0.2.1)
151
+ actionpack (= 6.0.2.1)
152
+ activesupport (= 6.0.2.1)
153
153
  method_source
154
154
  rake (>= 0.8.7)
155
155
  thor (>= 0.20.3, < 2.0)
@@ -165,16 +165,16 @@ GEM
165
165
  activesupport (>= 4.0)
166
166
  sprockets (>= 3.0.0)
167
167
  stringex (2.8.5)
168
- thor (0.20.3)
168
+ thor (1.0.1)
169
169
  thread_safe (0.3.6)
170
- tzinfo (1.2.5)
170
+ tzinfo (1.2.6)
171
171
  thread_safe (~> 0.1)
172
172
  validates_email_format_of (1.6.3)
173
173
  i18n
174
174
  websocket-driver (0.7.1)
175
175
  websocket-extensions (>= 0.1.0)
176
176
  websocket-extensions (0.1.4)
177
- zeitwerk (2.2.1)
177
+ zeitwerk (2.2.2)
178
178
 
179
179
  PLATFORMS
180
180
  ruby
@@ -185,4 +185,4 @@ DEPENDENCIES
185
185
  rocket_cms!
186
186
 
187
187
  BUNDLED WITH
188
- 1.17.3
188
+ 2.1.4
@@ -1,12 +1,16 @@
1
1
  import './index.sass';
2
2
 
3
- $(document).on("click", 'a.close_flash', function() {
4
- $(this).parent().fadeOut(function() {
5
- let $box = $(this).parents('.flash');
6
- $(this).remove();
7
- if ($box.children().length == 0) {
8
- $box.remove();
9
- }
3
+ //document.addEventListener('DOMContentLoaded', function () {
4
+ document.addEventListener("turbolinks:load", function() {
5
+ var close = document.querySelectorAll("a.close_flash");
6
+ close.forEach(function(n) {
7
+ n.addEventListener("click", function() {
8
+ var msg = this.parentNode.parentNode;
9
+ var box = msg.parentNode;
10
+ this.parentNode.parentNode.remove();
11
+ if (box.childNodes.length == 0) {
12
+ box.remove()
13
+ }
14
+ })
10
15
  })
11
16
  });
12
-
@@ -1,3 +1,3 @@
1
1
  module RocketCMS
2
- VERSION = '0.31.1'
2
+ VERSION = '0.32.0'
3
3
  end
@@ -353,13 +353,33 @@ end
353
353
 
354
354
  create_file 'extra/shrine/plugins/custom_pretty_location.rb' do <<-TEXT
355
355
  require 'shrine/plugins/pretty_location'
356
+
356
357
  class Shrine
357
358
  module Plugins
358
359
  module CustomPrettyLocation
359
- include Shrine::Plugins::PrettyLocation
360
+ def self.configure(uploader, **opts)
361
+ uploader.opts[:custom_pretty_location] ||= { identifier: :id }
362
+ uploader.opts[:custom_pretty_location].merge!(opts)
363
+ end
360
364
 
361
365
  module InstanceMethods
362
- include Shrine::Plugins::PrettyLocation::InstanceMethods
366
+ def generate_location(io, **options)
367
+ custom_pretty_location(io, **options)
368
+ end
369
+
370
+ def custom_pretty_location(io, name: nil, record: nil, version: nil, derivative: nil, identifier: nil, metadata: {}, **)
371
+ if record
372
+ namespace = record_namespace(record)
373
+ identifier ||= record_identifier(record)
374
+ end
375
+
376
+ basename = basic_location(io, metadata: metadata)
377
+ basename = [*(version || derivative), basename].join("-")
378
+
379
+ [*namespace, *identifier, *name, basename].join("/")
380
+ end
381
+
382
+ private
363
383
 
364
384
  def record_identifier(record)
365
385
  id = record.public_send(opts[:custom_pretty_location][:identifier])
@@ -374,8 +394,27 @@ class Shrine
374
394
  nil
375
395
  end
376
396
  end
377
- end
378
397
 
398
+ def transform_class_name(class_name)
399
+ 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
401
+ else
402
+ class_name.downcase
403
+ end
404
+ end
405
+
406
+ def record_namespace(record)
407
+ class_name = record.class.name or return
408
+ parts = transform_class_name(class_name).split("::")
409
+
410
+ if separator = opts[:custom_pretty_location][:namespace]
411
+ parts.join(separator)
412
+ else
413
+ parts.last
414
+ end
415
+ end
416
+
417
+ end
379
418
  end
380
419
  register_plugin(:custom_pretty_location, CustomPrettyLocation)
381
420
  end
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.31.1
4
+ version: 0.32.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - glebtv
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-11-29 00:00:00.000000000 Z
11
+ date: 2020-02-12 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -364,7 +364,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
364
364
  - !ruby/object:Gem::Version
365
365
  version: '0'
366
366
  requirements: []
367
- rubygems_version: 3.0.6
367
+ rubygems_version: 3.1.2
368
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