ack_rocket_cms 0.8.0 → 0.8.2

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
  SHA1:
3
- metadata.gz: 2b4be58e811a9fe7a30b6ae6c5dc4afcf8fb4224
4
- data.tar.gz: 539440be1663279ea0e98d7698b1212fef5066e2
3
+ metadata.gz: 6e33e7acc64054a4dd51d9937ebe3d041f6feabd
4
+ data.tar.gz: ea547035e193c9a8e691588f3304787191aa790a
5
5
  SHA512:
6
- metadata.gz: 5698b19ec72e2357d9d4a1eea81bc1c2e90fcb694e93495c3b866a37e9948d1537286fe934183e497882066e40dbed58ac1bc1f58855559d40d81d90595a845d
7
- data.tar.gz: 0c8816d2f174cc7453a2401c132da4f8cd81c396d245c1d9ae54741aa260156ec1824bc7db8fe3b23c5da44fae0c5bd1298dd7a98f3576fd02330a00f2f3116d
6
+ metadata.gz: 90706ad746c30a490c29e78ee23f5219ae7cb8ab283e222aad489f416385c15970f037eb24fca56cb368f0316ea8a1ed0597e61b4ebea0e06f4988990303563f
7
+ data.tar.gz: 7768a9ebaabb4120f7bbff96d0e4e15560e36c7fff30aa4a123af590585ef8aa84f3829372520ab20278b1da55f4b4ae38457ea93043e02f506d7aba52cbf903
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- ack_rocket_cms (0.8.0)
4
+ ack_rocket_cms (0.8.2)
5
5
  ack_rails_admin_jcrop
6
6
  addressable
7
7
  ckeditor
@@ -70,11 +70,11 @@ GEM
70
70
  thread_safe (~> 0.3, >= 0.3.4)
71
71
  tzinfo (~> 1.1)
72
72
  addressable (2.3.8)
73
- arel (6.0.2)
73
+ arel (6.0.3)
74
74
  bcrypt (3.1.10)
75
- bson (3.1.2)
75
+ bson (3.2.1)
76
76
  builder (3.2.2)
77
- ckeditor (4.1.2)
77
+ ckeditor (4.1.3)
78
78
  cocaine
79
79
  orm_adapter (~> 0.5.0)
80
80
  climate_control (0.0.3)
@@ -89,7 +89,7 @@ GEM
89
89
  execjs
90
90
  coffee-script-source (1.9.1.1)
91
91
  connection_pool (2.2.0)
92
- devise (3.5.1)
92
+ devise (3.5.2)
93
93
  bcrypt (~> 3.0)
94
94
  orm_adapter (~> 0.1)
95
95
  railties (>= 3.2.6, < 5)
@@ -98,13 +98,13 @@ GEM
98
98
  warden (~> 1.2.3)
99
99
  erubis (2.7.0)
100
100
  execjs (2.5.2)
101
- font-awesome-rails (4.3.0.0)
101
+ font-awesome-rails (4.4.0.0)
102
102
  railties (>= 3.2, < 5.0)
103
103
  geocoder (1.2.9)
104
104
  glebtv-simple_captcha (0.6.7)
105
- globalid (0.3.5)
105
+ globalid (0.3.6)
106
106
  activesupport (>= 4.1.0)
107
- haml (4.0.6)
107
+ haml (4.0.7)
108
108
  tilt
109
109
  htmlentities (4.3.4)
110
110
  i18n (0.7.0)
@@ -123,9 +123,9 @@ GEM
123
123
  mail (2.6.3)
124
124
  mime-types (>= 1.16, < 3)
125
125
  mime-types (2.6.1)
126
- mini_magick (4.2.7)
126
+ mini_magick (4.2.10)
127
127
  mini_portile (0.6.2)
128
- minitest (5.7.0)
128
+ minitest (5.8.0)
129
129
  mongoid (4.0.2)
130
130
  activemodel (~> 4.0)
131
131
  moped (~> 2.0.0)
@@ -185,7 +185,7 @@ GEM
185
185
  mongoid (>= 3.0)
186
186
  rails (>= 3.0)
187
187
  rails_admin (>= 0.5)
188
- rails_admin_nested_set (0.4.4)
188
+ rails_admin_nested_set (0.4.5)
189
189
  rails_admin
190
190
  rails_admin_settings (1.0.1)
191
191
  rails_admin_toggleable (0.5.1)
@@ -212,7 +212,7 @@ GEM
212
212
  simple_form (3.1.0)
213
213
  actionpack (~> 4.0)
214
214
  activemodel (~> 4.0)
215
- sitemap_generator (5.0.5)
215
+ sitemap_generator (5.1.0)
216
216
  builder
217
217
  smart_excerpt (0.1.5)
218
218
  activesupport
@@ -231,7 +231,7 @@ GEM
231
231
  coffee-rails
232
232
  tzinfo (1.2.2)
233
233
  thread_safe (~> 0.1)
234
- validates_email_format_of (1.6.2)
234
+ validates_email_format_of (1.6.3)
235
235
  i18n
236
236
  warden (1.2.3)
237
237
  rack (>= 1.0)
data/README.md CHANGED
@@ -117,6 +117,12 @@ or
117
117
  gem 'hstore_translate'
