refinerycms-pages 1.0.0 → 1.0.1

Sign up to get free protection for your applications and to get access to all the features.
@@ -21,7 +21,7 @@ class PagesController < ApplicationController
21
21
  if @page.try(:live?) || (refinery_user? && current_user.authorized_plugins.include?("refinery_pages"))
22
22
  # if the admin wants this to be a "placeholder" page which goes to its first child, go to that instead.
23
23
  if @page.skip_to_first_child && (first_live_child = @page.children.order('lft ASC').live.first).present?
24
- redirect_to first_live_child.url
24
+ redirect_to first_live_child.url and return
25
25
  elsif @page.link_url.present?
26
26
  redirect_to @page.link_url and return
27
27
  end
data/app/models/page.rb CHANGED
@@ -336,7 +336,7 @@ class Page < ActiveRecord::Base
336
336
  Refinery.deprecate({
337
337
  :what => "page[#{part_title.inspect}]",
338
338
  :when => '1.1',
339
- :replacement => "content_for(#{part_title.inspect})",
339
+ :replacement => "page.content_for(#{part_title.inspect})",
340
340
  :caller => caller
341
341
  })
342
342
 
data/lib/gemspec.rb CHANGED
@@ -1,8 +1,10 @@
1
+ # Encoding: UTF-8
1
2
  require 'pathname'
2
3
  gempath = Pathname.new(File.expand_path('../../', __FILE__))
3
4
  require gempath.join('..', 'base', 'lib', 'base', 'refinery')
4
5
 
5
6
  gemspec = <<EOF
7
+ # Encoding: UTF-8
6
8
  # DO NOT EDIT THIS FILE DIRECTLY! Instead, use lib/gemspec.rb to generate it.
7
9
 
8
10
  Gem::Specification.new do |s|
@@ -14,7 +16,7 @@ Gem::Specification.new do |s|
14
16
  s.email = %q{info@refinerycms.com}
