refinerycms-pages 2.0.0 → 2.0.1

Sign up to get free protection for your applications and to get access to all the features.
data/config/routes.rb CHANGED
@@ -1,7 +1,7 @@
1
1
  Refinery::Core::Engine.routes.draw do
2
- root :to => 'pages#home'
3
- post 'pages/preview' => 'pages#preview', :as => :preview_pages
4
- match 'pages/*path/preview' => 'pages#preview', :as => :preview_page, :via => [:get, :put]
2
+ root :to => 'pages#home', :via => :get
3
+ post 'pages/preview' => 'pages#preview', :as => :preview_pages
4
+ match 'pages/*path/preview' => 'pages#preview', :as => :preview_page, :via => [:get, :put]
5
5
  get '/pages/:id', :to => 'pages#show', :as => :page
6
6
 
7
7
  namespace :admin, :path => 'refinery' do
@@ -29,35 +29,30 @@ module Refinery
29
29
  plugin.name = 'refinery_pages'
30
30
  plugin.version = %q{2.0.0}
31
31
  plugin.menu_match = %r{refinery/page(_part|s_dialog)?s$}
32
- plugin.activity = {
33
- :class_name => :'refinery/page'
34
- }
35
- plugin.url = { :controller => '/refinery/admin/pages' }
32
+ plugin.activity = { :class_name => :'refinery/page' }
33
+ plugin.url = proc { Refinery::Core::Engine.routes.url_helpers.admin_pages_path }
36
34
  end
37
35
  end
38
36
 
39
- initializer "append marketable routes" do
40
- if Refinery::Pages.marketable_urls
41
- append_marketable_routes
42
- end
37
+ initializer "append marketable routes", :after => :set_routes_reloader_hook do
38
+ append_marketable_routes if Refinery::Pages.marketable_urls
43
39
  end
44
40
 
45
41
  initializer "add marketable route parts to reserved words", :after => :set_routes_reloader_hook do |app|
46
- if Refinery::Pages.marketable_urls
47
- add_route_parts_as_reserved_words(app)
48
- end
42
+ add_route_parts_as_reserved_words(app) if Refinery::Pages.marketable_urls
49
43
  end
50
44
 
51
45
  config.after_initialize do
52
46
  Refinery.register_extension(Refinery::Pages)
53
47
  end
54
48
 
55
- protected
49
+ protected
56
50
 
57
51
  def append_marketable_routes
58
52
  Refinery::Core::Engine.routes.append do
59
- get '*path', :to => 'pages#show'
53
+ get '*path', :to => 'pages#show', :as => :marketable_page
60
54
  end
55
+ Rails.application.routes_reloader.reload!
61
56
  end
62
57
 
63
58
  # Add any parts of routes as reserved words.
data/license.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # MIT License
2
2
 
3
- Copyright (c) 2005-2011 [Resolve Digital](http://www.resolvedigital.com)
3
+ Copyright (c) 2005-2012 [Resolve Digital](http://www.resolvedigital.com)
4
4
 
5
5
  Permission is hereby granted, free of charge, to any person obtaining a copy
6
6
  of this software and associated documentation files (the "Software"), to deal
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: refinerycms-pages
3
3
  version: !ruby/object:Gem::Version
4
- hash: 15
4
+ hash: 13
5
5
  prerelease:
6
6
  segments:
7
7
  - 2
8
8
  - 0
9
- - 0
10
- version: 2.0.0
9
+ - 1
10
+ version: 2.0.1
11
11
  platform: ruby
12
12
  authors:
13
13
  - Philip Arndt
@@ -59,12 +59,12 @@ dependencies:
59
59
  requirements:
60
60
  - - "="
61
61
  - !ruby/object:Gem::Version
62
- hash: 15
62
+ hash: 13
63
63
  segments:
64
64
  - 2
65
65
  - 0
66
- - 0
67
- version: 2.0.0
66
+ - 1
67
+ version: 2.0.1
68
68
  version_requirements: *id003
69
69
  name: refinerycms-core
70
70
  type: :runtime