trusty-cms 1.2.28 → 1.2.29

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 CHANGED
@@ -1,15 +1,15 @@
1
1
  ---
2
2
  !binary "U0hBMQ==":
3
3
  metadata.gz: !binary |-
4
- ZTY4MWE2MDI0NWQ3NDdmOWFkM2M5MGI2YmM2ZTNmNzkyMzRhNzY0ZA==
4
+ ZDljNjFiYjdjZTNiNWViMmUxZjYwZjE0NGViNGViZDg4ZTNmMjMzNQ==
5
5
  data.tar.gz: !binary |-
6
- ZjNiNzAxNDc1MWExM2VhYmMwN2FlYmYyYzA5MmNlYzJhMTRkOWY2YQ==
6
+ MTdkODliMmQxM2MwZjg1ZGFmMDY5OTU2Y2UwYTBjNmU1MDRhZDJhZQ==
7
7
  SHA512:
8
8
  metadata.gz: !binary |-
9
- ZDgxNWQzOTFmMTk3OGY0YzQ0YjE2OGI1OWViYzdhOWNkOGJkZTM1ZjU2YTgx
10
- MDU5Nzc1MWU0Yzg2YTg5ZDU3YzZiOWEyMzEyODE1YzkzOTFkZmZjNzEwM2Nm
11
- ZmEyZTYxN2IzMDQyYWI0ODZkYzA1ZDQ2NjkzYTBjOWYzMDY1NDk=
9
+ YTEwNmZiZTY5ZTQ3YzAwZGNmNTdiZjBmNTM4ZTM5OTM2YmQ1NThjYzhiYjk5
10
+ ZjJmY2UxNjE2MTViYjVkNDBhZmE0ZTc3NTBkYzRlMTNhZjFhNmZlZjA4MzAw
11
+ ZGFjMThjZjAyZDlhMjZkMmFjYzc3YWVlNWE3MjE4MzliNDRhYmQ=
12
12
  data.tar.gz: !binary |-
13
- N2VhNmNiZTg5MDAxYTZkYTM0YmU0NTYyMzY0ZGIzYzI2YTEyNDNhMzY1MTEz
14
- NTU5Njk0MmU1YTUzYjE2YjZlMDFhOWY2ZTk4OTRmOWU3MDUwZDlkNzFiNzli
15
- OTNjNGMzMzFkMmQxMmI1MjcyNDFmYzcwMGZlM2VmYWYxN2UzNDQ=
13
+ MjNiOWQzZDM4ODRkMTM4MGI2YjExZGIwZDM0ZTE2NTk4ZDE3ZmU4MjAxMzdi
14
+ NTJmNTEyODc2YWFjYWU3NmI5ZDk4Y2EzMmRkODcwNTZjNjUzNzYxYmExMTFj
15
+ MjE3NzZhYmE5ZDc3NzkzZGFiNzMxNWUyMzE0MDBlOTg3NWU1ZDI=
data/app/models/page.rb CHANGED
@@ -179,23 +179,26 @@ class Page < ActiveRecord::Base
179
179
  path = clean_path(path) if clean
180
180
  my_path = self.path
181
181
  if (my_path == path) && (not live or published?)
182
- self
182
+ return self
183
183
  elsif (path =~ /^#{Regexp.quote(my_path)}([^\/]*)/)
184
184
  slug_child = children.find_by_slug($1)
185
185
  if slug_child
186
- found = slug_child.find_by_url(path, live, clean) # TODO: set to find_by_path after deprecation
186
+ found = slug_child.find_by_path(path, live, clean) # TODO: set to find_by_path after deprecation
187
187
  return found if found
188
188
  end
189
189
  children.each do |child|
190
- found = child.find_by_url(path, live, clean) # TODO: set to find_by_path after deprecation
190
+ found = child.find_by_path(path, live, clean) # TODO: set to find_by_path after deprecation
191
191
  return found if found
192
192
  end
193
+ end
194
+ unless slug_child
193
195
  file_not_found_types = ([FileNotFoundPage] + FileNotFoundPage.descendants)
194
196
  file_not_found_names = file_not_found_types.collect { |x| x.name }
195
197
  condition = (['class_name = ?'] * file_not_found_names.length).join(' or ')
196
198
  condition = "status_id = #{Status[:published].id} and (#{condition})" if live
197
- children.where([condition] + file_not_found_names).first
199
+ return children.where([condition] + file_not_found_names).first
198
200
  end
201
+ slug_child
199
202
  end
200
203
  alias_method :find_by_url, :find_by_path
201
204
 
data/lib/trusty_cms.rb CHANGED
@@ -5,7 +5,7 @@ unless defined? TrustyCms::Version
5
5
  module Version
6
6
  Major = '1'
7
7
  Minor = '2'
8
- Tiny = '28'
8
+ Tiny = '29'
9
9
  Patch = nil # set to nil for normal release
10
10
 
11
11
  class << self
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: trusty-cms
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.2.28
4
+ version: 1.2.29
5
5
  platform: ruby
6
6
  authors:
7
7
  - TrustyCms CMS dev team
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-03-20 00:00:00.000000000 Z
11
+ date: 2015-04-13 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: tzinfo