Changesets can be listed by changeset number.
The Git repository is here.
Changeset 5
Updated to Radiant HEAD revision from 22-Jul-2006, about 5pm.
- Comitted by: adh
- Date: Saturday July 22 17:22:57 2006 (over 18 years ago)
Affected files:
- rool/rails/radiant/trunk/doc/
- rool/rails/radiant/trunk/vendor/rails/actionpack/test/fixtures/application_root/
- rool/rails/radiant/trunk/vendor/rails/actionpack/test/fixtures/application_root/app/
- rool/rails/radiant/trunk/vendor/rails/actionpack/test/fixtures/application_root/app/controllers/
- rool/rails/radiant/trunk/vendor/rails/actionpack/test/fixtures/application_root/app/controllers/a_class_that_contains_a_controller/
- rool/rails/radiant/trunk/vendor/rails/actionpack/test/fixtures/application_root/app/controllers/module_that_holds_controllers/
- rool/rails/radiant/trunk/vendor/rails/actionpack/test/fixtures/application_root/app/models/
- rool/rails/radiant/trunk/vendor/rails/railties/doc/
- rool/rails/radiant/trunk/vendor/redcloth/doc/
- rool/rails/radiant/trunk/vendor/rails/actionpack/examples/.htaccess
- rool/rails/radiant/trunk/vendor/rails/actionpack/lib/action_controller/vendor/html-scanner/html/document.rb
- rool/rails/radiant/trunk/vendor/rails/actionpack/test/fixtures/application_root/app/controllers/a_class_that_contains_a_controller/poorly_placed_controller.rb
- rool/rails/radiant/trunk/vendor/rails/actionpack/test/fixtures/application_root/app/controllers/module_that_holds_controllers/nested_controller.rb
- rool/rails/radiant/trunk/vendor/rails/actionpack/test/fixtures/application_root/app/models/a_class_that_contains_a_controller.rb
- rool/rails/radiant/trunk/vendor/rails/actionpack/test/fixtures/dont_load.rb
- rool/rails/radiant/trunk/vendor/rails/railties/doc/README_FOR_APP
- rool/rails/radiant/trunk/vendor/rails/railties/lib/tasks/documentation.rake
- rool/rails/radiant/trunk/vendor/rails/railties/lib/tasks/tmp.rake
- rool/rails/radiant/trunk/vendor/redcloth/doc/CHANGELOG
- rool/rails/radiant/trunk/vendor/redcloth/doc/COPYING
- rool/rails/radiant/trunk/vendor/redcloth/doc/README
- rool/rails/radiant/trunk/vendor/redcloth/doc/REFERENCE
- rool/rails/radiant/trunk/vendor/redcloth/doc/make.rb
- rool/rails/radiant/trunk/CHANGELOG (diff)
- rool/rails/radiant/trunk/CONTRIBUTORS (diff)
- rool/rails/radiant/trunk/app/helpers/admin/page_helper.rb (diff)
- rool/rails/radiant/trunk/app/views/admin/layout/index.rhtml (diff)
- rool/rails/radiant/trunk/app/views/admin/layout/new.rhtml (diff)
- rool/rails/radiant/trunk/app/views/admin/layout/remove.rhtml (diff)
- rool/rails/radiant/trunk/app/views/admin/page/_node.rhtml (diff)
- rool/rails/radiant/trunk/app/views/admin/page/_part.rhtml (diff)
- rool/rails/radiant/trunk/app/views/admin/page/index.rhtml (diff)
- rool/rails/radiant/trunk/app/views/admin/page/remove.rhtml (diff)
- rool/rails/radiant/trunk/app/views/admin/snippet/index.rhtml (diff)
- rool/rails/radiant/trunk/app/views/admin/snippet/new.rhtml (diff)
- rool/rails/radiant/trunk/app/views/admin/snippet/remove.rhtml (diff)
- rool/rails/radiant/trunk/app/views/admin/user/index.rhtml (diff)
- rool/rails/radiant/trunk/app/views/admin/user/new.rhtml (diff)
- rool/rails/radiant/trunk/app/views/admin/user/preferences.rhtml (diff)
- rool/rails/radiant/trunk/app/views/admin/user/remove.rhtml (diff)
- rool/rails/radiant/trunk/app/views/admin/welcome/login.rhtml (diff)
- rool/rails/radiant/trunk/app/views/layouts/application.rhtml (diff)
- rool/rails/radiant/trunk/db/migrate/001_create_radiant_tables.rb (diff)
- rool/rails/radiant/trunk/db/migrate/002_insert_initial_data.rb (diff)
- rool/rails/radiant/trunk/db/schema.rb (diff)
- rool/rails/radiant/trunk/lib/tasks/release.rake (diff)
- rool/rails/radiant/trunk/test/functional/admin/page_controller_test.rb (diff)
- rool/rails/radiant/trunk/vendor/rails/actionmailer/CHANGELOG (diff)
- rool/rails/radiant/trunk/vendor/rails/actionmailer/Rakefile (diff)
- rool/rails/radiant/trunk/vendor/rails/actionmailer/lib/action_mailer/version.rb (diff)
- rool/rails/radiant/trunk/vendor/rails/actionpack/CHANGELOG (diff)
- rool/rails/radiant/trunk/vendor/rails/actionpack/lib/action_controller/routing.rb (diff)
- rool/rails/radiant/trunk/vendor/rails/actionpack/lib/action_pack/version.rb (diff)
- rool/rails/radiant/trunk/vendor/rails/actionpack/test/controller/fake_controllers.rb (diff)
- rool/rails/radiant/trunk/vendor/rails/actionpack/test/controller/routing_test.rb (diff)
- rool/rails/radiant/trunk/vendor/rails/actionwebservice/CHANGELOG (diff)
- rool/rails/radiant/trunk/vendor/rails/actionwebservice/Rakefile (diff)
- rool/rails/radiant/trunk/vendor/rails/actionwebservice/lib/action_web_service/version.rb (diff)
- rool/rails/radiant/trunk/vendor/rails/activerecord/CHANGELOG (diff)
- rool/rails/radiant/trunk/vendor/rails/activerecord/lib/active_record/associations.rb (diff)
- rool/rails/radiant/trunk/vendor/rails/activerecord/lib/active_record/calculations.rb (diff)
- rool/rails/radiant/trunk/vendor/rails/activerecord/lib/active_record/connection_adapters/abstract/schema_statements.rb (diff)
- rool/rails/radiant/trunk/vendor/rails/activerecord/lib/active_record/connection_adapters/mysql_adapter.rb (diff)
- rool/rails/radiant/trunk/vendor/rails/activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb (diff)
- rool/rails/radiant/trunk/vendor/rails/activerecord/lib/active_record/connection_adapters/sqlite_adapter.rb (diff)
- rool/rails/radiant/trunk/vendor/rails/activerecord/lib/active_record/version.rb (diff)
- rool/rails/radiant/trunk/vendor/rails/activerecord/test/associations_go_eager_test.rb (diff)
- rool/rails/radiant/trunk/vendor/rails/activerecord/test/migration_test.rb (diff)
- rool/rails/radiant/trunk/vendor/rails/railties/CHANGELOG (diff)
- rool/rails/radiant/trunk/vendor/rails/railties/Rakefile (diff)
- rool/rails/radiant/trunk/vendor/rails/railties/lib/commands/console.rb (diff)
- rool/rails/radiant/trunk/vendor/rails/railties/lib/commands/process/reaper.rb (diff)
- rool/rails/radiant/trunk/vendor/rails/railties/lib/commands/process/spawner.rb (diff)
- rool/rails/radiant/trunk/vendor/rails/railties/lib/commands/process/spinner.rb (diff)
- rool/rails/radiant/trunk/vendor/rails/railties/lib/commands/runner.rb (diff)
- rool/rails/radiant/trunk/vendor/rails/railties/lib/commands/servers/webrick.rb (diff)
- rool/rails/radiant/trunk/vendor/rails/railties/lib/rails/version.rb (diff)
- rool/rails/radiant/trunk/vendor/rails/railties/lib/rails_generator/generators/applications/app/app_generator.rb (diff)
- rool/rails/radiant/trunk/vendor/rails/railties/lib/rails_generator/generators/components/model/model_generator.rb (diff)
- rool/rails/radiant/trunk/vendor/rails/railties/lib/rails_generator/options.rb (diff)
- rool/rails/radiant/trunk/vendor/rails/release.rb (diff)
rool/rails/radiant/trunk/CHANGELOG:
prev. | current | |
= Change Log +* Migrations are now repaired so that you can run `rake migrate` to create the initial database. (`script/setup_database` is still the recommended method.) (closes ticket #46) [Daniel Shepherd] +* When you collapse a branch in the admin page tree view and move to another tab the collapsed status is now saved so that when you return, the collapsed status is preserved. Also the status of collapsed branches is preserved when collapsing and expanding parent nodes. (closes ticket #29) [Daniel Shepherd] + === 0.5.0 Grindstone (June 28, 2006) * First release. |
rool/rails/radiant/trunk/CONTRIBUTORS:
prev. | current | |
The following people have submitted changes which have been applied to the core: | ||
5 | * Daniel Shepherd | |
6 | ||
7 | === 0.5.0 | |
8 | ||
* Matt McCray | ||
* Paul Smith | ||
* Scott Walter |
rool/rails/radiant/trunk/app/helpers/admin/page_helper.rb:
prev. | current | |
module Admin::PageHelper | ||
def render_node(page, locals = {}) | ||
3 | | |
3 | locals.reverse_merge!( :level => 0, :simple => false ).merge!( :page => page ) | |
render :partial => 'node', :locals => locals | ||
end | ||
6 | ||
7 | def expanded_rows | |
8 | if(cookie_string = (@cookies['expanded_rows']||[])[0]) | |
9 | cookie_string.split(',').map {|x| x.to_i } | |
10 | else | |
11 | [(@homepage || Page.find_by_parent_id(nil)).id]; | |
12 | end | |
13 | end | |
def meta_errors? | ||
!!(@page.errors[:slug] or @page.errors[:breadcrumb]) |
rool/rails/radiant/trunk/app/views/admin/layout/index.rhtml:
prev. | current | |
edit it or click <code>Remove</code> to delete it.</p> | ||
<table id="layouts" class="index" cellpadding="0" cellspacing="0" border="0"> | ||
8 | | |
9 | | |
10 | | |
11 | | |
12 | | |
13 | | |
14 | | |
8 | <thead> | |
9 | <tr> | |
10 | <th class="layout">Layout</th> | |
11 | <th class="modify">Modify</th> | |
12 | </tr> | |
13 | </thead> | |
14 | <tbody> | |
<% unless @layouts.empty? -%> | ||
<% for layout in @layouts -%> | ||
17 | | |
18 | | |
19 | | |
20 | | |
21 | | |
22 | | |
23 | | |
17 | <tr class="node level-1"> | |
18 | <td class="layout"> | |
19 | <%= image_tag 'page', :alt => 'layout-icon', :title => '', :align => 'center' %> | |
20 | <%= link_to layout.name, layout_edit_url(:id => layout) %> | |
21 | </td> | |
22 | <td class="remove"><%= link_to image_tag('remove', :alt => 'Remove Layout'), layout_remove_url(:id => layout) %></td> | |
23 | </tr> | |
<% end -%> | ||
<% else -%> | ||
<tr> | ||
<td colspan="2" class="note">No Layouts</td> | ||
</tr> | ||
<% end -%> | ||
30 | | |
30 | </tbody> | |
</table> | ||
<script type="text/javascript"> | ||
// <![CDATA[ |
rool/rails/radiant/trunk/app/views/admin/layout/new.rhtml:
prev. | current | |
<% end -%> | ||
<form method="post"> | ||
8 | | |
9 | | |
10 | | |
11 | | |
12 | | |
13 | | |
8 | <div class="form-area"> | |
9 | <p class="title"> | |
10 | <label for="layout_name">Name</label> | |
11 | <%= text_field "layout", "name", :class => 'textbox', :maxlength => 100 %> | |
12 | </p> | |
13 | <div id="extended-metadata" class="row"<%= meta_visible(:meta) %>> | |
<table class="fieldset" cellpadding="0" cellspacing="0" border="0"> | ||
<tr> | ||
<td><label for="layout_content_type">Content-Type</label></td> | ||
... | ... | |
<a id="less-extended-metadata" href="<%= toggle_javascript_for('extended-metadata') %>"<%= meta_visible(:meta_less) %>>Less</a> | ||
</small> | ||
</p> | ||
27 | | |
28 | | |
29 | | |
27 | <p class="content"> | |
28 | <label for="layout_content">Body</label> | |
29 | <%= text_area "layout", "content", :class => "textarea", :style => "width: 100%" %></p> | |
<%= updated_stamp @layout %> | ||
31 | | |
32 | | |
33 | | |
34 | | |
31 | </div> | |
32 | <p class="buttons"> | |
33 | <%= save_model_button(@layout) %> <%= save_model_and_continue_editing_button(@layout) %> or <%= link_to "Cancel", layout_index_url %> | |
34 | </p> | |
</form> | ||
<%= focus 'layout_name' %> | ||
rool/rails/radiant/trunk/app/views/admin/layout/remove.rhtml:
prev. | current | |
<p>Are you sure you want to <strong class="warning">permanently remove</strong> the following layout?</p> | ||
<table id="site-map" class="index" cellpadding="0" cellspacing="0" border="0"> | ||
5 | | |
6 | | |
7 | | |
8 | | |
9 | | |
10 | | |
11 | | |
12 | | |
5 | <tbody> | |
6 | <tr class="node level-1" onmouseover="Element.addClassName(this, 'highlight');" onmouseout="Element.removeClassName(this, 'highlight');"> | |
7 | <td class="layout"> | |
8 | <%= image_tag 'page', :alt => 'layout-icon', :title => '', :align => 'center' %> | |
9 | <%= @layout.name %> | |
10 | </td> | |
11 | </tr> | |
12 | </tbody> | |
</table> | ||
<form method="post"> | ||
16 | | |
16 | <p class="buttons"><%= submit_tag "Delete Layout", :class => 'button' %> or <%= link_to 'Cancel', layout_index_url %></p> | |
</form> | ||
rool/rails/radiant/trunk/app/views/admin/page/_node.rhtml:
prev. | current | |
<% | ||
count = page.children.count | ||
children = count > 0 | ||
4 | ||
5 | ||
4 | expanded = expanded_rows.include?(page.id) | |
padding_left = (level * 22) + 4 | ||
children_class = children ? (expanded ? ' children-visible' : ' children-hidden') : ' no-children' | ||
... | ... | |
spinner = image_tag("spinner.gif", :class => 'busy', :id => "busy-#{page.id}", :alt => "", :title => "", :align => "center", :style => 'display: none;') | ||
-%> | ||
23 | | |
24 | | |
25 | | |
22 | <tr id="page-<%= page.id %>" class="node level-<%= level %><%= children_class %><%= virtual_class %>"> | |
23 | <td class="page" style="padding-left: <%= padding_left %>px"> | |
24 | <span class="w1"> | |
<% if simple -%> | ||
<%= icon %> | ||
<%= title %> | ||
<% else -%> | ||
<%= expander %><a href="<%= page_edit_url(:id => page) %>"><%= icon %> <%= title %></a> | ||
31 | | |
32 | | |
30 | <%= behavior %> | |
31 | <%= spinner %> | |
<% end -%> | ||
</span> | ||
35 | | |
34 | </td> | |
<% unless simple -%> | ||
37 | | |
38 | | |
39 | | |
36 | <td class="status <%= page.status.name.downcase %>-status"><%= page.status.name %></td> | |
37 | <td class="add-child"><%= link_to image_tag('add-child', :alt => 'add child'), page_new_url(:parent_id => page) %></td> | |
38 | <td class="remove"><%= link_to image_tag('remove', :alt => 'remove page'), page_remove_url(:id => page) %></td> | |
<% end -%> | ||
41 | | |
40 | </tr> | |
<% level = level + 1 -%> | ||
<% | ||
if expanded | ||
page.children.each do |child| | ||
-%> | ||
47 | ||
46 | <%= render_node child, :level => level, :simple => simple -%> | |
<% | ||
end | ||
end | ||
51 | ||
51 | -%> |
rool/rails/radiant/trunk/app/views/admin/page/_part.rhtml:
prev. | current | |
@index = (params[:index] || @index || 1).to_i | ||
-%> | ||
<div class="page" id="page-<%= @index %>"> | ||
6 | | |
7 | | |
8 | | |
9 | | |
10 | | |
11 | | |
12 | | |
13 | | |
6 | <div class="part" id="part-<%= @index %>"> | |
7 | <%= hidden_field_tag "part[#{@index - 1}][name]", @part.name %> | |
8 | <p> | |
9 | <label for="part[<%= @index - 1 %>}][filter_id]">Filter</label> | |
10 | <%= select_tag "part[#{@index - 1}][filter_id]", options_for_select([['<none>', '']] + TextFilter.find_all.map { |s| s.registered_id }, @part.filter_id) %> | |
11 | </p> | |
12 | <div><%= text_area_tag "part[#{@index - 1}][content]", h(@part.content), :class => "textarea", :style => "width: 100%" %></div> | |
13 | </div> | |
</div> | ||
<% | ||
@index += 1; |
rool/rails/radiant/trunk/app/views/admin/page/index.rhtml:
prev. | current | |
var SiteMap = Class.create(); | ||
SiteMap.prototype = Object.extend({}, RuledTable.prototype); // Inherit from RuledTable | ||
Object.extend(SiteMap.prototype, { | ||
5 | ||
6 | expandedRows: <%= expanded_rows.to_json %>, | |
onRowSetup: function(row) { | ||
Event.observe(row, 'click', this.onMouseClickRow.bindAsEventListener(this), false); | ||
... | ... | |
expanders.push(image); | ||
}.bind(this)); | ||
return expanders.first(); | ||
53 | | |
55 | }, | |
57 | saveExpandedCookie: function() { | |
58 | document.cookie = "expanded_rows="+this.expandedRows.join(",")+"; path=/admin"; | |
59 | }, | |
60 | ||
hideBranch: function(row, img) { | ||
var level = this.extractLevel(row); | ||
var sibling = row.nextSibling; | ||
... | ... | |
} | ||
sibling = sibling.nextSibling; | ||
} | ||
71 | var pageId = this.extractPageId(row); | |
72 | var newExpanded = []; | |
73 | for(i=0; i < this.expandedRows.length; i++) | |
74 | if(this.expandedRows[i] != pageId) | |
75 | newExpanded.push(this.expandedRows[i]); | |
76 | this.expandedRows = newExpanded; | |
77 | this.saveExpandedCookie(); | |
if (img == null) | ||
img = this.getExpanderImageForRow(row); | ||
img.src = img.src.replace(/collapse/, 'expand'); | ||
... | ... | |
Element.addClassName(row, 'children-hidden'); | ||
}, | ||
72 | | |
85 | showBranchInternal: function(row, img) { | |
var level = this.extractLevel(row); | ||
var sibling = row.nextSibling; | ||
var children = false; | ||
89 | var childOwningSiblings = []; | |
while(sibling != null) { | ||
if (this.isRow(sibling)) { | ||
var siblingLevel = this.extractLevel(sibling); | ||
if (siblingLevel <= level) break; | ||
if (siblingLevel == level + 1) { | ||
Element.show(sibling); | ||
82 | | |
96 | if(sibling.className.match(/children-visible/)) { | |
97 | childOwningSiblings.push(sibling); | |
98 | } else { | |
99 | this.hideBranch(sibling); | |
100 | } | |
} | ||
children = true; | ||
} | ||
... | ... | |
if (!children) | ||
this.getBranch(row); | ||
if (img == null) | ||
91 | | |
109 | img = this.getExpanderImageForRow(row); | |
img.src = img.src.replace(/expand/, 'collapse'); | ||
111 | for(i=0; i < childOwningSiblings.length; i++) { | |
112 | this.showBranch(childOwningSiblings[i], null); | |
113 | } | |
Element.removeClassName(row, 'children-hidden'); | ||
Element.addClassName(row, 'children-visible'); | ||
}, | ||
118 | showBranch: function(row, img) { | |
119 | this.showBranchInternal(row, img); | |
120 | this.expandedRows.push(this.extractPageId(row)); | |
121 | this.saveExpandedCookie(); | |
122 | }, | |
123 | ||
getBranch: function(row) { | ||
var level = this.extractLevel(row).toString(); | ||
var id = this.extractPageId(row).toString(); | ||
... | ... | |
<h1>Pages</h1> | ||
<table id="site-map" class="index" cellpadding="0" cellspacing="0" border="0"> | ||
143 | | |
144 | | |
145 | | |
146 | | |
147 | | |
148 | | |
149 | | |
150 | | |
170 | <thead> | |
171 | <tr> | |
172 | <th class="page">Page</th> | |
173 | <th class="status">Status</th> | |
174 | <th class="modify" colspan="2">Modify</th> | |
175 | </tr> | |
176 | </thead> | |
177 | <tbody> | |
<% if @homepage -%> | ||
<%= render_node @homepage -%> | ||
<% else -%> | ||
154 | | |
155 | | |
156 | | |
181 | <tr> | |
182 | <td colspan="4" class="note">No Pages</td> | |
183 | </tr> | |
<% end -%> | ||
158 | | |
185 | </tbody> | |
</table> | ||
<script type="text/javascript"> | ||
// <![CDATA[ | ||
... | ... | |
<% end -%> | ||
<%= image_submit_tag 'clear-page-cache' %> | ||
</p> | ||
172 | ||
200 | </form> |
rool/rails/radiant/trunk/app/views/admin/page/remove.rhtml:
prev. | current | |
<p>Are you sure you want to <strong class="warning">permanently remove</strong> the following <%= pages.downcase %>?</p> | ||
<table id="site-map" class="index" cellpadding="0" cellspacing="0" border="0"> | ||
7 | | |
7 | <tbody> | |
<%= render_node @page, :simple => true -%> | ||
9 | | |
9 | </tbody> | |
</table> | ||
<form method="post"> | ||
13 | | |
13 | <p class="buttons"><%= submit_tag "Delete #{pages}", :class => 'button' %> or <%= link_to 'Cancel', page_index_url %></p> | |
</form> | ||
rool/rails/radiant/trunk/app/views/admin/snippet/index.rhtml:
prev. | current | |
<p>Snippets are generally small pieces of content which are included in other pages or layouts.</p> | ||
<table id="snippets" class="index" cellpadding="0" cellspacing="0" border="0"> | ||
6 | | |
7 | | |
8 | | |
9 | | |
10 | | |
11 | | |
12 | | |
6 | <thead> | |
7 | <tr> | |
8 | <th class="snippet">Snippet</th> | |
9 | <th class="modify">Modify</th> | |
10 | </tr> | |
11 | </thead> | |
12 | <tbody> | |
<% unless @snippets.empty? -%> | ||
<% for snippet in @snippets -%> | ||
15 | | |
16 | | |
17 | | |
18 | | |
19 | | |
20 | | |
21 | | |
15 | <tr class="node level-1"> | |
16 | <td class="snippet"> | |
17 | <%= image_tag "snippet", :class => "icon", :alt => 'snippet-icon', :title => '', :align => 'center' %> | |
18 | <%= link_to snippet.name, snippet_edit_url(:id => snippet) %></span> | |
19 | </td> | |
20 | <td class="remove"><%= link_to image_tag('remove', :alt => 'Remove Snippet'), snippet_remove_url(:id => snippet) %></td> | |
21 | </tr> | |
<% end -%> | ||
<% else -%> | ||
<tr> | ||
<td colspan="2" class="note">No Snippets</td> | ||
</tr> | ||
<% end -%> | ||
28 | | |
28 | </tbody> | |
</table> | ||
<script type="text/javascript"> | ||
// <![CDATA[ |
rool/rails/radiant/trunk/app/views/admin/snippet/new.rhtml:
prev. | current | |
<% end -%> | ||
<form method="post"> | ||
8 | | |
9 | | |
10 | | |
11 | | |
12 | | |
8 | <div class="form-area"> | |
9 | <p class="title"> | |
10 | <label for="snippet_name">Name</label> | |
11 | <%= text_field "snippet", "name", :class => 'textbox', :maxlength => 100 %> | |
12 | </p> | |
14 | | |
15 | | |
16 | | |
17 | | |
18 | | |
14 | <p class="content"> | |
15 | <label for="snippet_content">Body</label> | |
16 | <%= text_area "snippet", "content", :class => "textarea", :style => "width: 100%" %></p> | |
17 | <p> | |
18 | <label for="snippet_filter">Filter</label> | |
<%= select_tag "snippet[filter_id]", options_for_select([['none', '']] + TextFilter.find_all.map { |f| f.registered_id }, @snippet.filter_id) %> | ||
20 | | |
20 | </p> | |
<%= updated_stamp @snippet %> | ||
</div> | ||
23 | | |
24 | | |
25 | | |
23 | <p class="buttons"> | |
24 | <%= save_model_button(@snippet) %> <%= save_model_and_continue_editing_button(@snippet) %> or <%= link_to "Cancel", snippet_index_url %> | |
25 | </p> | |
</form> | ||
<%= focus 'snippet_name' %> | ||
rool/rails/radiant/trunk/app/views/admin/snippet/remove.rhtml:
prev. | current | |
<p>Are you sure you want to <strong class="warning">permanently remove</strong> the following snippet?</p> | ||
<table id="snippets" class="index" cellpadding="0" cellspacing="0" border="0"> | ||
5 | | |
6 | | |
7 | | |
8 | | |
9 | | |
10 | | |
11 | | |
5 | <tbody> | |
6 | <tr class="node level-1" onmouseover="Element.addClassName(this, 'highlight');" onmouseout="Element.removeClassName(this, 'highlight');"> | |
7 | <td class="snippet"> | |
8 | <%= @snippet.name %> | |
9 | </td> | |
10 | </tr> | |
11 | </tbody> | |
</table> | ||
<form method="post"> | ||
15 | | |
15 | <p class="buttons"><%= submit_tag "Delete Snippet", :class => 'button' %> or <%= link_to 'Cancel', snippet_index_url %></p> | |
</form> | ||
rool/rails/radiant/trunk/app/views/admin/user/index.rhtml:
prev. | current | |
<h1>Users</h1> | ||
<table id="users" class="index" cellpadding="0" cellspacing="0" border="0"> | ||
4 | | |
5 | | |
6 | | |
7 | | |
8 | | |
9 | | |
10 | | |
11 | | |
4 | <thead> | |
5 | <tr> | |
6 | <th class="user">Name / Login</th> | |
7 | <th class="roles">Roles</th> | |
8 | <th class="modify">Modify</th> | |
9 | </tr> | |
10 | </thead> | |
11 | <tbody> | |
<% unless @users.empty? -%> | ||
<% for user in @users -%> | ||
14 | | |
15 | | |
16 | | |
17 | | |
18 | | |
19 | | |
20 | | |
14 | <tr class="node level-1"> | |
15 | <td class="user"> | |
16 | <%= link_to user.name, user_edit_url(:id => user) %> | |
17 | <small class="login"><%= user.login %></small> | |
18 | </td> | |
19 | <td class="roles"> | |
20 | <%= | |
roles = [] | ||
roles << 'Administrator' if user.admin? | ||
roles << 'Developer' if user.developer? | ||
roles.join(', ') | ||
%> | ||
26 | | |
27 | | |
28 | | |
26 | </td> | |
27 | <td class="remove"><%= user.id != session[:user].id ? link_to(image_tag('remove', :alt => 'Remove User'), user_remove_url(:id => user)) : image_tag('remove-disabled', :alt => 'Remove') %></td> | |
28 | </tr> | |
<% end -%> | ||
<% else -%> | ||
<tr> | ||
<td colspan="3" class="note">No Users</td> | ||
</tr> | ||
<% end -%> | ||
35 | | |
35 | </tbody> | |
</table> | ||
<script type="text/javascript"> | ||
// <![CDATA[ |
rool/rails/radiant/trunk/app/views/admin/user/new.rhtml:
prev. | current | |
<table class="fieldset" cellpadding="0" cellspacing="0" border="0"> | ||
<tr> | ||
<td class="label"><label for="user_name">Name</label></td> | ||
11 | | |
12 | | |
11 | <td class="field"><%= text_field "user", "name", :class => 'textbox', :maxlength => 100 %></td> | |
12 | <td class="help">Required.</td> | |
</tr> | ||
<tr> | ||
15 | | |
16 | | |
17 | | |
18 | | |
15 | <td class="label"><label class="optional" for="user_email">E-mail</label></td> | |
16 | <td class="field"><%= text_field "user", "email", :class => 'textbox', :maxlength => 255 %></td> | |
17 | <td class="help">Optional. Please use a valid e-mail address.</td> | |
18 | </tr> | |
<tr> | ||
<td class="label"><label for="user_login">Username</label></td> | ||
21 | | |
22 | | |
23 | | |
21 | <td class="field"><%= text_field "user", "login", :class => 'textbox', :maxlength => 40 %></td> | |
22 | <td class="help">At least 3 characters. Must be unique.</td> | |
23 | </tr> | |
<tr> | ||
25 | | |
26 | | |
27 | | |
25 | <td class="label"><label for="user_password">Password</label></td> | |
26 | <td class="field"><%= password_field "user", "password", :class => 'textbox', :value => '', :maxlength => 40 %></td> | |
27 | <td class="help" rowspan="2">At least 5 characters. <% unless @user.new_record? %>Leave password blank for it to remain unchanged.<% end %></td> | |
</tr> | ||
<tr> | ||
30 | | |
31 | | |
30 | <td class="label"><label for="user_password_confirmation">Confirm Password</label></td> | |
31 | <td class="field"><%= password_field "user", "password_confirmation", :class => 'textbox', :value => '', :maxlength => 40 %></td> | |
</tr> | ||
33 | | |
34 | | |
35 | | |
36 | | |
37 | | |
38 | | |
39 | | |
40 | | |
41 | | |
33 | <tr> | |
34 | <td class="label"><label for="user_admin">Roles</label></td> | |
35 | <td class="field"> | |
36 | <span class="checkbox"><%= check_box "user", "admin" %> Administrator</span> | |
37 | <span class="checkbox"><%= check_box "user", "developer" %> Developer</span> | |
38 | </td> | |
39 | <td class="help">Roles restrict user privileges and turn parts of the administrative interface on or off.</td> | |
40 | </tr> | |
41 | </table> | |
<%= updated_stamp @user %> | ||
43 | | |
44 | | |
45 | | |
43 | <p class="buttons"> | |
44 | <%= save_model_button(@user) %> <%= save_model_and_continue_editing_button(@user) %> or <%= link_to "Cancel", user_index_url %> | |
45 | </p> | |
</form> | ||
<%= focus 'user_name' %> | ||
rool/rails/radiant/trunk/app/views/admin/user/preferences.rhtml:
prev. | current | |
<form method="post"> | ||
<table class="fieldset" cellpadding="0" cellspacing="0" border="0"> | ||
<tr> | ||
6 | | |
7 | | |
8 | | |
6 | <td class="label"><label for="user_password">Password</label></td> | |
7 | <td class="field"><%= password_field "user", "password", :class => 'textbox', :value => '', :maxlength => 40 %></td> | |
8 | <td class="help" rowspan="2">At least 5 characters. <% unless @user.new_record? %>Leave password blank for it to remain unchanged.<% end %></td> | |
</tr> | ||
<tr> | ||
11 | | |
12 | | |
11 | <td class="label"><label for="user_password_confirmation">Confirm Password</label></td> | |
12 | <td class="field"><%= password_field "user", "password_confirmation", :class => 'textbox', :value => '', :maxlength => 40 %></td> | |
</tr> | ||
<tr> | ||
15 | | |
16 | | |
17 | | |
18 | | |
15 | <td class="label"><label for="user_email">E-mail</label></td> | |
16 | <td class="field"><%= text_field "user", "email", :class => 'textbox', :maxlength => 255 %></td> | |
17 | <td class="help">Optional.</td> | |
18 | </tr> | |
</table> | ||
20 | | |
21 | | |
22 | | |
20 | <p class="buttons"> | |
21 | <%= submit_tag 'Save Changes' %> or <%= link_to "Cancel", admin_url %> | |
22 | </p> | |
</form> | ||
<script type="text/javascript"> | ||
// <![CDATA[ | ||
27 | | |
27 | Field.focus('user_password'); | |
// ]]> | ||
</script> | ||
rool/rails/radiant/trunk/app/views/admin/user/remove.rhtml:
prev. | current | |
<p>Are you sure you want to <strong class="warning">permanently remove</strong> the following user?</p> | ||
<table id="users" class="index" cellpadding="0" cellspacing="0" border="0"> | ||
5 | | |
6 | | |
7 | | |
8 | | |
9 | | |
10 | | |
11 | | |
5 | <tbody> | |
6 | <tr class="node level-1" onmouseover="Element.addClassName(this, 'highlight');" onmouseout="Element.removeClassName(this, 'highlight');"> | |
7 | <td class="user"> | |
8 | <%= @user.name %> | |
9 | </td> | |
10 | </tr> | |
11 | </tbody> | |
</table> | ||
<form method="post"> | ||
15 | | |
15 | <p class="buttons"><%= submit_tag "Delete User", :class => 'button' %> or <%= link_to 'Cancel', user_index_url %></p> | |
</form> | ||
rool/rails/radiant/trunk/app/views/admin/welcome/login.rhtml:
prev. | current | |
<h1>Please Login</h1> | ||
<form method="post"> | ||
41 | | |
42 | | |
43 | | |
44 | | |
45 | | |
46 | | |
47 | | |
41 | <p><label for="user_login">Username</label> | |
42 | <%= text_field "user", "login", :class => 'textbox', :value => '', :maxlength => 40 %></p> | |
43 | <p><label for="user_password">Password</label> | |
44 | <%= password_field "user", "password", :class => 'textbox', :value => '', :maxlength => 40 %></p> | |
45 | <p class="buttons"> | |
46 | <%= submit_tag 'Login', :class => 'button' %> | |
47 | </p> | |
</form> | ||
</div> | ||
rool/rails/radiant/trunk/app/views/layouts/application.rhtml:
prev. | current | |
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" | ||
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> | ||
<html> | ||
4 | | |
5 | | |
6 | | |
7 | | |
8 | | |
9 | | |
10 | | |
11 | | |
12 | | |
13 | | |
14 | | |
15 | | |
16 | | |
17 | | |
4 | <head> | |
5 | <meta http-equiv="Content-type" content="text/html; charset=utf-8" /> | |
6 | <title><%= @page_title || default_page_title %></title> | |
7 | <%= stylesheet_link_tag 'admin' %> | |
8 | <%= javascript_include_tag 'prototype' %> | |
9 | <%= javascript_include_tag 'string' %> | |
10 | <%= javascript_include_tag 'effects' %> | |
11 | <%= javascript_include_tag 'dragdrop' %> | |
12 | <%= javascript_include_tag 'controls' %> | |
13 | <%= javascript_include_tag 'tabcontrol' %> | |
14 | <%= javascript_include_tag 'ruledtable' %> | |
15 | <!--[if lt IE 7]> | |
16 | <script defer type="text/javascript" src="/javascripts/pngfix.js"></script> | |
17 | <![endif]--> | |
<% if @content_for_page_scripts -%> | ||
19 | | |
20 | | |
19 | <script type="text/javascript"> | |
20 | // <![CDATA[ | |
<%= @content_for_page_scripts %> | ||
22 | | |
23 | | |
22 | // ]]> | |
23 | </script> | |
<% end -%> | ||
<% if @content_for_page_css -%> | ||
26 | | |
26 | <style type="text/css" media="screen"> | |
<%= @content_for_page_css -%> | ||
28 | | |
28 | </style> | |
<% end -%> | ||
30 | | |
31 | | |
32 | | |
33 | | |
34 | | |
30 | </head> | |
31 | <body> | |
32 | <div id="header"> | |
33 | <div id="site-title"><%= link_to_unless_current title, admin_url %></div> | |
34 | <div id="site-subtitle"><%= subtitle %></div> | |
<% if logged_in? -%> | ||
36 | | |
36 | <div id="navigation"> | |
<%= links_for_navigation %> | ||
38 | | |
38 | </div> | |
<% end -%> | ||
40 | | |
41 | | |
42 | | |
40 | </div> | |
41 | <hr class="hidden" /> | |
42 | <div id="main"> | |
<% if flash[:notice] -%> | ||
44 | | |
45 | | |
46 | | |
44 | <div id="notice"> | |
45 | <p><%= flash[:notice] %></p> | |
46 | </div> | |
<% end -%> | ||
<% if flash[:error] -%> | ||
49 | | |
50 | | |
51 | | |
49 | <div id="error"> | |
50 | <p><%= flash[:error] %></p> | |
51 | </div> | |
<% end -%> | ||
53 | | |
53 | <div id="content"> | |
<%= yield%> | ||
55 | | |
56 | | |
57 | | |
58 | | |
59 | | |
60 | | |
55 | </div> | |
56 | </div> | |
57 | <hr class="hidden" /> | |
58 | <div id="footer"> | |
59 | <p>This site was made with Ruby and is powered by <a href="http://radiantcms.org">Radiant CMS</a>.</p> | |
60 | <p id="site-links"> | |
<% if logged_in? -%> | ||
<% if admin? -%> | ||
63 | | |
63 | <%= nav_link_to 'Users', user_index_url %> | |
<% else -%> | ||
<%= nav_link_to 'Preferences', user_preferences_url %> | ||
<% end -%> | ||
<span class="separator"> | </span> | ||
68 | | |
69 | | |
68 | <%= nav_link_to 'Log Out', logout_url %> | |
69 | <span class="separator"> | </span> | |
<% end -%> | ||
71 | | |
72 | | |
73 | | |
74 | | |
71 | <%= link_to image_tag('view-site.gif', :alt => 'View Site', :title => '', :align => 'center'), homepage_url %> | |
72 | </p> | |
73 | </div> | |
74 | </body> | |
</html> | ||
rool/rails/radiant/trunk/db/migrate/001_create_radiant_tables.rb:
prev. | current | |
t.column "key", :string, :limit => 40, :default => "", :null => false | ||
t.column "value", :string, :default => "" | ||
end | ||
7 | add_index "config", ["key"], :name => "key", :unique => true | |
create_table "pages" do |t| | ||
t.column "title", :string | ||
... | ... | |
drop_table "snippets" | ||
drop_table "layouts" | ||
drop_table "users" | ||
73 | drop_table "config" | |
end | ||
end |
rool/rails/radiant/trunk/db/migrate/002_insert_initial_data.rb:
prev. | current | |
class InsertInitialData < ActiveRecord::Migration | ||
2 | class Page < ActiveRecord::Base | |
3 | end | |
4 | class Layout < ActiveRecord::Base | |
5 | end | |
6 | class Snippet < ActiveRecord::Base | |
7 | end | |
8 | class PagePart < ActiveRecord::Base | |
9 | belongs_to :page | |
10 | end | |
def self.up | ||
now = Time.now | ||
puts "Creating the user 'admin' with the password 'radiant'..." | ||
6 | | |
7 | | |
8 | | |
9 | | |
10 | ||
15 | admin = User.new :name => 'Administrator', :login => 'admin', :password => 'radiant', :password_confirmation => 'radiant', :admin => true, :created_at => now, :updated_at => now | |
16 | admin.save! | |
17 | ||
puts "Initializing configuration..." | ||
Radiant::Config['admin.title' ] = 'Radiant CMS' | ||
Radiant::Config['admin.subtitle'] = 'Publishing for Small Teams' |
rool/rails/radiant/trunk/db/schema.rb:
prev. | current | |
create_table "layouts", :force => true do |t| | ||
t.column "name", :string, :limit => 100 | ||
t.column "content", :text | ||
17 | | |
t.column "created_at", :datetime | ||
t.column "updated_at", :datetime | ||
t.column "created_by", :integer | ||
t.column "updated_by", :integer | ||
21 | t.column "content_type", :string, :limit => 40 | |
end | ||
create_table "page_parts", :force => true do |t| | ||
... | ... | |
t.column "title", :string | ||
t.column "slug", :string, :limit => 100 | ||
t.column "breadcrumb", :string, :limit => 160 | ||
35 | t.column "behavior_id", :string, :limit => 25 | |
36 | t.column "status_id", :integer, :default => 1, :null => false | |
t.column "parent_id", :integer | ||
t.column "layout_id", :integer | ||
37 | | |
38 | | |
t.column "created_at", :datetime | ||
t.column "updated_at", :datetime | ||
t.column "published_at", :datetime |
rool/rails/radiant/trunk/lib/tasks/release.rake:
prev. | current | |
s.rubyforge_project = RUBY_FORGE_PROJECT | ||
s.platform = Gem::Platform::RUBY | ||
s.requirements << 'rails, redcloth, bluecloth, radius' | ||
30 | | |
30 | s.add_dependency 'rails', '= 1.1.4' | |
s.add_dependency 'radius', '>= 0.5.1', '< 0.6' | ||
s.add_dependency 'RedCloth', '>= 3.0.3', '< 3.1' | ||
s.add_dependency 'BlueCloth', '>= 1.0.0', '< 1.1' | ||
... | ... | |
files.exclude 'log/*' | ||
files.exclude 'tmp' | ||
files.exclude 'cache/*' | ||
47 | files.exclude 'vendor' | |
files.exclude 'pkg' | ||
files.exclude 'config/database.yml' | ||
files.exclude 'db/*.sql*.db' |
rool/rails/radiant/trunk/test/functional/admin/page_controller_test.rb:
prev. | current | |
assert_response :success | ||
assert_kind_of Page, assigns(:homepage) | ||
end | ||
32 | ||
33 | def test_index_without_cookies | |
34 | get :index | |
35 | assert_response :success | |
36 | #should contain only the homepage and direct children | |
37 | wanted, unwanted = Page.find(:all).partition {|p| p.parent_id.nil? || p.parent.parent_id.nil? } | |
38 | wanted.each { |page| | |
39 | assert_tag :tag => 'tr', :attributes => {:id => "page-#{page.id}" } | |
40 | } | |
41 | unwanted.each { |page| | |
42 | assert_no_tag :tag => 'tr', :attributes => {:id => "page-#{page.id}" } | |
43 | } | |
44 | end | |
45 | ||
46 | def test_index_with_empty_cookie | |
47 | @request.cookies['expanded_rows'] = [""] | |
48 | get :index | |
49 | assert_response :success | |
50 | #should contain only the homepage | |
51 | wanted, unwanted = Page.find(:all).partition {|p| p.parent_id.nil? } | |
52 | wanted.each { |page| | |
53 | assert_tag :tag => 'tr', :attributes => {:id => "page-#{page.id}" } | |
54 | } | |
55 | unwanted.each { |page| | |
56 | assert_no_tag :tag => 'tr', :attributes => {:id => "page-#{page.id}" } | |
57 | } | |
58 | end | |
59 | ||
60 | def test_index_with_cookie | |
61 | @request.cookies['expanded_rows'] = ["1,5,9,10,11,12,52"] | |
62 | get :index | |
63 | assert_response :success | |
64 | #should contain only the direct children of nodes 1,5,9,10,11,12 and 52 (assuming there's no missing parent nodes) | |
65 | wanted, unwanted = Page.find(:all).partition {|p| [1,5,9,52,10,11,12].include?(p.parent_id) || p.parent_id.nil? } | |
66 | wanted.each { |page| | |
67 | assert_tag :tag => 'tr', :attributes => {:id => "page-#{page.id}" } | |
68 | } | |
69 | unwanted.each { |page| | |
70 | assert_no_tag :tag => 'tr', :attributes => {:id => "page-#{page.id}" } | |
71 | } | |
72 | end | |
def test_new | ||
@controller.config = { 'default.parts' => 'body, extended, summary' } |
rool/rails/radiant/trunk/vendor/rails/actionmailer/CHANGELOG:
prev. | current | |
1 | *1.2.3* (June 29th, 2006) | |
2 | ||
3 | * Depend on Action Pack 1.12.3 | |
4 | ||
5 | ||
6 | *1.2.2* (June 27th, 2006) | |
7 | ||
8 | * Depend on Action Pack 1.12.2 | |
9 | ||
10 | ||
*1.2.1* (April 6th, 2005) | ||
* Be part of Rails 1.1.1 |
rool/rails/radiant/trunk/vendor/rails/actionmailer/Rakefile:
prev. | current | |
s.rubyforge_project = "actionmailer" | ||
s.homepage = "http://www.rubyonrails.org" | ||
57 | | |
57 | s.add_dependency('actionpack', '= 1.12.3' + PKG_BUILD) | |
s.has_rdoc = true | ||
s.requirements << 'none' |
rool/rails/radiant/trunk/vendor/rails/actionmailer/lib/action_mailer/version.rb:
prev. | current | |
module VERSION #:nodoc: | ||
MAJOR = 1 | ||
MINOR = 2 | ||
5 | | |
5 | TINY = 3 | |
STRING = [MAJOR, MINOR, TINY].join('.') | ||
end |
rool/rails/radiant/trunk/vendor/rails/actionpack/CHANGELOG:
prev. | current | |
1 | ||
1 | *1.12.3* (June 28th, 2006) | |
3 | * Fix broken traverse_to_controller. We now: | |
4 | Look for a _controller.rb file under RAILS_ROOT to load. | |
5 | If we find it, we require_dependency it and return the controller it defined. (If none was defined we stop looking.) | |
6 | If we don't find it, we look for a .rb file under RAILS_ROOT to load. If we find it, and it loads a constant we keep looking. | |
7 | Otherwise we check to see if a directory of the same name exists, and if it does we create a module for it. | |
8 | ||
9 | ||
10 | *1.12.2* (June 27th, 2006) | |
11 | ||
12 | * Refinement to avoid exceptions in traverse_to_controller. | |
13 | ||
14 | * (Hackish) Fix loading of arbitrary files in Ruby's load path by traverse_to_controller. [Nicholas Seckar] | |
15 | ||
16 | ||
17 | *1.12.1* (April 6th, 2006) | |
18 | ||
* Fixed that template extensions would be cached development mode #4624 [Stefan Kaes] | ||
* Update to Prototype 1.5.0_rc0 [Sam Stephenson] | ||
... | ... | |
This can be used by deployment managers to set the asset id by application revision | ||
33 | ||
49 | *1.12.0* (March 27th, 2006) | |
* Add documentation for respond_to. [Jamis Buck] | ||
rool/rails/radiant/trunk/vendor/rails/actionpack/lib/action_controller/routing.rb:
prev. | current | |
length = segments.length | ||
index = start_at | ||
mod_name = controller_name = segment = nil | ||
227 | | |
while index < length | ||
229 | | |
228 | return nil unless /\A[A-Za-z][A-Za-z\d_]*\Z/ =~ (segment = segments[index]) | |
index += 1 | ||
mod_name = segment.camelize | ||
controller_name = "#{mod_name}Controller" | ||
233 | path_suffix = File.join(segments[start_at..(index - 1)]) | |
234 | next_mod = nil | |
235 | | |
236 | | |
237 | | |
238 | | |
239 | | |
240 | | |
241 | | |
242 | | |
243 | | |
244 | | |
245 | | |
236 | # If the controller is already present, or if we load it, return it. | |
237 | if mod.const_defined?(controller_name) || attempt_load(mod, controller_name, path_suffix + "_controller") == :defined | |
238 | controller = mod.const_get(controller_name) | |
239 | return nil unless controller.is_a?(Class) && controller.ancestors.include?(ActionController::Base) # it's not really a controller? | |
240 | return [controller, (index - start_at)] | |
end | ||
248 | | |
249 | | |
250 | | |
251 | | |
252 | | |
253 | | |
243 | # No controller? Look for the module | |
244 | if mod.const_defined? mod_name | |
245 | next_mod = mod.send(:const_get, mod_name) | |
246 | next_mod = nil unless next_mod.is_a?(Module) | |
247 | else | |
248 | # Try to load a file that defines the module we want. | |
249 | case attempt_load(mod, mod_name, path_suffix) | |
250 | when :defined then next_mod = mod.const_get mod_name | |
251 | when :dir then # We didn't find a file, but there's a dir. | |
252 | next_mod = Module.new # So create a module for the directory | |
253 | mod.send :const_set, mod_name, next_mod | |
254 | else | |
255 | return nil | |
256 | end | |
end | ||
258 | mod = next_mod | |
256 | | |
260 | return nil unless mod && mod.is_a?(Module) | |
end | ||
262 | nil | |
end | ||
264 | ||
265 | protected | |
266 | def safe_load_paths #:nodoc: | |
267 | if defined?(RAILS_ROOT) | |
268 | $LOAD_PATH.select do |base| | |
269 | base = File.expand_path(base) | |
270 | extended_root = File.expand_path(RAILS_ROOT) | |
271 | base[0, extended_root.length] == extended_root || base =~ %r{rails-[\d.]+/builtin} | |
272 | end | |
273 | else | |
274 | $LOAD_PATH | |
275 | end | |
276 | end | |
277 | ||
278 | def attempt_load(mod, const_name, path) | |
279 | has_dir = false | |
280 | safe_load_paths.each do |load_path| | |
281 | full_path = File.join(load_path, path) | |
282 | file_path = full_path + '.rb' | |
283 | if File.file?(file_path) # Found a .rb file? Load it up | |
284 | require_dependency(file_path) | |
285 | return :defined if mod.const_defined? const_name | |
286 | else | |
287 | has_dir ||= File.directory?(full_path) | |
288 | end | |
289 | end | |
290 | return (has_dir ? :dir : nil) | |
291 | end | |
end | ||
end | ||
rool/rails/radiant/trunk/vendor/rails/actionpack/lib/action_pack/version.rb:
prev. | current | |
module VERSION #:nodoc: | ||
MAJOR = 1 | ||
MINOR = 12 | ||
5 | | |
5 | TINY = 3 | |
STRING = [MAJOR, MINOR, TINY].join('.') | ||
end |
rool/rails/radiant/trunk/vendor/rails/actionpack/test/controller/fake_controllers.rb:
prev. | current | |
end | ||
module Admin | ||
class << self; alias_method :const_available?, :const_defined?; end | ||
9 | SomeConstant = 10 | |
class UserController < Class.new(ActionController::Base); end | ||
class NewsFeedController < Class.new(ActionController::Base); end | ||
end |
rool/rails/radiant/trunk/vendor/rails/actionpack/test/controller/routing_test.rb:
prev. | current | |
class RouteTests < Test::Unit::TestCase | ||
538 | | |
def route(*args) | ||
@route = ::ActionController::Routing::Route.new(*args) unless args.empty? | ||
return @route | ||
... | ... | |
end | ||
end | ||
974 | class ControllerComponentTest < Test::Unit::TestCase | |
975 | ||
976 | def test_traverse_to_controller_should_not_load_arbitrary_files | |
977 | load_path = $:.dup | |
978 | base = File.dirname(File.dirname(File.expand_path(__FILE__))) | |
979 | $: << File.join(base, 'fixtures') | |
980 | Object.send :const_set, :RAILS_ROOT, File.join(base, 'fixtures/application_root') | |
981 | assert_equal nil, ActionController::Routing::ControllerComponent.traverse_to_controller(%w(dont_load pretty please)) | |
982 | ensure | |
983 | $:[0..-1] = load_path | |
984 | Object.send :remove_const, :RAILS_ROOT | |
985 | end | |
986 | ||
987 | def test_traverse_should_not_trip_on_non_module_constants | |
988 | assert_equal nil, ActionController::Routing::ControllerComponent.traverse_to_controller(%w(admin some_constant a)) | |
989 | end | |
990 | ||
991 | # This is evil, but people do it. | |
992 | def test_traverse_to_controller_should_pass_thru_classes | |
993 | load_path = $:.dup | |
994 | base = File.dirname(File.dirname(File.expand_path(__FILE__))) | |
995 | $: << File.join(base, 'fixtures') | |
996 | $: << File.join(base, 'fixtures/application_root/app/controllers') | |
997 | $: << File.join(base, 'fixtures/application_root/app/models') | |
998 | Object.send :const_set, :RAILS_ROOT, File.join(base, 'fixtures/application_root') | |
999 | pair = ActionController::Routing::ControllerComponent.traverse_to_controller(%w(a_class_that_contains_a_controller poorly_placed)) | |
1000 | ||
1001 | # Make sure the container class was loaded properly | |
1002 | assert defined?(AClassThatContainsAController) | |
1003 | assert_kind_of Class, AClassThatContainsAController | |
1004 | assert_equal :you_know_it, AClassThatContainsAController.is_special? | |
1005 | ||
1006 | # Make sure the controller was too | |
1007 | assert_kind_of Array, pair | |
1008 | assert_equal 2, pair[1] | |
1009 | klass = pair.first | |
1010 | assert_kind_of Class, klass | |
1011 | assert_equal :decidedly_so, klass.is_evil? | |
1012 | assert klass.ancestors.include?(ActionController::Base) | |
1013 | assert defined?(AClassThatContainsAController::PoorlyPlacedController) | |
1014 | assert_equal klass, AClassThatContainsAController::PoorlyPlacedController | |
1015 | ensure | |
1016 | $:[0..-1] = load_path | |
1017 | Object.send :remove_const, :RAILS_ROOT | |
1018 | end | |
1019 | ||
1020 | def test_traverse_to_nested_controller | |
1021 | load_path = $:.dup | |
1022 | base = File.dirname(File.dirname(File.expand_path(__FILE__))) | |
1023 | $: << File.join(base, 'fixtures') | |
1024 | $: << File.join(base, 'fixtures/application_root/app/controllers') | |
1025 | Object.send :const_set, :RAILS_ROOT, File.join(base, 'fixtures/application_root') | |
1026 | pair = ActionController::Routing::ControllerComponent.traverse_to_controller(%w(module_that_holds_controllers nested)) | |
1027 | ||
1028 | assert_not_equal nil, pair | |
1029 | ||
1030 | # Make sure that we created a module for the dir | |
1031 | assert defined?(ModuleThatHoldsControllers) | |
1032 | assert_kind_of Module, ModuleThatHoldsControllers | |
1033 | ||
1034 | # Make sure the controller is ok | |
1035 | assert_kind_of Array, pair | |
1036 | assert_equal 2, pair[1] | |
1037 | klass = pair.first | |
1038 | assert_kind_of Class, klass | |
1039 | assert klass.ancestors.include?(ActionController::Base) | |
1040 | assert defined?(ModuleThatHoldsControllers::NestedController) | |
1041 | assert_equal klass, ModuleThatHoldsControllers::NestedController | |
1042 | ensure | |
1043 | $:[0..-1] = load_path | |
1044 | Object.send :remove_const, :RAILS_ROOT | |
1045 | end | |
1046 | ||
end | ||
1048 | ||
1049 | end |
rool/rails/radiant/trunk/vendor/rails/actionwebservice/CHANGELOG:
prev. | current | |
1 | *1.1.4* (June 29th, 2006) | |
2 | ||
3 | * Rely on Action Pack 1.12.3 | |
4 | ||
5 | ||
6 | *1.1.3* (June 27th, 2006) | |
7 | ||
8 | * Rely on Action Pack 1.12.2 and Active Record 1.14.3 | |
9 | ||
10 | ||
*1.1.2* (April 9th, 2005) | ||
* Rely on Active Record 1.14.2 |
rool/rails/radiant/trunk/vendor/rails/actionwebservice/Rakefile:
prev. | current | |
s.rubyforge_project = "aws" | ||
s.homepage = "http://www.rubyonrails.org" | ||
74 | | |
75 | | |
74 | s.add_dependency('actionpack', '= 1.12.3' + PKG_BUILD) | |
75 | s.add_dependency('activerecord', '= 1.14.3' + PKG_BUILD) | |
s.has_rdoc = true | ||
s.requirements << 'none' |
rool/rails/radiant/trunk/vendor/rails/actionwebservice/lib/action_web_service/version.rb:
prev. | current | |
module VERSION #:nodoc: | ||
MAJOR = 1 | ||
MINOR = 1 | ||
5 | | |
5 | TINY = 4 | |
STRING = [MAJOR, MINOR, TINY].join('.') | ||
end |
rool/rails/radiant/trunk/vendor/rails/activerecord/CHANGELOG:
prev. | current | |
1 | ||
1 | *1.14.3* (June 27th, 2006) | |
3 | * Properly quote index names in migrations (closes #4764) [John Long] | |
4 | ||
5 | * Ensure that Associations#include_eager_conditions? checks both scoped and explicit conditions [Rick] | |
6 | ||
7 | * Associations#select_limited_ids_list adds the ORDER BY columns to the SELECT DISTINCT List for postgresql. [Rick] | |
8 | ||
9 | ||
10 | *1.14.2* (April 9th, 2006) | |
11 | ||
* Fixed calculations for the Oracle Adapter (closes #4626) [Michael Schoen] | ||
6 | ||
15 | *1.14.1* (April 6th, 2006) | |
* Fix type_name_with_module to handle type names that begin with '::'. Closes #4614. [Nicholas Seckar] | ||
... | ... | |
* Fixed broken OCIAdapter #4457 [schoenm@earthlink.net] | ||
61 | ||
70 | *1.14.0* (March 27th, 2006) | |
* Replace 'rescue Object' with a finer grained rescue. Closes #4431. [Nicholas Seckar] | ||
... | ... | |
* Fixed :through relations when using STI inherited classes would use the inherited class's name as foreign key on the join model [Tobias Luetke] | ||
490 | ||
*1.13.2* (December 13th, 2005) | ||
* Become part of Rails 1.0 |
rool/rails/radiant/trunk/vendor/rails/activerecord/lib/active_record/associations.rb:
prev. | current | |
end | ||
def select_limited_ids_list(options, join_dependency) | ||
1166 | | |
1166 | connection.select_all( | |
construct_finder_sql_for_association_limiting(options, join_dependency), | ||
"#{name} Load IDs For Limited Eager Loading" | ||
1169 | | |
1169 | ).collect { |row| connection.quote(row[primary_key]) }.join(", ") | |
end | ||
def construct_finder_sql_for_association_limiting(options, join_dependency) | ||
scope = scope(:find) | ||
1174 | | |
sql = "SELECT " | ||
sql << "DISTINCT #{table_name}." if include_eager_conditions?(options) || include_eager_order?(options) | ||
1177 | | |
1176 | sql << primary_key | |
1177 | sql << ", #{options[:order].split(',').collect { |s| s.split.first } * ', '}" if options[:order] && (include_eager_conditions?(options) || include_eager_order?(options)) | |
1178 | sql << " FROM #{table_name} " | |
if include_eager_conditions?(options) || include_eager_order?(options) | ||
sql << join_dependency.join_associations.collect{|join| join.association_join }.join | ||
... | ... | |
add_limit!(sql, options, scope) | ||
return sanitize_sql(sql) | ||
end | ||
1189 | ||
1190 | ||
1191 | # Checks if the conditions reference a table other than the current model table | |
def include_eager_conditions?(options) | ||
1191 | | |
1192 | | |
1193 | | |
1194 | | |
1193 | # look in both sets of conditions | |
1194 | conditions = [scope(:find, :conditions), options[:conditions]].inject([]) do |all, cond| | |
1195 | case cond | |
1196 | when nil then all | |
1197 | when Array then all << cond.first | |
1198 | else all << cond | |
1199 | end | |
1200 | end | |
1201 | return false unless conditions.any? | |
1202 | conditions.join(' ').scan(/(\w+)\.\w+/).flatten.any? do |condition_table_name| | |
condition_table_name != table_name | ||
end | ||
end | ||
1207 | # Checks if the query order references a table other than the current model's table. | |
def include_eager_order?(options) | ||
order = options[:order] | ||
return false unless order |
rool/rails/radiant/trunk/vendor/rails/activerecord/lib/active_record/calculations.rb:
prev. | current | |
# | ||
# Note: Person.count(:all) will not work because it will use :all as the condition. Use Person.count instead. | ||
def count(*args) | ||
45 | | |
46 | | |
47 | | |
48 | | |
45 | options = {} | |
46 | column_name = :all | |
47 | # For backwards compatibility, we need to handle both count(conditions=nil, joins=nil) or count(options={}) or count(column_name=:all, options={}). | |
48 | if args.size >= 0 && args.size <= 2 | |
if args.first.is_a?(Hash) | ||
50 | | |
51 | | |
50 | options = args.first | |
elsif args[1].is_a?(Hash) | ||
52 | options = args[1] | |
column_name = args.first | ||
54 | | |
else | ||
56 | | |
55 | # Handle legacy paramter options: def count(conditions=nil, joins=nil) | |
options.merge!(:conditions => args[0]) if args.length > 0 | ||
58 | | |
57 | options.merge!(:joins => args[1]) if args.length > 1 | |
end | ||
else | ||
raise(ArgumentError, "Unexpected parameters passed to count(*args): expected either count(conditions=nil, joins=nil) or count(options={})") | ||
end | ||
64 | | |
63 | if options[:include] || scope(:find, :include) | |
64 | count_with_associations(options) | |
65 | else | |
66 | calculate(:count, column_name, options) | |
67 | end | |
end | ||
# Calculates average value on a given column. The value is returned as a float. See #calculate for examples with options. |
rool/rails/radiant/trunk/vendor/rails/activerecord/lib/active_record/connection_adapters/abstract/schema_statements.rb:
prev. | current | |
# Adds a new column to the named table. | ||
# See TableDefinition#column for details of the options you can use. | ||
def add_column(table_name, column_name, type, options = {}) | ||
122 | | |
122 | add_column_sql = "ALTER TABLE #{table_name} ADD #{quote_column_name(column_name)} #{type_to_sql(type, options[:limit])}" | |
add_column_options!(add_column_sql, options) | ||
execute(add_column_sql) | ||
end | ||
... | ... | |
# ===== Examples | ||
# remove_column(:suppliers, :qualification) | ||
def remove_column(table_name, column_name) | ||
131 | | |
131 | execute "ALTER TABLE #{table_name} DROP #{quote_column_name(column_name)}" | |
end | ||
# Changes the column's definition according to the new options. | ||
... | ... | |
# generates | ||
# CREATE UNIQUE INDEX by_branch_party ON accounts(branch_id, party_id) | ||
def add_index(table_name, column_name, options = {}) | ||
187 | | |
187 | column_names = Array(column_name) | |
188 | index_name = index_name(table_name, :column => column_names.first) | |
if Hash === options # legacy support, since this param was a string | ||
index_type = options[:unique] ? "UNIQUE" : "" | ||
... | ... | |
else | ||
index_type = options | ||
end | ||
195 | ||
196 | | |
196 | quoted_column_names = column_names.map { |e| quote_column_name(e) }.join(", ") | |
197 | execute "CREATE #{index_type} INDEX #{quote_column_name(index_name)} ON #{table_name} (#{quoted_column_names})" | |
end | ||
# Remove the given index from the table. | ||
... | ... | |
# add_index :accounts, [:username, :password] | ||
# remove_index :accounts, :username | ||
def remove_index(table_name, options = {}) | ||
212 | | |
213 | execute "DROP INDEX #{quote_column_name(index_name(table_name, options))} ON #{table_name}" | |
end | ||
def index_name(table_name, options) #:nodoc: |
rool/rails/radiant/trunk/vendor/rails/activerecord/lib/active_record/connection_adapters/mysql_adapter.rb:
prev. | current | |
end | ||
end | ||
21 | ||
config = config.symbolize_keys | ||
host = config[:host] | ||
port = config[:port] |
rool/rails/radiant/trunk/vendor/rails/activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb:
prev. | current | |
def remove_index(table_name, options) #:nodoc: | ||
execute "DROP INDEX #{index_name(table_name, options)}" | ||
340 | | |
340 | end | |
342 | ||
private | ||
BYTEA_COLUMN_TYPE_OID = 17 | ||
TIMESTAMPOID = 1114 |
rool/rails/radiant/trunk/vendor/rails/activerecord/lib/active_record/connection_adapters/sqlite_adapter.rb:
prev. | current | |
end | ||
def remove_index(table_name, options={}) #:nodoc: | ||
216 | | |
217 | | |
218 | | |
219 | | |
220 | | |
221 | ||
222 | | |
216 | execute "DROP INDEX #{quote_column_name(index_name(table_name, options))}" | |
end | ||
def rename_table(name, new_name) |
rool/rails/radiant/trunk/vendor/rails/activerecord/lib/active_record/version.rb:
prev. | current | |
module VERSION #:nodoc: | ||
MAJOR = 1 | ||
MINOR = 14 | ||
5 | | |
5 | TINY = 3 | |
STRING = [MAJOR, MINOR, TINY].join('.') | ||
end |
rool/rails/radiant/trunk/vendor/rails/activerecord/test/associations_go_eager_test.rb:
prev. | current | |
assert_equal count, posts.size | ||
end | ||
182 | def test_eager_with_has_many_and_limit_and_scoped_conditions_on_the_eagers | |
183 | posts = nil | |
184 | Post.with_scope(:find => { | |
185 | :include => :comments, | |
186 | :conditions => "comments.body like 'Normal%' OR comments.#{QUOTED_TYPE}= 'SpecialComment'" | |
187 | }) do | |
188 | posts = authors(:david).posts.find(:all, :limit => 2) | |
189 | assert_equal 2, posts.size | |
190 | end | |
191 | ||
192 | Post.with_scope(:find => { | |
193 | :include => [ :comments, :author ], | |
194 | :conditions => "authors.name = 'David' AND (comments.body like 'Normal%' OR comments.#{QUOTED_TYPE}= 'SpecialComment')" | |
195 | }) do | |
196 | count = Post.count(:limit => 2) | |
197 | assert_equal count, posts.size | |
198 | end | |
199 | end | |
200 | ||
201 | def test_eager_with_has_many_and_limit_and_scoped_and_explicit_conditions_on_the_eagers | |
202 | Post.with_scope(:find => { :conditions => "1=1" }) do | |
203 | posts = authors(:david).posts.find(:all, | |
204 | :include => :comments, | |
205 | :conditions => "comments.body like 'Normal%' OR comments.#{QUOTED_TYPE}= 'SpecialComment'", | |
206 | :limit => 2 | |
207 | ) | |
208 | assert_equal 2, posts.size | |
209 | ||
210 | count = Post.count( | |
211 | :include => [ :comments, :author ], | |
212 | :conditions => "authors.name = 'David' AND (comments.body like 'Normal%' OR comments.#{QUOTED_TYPE}= 'SpecialComment')", | |
213 | :limit => 2 | |
214 | ) | |
215 | assert_equal count, posts.size | |
216 | end | |
217 | end | |
def test_eager_association_loading_with_habtm | ||
posts = Post.find(:all, :include => :categories, :order => "posts.id") | ||
assert_equal 2, posts[0].categories.size |
rool/rails/radiant/trunk/vendor/rails/activerecord/test/migration_test.rb:
prev. | current | |
Reminder.reset_column_information | ||
Person.connection.remove_column("people", "last_name") rescue nil | ||
37 | Person.connection.remove_column("people", "key") rescue nil | |
Person.connection.remove_column("people", "bio") rescue nil | ||
Person.connection.remove_column("people", "age") rescue nil | ||
Person.connection.remove_column("people", "height") rescue nil | ||
... | ... | |
def test_add_index | ||
Person.connection.add_column "people", "last_name", :string | ||
Person.connection.add_column "people", "administrator", :boolean | ||
51 | Person.connection.add_column "people", "key", :string | |
assert_nothing_raised { Person.connection.add_index("people", "last_name") } | ||
assert_nothing_raised { Person.connection.remove_index("people", "last_name") } | ||
assert_nothing_raised { Person.connection.add_index("people", ["last_name", "first_name"]) } | ||
assert_nothing_raised { Person.connection.remove_index("people", "last_name") } | ||
58 | ||
59 | # quoting | |
60 | assert_nothing_raised { Person.connection.add_index("people", ["key"], :name => "key", :unique => true) } | |
61 | assert_nothing_raised { Person.connection.remove_index("people", :name => "key") } | |
# Sybase adapter does not support indexes on :boolean columns | ||
unless current_adapter?(:SybaseAdapter) |
rool/rails/radiant/trunk/vendor/rails/railties/CHANGELOG:
prev. | current | |
1 | ||
1 | *1.1.4* (June 29th, 2006) | |
3 | * Remove use of opts.on { |options[:name] } style hash assignment. References #4440. [headius@headius.com] | |
4 | ||
5 | * Updated to Action Pack 1.12.3, ActionWebService 1.1.4, ActionMailer 1.2.3 | |
6 | ||
7 | ||
8 | *1.1.3* (June 27th, 2006) | |
9 | ||
10 | * Updated to Active Record 1.14.3, Action Pack 1.12.2, ActionWebService 1.1.3, ActionMailer 1.2.2 | |
11 | ||
12 | ||
13 | *1.1.2* (April 9th, 2006) | |
14 | ||
* Added rake rails:update:configs to update config/boot.rb from the latest (also included in rake rails:update) [DHH] | ||
* Fixed that boot.rb would set RAILS_GEM_VERSION twice, not respect an uncommented RAILS_GEM_VERSION line, and not use require_gem [DHH] | ||
8 | ||
20 | *1.1.1* (April 6th, 2006) | |
* Enhances plugin#discover allowing it to discover svn:// like URIs (closes #4565) [ruben.nine@gmail.com] | ||
... | ... | |
* Avoid passing escapeHTML non-string in Rails' info controller [Nicholas Seckar] | ||
47 | ||
59 | *1.1.0* (March 27th, 2006) | |
* Allow db:fixtures:load to load a subset of the applications fixtures. [Chad Fowler] | ||
... | ... | |
* Honor ActiveRecord::Base.pluralize_table_names when creating and destroying session store table. #3204. [rails@bencurtis.com, Marcel Molina Jr.] | ||
200 | ||
*1.0.0* (December 13th, 2005) | ||
* Update instructions on how to find and install generators. #3172. [Chad Fowler] |
rool/rails/radiant/trunk/vendor/rails/railties/Rakefile:
prev. | current | |
s.add_dependency('rake', '>= 0.7.1') | ||
s.add_dependency('activesupport', '= 1.3.1' + PKG_BUILD) | ||
282 | | |
283 | | |
284 | | |
285 | | |
282 | s.add_dependency('activerecord', '= 1.14.3' + PKG_BUILD) | |
283 | s.add_dependency('actionpack', '= 1.12.3' + PKG_BUILD) | |
284 | s.add_dependency('actionmailer', '= 1.2.3' + PKG_BUILD) | |
285 | s.add_dependency('actionwebservice', '= 1.1.4' + PKG_BUILD) | |
s.rdoc_options << '--exclude' << '.' | ||
s.has_rdoc = false |
rool/rails/radiant/trunk/vendor/rails/railties/lib/commands/console.rb:
prev. | current | |
options = { :sandbox => false, :irb => irb } | ||
OptionParser.new do |opt| | ||
opt.banner = "Usage: console [environment] [options]" | ||
7 | | |
8 | | |
7 | opt.on('-s', '--sandbox', 'Rollback database modifications on exit.') { |v| options[:sandbox] = v } | |
8 | opt.on("--irb=[#{irb}]", 'Invoke a different irb.') { |v| options[:irb] = v } | |
opt.parse!(ARGV) | ||
end | ||
rool/rails/radiant/trunk/vendor/rails/railties/lib/commands/process/reaper.rb:
prev. | current | |
opts.on(" Options:") | ||
120 | | |
121 | | |
120 | opts.on("-a", "--action=name", "reload|graceful|kill (default: #{OPTIONS[:action]})", String) { |v| OPTIONS[:action] = v } | |
121 | opts.on("-d", "--dispatcher=path", "default: #{OPTIONS[:dispatcher]}", String) { |v| OPTIONS[:dispatcher] = v } | |
opts.separator "" | ||
rool/rails/radiant/trunk/vendor/rails/railties/lib/commands/process/spawner.rb:
prev. | current | |
opts.on(" Options:") | ||
68 | | |
69 | | |
70 | | |
71 | | |
72 | | |
68 | opts.on("-p", "--port=number", Integer, "Starting port number (default: #{OPTIONS[:port]})") { |v| OPTIONS[:port] = v } | |
69 | opts.on("-i", "--instances=number", Integer, "Number of instances (default: #{OPTIONS[:instances]})") { |v| OPTIONS[:instances] = v } | |
70 | opts.on("-r", "--repeat=seconds", Integer, "Repeat spawn attempts every n seconds (default: off)") { |v| OPTIONS[:repeat] = v } | |
71 | opts.on("-e", "--environment=name", String, "test|development|production (default: #{OPTIONS[:environment]})") { |v| OPTIONS[:environment] = v } | |
72 | opts.on("-s", "--spawner=path", String, "default: #{OPTIONS[:spawner]}") { |v| OPTIONS[:spawner] = v } | |
opts.on("-d", "--dispatcher=path", String, "default: #{OPTIONS[:dispatcher]}") { |dispatcher| OPTIONS[:dispatcher] = File.expand_path(dispatcher) } | ||
opts.separator "" |
rool/rails/radiant/trunk/vendor/rails/railties/lib/commands/process/spinner.rb:
prev. | current | |
opts.on(" Options:") | ||
39 | | |
40 | | |
41 | | |
39 | opts.on("-c", "--command=path", String) { |v| OPTIONS[:command] = v } | |
40 | opts.on("-i", "--interval=seconds", Float) { |v| OPTIONS[:interval] = v } | |
41 | opts.on("-d", "--daemon") { |v| OPTIONS[:daemon] = v } | |
opts.separator "" | ||
rool/rails/radiant/trunk/vendor/rails/railties/lib/commands/runner.rb:
prev. | current | |
opts.on("-e", "--environment=name", String, | ||
"Specifies the environment for the runner to operate under (test/development/production).", | ||
13 | | |
13 | "Default: development") { |v| options[:environment] = v } | |
opts.separator "" | ||
rool/rails/radiant/trunk/vendor/rails/railties/lib/commands/servers/webrick.rb:
prev. | current | |
opts.on("-p", "--port=port", Integer, | ||
"Runs Rails on the specified port.", | ||
22 | | |
22 | "Default: 3000") { |v| OPTIONS[:port] = v } | |
opts.on("-b", "--binding=ip", String, | ||
"Binds Rails to the specified ip.", | ||
25 | | |
25 | "Default: 0.0.0.0") { |v| OPTIONS[:ip] = v } | |
opts.on("-e", "--environment=name", String, | ||
"Specifies the environment to run this server under (test/development/production).", | ||
28 | | |
28 | "Default: development") { |v| OPTIONS[:environment] = v } | |
opts.on("-m", "--mime-types=filename", String, | ||
"Specifies an Apache style mime.types configuration file to be used for mime types", | ||
"Default: none") { |mime_types_file| OPTIONS[:mime_types] = WEBrick::HTTPUtils::load_mime_types(mime_types_file) } | ||
... | ... | |
opts.on("-c", "--charset=charset", String, | ||
"Set default charset for output.", | ||
39 | | |
39 | "Default: UTF-8") { |v| OPTIONS[:charset] = v } | |
opts.separator "" | ||
rool/rails/radiant/trunk/vendor/rails/railties/lib/rails/version.rb:
prev. | current | |
module VERSION #:nodoc: | ||
MAJOR = 1 | ||
MINOR = 1 | ||
5 | | |
5 | TINY = 4 | |
STRING = [MAJOR, MINOR, TINY].join('.') | ||
end |
rool/rails/radiant/trunk/vendor/rails/railties/lib/rails_generator/generators/applications/app/app_generator.rb:
prev. | current | |
opt.separator 'Options:' | ||
opt.on("-r", "--ruby=path", String, | ||
"Path to the Ruby binary of your choice (otherwise scripts use env, dispatchers current path).", | ||
99 | | |
99 | "Default: #{DEFAULT_SHEBANG}") { |v| options[:shebang] = v } | |
opt.on("-d", "--database=name", String, | ||
"Preconfigure for selected database (options: mysql/oracle/postgresql/sqlite2/sqlite3).", | ||
103 | | |
103 | "Default: mysql") { |v| options[:db] = v } | |
opt.on("-f", "--freeze", | ||
"Freeze Rails in vendor/rails from the gems generating the skeleton", | ||
107 | | |
107 | "Default: false") { |v| options[:freeze] = v } | |
end | ||
def mysql_socket_location |
rool/rails/radiant/trunk/vendor/rails/railties/lib/rails_generator/generators/components/model/model_generator.rb:
prev. | current | |
opt.separator '' | ||
opt.separator 'Options:' | ||
opt.on("--skip-migration", | ||
32 | | |
32 | "Don't generate a migration file for this model") { |v| options[:skip_migration] = v } | |
end | ||
end |
rool/rails/radiant/trunk/vendor/rails/railties/lib/rails_generator/options.rb:
prev. | current | |
opt.separator '' | ||
opt.separator 'General Options:' | ||
124 | | |
124 | opt.on('-p', '--pretend', 'Run but do not make any changes.') { |v| options[:pretend] = v } | |
opt.on('-f', '--force', 'Overwrite files that already exist.') { options[:collision] = :force } | ||
opt.on('-s', '--skip', 'Skip files that already exist.') { options[:collision] = :skip } | ||
127 | | |
128 | | |
129 | | |
127 | opt.on('-q', '--quiet', 'Suppress normal output.') { |v| options[:quiet] = v } | |
128 | opt.on('-t', '--backtrace', 'Debugging: show backtrace on errors.') { |v| options[:backtrace] = v } | |
129 | opt.on('-h', '--help', 'Show this help message.') { |v| options[:help] = v } | |
opt.on('-c', '--svn', 'Modify files with subversion. (Note: svn must be in path)') do | ||
options[:svn] = `svn status`.inject({}) do |opt, e| | ||
opt[e.chomp[7..-1]] = true |
rool/rails/radiant/trunk/vendor/rails/release.rb:
prev. | current | |
PACKAGES = %w( activesupport activerecord actionpack actionmailer actionwebservice ) | ||
# Checkout source | ||
7 | ||
7 | `rm -rf release && svn export http://dev.rubyonrails.org/svn/rails/branches/stable release` | |
# Create Rails packages | ||
`cd release/railties && rake template=jamis package` | ||
... | ... | |
`rubyforge add_release rails rails 'REL #{VERSION}' rails-#{VERSION}.zip` | ||
# Create SVN tag | ||
25 | ||
26 | puts "Remeber to create SVN tag" |