refinerycms 0.9.8.1 → 0.9.8.2

Sign up to get free protection for your applications and to get access to all the features.
data/bin/refinerycms CHANGED
@@ -53,7 +53,7 @@ module Refinery
53
53
  @options[:force] = true
54
54
  end
55
55
 
56
- opts.on("-h [APP_NAME]", "--heroku [APP_NAME]", "Set up and deploy to Heroku") do |app_name|
56
+ opts.on("--heroku [APP_NAME]", "Set up and deploy to Heroku") do |app_name|
57
57
  @options[:heroku] = app_name || ''
58
58
  end
59
59
 
@@ -145,7 +145,7 @@ module Refinery
145
145
  Refinery.root.join('vendor', 'refinerycms', 'core', 'public', 'stylesheets', stylesheet)
146
146
  }.each do |stylesheet|
147
147
  FileUtils::cp stylesheet.to_s,
148
- @app_path.join('public', 'sylesheets').to_s,
148
+ @app_path.join('public', 'stylesheets').to_s,
149
149
  :verbose => false if stylesheet.file?
150
150
  end
151
151
 
@@ -172,10 +172,12 @@ module Refinery
172
172
  # Replace app constant with Refinery
173
173
  # TODO: Find a way around this
174
174
  camelized_app_name = @app_name.gsub(/\W/, '_').squeeze('_').gsub(/\/(.?)/) { "::#{$1.upcase}" }.gsub(/(?:^|_)(.)/) { $1.upcase }
175
+ camelized_app_name << "::Application" # We only want to replace occurances like App::Application.
175
176
  %w(Rakefile config.ru config/application.rb config/environment.rb
176
177
  config/environments/development.rb config/environments/production.rb config/environments/test.rb
177
178
  config/initializers/secret_token.rb config/initializers/session_store.rb).each do |hackable|
178
- find_and_replace(hackable, camelized_app_name, "Refinery")
179
+ find_and_replace(hackable, camelized_app_name, 'Refinery::Application')
180
+ find_and_replace(hackable, "module #{camelized_app_name.split('::').first}", 'module Refinery')
179
181
  end
180
182
 
181
183
  # Remove development specific stuff from the .gitinore file
@@ -0,0 +1,12 @@
1
+ class AddCachedSlugToPages < ActiveRecord::Migration
2
+ def self.up
3
+ add_column :pages, :cached_slug, :string
4
+ Page.all.each do |p|
5
+ p.save!
6
+ end
7
+ end
8
+
9
+ def self.down
10
+ remove_column :pages, :cached_slug
11
+ end
12
+ end
data/db/schema.rb CHANGED
@@ -10,7 +10,7 @@
10
10
  #
11
11
  # It's strongly recommended to check this file into your version control system.
12
12
 
13
- ActiveRecord::Schema.define(:version => 20100831122919) do
13
+ ActiveRecord::Schema.define(:version => 20100913234704) do
14
14
 
15
15
  create_table "images", :force => true do |t|
16
16
  t.string "image_mime_type"
@@ -77,6 +77,7 @@ ActiveRecord::Schema.define(:version => 20100831122919) do
77
77
  t.integer "lft"
78
78
  t.integer "rgt"
79
79
  t.integer "depth"
80
+ t.string "cached_slug"
80
81
  end
81
82
 
82
83
  add_index "pages", ["depth"], :name => "index_pages_on_depth"
