ack_rocket_cms 0.7.6.3 → 0.7.6.4

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: e69afd162ed33c6b8c2ea80bdd95656841f1afb2
4
- data.tar.gz: 6eee9dab90b8d4f07848662b365efb1a8bd5485f
3
+ metadata.gz: 7f5c8755a70408ccb0e2018b820542c22e65ddf6
4
+ data.tar.gz: 6cc2ed7e328c4b1af1f5a65fe98139bd85a06083
5
5
  SHA512:
6
- metadata.gz: 41960cb78465c72fd0c5abefd59eb14d24a7954940a77d96ced5efdaa5c1bf6781c56404b46c7c9dbf92675e61bdab65d95c29e4306c1686d13bb8bb472c3fa6
7
- data.tar.gz: 1c28fd5d081b98d08ae631702ffb22e0c113cbc7d06e653c47e4b74cab7b4f7fd855da5187d6273ec35d54b3e178862725a14e7801531d0df66b74d3dd155be1
6
+ metadata.gz: e76306c0c338b37f418859629dd85599b8f33fc90c3783f07ab19029649b2a12ccf4254219c5175d9634bf9c11acc5960b035e842c2124383c25b2034f1c91d1
7
+ data.tar.gz: 51dd6019831bd6d4478470d211bde3eb818e41b497bc8b11030aa5f988bb79b3f8d88a97bbffb8467771a061ea1d50e1e8228c2c51c23b080f675ab23cf19cb6
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- ack_rocket_cms (0.7.6.3)
4
+ ack_rocket_cms (0.7.6.4)
5
5
  ack_rails_admin_jcrop
6
6
  addressable
7
7
  ckeditor
@@ -30,7 +30,7 @@ PATH
30
30
  GEM
31
31
  remote: https://rubygems.org/
32
32
  specs:
33
- ack_rails_admin_jcrop (0.0.2)
33
+ ack_rails_admin_jcrop (0.0.4)
34
34
  mini_magick
35
35
  rails (>= 3.0.0)
36
36
  rails_admin (>= 0.3.0)
@@ -72,7 +72,7 @@ GEM
72
72
  addressable (2.3.8)
73
73
  arel (6.0.0)
74
74
  bcrypt (3.1.10)
75
- bson (2.3.0)
75
+ bson (3.0.4)
76
76
  builder (3.2.2)
77
77
  ckeditor (4.1.2)
78
78
  cocaine
@@ -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.4.1)
92
+ devise (3.5.1)
93
93
  bcrypt (~> 3.0)
94
94
  orm_adapter (~> 0.1)
95
95
  railties (>= 3.2.6, < 5)
@@ -114,7 +114,7 @@ GEM
114
114
  thor (>= 0.14, < 2.0)
115
115
  jquery-ui-rails (5.0.5)
116
116
  railties (>= 3.2.16)
117
- json (1.8.2)
117
+ json (1.8.3)
118
118
  kaminari (0.16.3)
119
119
  actionpack (>= 3.0.0)
120
120
  activesupport (>= 3.0.0)
@@ -122,17 +122,17 @@ GEM
122
122
  nokogiri (>= 1.5.9)
123
123
  mail (2.6.3)
124
124
  mime-types (>= 1.16, < 3)
125
- mime-types (2.5)
126
- mini_magick (4.2.4)
125
+ mime-types (2.6.1)
126
+ mini_magick (4.2.7)
127
127
  mini_portile (0.6.2)
128
- minitest (5.6.1)
128
+ minitest (5.7.0)
129
129
  mongoid (4.0.2)
130
130
  activemodel (~> 4.0)
131
131
  moped (~> 2.0.0)
132
132
  origin (~> 2.1)
133
133
  tzinfo (>= 0.3.37)
134
- moped (2.0.4)
135
- bson (~> 2.2)
134
+ moped (2.0.5)
135
+ bson (~> 3.0.4)
136
136
  connection_pool (~> 2.0)
137
137
  optionable (~> 0.2.0)
138
138
  nested_form (0.3.2)
@@ -200,7 +200,7 @@ GEM
200
200
  responders (2.1.0)
201
201
  railties (>= 4.2.0, < 5)
202
202
  safe_yaml (1.0.4)
203
- sass (3.4.13)
203
+ sass (3.4.14)
204
204
  sass-rails (5.0.3)
