rocket_cms 0.8.0.pre.6 → 0.8.0

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: c435abf4bab646d020c211fe4908bd8e871f7fe0
4
- data.tar.gz: 1715732d78ec2450a345858277dd34bed2e2093d
3
+ metadata.gz: bde856fee99a7ce815e3452f2df4d3db50795fdc
4
+ data.tar.gz: dded2bab36ed3115148be3ff23f77ed94bc96cdb
5
5
  SHA512:
6
- metadata.gz: d350328115337170dbca7a427df2af03ab6fa48995c627b527434191327c21597c59c4ce82a192f79033c228c0f74576625af3bcffc9817a0a95fe464f15aced
7
- data.tar.gz: b6c3936de5887a928ad02b041c8906cf102aae3611480a6f191c4e8e6f63ca5412e72ecd025e21ac87e0be80231036ac4c1b0a17250cf93725ae619541c8562d
6
+ metadata.gz: 879158b201d8da62949347753f70e88f998b16dbf6240202806068738527742da297a58085562e10dec6d462971f435fc3e81c52e6552b7f57486298aaf19b0d
7
+ data.tar.gz: b6a0bc88d9b26853a62f961b8cb43ad2cd63ae332f12a087df95c3ab4abf7a67cdce071586b1881b7ad901adcb04239a0fef9cf902c845816e3d62cf03dfa96b
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- rocket_cms (0.8.0.pre.6)
4
+ rocket_cms (0.8.0)
5
5
  addressable
6
6
  coffee-rails
7
7
  devise
@@ -160,7 +160,7 @@ GEM
160
160
  sass-rails (>= 4.0, < 6)
161
161
  rails_admin_nested_set (0.4.2)
162
162
  rails_admin (~> 0.6.6)
163
- rails_admin_settings (1.0.0)
163
+ rails_admin_settings (1.0.1)
164
164
  rails_admin_toggleable (0.5.0)
165
165
  rails_admin (~> 0.6.6)
166
166
  railties (4.2.3)
@@ -19,7 +19,7 @@ module RsMenu
19
19
  end
20
20
 
21
21
  def navigation_item(primary, item, block=nil)
22
- url = item.redirect.blank? ? item.fullpath : item.redirect
22
+ url = nav_get_url(item)
23
23
  if block.nil?
24
24
  primary.item(item.slug, item.name, url, item.nav_options)
25
25
  else
@@ -46,10 +46,12 @@ module RsMenu
46
46
  end
47
47
  end
48
48
 
49
+ def nav_get_url(item)
50
+ item.redirect.blank? ? item.fullpath : item.redirect
51
+ end
49
52
  def nav_get_menu_items(type)
50
53
  ::Menu.find(type.to_s).pages.enabled.sorted.to_a
51
54
  end
52
-
53
55
  def nav_extra_data_before(type, primary)
54
56
  # override for additional config or items
55
57
  end
@@ -22,8 +22,12 @@ module RsPages
22
22
  path = path[0..-2]
23
23
  do_redirect = true
24
24
  end
25
-
26
25
  page = Page.enabled.where(fullpath: path).first
26
+
27
+ if page.nil? && !params[:slug].blank?
28
+ page = Page.enabled.where(fullpath: "/" + params[:slug]).first
29
+ end
30
+
27
31
  if page.nil?
28
32
  do_redirect = true
29
33
  spath = path.chomp(File.extname(path))
@@ -31,6 +35,7 @@ module RsPages
31
35
  page = Page.enabled.where(fullpath: spath).first
32
36
  end
33
37
  end
38
+
34
39
  if !page.nil? && do_redirect
35
40
  redirect_to path, status: :moved_permanently
36
41
  end
@@ -6,11 +6,13 @@ module Seoable
6
6
  if Seo.table_exists?
7
7
  included do
8
8
  has_one :seo, as: :seoable, autosave: true
9
- after_create :create_seo
10
9
  accepts_nested_attributes_for :seo
11
10
  delegate *FIELDS, to: :seo
12
11
  delegate *(FIELDS.map {|f| "#{f}=".to_sym }), to: :seo
13
-
12
+ alias seo_without_build seo
13
+ def seo
14
+ seo_without_build || build_seo
15
+ end
14
16
  if RocketCMS.config.localize
15
17
  delegate *(LOCALIZED_FIELDS.map {|f| "#{f}_translations".to_sym }), to: :seo
16
18
  delegate *(LOCALIZED_FIELDS.map {|f| "#{f}_translations=".to_sym }), to: :seo
@@ -53,10 +53,14 @@ module RocketCMS
53
53
  url.match(clean_regexp)
54
54
  end
55
55
  end
56
-
56
+
57
+ def regexp_prefix
58
+ ""
59
+ end
60
+
57
61
  def clean_regexp
58
62
  if regexp.blank?
59
- /^#{Regexp.escape(fullpath)}$/
63
+ /^#{regexp_prefix}#{Regexp.escape(fullpath)}$/
60
64
  else
61
65
  begin
62
66
  /#{regexp}/
@@ -1,3 +1,3 @@
1
1
  module RocketCMS
2
- VERSION = "0.8.0.pre.6"
2
+ VERSION = "0.8.0"
3
3
  end
@@ -301,10 +301,7 @@ create_file 'app/assets/stylesheets/rails_admin/custom/theming.css.sass' do <<-T
301
301
  font-size: 20px
302
302
 
303
303
  .remove_nested_fields
304
- display: block !important
305
- z-index: 5
306
- right: 0
307
- left: auto
304
+ opacity: 1 !important
308
305
 
309
306
  .model-dialog
310
307
  width: 800px !important
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rocket_cms
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.8.0.pre.6
4
+ version: 0.8.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - glebtv
@@ -494,9 +494,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
494
494
  version: '0'
495
495
  required_rubygems_version: !ruby/object:Gem::Requirement
496
496
  requirements:
497
- - - ">"
497
+ - - ">="
498
498
  - !ruby/object:Gem::Version
499
- version: 1.3.1
499
+ version: '0'
500
500
  requirements: []
501
501
  rubyforge_project:
502
502
  rubygems_version: 2.4.5