rocket_cms 0.33.0 → 0.33.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +76 -76
- data/lib/generators/rocket_cms/templates/webpack.config.js +1 -1
- data/lib/rocket_cms/version.rb +1 -1
- data/template.rb +72 -26
- metadata +6 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 15d7121ecc5a1d3a6cb949ac7d790faeb88cb3df191578687b48d179f583d15e
|
4
|
+
data.tar.gz: d3843ac98ba756d4399cad90a83dde8b8a12d56196bec5ed2a393e6bcf84df8a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: aeaf5510cd6d74c56c934c00bde9d1de486247b01d342ae925a07de6561579df2adced525dc009d2317ef5e7c43ae68600cc3f812bd715f44c2d46169a9961ab
|
7
|
+
data.tar.gz: d17429f5fd7b2433120f4fb2a8bccf91428a7b4d69569bf44014ba6e5523c4bab6d53e4eec28740c95c8528fbb6de1992d87bcfab025cdc0b5856ac3e361c974
|
data/Gemfile.lock
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
rocket_cms (0.33.
|
4
|
+
rocket_cms (0.33.1)
|
5
5
|
addressable
|
6
6
|
coffee-rails
|
7
7
|
jquery-rails
|
@@ -16,61 +16,61 @@ PATH
|
|
16
16
|
GEM
|
17
17
|
remote: https://rubygems.org/
|
18
18
|
specs:
|
19
|
-
actioncable (6.0.2
|
20
|
-
actionpack (= 6.0.2
|
19
|
+
actioncable (6.0.3.2)
|
20
|
+
actionpack (= 6.0.3.2)
|
21
21
|
nio4r (~> 2.0)
|
22
22
|
websocket-driver (>= 0.6.1)
|
23
|
-
actionmailbox (6.0.2
|
24
|
-
actionpack (= 6.0.2
|
25
|
-
activejob (= 6.0.2
|
26
|
-
activerecord (= 6.0.2
|
27
|
-
activestorage (= 6.0.2
|
28
|
-
activesupport (= 6.0.2
|
23
|
+
actionmailbox (6.0.3.2)
|
24
|
+
actionpack (= 6.0.3.2)
|
25
|
+
activejob (= 6.0.3.2)
|
26
|
+
activerecord (= 6.0.3.2)
|
27
|
+
activestorage (= 6.0.3.2)
|
28
|
+
activesupport (= 6.0.3.2)
|
29
29
|
mail (>= 2.7.1)
|
30
|
-
actionmailer (6.0.2
|
31
|
-
actionpack (= 6.0.2
|
32
|
-
actionview (= 6.0.2
|
33
|
-
activejob (= 6.0.2
|
30
|
+
actionmailer (6.0.3.2)
|
31
|
+
actionpack (= 6.0.3.2)
|
32
|
+
actionview (= 6.0.3.2)
|
33
|
+
activejob (= 6.0.3.2)
|
34
34
|
mail (~> 2.5, >= 2.5.4)
|
35
35
|
rails-dom-testing (~> 2.0)
|
36
|
-
actionpack (6.0.2
|
37
|
-
actionview (= 6.0.2
|
38
|
-
activesupport (= 6.0.2
|
36
|
+
actionpack (6.0.3.2)
|
37
|
+
actionview (= 6.0.3.2)
|
38
|
+
activesupport (= 6.0.3.2)
|
39
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.2
|
44
|
-
actionpack (= 6.0.2
|
45
|
-
activerecord (= 6.0.2
|
46
|
-
activestorage (= 6.0.2
|
47
|
-
activesupport (= 6.0.2
|
43
|
+
actiontext (6.0.3.2)
|
44
|
+
actionpack (= 6.0.3.2)
|
45
|
+
activerecord (= 6.0.3.2)
|
46
|
+
activestorage (= 6.0.3.2)
|
47
|
+
activesupport (= 6.0.3.2)
|
48
48
|
nokogiri (>= 1.8.5)
|
49
|
-
actionview (6.0.2
|
50
|
-
activesupport (= 6.0.2
|
49
|
+
actionview (6.0.3.2)
|
50
|
+
activesupport (= 6.0.3.2)
|
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.2
|
56
|
-
activesupport (= 6.0.2
|
55
|
+
activejob (6.0.3.2)
|
56
|
+
activesupport (= 6.0.3.2)
|
57
57
|
globalid (>= 0.3.6)
|
58
|
-
activemodel (6.0.2
|
59
|
-
activesupport (= 6.0.2
|
60
|
-
activerecord (6.0.2
|
61
|
-
activemodel (= 6.0.2
|
62
|
-
activesupport (= 6.0.2
|
63
|
-
activestorage (6.0.2
|
64
|
-
actionpack (= 6.0.2
|
65
|
-
activejob (= 6.0.2
|
66
|
-
activerecord (= 6.0.2
|
58
|
+
activemodel (6.0.3.2)
|
59
|
+
activesupport (= 6.0.3.2)
|
60
|
+
activerecord (6.0.3.2)
|
61
|
+
activemodel (= 6.0.3.2)
|
62
|
+
activesupport (= 6.0.3.2)
|
63
|
+
activestorage (6.0.3.2)
|
64
|
+
actionpack (= 6.0.3.2)
|
65
|
+
activejob (= 6.0.3.2)
|
66
|
+
activerecord (= 6.0.3.2)
|
67
67
|
marcel (~> 0.3.1)
|
68
|
-
activesupport (6.0.2
|
68
|
+
activesupport (6.0.3.2)
|
69
69
|
concurrent-ruby (~> 1.0, >= 1.0.2)
|
70
70
|
i18n (>= 0.7, < 2)
|
71
71
|
minitest (~> 5.1)
|
72
72
|
tzinfo (~> 1.1)
|
73
|
-
zeitwerk (~> 2.2)
|
73
|
+
zeitwerk (~> 2.2, >= 2.2.2)
|
74
74
|
addressable (2.7.0)
|
75
75
|
public_suffix (>= 2.0.2, < 5.0)
|
76
76
|
builder (3.2.4)
|
@@ -81,32 +81,32 @@ GEM
|
|
81
81
|
coffee-script-source
|
82
82
|
execjs
|
83
83
|
coffee-script-source (1.12.2)
|
84
|
-
concurrent-ruby (1.1.
|
84
|
+
concurrent-ruby (1.1.7)
|
85
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.8.
|
91
|
+
i18n (1.8.5)
|
92
92
|
concurrent-ruby (~> 1.0)
|
93
|
-
jquery-rails (4.
|
93
|
+
jquery-rails (4.4.0)
|
94
94
|
rails-dom-testing (>= 1, < 3)
|
95
95
|
railties (>= 4.2.0)
|
96
96
|
thor (>= 0.14, < 2.0)
|
97
|
-
kaminari (1.2.
|
97
|
+
kaminari (1.2.1)
|
98
98
|
activesupport (>= 4.1.0)
|
99
|
-
kaminari-actionview (= 1.2.
|
100
|
-
kaminari-activerecord (= 1.2.
|
101
|
-
kaminari-core (= 1.2.
|
102
|
-
kaminari-actionview (1.2.
|
99
|
+
kaminari-actionview (= 1.2.1)
|
100
|
+
kaminari-activerecord (= 1.2.1)
|
101
|
+
kaminari-core (= 1.2.1)
|
102
|
+
kaminari-actionview (1.2.1)
|
103
103
|
actionview
|
104
|
-
kaminari-core (= 1.2.
|
105
|
-
kaminari-activerecord (1.2.
|
104
|
+
kaminari-core (= 1.2.1)
|
105
|
+
kaminari-activerecord (1.2.1)
|
106
106
|
activerecord
|
107
|
-
kaminari-core (= 1.2.
|
108
|
-
kaminari-core (1.2.
|
109
|
-
loofah (2.
|
107
|
+
kaminari-core (= 1.2.1)
|
108
|
+
kaminari-core (1.2.1)
|
109
|
+
loofah (2.6.0)
|
110
110
|
crass (~> 1.0.2)
|
111
111
|
nokogiri (>= 1.5.9)
|
112
112
|
mail (2.7.1)
|
@@ -115,41 +115,41 @@ GEM
|
|
115
115
|
activesupport
|
116
116
|
marcel (0.3.3)
|
117
117
|
mimemagic (~> 0.3.2)
|
118
|
-
method_source (0.
|
119
|
-
mimemagic (0.3.
|
118
|
+
method_source (1.0.0)
|
119
|
+
mimemagic (0.3.5)
|
120
120
|
mini_mime (1.0.2)
|
121
121
|
mini_portile2 (2.4.0)
|
122
|
-
minitest (5.14.
|
122
|
+
minitest (5.14.1)
|
123
123
|
nio4r (2.5.2)
|
124
|
-
nokogiri (1.10.
|
124
|
+
nokogiri (1.10.10)
|
125
125
|
mini_portile2 (~> 2.4.0)
|
126
|
-
public_suffix (4.0.
|
127
|
-
rack (2.2.
|
126
|
+
public_suffix (4.0.5)
|
127
|
+
rack (2.2.3)
|
128
128
|
rack-test (1.1.0)
|
129
129
|
rack (>= 1.0, < 3)
|
130
|
-
rails (6.0.2
|
131
|
-
actioncable (= 6.0.2
|
132
|
-
actionmailbox (= 6.0.2
|
133
|
-
actionmailer (= 6.0.2
|
134
|
-
actionpack (= 6.0.2
|
135
|
-
actiontext (= 6.0.2
|
136
|
-
actionview (= 6.0.2
|
137
|
-
activejob (= 6.0.2
|
138
|
-
activemodel (= 6.0.2
|
139
|
-
activerecord (= 6.0.2
|
140
|
-
activestorage (= 6.0.2
|
141
|
-
activesupport (= 6.0.2
|
130
|
+
rails (6.0.3.2)
|
131
|
+
actioncable (= 6.0.3.2)
|
132
|
+
actionmailbox (= 6.0.3.2)
|
133
|
+
actionmailer (= 6.0.3.2)
|
134
|
+
actionpack (= 6.0.3.2)
|
135
|
+
actiontext (= 6.0.3.2)
|
136
|
+
actionview (= 6.0.3.2)
|
137
|
+
activejob (= 6.0.3.2)
|
138
|
+
activemodel (= 6.0.3.2)
|
139
|
+
activerecord (= 6.0.3.2)
|
140
|
+
activestorage (= 6.0.3.2)
|
141
|
+
activesupport (= 6.0.3.2)
|
142
142
|
bundler (>= 1.3.0)
|
143
|
-
railties (= 6.0.2
|
143
|
+
railties (= 6.0.3.2)
|
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.2
|
151
|
-
actionpack (= 6.0.2
|
152
|
-
activesupport (= 6.0.2
|
150
|
+
railties (6.0.3.2)
|
151
|
+
actionpack (= 6.0.3.2)
|
152
|
+
activesupport (= 6.0.3.2)
|
153
153
|
method_source
|
154
154
|
rake (>= 0.8.7)
|
155
155
|
thor (>= 0.20.3, < 2.0)
|
@@ -157,7 +157,7 @@ GEM
|
|
157
157
|
smart_excerpt (0.1.6)
|
158
158
|
activesupport
|
159
159
|
htmlentities
|
160
|
-
sprockets (4.0.
|
160
|
+
sprockets (4.0.2)
|
161
161
|
concurrent-ruby (~> 1.0)
|
162
162
|
rack (> 1, < 3)
|
163
163
|
sprockets-rails (3.2.1)
|
@@ -167,14 +167,14 @@ GEM
|
|
167
167
|
stringex (2.8.5)
|
168
168
|
thor (1.0.1)
|
169
169
|
thread_safe (0.3.6)
|
170
|
-
tzinfo (1.2.
|
170
|
+
tzinfo (1.2.7)
|
171
171
|
thread_safe (~> 0.1)
|
172
172
|
validates_email_format_of (1.6.3)
|
173
173
|
i18n
|
174
|
-
websocket-driver (0.7.
|
174
|
+
websocket-driver (0.7.3)
|
175
175
|
websocket-extensions (>= 0.1.0)
|
176
|
-
websocket-extensions (0.1.
|
177
|
-
zeitwerk (2.
|
176
|
+
websocket-extensions (0.1.5)
|
177
|
+
zeitwerk (2.4.0)
|
178
178
|
|
179
179
|
PLATFORMS
|
180
180
|
ruby
|
data/lib/rocket_cms/version.rb
CHANGED
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})"
|
@@ -29,10 +32,9 @@ gem 'rails-i18n'
|
|
29
32
|
#{if mongoid then "gem 'mongoid', '~> 6.1.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'
|
@@ -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'
|
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
|
@@ -809,18 +816,57 @@ TEXT
|
|
809
816
|
end
|
810
817
|
|
811
818
|
create_file "spec/support/capybara.rb" do <<-TEXT
|
812
|
-
|
813
|
-
|
814
|
-
|
815
|
-
|
816
|
-
|
817
|
-
|
818
|
-
|
819
|
-
|
820
|
-
|
821
|
-
|
822
|
-
|
823
|
-
|
819
|
+
if ENV['CI']
|
820
|
+
Selenium::WebDriver::Chrome.path = '/usr/bin/google-chrome-stable'
|
821
|
+
else
|
822
|
+
begin
|
823
|
+
Selenium::WebDriver::Chrome.path = '/usr/bin/chromium'
|
824
|
+
rescue Selenium::WebDriver::Error::WebDriverError
|
825
|
+
end
|
826
|
+
end
|
827
|
+
|
828
|
+
Capybara.register_driver :chrome_root do |app|
|
829
|
+
service = ::Selenium::WebDriver::Service.chrome#(args: { verbose: true, log_path: 'chromedriver.log' })
|
830
|
+
options = ::Selenium::WebDriver::Chrome::Options.new
|
831
|
+
options.args << '--headless' unless ENV['NO_HEADLESS']
|
832
|
+
options.args << '--no-sandbox'
|
833
|
+
options.args << '--window-size=1280,1024'
|
834
|
+
|
835
|
+
Capybara::Selenium::Driver.new(app, browser: :chrome, options: options, service: service)
|
836
|
+
end
|
837
|
+
# не работает, установлено выше
|
838
|
+
# Capybara::Screenshot.webkit_options = { width: 1280, height: 1024 }
|
839
|
+
|
840
|
+
if ENV['CHROME_VISIBLE']
|
841
|
+
Capybara.javascript_driver = :selenium_chrome
|
842
|
+
else
|
843
|
+
Capybara.javascript_driver = :chrome_root
|
844
|
+
end
|
845
|
+
Capybara.default_driver = :rack_test
|
846
|
+
Capybara.default_max_wait_time = 15
|
847
|
+
Capybara.register_server :puma do |app, port, host|
|
848
|
+
require 'rack/handler/puma'
|
849
|
+
Rack::Handler::Puma.run(app, Host: host, Port: port, Threads: "1:1")
|
850
|
+
end
|
851
|
+
|
852
|
+
Capybara.configure do |config|
|
853
|
+
config.app_host = "http://\#{Rails.application.secrets.host}"
|
854
|
+
config.server = :puma
|
855
|
+
config.server_port = 9332
|
856
|
+
config.run_server = true
|
857
|
+
config.always_include_port = true
|
858
|
+
end
|
859
|
+
|
860
|
+
|
861
|
+
Capybara::Screenshot.register_driver(:selenium_chrome) do |driver, path|
|
862
|
+
driver.browser.save_screenshot(path)
|
863
|
+
end
|
864
|
+
Capybara::Screenshot.register_driver(:chrome_root) do |driver, path|
|
865
|
+
driver.browser.save_screenshot(path)
|
866
|
+
end
|
867
|
+
|
868
|
+
Capybara::Screenshot.autosave_on_failure = true
|
869
|
+
|
824
870
|
TEXT
|
825
871
|
end
|
826
872
|
|
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.
|
4
|
+
version: 0.33.1
|
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-
|
11
|
+
date: 2020-08-26 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -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.
|
368
|
-
signing_key:
|
367
|
+
rubygems_version: 3.1.4
|
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!
|