118
118
  ```
119
119
 
120
+ Add ```rails_admin_mongoid_localize_field``` gem if using MongoDB:
121
+
122
+ ```ruby
123
+ gem 'rails_admin_mongoid_localize_field'
124
+ ```
125
+
120
126
  ### Documentation
121
127
 
122
128
  It's basically Mongoid + Rails Admin + some of my common models and controllers, capistrano config (from root repo), etc.
@@ -71,7 +71,7 @@ module RsErrors
71
71
  Rails.logger.error "__________________________"
72
72
  begin
73
73
  if rails_admin?
74
- render text: t('rs.errors.internal_error', klass: exception.class.name, message: exception.message), status: 500
74
+ render text: t('rs.errors.internal_error_full', klass: exception.class.name, message: exception.message), status: 500
75
75
  return
76
76
  end
77
77
  rescue Exception => e
@@ -13,7 +13,11 @@ module RsLocalizeable
13
13
  end
14
14
  def nav_get_menu_items(type)
15
15
  pages = ::Menu.find(type.to_s).pages.enabled
16
- pages = pages.where(["EXIST(name_translations, ?) = TRUE AND name_translations -> ? != ''", I18n.locale, I18n.locale])
16
+ if RocketCMS.mongoid?
17
+ pages = pages.where(:"name.#{I18n.locale}".exists => true)
18
+ elsif RocketCMS.active_record?
19
+ pages = pages.where(["EXIST(name_translations, ?) = TRUE AND name_translations -> ? != ''", I18n.locale, I18n.locale])
20
+ end
17
21
  pages.sorted.to_a
18
22
  end
19
23
  def nav_get_url(item)
@@ -33,13 +33,16 @@ module RsMenu
33
33
  begin
34
34
  nav_extra_data_before(type, primary)
35
35
  items = nav_get_menu_items(type)
36
- items.select { |i| i.parent_id.nil? && !i.name.blank? && i.enabled }.each do |item|
37
- render_with_subs(items, primary, item) if primary
36
+ items = items.select { |i| i.parent_id.nil? && !i.name.blank? && i.enabled }
37
+ items.each do |item|
38
+ render_with_subs(items, primary, item)
38
39
  end
39
40
  nav_extra_data_after(type, primary)
40
41
  rescue Exception => exception
41
42
  Rails.logger.error exception.message
42
43
  Rails.logger.error exception.backtrace.join("\n")
44
+ puts exception.message
45
+ puts exception.backtrace.join("\n")
43
46
  capture_exception(exception) if respond_to?(:capture_exception)
44
47
  items || []
45
48
  end
@@ -1,3 +1,3 @@
1
1
  #rocket_cms_error{class="error-#{code}"}
2
- %h1= t('rs.errors.title', code: code)
2
+ h1= t('rs.errors.title', code: code)
3
3
  p= "#{text}"
@@ -1,7 +1,7 @@
1
1
  .rs-news-show
2
2
  h1.rs-news-title= @news.name
3
3
  .rs-news-date= l(@news.time.to_date)
4
- .rs-news-text= @news.excerpt
4
+ .rs-news-text== @news.content
5
5
  - if !RocketCMS.config.news_image_styles.nil? && @news.image?
6
6
  .rs-news-image= image_tag @news.image.url(:main)
7
7
  .rs-news-content
@@ -1,7 +1,7 @@
1
1
  - unless obj.nil?
2
2
  .text_content
3
3
  - if (!defined?(h1) || h1) && !obj.h1.blank?
4
- %h1= obj.h1
4
+ h1= obj.h1
5
5
  - if obj.content.blank?
6
6
  - unless @seo_page.nil?
7
7
  = raw @seo_page.page_content
@@ -18,4 +18,4 @@
18
18
 
19
19
  - content_for :title do
20
20
  - if obj.title
21
- %title= obj.title
21
+ title= obj.title
@@ -23,6 +23,7 @@ en:
23
23
  errors:
24
24
  title: "Error %{code}"
25
25
  form_expired: "Token expired"
26
- internal_error: "Internal error: %{klass} %{message}"
26
+ internal_error: "Internal error"
27
+ internal_error_full: "Internal error: %{klass} %{message}"
27
28
  access_denied: "Access denied"
28
29
  not_found: 'The requested page was not found on this server'
@@ -23,7 +23,8 @@ ru:
23
23
  errors:
24
24
  title: "Ошибка %{code}"
25
25
  form_expired: "Истекло время на заполение формы"
26
- internal_error: "Внутренняя ошибка: %{klass} %{message}"
26
+ internal_error: "Внутренняя ошибка"
27
+ internal_error_full: "Внутренняя ошибка: %{klass} %{message}"
27
28
  access_denied: "Доступ запрещен"
28
29
  not_found: 'Запрашиваемая страница была удалена, или введён некорректный адрес'
29
30
 
@@ -54,16 +54,12 @@ RailsAdmin.config do |config|
54
54
  end
55
55
 
56
56
  toggle
57
- <<<<<<< HEAD
58
- toggle_menu
59
- sitemap
60
- =======
61
- toggle_menu do
57
+ toggle_menu do
62
58
  visible do
63
59
  ['Page'].include? bindings[:abstract_model].model_name
64
60
  end
65
61
  end
66
- >>>>>>> upstream/master
62
+ sitemap
67
63
  end
68
64
 
69
65
  config.main_app_name = ['<%= Rails.application.class.name.split('::')[0] %>', 'Админка']
@@ -1,3 +1,3 @@
1
1
  module RocketCMS
2
- VERSION = "0.8.0"
2
+ VERSION = "0.8.2"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ack_rocket_cms
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.8.0
4
+ version: 0.8.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Alexander Kiseliev
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2015-07-14 00:00:00.000000000 Z
12
+ date: 2015-08-11 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: bundler