15
17
  s.homepage = %q{http://refinerycms.com}
16
18
  s.rubyforge_project = %q{refinerycms}
17
- s.authors = ['Resolve Digital', 'Philip Arndt', 'David Jones', 'Steven Heidel']
19
+ s.authors = ['Resolve Digital', 'Philip Arndt', 'David Jones', 'Steven Heidel', 'Uģis Ozols']
18
20
  s.license = %q{MIT}
19
21
  s.require_paths = %w(lib)
20
22
  s.executables = %w(#{Pathname.glob(gempath.join('bin/*')).map{|d| d.relative_path_from(gempath)}.sort.join(" ")})
@@ -1,9 +1,10 @@
1
- ::Refinery::Application.routes.draw do
2
- match '*path' => 'pages#show'
3
- end
4
1
 
5
- # Add any parts of routes as reserved words.
6
2
  if Page.use_marketable_urls?
3
+ ::Refinery::Application.routes.draw do
4
+ match '*path' => 'pages#show'
5
+ end
6
+
7
+ # Add any parts of routes as reserved words.
7
8
  route_paths = ::Refinery::Application.routes.named_routes.routes.map{|name, route| route.path}
8
9
  Page.friendly_id_config.reserved_words |= route_paths.map { |path|
9
10
  path.to_s.gsub(/^\//, '').to_s.split('(').first.to_s.split(':').first.to_s.split('/')
@@ -35,6 +35,7 @@ module Refinery
35
35
 
36
36
  config.after_initialize do
37
37
  ::Refinery::Plugin.register do |plugin|
38
+ plugin.pathname = root
38
39
  plugin.name = 'refinery_pages'
39
40
  plugin.directory = 'pages'
40
41
  plugin.version = %q{1.0.0}
@@ -1,15 +1,16 @@
1
+ # Encoding: UTF-8
1
2
  # DO NOT EDIT THIS FILE DIRECTLY! Instead, use lib/gemspec.rb to generate it.
2
3
 
3
4
  Gem::Specification.new do |s|
4
5
  s.name = %q{refinerycms-pages}
5
- s.version = %q{1.0.0}
6
+ s.version = %q{1.0.1}
6
7
  s.summary = %q{Pages engine for Refinery CMS}
7
8
  s.description = %q{The default content engine of Refinery CMS. This engine handles the administration and display of user-editable pages.}
8
- s.date = %q{2011-05-28}
9
+ s.date = %q{2011-06-21}
9
10
  s.email = %q{info@refinerycms.com}
10
11
  s.homepage = %q{http://refinerycms.com}
11
12
  s.rubyforge_project = %q{refinerycms}
12
- s.authors = ['Resolve Digital', 'Philip Arndt', 'David Jones', 'Steven Heidel']
13
+ s.authors = ['Resolve Digital', 'Philip Arndt', 'David Jones', 'Steven Heidel', 'Uģis Ozols']
13
14
  s.license = %q{MIT}
14
15
  s.require_paths = %w(lib)
15
16
  s.executables = %w()
@@ -119,7 +120,7 @@ Gem::Specification.new do |s|
119
120
  'spec/models/page_spec.rb'
120
121
  ]
121
122
 
122
- s.add_dependency 'refinerycms-core', '= 1.0.0'
123
+ s.add_dependency 'refinerycms-core', '= 1.0.1'
123
124
  s.add_dependency 'friendly_id_globalize3', '~> 3.2.1'
124
125
  s.add_dependency 'globalize3', '~> 0.1'
125
126
  s.add_dependency 'awesome_nested_set', '~> 2.0'
metadata CHANGED
@@ -1,20 +1,25 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: refinerycms-pages
3
3
  version: !ruby/object:Gem::Version
4
+ hash: 21
4
5
  prerelease:
5
- version: 1.0.0
6
+ segments:
7
+ - 1
8
+ - 0
9
+ - 1
10
+ version: 1.0.1
6
11
  platform: ruby
7
12
  authors:
8
13
  - Resolve Digital
9
14
  - Philip Arndt
10
15
  - David Jones
11
16
  - Steven Heidel
17
+ - "U\xC4\xA3is Ozols"
12
18
  autorequire:
13
19
  bindir: bin
14
20
  cert_chain: []
15
21
 
16
- date: 2011-05-28 00:00:00 +12:00
17
- default_executable:
22
+ date: 2011-06-21 00:00:00 Z
18
23
  dependencies:
19
24
  - !ruby/object:Gem::Dependency
20
25
  name: refinerycms-core
@@ -24,7 +29,12 @@ dependencies:
24
29
  requirements:
25
30
  - - "="
26
31
  - !ruby/object:Gem::Version
27
- version: 1.0.0
32
+ hash: 21
33
+ segments:
34
+ - 1
35
+ - 0
36
+ - 1
37
+ version: 1.0.1
28
38
  type: :runtime
29
39
  version_requirements: *id001
30
40
  - !ruby/object:Gem::Dependency
@@ -35,6 +45,11 @@ dependencies:
35
45
  requirements:
36
46
  - - ~>
37
47
  - !ruby/object:Gem::Version
48
+ hash: 13
49
+ segments:
50
+ - 3
51
+ - 2
52
+ - 1
38
53
  version: 3.2.1
39
54
  type: :runtime
40
55
  version_requirements: *id002
@@ -46,6 +61,10 @@ dependencies:
46
61
  requirements:
47
62
  - - ~>
48
63
  - !ruby/object:Gem::Version
64
+ hash: 9
65
+ segments:
66
+ - 0
67
+ - 1
49
68
  version: "0.1"
50
69
  type: :runtime
51
70
  version_requirements: *id003
@@ -57,6 +76,10 @@ dependencies:
57
76
  requirements:
58
77
  - - ~>
59
78
  - !ruby/object:Gem::Version
79
+ hash: 3
80
+ segments:
81
+ - 2
82
+ - 0
60
83
  version: "2.0"
61
84
  type: :runtime
62
85
  version_requirements: *id004
@@ -68,6 +91,10 @@ dependencies:
68
91
  requirements:
69
92
  - - ~>
70
93
  - !ruby/object:Gem::Version
94
+ hash: 13
95
+ segments:
96
+ - 1
97
+ - 1
71
98
  version: "1.1"
72
99
  type: :runtime
73
100
  version_requirements: *id005
@@ -155,7 +182,6 @@ files:
155
182
  - license.md
156
183
  - refinerycms-pages.gemspec
157
184
  - spec/models/page_spec.rb
158
- has_rdoc: true
159
185
  homepage: http://refinerycms.com
160
186
  licenses:
161
187
  - MIT
@@ -169,17 +195,23 @@ required_ruby_version: !ruby/object:Gem::Requirement
169
195
  requirements:
170
196
  - - ">="
171
197
  - !ruby/object:Gem::Version
198
+ hash: 3
199
+ segments:
200
+ - 0
172
201
  version: "0"
173
202
  required_rubygems_version: !ruby/object:Gem::Requirement
174
203
  none: false
175
204
  requirements:
176
205
  - - ">="
177
206
  - !ruby/object:Gem::Version
207
+ hash: 3
208
+ segments:
209
+ - 0
178
210
  version: "0"
179
211
  requirements: []
180
212
 
181
213
  rubyforge_project: refinerycms
182
- rubygems_version: 1.6.2
214
+ rubygems_version: 1.8.5
183
215
  signing_key:
184
216
  specification_version: 3
185
217
  summary: Pages engine for Refinery CMS