Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
  • 10 commits
  • 12 files changed
  • 0 comments
  • 4 contributors
6  Gemfile.lock
@@ -8,7 +8,7 @@ GIT
8 8
 PATH
9 9
   remote: .
10 10
   specs:
11  
-    refinerycms (0.9.8.1)
  11
+    refinerycms (0.9.8.2)
12 12
       acts_as_indexed (~> 0.6.6)
13 13
       authlogic (~> 2.1.6)
14 14
       bundler (~> 1.0.0)
@@ -82,7 +82,7 @@ GEM
82 82
     culerity (0.2.12)
83 83
     database_cleaner (0.5.2)
84 84
     diff-lcs (1.1.2)
85  
-    dragonfly (0.7.5)
  85
+    dragonfly (0.7.6)
86 86
       rack
87 87
     erubis (2.6.6)
88 88
       abstract (>= 1.0.0)
@@ -109,7 +109,7 @@ GEM
109 109
     nokogiri (1.4.3.1)
110 110
     polyglot (0.3.1)
111 111
     rack (1.2.1)
112  
-    rack-cache (0.5.2)
  112
+    rack-cache (0.5.3)
113 113
       rack (>= 0.4)
114 114
     rack-mount (0.6.13)
115 115
       rack (>= 1.0.0)
8  bin/refinerycms
@@ -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
12  db/migrate/20100913234704_add_cached_slug_to_pages.rb
... ...
@@ -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
3  db/schema.rb
@@ -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 @@
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"
11  readme.md
Source Rendered
@@ -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)
5  refinerycms.gemspec
@@ -2,9 +2,9 @@
2 2
 
3 3
 Gem::Specification.new do |s|
4 4
   s.name              = %q{refinerycms}
5  
-  s.version           = %q{0.9.8.1}
  5
+  s.version           = %q{0.9.8.2}
6 6
   s.description       = %q{A Ruby on Rails CMS that supports Rails 3. It's easy to extend and sticks to 'the Rails way' where possible.}
7  
-  s.date              = %q{2010-09-10}
  7
+  s.date              = %q{2010-09-14}
8 8
   s.summary           = %q{A Ruby on Rails CMS that supports Rails 3}
9 9
   s.email             = %q{info@refinerycms.com}
10 10
   s.homepage          = %q{http://refinerycms.com}
@@ -88,6 +88,7 @@ Gem::Specification.new do |s|
88 88
     'db/migrate/20100729221735_remove_page_translations_if_present.rb',
89 89
     'db/migrate/20100826232810_move_inquiry_settings_to_refinery_settings.rb',
90 90
     'db/migrate/20100831122919_move_page_to_nested_set.rb',
  91
+    'db/migrate/20100913234704_add_cached_slug_to_pages.rb',
91 92
     'db/schema.rb',
92 93
     'db/seeds',
93 94
     'db/seeds.rb',
7  vendor/refinerycms/core/app/views/shared/_menu.html.erb
@@ -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,
5  vendor/refinerycms/core/app/views/shared/_menu_branch.html.erb
@@ -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",
2  vendor/refinerycms/core/lib/refinery/application_controller.rb
@@ -79,7 +79,7 @@ def login?
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.
3  vendor/refinerycms/pages/app/models/page.rb
@@ -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!
2  vendor/refinerycms/refinery.rb
@@ -27,7 +27,7 @@ class Version
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
4  vendor/refinerycms/resources/readme.md
Source Rendered
... ...
@@ -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).

No commit comments for this range

Something went wrong with that request. Please try again.