205
205
  railties (>= 4.0.0, < 5.0)
206
206
  sass (~> 3.1)
@@ -217,7 +217,7 @@ GEM
217
217
  smart_excerpt (0.1.5)
218
218
  activesupport
219
219
  htmlentities
220
- sprockets (3.1.0)
220
+ sprockets (3.2.0)
221
221
  rack (~> 1.0)
222
222
  sprockets-rails (2.3.1)
223
223
  actionpack (>= 3.0)
@@ -2,5 +2,4 @@
2
2
 
3
3
  html
4
4
  -moz-font-smoothing: antialiased
5
- -webkit-font-smoothing: antialiased
6
-
5
+ -webkit-font-smoothing: antialiased
@@ -1,5 +1,3 @@
1
-
2
-
3
1
  .flash
4
2
  margin: 0 auto
5
3
  padding: 10px 0
@@ -62,5 +60,4 @@
62
60
  +background(linear-gradient(top, #f0565b, #e83639))
63
61
  text-shadow: 0px 1px #d71012
64
62
  a.close_flash
65
- color: #782124
66
-
63
+ color: #782124
@@ -17,6 +17,16 @@ module RsErrors
17
17
 
18
18
  if defined?(CanCan)
19
19
  rescue_from CanCan::AccessDenied do |exception|
20
+ Rails.logger.error "__________________________"
21
+ Rails.logger.error "Error 403"
22
+ Rails.logger.error (params ? params.inspect : "no params data")
23
+ Rails.logger.error (current_user ? current_user.inspect : "no current_user")
24
+ unless exception.nil?
25
+ Rails.logger.error exception.message
26
+ Rails.logger.error exception.backtrace.join("\n")
27
+ capture_exception(exception) if defined?(Raven)
28
+ end
29
+ Rails.logger.error "__________________________"
20
30
  if !user_signed_in?
21
31
  #scope = rails_admin? ? main_app : self
22
32
  #redirect_to scope.new_user_session_path, alert: "Необходимо авторизоваться"
@@ -30,20 +40,30 @@ module RsErrors
30
40
 
31
41
  protected
32
42
  def render_404(exception = nil)
33
- Rails.logger.error "404: #{request.url}"
43
+ Rails.logger.error "__________________________"
44
+ Rails.logger.error "Error 404"
45
+ Rails.logger.error (params ? params.inspect : "no params data")
46
+ Rails.logger.error (current_user ? current_user.inspect : "no current_user")
34
47
  unless exception.nil?
35
48
  Rails.logger.error exception.message
36
49
  Rails.logger.error exception.backtrace.join("\n")
37
50
  capture_exception(exception) if defined?(Raven)
38
51
  end
52
+ Rails.logger.error "__________________________"
39
53
  render_error(404)
40
54
  end
41
55
 
42
- def render_500(exception)
43
- Rails.logger.error "500: #{request.url}"
44
- Rails.logger.error exception.message
45
- Rails.logger.error exception.backtrace.join("\n")
46
- capture_exception(exception) if defined?(Raven)
56
+ def render_500(exception = nil)
57
+ Rails.logger.error "__________________________"
58
+ Rails.logger.error "Error 500"
59
+ Rails.logger.error (params ? params.inspect : "no params data")
60
+ Rails.logger.error (current_user ? current_user.inspect : "no current_user")
61
+ unless exception.nil?
62
+ Rails.logger.error exception.message
63
+ Rails.logger.error exception.backtrace.join("\n")
64
+ capture_exception(exception) if defined?(Raven)
65
+ end
66
+ Rails.logger.error "__________________________"
47
67
  begin
48
68
  if rails_admin_controller?
49
69
  render text: 'Внутренняя ошибка', status: 500
@@ -55,7 +75,7 @@ module RsErrors
55
75
  end
56
76
 
57
77
  def render_error(code = 500)
58
- render template: "errors/error_#{code}", formats: [:html], handlers: [:haml, :slim], layout: RocketCMS.configuration.error_layout, status: code
78
+ render template: "errors/error_#{code}", formats: [:html], handlers: [:haml, :slim], layout: RocketCMS.configuration.error_layout, status: code
59
79
  end
60
80
 
61
81
  def rails_admin?
@@ -33,6 +33,10 @@ module Seoable
33
33
  def self.admin
34
34
  RocketCMS.seo_config
35
35
  end
36
+
37
+ def og_image_jcrop_options
38
+ {aspectRation: 800.0/600.0}
39
+ end
36
40
 
37
41
  # deprecated
38
42
  def self.seo_config
@@ -4,10 +4,10 @@ module RocketCMS
4
4
  module ContactMessage
5
5
  extend ActiveSupport::Concern
6
6
  included do
7
- field :name, type: String
8
- field :email, type: String
9
- field :phone, type: String
10
- field :content, type: String
7
+ field :name, type: String, default: ""
8
+ field :email, type: String, default: ""
9
+ field :phone, type: String, default: ""
10
+ field :content, type: String, default: ""
11
11
  RocketCMS.configuration.contacts_fields.each_pair do |fn, ft|
12
12
  next if ft.nil?
13
13
  field fn, type: ft
@@ -5,7 +5,7 @@ module RocketCMS
5
5
  extend ActiveSupport::Concern
6
6
 
7
7
  included do
8
- field :name, type: String, localize: RocketCMS.configuration.localize
8
+ field :name, type: String, localize: RocketCMS.configuration.localize, default: ""
9
9
  end
10
10
  end
11
11
  end
@@ -14,8 +14,9 @@ module RocketCMS
14
14
  validates_attachment :image, content_type: { content_type: ["image/jpg", "image/jpeg", "image/png"] }
15
15
 
16
16
  def image_file_name=(val)
17
+ return self[:image_file_name] = "" if val == ""
18
+ return self[:image_file_name] = nil if val == nil
17
19
  val = val.to_s
18
- return if val.blank?
19
20
  extension = File.extname(val)[1..-1]
20
21
  file_name = val[0..val.size-extension.size-1]
21
22
  self[:image_file_name] = "#{file_name.filename_to_slug}.#{extension.filename_to_slug}"
@@ -15,8 +15,9 @@ module RocketCMS
15
15
  validates_attachment :image, content_type: { content_type: ["image/jpg", "image/jpeg", "image/png"] }
16
16
 
17
17
  def image_file_name=(val)
18
+ return self[:image_file_name] = "" if val == ""
19
+ return self[:image_file_name] = nil if val == nil
18
20
  val = val.to_s
19
- return if val.blank?
20
21
  extension = File.extname(val)[1..-1]
21
22
  file_name = val[0..val.size-extension.size-1]
22
23
  self[:image_file_name] = "#{file_name.filename_to_slug}.#{extension.filename_to_slug}"
@@ -13,8 +13,9 @@ module RocketCMS
13
13
  validates_attachment :image, content_type: { content_type: ["image/jpg", "image/jpeg", "image/png"] }
14
14
 
15
15
  def image_file_name=(val)
16
+ return self[:image_file_name] = "" if val == ""
17
+ return self[:image_file_name] = nil if val == nil
16
18
  val = val.to_s
17
- return if val.blank?
18
19
  extension = File.extname(val)[1..-1]
19
20
  file_name = val[0..val.size-extension.size-1]
20
21
  self[:image_file_name] = "#{file_name.filename_to_slug}.#{extension.filename_to_slug}"
@@ -4,7 +4,7 @@ module RocketCMS
4
4
  module Menu
5
5
  extend ActiveSupport::Concern
6
6
  included do
7
- field :name, type: String
7
+ field :name, type: String, default: ""
8
8
  end
9
9
  end
10
10
  end
@@ -12,10 +12,19 @@ module RocketCMS
12
12
  unless RocketCMS.configuration.news_image_styles.nil?
13
13
  has_mongoid_attached_file :image, styles: RocketCMS.configuration.news_image_styles
14
14
  validates_attachment_content_type :image, content_type: %w(image/gif image/jpeg image/jpg image/png), if: :image?
15
+
16
+ def image_file_name=(val)
17
+ return self[:image_file_name] = "" if val == ""
18
+ return self[:image_file_name] = nil if val == nil
19
+ val = val.to_s
20
+ extension = File.extname(val)[1..-1]
21
+ file_name = val[0..val.size-extension.size-1]
22
+ self[:image_file_name] = "#{file_name.filename_to_slug}.#{extension.filename_to_slug}"
23
+ end
15
24
  end
16
25
 
17
- field :excerpt, type: String, localize: RocketCMS.configuration.localize
18
- field :content, type: String, localize: RocketCMS.configuration.localize
26
+ field :excerpt, type: String, localize: RocketCMS.configuration.localize, default: ""
27
+ field :content, type: String, localize: RocketCMS.configuration.localize, default: ""
19
28
 
20
29
  scope :after_now, -> { where(:time.lt => Time.now) }
21
30
  scope :by_date, -> { desc(:time) }
@@ -4,11 +4,11 @@ module RocketCMS
4
4
  module Page
5
5
  extend ActiveSupport::Concern
6
6
  included do
7
- field :regexp, type: String
8
- field :redirect, type: String
9
- field :excerpt, type: String, localize: RocketCMS.configuration.localize
10
- field :content, type: String, localize: RocketCMS.configuration.localize
11
- field :fullpath, type: String
7
+ field :regexp, type: String, default: ""
8
+ field :redirect, type: String, default: ""
9
+ field :excerpt, type: String, localize: RocketCMS.configuration.localize, default: ""
10
+ field :content, type: String, localize: RocketCMS.configuration.localize, default: ""
11
+ field :fullpath, type: String, default: ""
12
12
  has_and_belongs_to_many :menus, inverse_of: :pages
13
13
  acts_as_nested_set
14
14
 
@@ -1,3 +1,3 @@
1
1
  module RocketCMS
2
- VERSION = "0.7.6.3"
2
+ VERSION = "0.7.6.4"
3
3
  end
data/release.sh CHANGED
File without changes
data/template.rb CHANGED
@@ -52,6 +52,9 @@ group :development do
52
52
  gem 'hipchat'
53
53
  # gem 'coffee-rails-source-maps'
54
54
  # gem 'compass-rails-source-maps'
55
+
56
+ gem 'favicon_maker', '0.3'
57
+ gem 'favicon_maker_rails'
55
58
  end
56
59
 
57
60
  group :test do
@@ -368,7 +371,7 @@ Rack::Utils.multipart_part_limit = 0
368
371
  TEXT
369
372
  end
370
373
 
371
- create_file 'app/assets/stylesheets/rails_admin/custom/theming.css.sass' do <<-TEXT
374
+ create_file 'app/assets/stylesheets/rails_admin/custom/theming.sass' do <<-TEXT
372
375
  .navbar-brand
373
376
  margin-left: 0 !important
374
377
 
@@ -458,7 +461,7 @@ body.rails_admin
458
461
  .sidebar-nav i
459
462
  margin-right: 5px
460
463
 
461
- body.rails_admin .table td.paperclip_type, body.rails_admin .table td.carrierwave_type
464
+ body.rails_admin .table td.paperclip_type, body.rails_admin .table td.carrierwave_type, body.rails_admin .table td.jcrop_type
462
465
  img
463
466
  max-width: 150px
464
467
  max-height: 100px
@@ -468,6 +471,7 @@ end
468
471
  remove_file 'public/robots.txt'
469
472
  create_file 'public/robots.txt' do <<-TEXT
470
473
  User-Agent: *
474
+ Allow: /
471
475
  Disallow: /admin
472
476
  Sitemap: /sitemap.xml.gz
473
477
  TEXT
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.7.6.3
4
+ version: 0.7.6.4
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-05-21 00:00:00.000000000 Z
12
+ date: 2015-06-08 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: bundler
@@ -404,9 +404,9 @@ files:
404
404
  - app/assets/javascripts/rocket_cms.js.coffee
405
405
  - app/assets/javascripts/rocket_cms/flash.js.coffee
406
406
  - app/assets/javascripts/rocket_cms/map.js.coffee
407
- - app/assets/stylesheets/rocket_cms.css.sass
408
- - app/assets/stylesheets/rocket_cms/flash.css.sass
409
- - app/assets/stylesheets/rocket_cms/normalize.css.scss
407
+ - app/assets/stylesheets/rocket_cms.sass
408
+ - app/assets/stylesheets/rocket_cms/flash.sass
409
+ - app/assets/stylesheets/rocket_cms/normalize.scss
410
410
  - app/controllers/concerns/no_cache.rb
411
411
  - app/controllers/concerns/rs_errors.rb
412
412
  - app/controllers/concerns/rs_menu.rb