rocket_cms 0.25.1 → 0.25.3

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: f857caa9b097cb30962cabade54f1dfba733a73f94cbd77e3658a5cd282ca719
4
- data.tar.gz: 1774de5c3b590febd0e2828bf7441a3193941e37f1b4571891890b8a13eb780d
3
+ metadata.gz: 7c3c972dce8c12cffb6124593a02cfe2205d84a949fd954b4ba19f5dac2b6608
4
+ data.tar.gz: 767caf3f26c4805a805f385b8accb9e64d9ce3fe2b3abdf8388f11c4d181dcea
5
5
  SHA512:
6
- metadata.gz: 848e9a4f759aad59c3eae2d247da275cae14c7216f9f651d67386c890a8b350fadc851c7ded99ee96e93747dda53b57851cbb6813a1bd32c9d6e12f7edd560f6
7
- data.tar.gz: 185fe4f1c840908ca1bd00f1879d5140407ec896c69fd90d5d568b769077094a3d217d74808ee354c8ad5cb66898a945dd8efbf311f0db451072be2567d8de53
6
+ metadata.gz: 45fecf2fe340e7b4404b9afb90ffc7ed2ec8e308c536c749c09834d069f7a85ceab6bdf8d72ced7a7dc75004cf5773146654ca773aa75eacde4996843712b4b9
7
+ data.tar.gz: 37e7515c77173323da11a56eedb78d3e4e91cebea2cca72dd87556b1379fe1af703314b35a7c40c4577c236f6a2b18de5ab4d578462d74312b790d1dd2e6584d
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- rocket_cms (0.25.1)
4
+ rocket_cms (0.25.3)
5
5
  addressable
6
6
  coffee-rails
7
7
  jquery-rails
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.
@@ -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
- if (window[metrika]) {
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
- // gtag('event', 'page_view', { 'send_to': 'YOUR_ID_HERE' });
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) {
@@ -105,3 +105,4 @@ if defined?(RailsAdmin) && !RocketCMS.light?
105
105
  require 'rocket_cms/nested_set'
106
106
  end
107
107
 
108
+ Thor::Util.load_thorfile(File.expand_path("../tasks/rocket.thor", __FILE__).to_s)
@@ -1,3 +1,3 @@
1
1
  module RocketCMS
2
- VERSION = "0.25.1"
2
+ VERSION = "0.25.3"
3
3
  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.25.1
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-27 00:00:00.000000000 Z
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