rocket_cms 0.25.1 → 0.25.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/README.md +4 -0
- data/bin/rocket_cms +59 -0
- data/lib/generators/rocket_cms/templates/webpack/analytics.es6 +8 -4
- data/lib/rocket_cms.rb +1 -0
- data/lib/rocket_cms/version.rb +1 -1
- metadata +5 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 7c3c972dce8c12cffb6124593a02cfe2205d84a949fd954b4ba19f5dac2b6608
|
4
|
+
data.tar.gz: 767caf3f26c4805a805f385b8accb9e64d9ce3fe2b3abdf8388f11c4d181dcea
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 45fecf2fe340e7b4404b9afb90ffc7ed2ec8e308c536c749c09834d069f7a85ceab6bdf8d72ced7a7dc75004cf5773146654ca773aa75eacde4996843712b4b9
|
7
|
+
data.tar.gz: 37e7515c77173323da11a56eedb78d3e4e91cebea2cca72dd87556b1379fe1af703314b35a7c40c4577c236f6a2b18de5ab4d578462d74312b790d1dd2e6584d
|
data/Gemfile.lock
CHANGED
data/README.md
CHANGED
@@ -155,6 +155,10 @@ gem 'rails_admin_mongoid_localize_field'
|
|
155
155
|
|
156
156
|
designed to be used together with our ansible app setup script.
|
157
157
|
|
158
|
+
### Alternative capistrano task (can be used with non-configured app)
|
159
|
+
|
160
|
+
bundle exec rocket_cms capify PmiGames pg.pmi.ru
|
161
|
+
|
158
162
|
### Documentation
|
159
163
|
|
160
164
|
It's basically Rails Admin + some of our common models and controllers, capistrano config, etc.
|
data/bin/rocket_cms
ADDED
@@ -0,0 +1,59 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
# encoding: utf-8
|
3
|
+
|
4
|
+
require 'thor'
|
5
|
+
|
6
|
+
module RocketCMS
|
7
|
+
class Capify < Thor::Group
|
8
|
+
include Thor::Actions
|
9
|
+
|
10
|
+
no_commands do
|
11
|
+
def load_env
|
12
|
+
return if defined?(Rails)
|
13
|
+
require File.expand_path("../../../config/environment", __FILE__)
|
14
|
+
end
|
15
|
+
end
|
16
|
+
|
17
|
+
class_option :mongoid, default: false
|
18
|
+
|
19
|
+
argument :app_name, type: :string
|
20
|
+
argument :domain, type: :string
|
21
|
+
argument :port, type: :string, optional: true
|
22
|
+
|
23
|
+
source_root File.expand_path('../../lib/generators/rocket_cms/templates', __FILE__)
|
24
|
+
|
25
|
+
#def app_name
|
26
|
+
#Rails.application.class.name.split("::")[0]
|
27
|
+
#end
|
28
|
+
|
29
|
+
def deploy_to
|
30
|
+
"/data/#{app_name.downcase}/app"
|
31
|
+
end
|
32
|
+
def tmp_path
|
33
|
+
"/data/#{app_name.downcase}/tmp_dump"
|
34
|
+
end
|
35
|
+
|
36
|
+
desc "Generate Capistrano config"
|
37
|
+
def capify
|
38
|
+
if options[:mongoid]
|
39
|
+
def RocketCMS.mongoid?
|
40
|
+
true
|
41
|
+
end
|
42
|
+
else
|
43
|
+
def RocketCMS.mongoid?
|
44
|
+
true
|
45
|
+
end
|
46
|
+
end
|
47
|
+
copy_file "Capfile", "Capfile"
|
48
|
+
unless port.nil?
|
49
|
+
template "unicorn.erb", "config/unicorn/production.rb"
|
50
|
+
end
|
51
|
+
template "deploy.erb", "config/deploy.rb"
|
52
|
+
template "production.erb", "config/deploy/production.rb"
|
53
|
+
template "dl.erb", "lib/tasks/dl.thor"
|
54
|
+
puts "all ok"
|
55
|
+
end
|
56
|
+
end
|
57
|
+
end
|
58
|
+
|
59
|
+
RocketCMS::Capify.start
|
@@ -1,21 +1,25 @@
|
|
1
1
|
var old_url = window.location.href;
|
2
|
+
var first = true;
|
2
3
|
|
3
4
|
document.addEventListener("turbolinks:load", function() {
|
4
5
|
//console.log("analytics load");
|
5
|
-
|
6
|
-
|
6
|
+
if (first) {
|
7
|
+
first = false;
|
8
|
+
return;
|
9
|
+
}
|
10
|
+
if (window.metrika && window[metrika] && window[metrika].hit) {
|
7
11
|
window[metrika].hit(window.location.href, document.title, old_url)
|
8
12
|
}
|
9
13
|
old_url = window.location.href
|
10
14
|
|
11
15
|
if (window.gtag) {
|
12
16
|
gtag('event', 'page_view');
|
13
|
-
//
|
17
|
+
//gtag('event', 'page_view', { 'send_to': 'YOUR_ID_HERE' });
|
14
18
|
}
|
15
19
|
});
|
16
20
|
|
17
21
|
export default function(name) {
|
18
|
-
if (window[metrika] && window[metrika].reachGoal) {
|
22
|
+
if (window.metrika && window[metrika] && window[metrika].reachGoal) {
|
19
23
|
window[metrika].reachGoal(name);
|
20
24
|
} else {
|
21
25
|
if (window.console) {
|
data/lib/rocket_cms.rb
CHANGED
data/lib/rocket_cms/version.rb
CHANGED
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.25.
|
4
|
+
version: 0.25.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- glebtv
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-03-
|
11
|
+
date: 2018-03-28 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -187,7 +187,8 @@ dependencies:
|
|
187
187
|
description: RocketCMS
|
188
188
|
email:
|
189
189
|
- glebtv@gmail.com
|
190
|
-
executables:
|
190
|
+
executables:
|
191
|
+
- rocket_cms
|
191
192
|
extensions: []
|
192
193
|
extra_rdoc_files: []
|
193
194
|
files:
|
@@ -252,6 +253,7 @@ files:
|
|
252
253
|
- app/views/shared/_meta.slim
|
253
254
|
- app/views/shared/_obj.slim
|
254
255
|
- app/views/shared/_og.slim
|
256
|
+
- bin/rocket_cms
|
255
257
|
- config/locales/en.rocket_admin.yml
|
256
258
|
- config/locales/en.rs.yml
|
257
259
|
- config/locales/ru.cancan.yml
|