data/readme.md CHANGED
@@ -41,6 +41,7 @@ Mac OS 10.5+ users [this shell install script](http://github.com/maddox/magick-i
41
41
  * [IRC Channel](irc://irc.freenode.net/refinerycms)
42
42
  * [GitHub repository](http://github.com/resolve/refinerycms)
43
43
  * [Developer/API documentation](http://api.refinerycms.org)
44
+ * Documentation about: [Pages](http://github.com/resolve/refinerycms/blob/master/vendor/refinerycms/pages/readme.md#readme), [Images](http://github.com/resolve/refinerycms/blob/master/vendor/refinerycms/images/readme.md#readme), [Files](http://github.com/resolve/refinerycms/blob/master/vendor/refinerycms/resources/readme.md#readme), [Inquiries](http://github.com/resolve/refinerycms-inquiries/blob/master/readme.md#readme), [Settings](http://github.com/resolve/refinerycms/blob/master/vendor/refinerycms/settings/readme.md#readme), [Dashboard](http://github.com/resolve/refinerycms/blob/master/vendor/refinerycms/dashboard/readme.md#readme), [Authentication & Users](http://github.com/resolve/refinerycms/blob/master/vendor/refinerycms/authentication/readme.md#readme), [Extending with Engines](http://github.com/resolve/refinerycms/blob/master/vendor/refinerycms/core/engines.md#readme).
44
45
 
45
46
  ## Features
46
47
 
@@ -56,13 +57,13 @@ Mac OS 10.5+ users [this shell install script](http://github.com/maddox/magick-i
56
57
  * Uses the popular [Dragonfly](http://github.com/markevans/dragonfly).
57
58
  * Supports storage on Amazon S3.
58
59
 
59
- ### [Inquiries](http://github.com/resolve/refinerycms/blob/master/vendor/refinerycms/inquiries/readme.md#readme)
60
+ ### [Inquiries](http://github.com/resolve/refinerycms-inquiries/blob/master/readme.md#readme)
60
61
 
61
62
  * Collect inquiries from a contact form.
62
63
  * Manage your inquiries and be notified when new ones come in.
63
64
  * Checks new inquiries for spam.
64
65
 
65
- ### [Settings](http://github.com/resolve/refinerycms/blob/master/vendor/refinerycms/refinery_settings/readme.md#readme)
66
+ ### [Settings](http://github.com/resolve/refinerycms/blob/master/vendor/refinerycms/settings/readme.md#readme)
66
67
 
67
68
  * Manage the behaviour of Refinery
68
69
  * Easily integrate with [Google Analytics](https://www.google.com/analytics/)
@@ -87,11 +88,17 @@ to get help on how to use that. Or read the full documentation on [writing engin
87
88
 
88
89
  ### Popular Engines
89
90
 
91
+ * [Blog](http://github.com/resolve/refinerycms-blog) - A simple blogging engine that supports posts, categories and comments (with moderation support if you choose to enable it)
90
92
  * [Portfolio](http://github.com/resolve/refinerycms-portfolio) - manage groups of images like an image gallery.
91
93
  * [News](http://github.com/resolve/refinerycms-news) - post and manage news items.
94
+ * [Theming](http://github.com/resolve/refinerycms-theming) - turn your views, stylesheets, javascripts and images into bundled themes that are reusable and interchangeable.
92
95
 
93
96
  [Full engine list here](http://github.com/resolve/refinerycms/wiki/engines)
94
97
 
98
+ ### Example Site Showcase
99
+
100
+ [List here (add your link when you're done)](http://github.com/resolve/refinerycms/wiki/Example-Site-Showcase)
101
+
95
102
  ## License
96
103
 
97
104
  Refinery is released under the [MIT license](http://github.com/resolve/refinerycms/blob/master/license.md#readme) and is copyright (c) 2005-2010 [Resolve Digital Ltd.](http://www.resolvedigital.co.nz)
@@ -6,13 +6,14 @@
6
6
  cache_key << RefinerySetting.find_or_set(:refinery_menu_cache_action_suffix, "site_menu")
7
7
  cache_key << request.path
8
8
  cache(cache_key.join('_')) do
9
- if (collection ||= @menu_pages).any?
10
- sibling_count = collection.size - 1
9
+ roots = @menu_pages.select { |m| m.parent_id == nil } # Select top menu items
10
+ if roots.any?
11
+ sibling_count = roots.size - 1
11
12
  -%>
12
13
  <nav id='<%= dom_id %>' class='<%= %W(#{css} clearfix).join(' ') %>'>
13
14
  <ul>
14
15
  <%= render :partial => "/shared/menu_branch",
15
- :collection => collection,
16
+ :collection => roots,
16
17
  :locals => {
17
18
  :hide_children => hide_children,
18
19
  :sibling_count => sibling_count,
@@ -4,12 +4,13 @@
4
4
  " class='#{classes.join(' ')}'"
5
5
  end
6
6
  dom_id = (" id='item_#{menu_branch_counter}'" if menu_branch.parent_id.nil? and menu_branch.title.present?)
7
+ @menu_pages.reject! { |branch| branch == menu_branch } # Remove page from the array, so that future searching will be faster.
8
+ children = @menu_pages.select { |p| p.parent_id == menu_branch.id && p.in_menu? }
7
9
  -%>
8
10
  <li<%= css -%><%= dom_id -%>>
9
11
  <%= link_to menu_branch.title, menu_branch.url %>
10
12
 
11
- <% unless hide_children or
12
- (children = menu_branch.children.reject{|c| !c.in_menu?}).empty? %>
13
+ <% unless hide_children or children.empty? %>
13
14
  <ul class='clearfix'>
14
15
  <%=
15
16
  render :partial => "/shared/menu_branch",
@@ -79,7 +79,7 @@ module Refinery::ApplicationController
79
79
 
80
80
  # get all the pages to be displayed in the site menu.
81
81
  def find_pages_for_menu
82
- @menu_pages = Page.top_level
82
+ @menu_pages = Page.where(:show_in_menu => true, :draft => false).order('lft ASC').includes(:parts)
83
83
  end
84
84
 
85
85
  # use a different model for the meta information.
@@ -16,7 +16,8 @@ class Page < ActiveRecord::Base
16
16
  :allow_destroy => true
17
17
 
18
18
  # Docs for acts_as_indexed http://github.com/dougal/acts_as_indexed
19
- acts_as_indexed :fields => [:title, :meta_keywords, :meta_description, :custom_title, :browser_title, :all_page_part_content]
19
+ acts_as_indexed :fields => [:title, :meta_keywords, :meta_description,
20
+ :custom_title, :browser_title, :all_page_part_content]
20
21
 
21
22
  before_destroy :deletable?
22
23
  after_save :reposition_parts!
@@ -27,7 +27,7 @@ module Refinery
27
27
  @major = 0
28
28
  @minor = 9
29
29
  @tiny = 8
30
- @build = 1
30
+ @build = 2
31
31
 
32
32
  class << self
33
33
  attr_reader :major, :minor, :tiny, :build
@@ -1,4 +1,4 @@
1
- # Resources
1
+ # Resources (Files)
2
2
 
3
3
  ## About
4
4
 
@@ -6,4 +6,4 @@ The Resources plugin allows you to upload files such as PDFs and other files you
6
6
 
7
7
  ## How it works
8
8
 
9
- The resources plugins is made up of [attachment_fu](http://github.com/technoweenie/attachment_fu) for handling the store and upload of the images and the [Crudfiy mixin](http://github.com/resolve/refinerycms/blob/master/vendor/plugins/refinery/crud.md).
9
+ The resources plugin uses [dragonfly](http://github.com/markevans/dragonfly) to handle the storage of files. This plugin is mainly comprised of the [Crudfiy mixin](http://github.com/resolve/refinerycms/blob/master/vendor/plugins/refinery/crud.md).
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: refinerycms
3
3
  version: !ruby/object:Gem::Version
4
- hash: 37
4
+ hash: 35
5
5
  prerelease: false
6
6
  segments:
7
7
  - 0
8
8
  - 9
9
9
  - 8
10
- - 1
11
- version: 0.9.8.1
10
+ - 2
11
+ version: 0.9.8.2
12
12
  platform: ruby
13
13
  authors:
14
14
  - Resolve Digital
@@ -18,7 +18,7 @@ autorequire:
18
18
  bindir: bin
19
19
  cert_chain: []
20
20
 
21
- date: 2010-09-10 00:00:00 +12:00
21
+ date: 2010-09-14 00:00:00 +12:00
22
22
  default_executable:
23
23
  dependencies:
24
24
  - !ruby/object:Gem::Dependency
@@ -242,6 +242,7 @@ files:
242
242
  - db/migrate/20100729221735_remove_page_translations_if_present.rb
243
243
  - db/migrate/20100826232810_move_inquiry_settings_to_refinery_settings.rb
244
244
  - db/migrate/20100831122919_move_page_to_nested_set.rb
245
+ - db/migrate/20100913234704_add_cached_slug_to_pages.rb
245
246
  - db/schema.rb
246
247
  - db/seeds.rb
247
248
  - db/seeds/inquiry_settings.rb