refinerycms 0.9.5.19 → 0.9.5.20
Sign up to get free protection for your applications and to get access to all the features.
- data/.gems +6 -0
- data/.gitignore +14 -0
- data/README +7 -5
- data/Rakefile +30 -3
- data/VERSION +1 -0
- data/db/schema.rb +1 -1
- data/public/javascripts/wymeditor/jquery.refinery.wymeditor.js +1 -1
- data/public/stylesheets/refinery/application.css +11 -7
- data/vendor/plugins/pages/app/models/page.rb +23 -0
- data/vendor/plugins/pages/app/views/admin/pages/_form.html.erb +2 -1
- data/vendor/plugins/rails_indexes/MIT-LICENSE +20 -0
- data/vendor/plugins/rails_indexes/README.textile +46 -0
- data/vendor/plugins/rails_indexes/Rakefile +23 -0
- data/vendor/plugins/{refinery → rails_indexes}/lib/indexer.rb +123 -104
- data/vendor/plugins/{refinery/lib → rails_indexes}/tasks/indexer.rake +1 -1
- data/vendor/plugins/rails_indexes/test/fixtures/app/controllers/users_controller.rb +8 -0
- data/vendor/plugins/rails_indexes/test/fixtures/app/models/address.rb +5 -0
- data/vendor/plugins/rails_indexes/test/fixtures/app/models/company.rb +11 -0
- data/vendor/plugins/rails_indexes/test/fixtures/app/models/country.rb +4 -0
- data/vendor/plugins/rails_indexes/test/fixtures/app/models/freelancer.rb +3 -0
- data/vendor/plugins/rails_indexes/test/fixtures/app/models/gift.rb +10 -0
- data/vendor/plugins/rails_indexes/test/fixtures/app/models/god.rb +3 -0
- data/vendor/plugins/rails_indexes/test/fixtures/app/models/user.rb +16 -0
- data/vendor/plugins/rails_indexes/test/fixtures/app/sweepers/user_sweeper.rb +9 -0
- data/vendor/plugins/rails_indexes/test/fixtures/schema.rb +46 -0
- data/vendor/plugins/rails_indexes/test/rails_indexes_test.rb +83 -0
- data/vendor/plugins/rails_indexes/test/test_helper.rb +30 -0
- data/vendor/plugins/refinery/app/views/shared/admin/_image_picker.html.erb +9 -1
- metadata +47 -29
data/.gems
ADDED
data/.gitignore
ADDED
data/README
CHANGED
@@ -2,12 +2,12 @@
|
|
2
2
|
|
3
3
|
Refinery is a simple, easy to use, well presented content manager for small businesses.
|
4
4
|
|
5
|
-
Refinery was born out of Resolve Digital (http://resolvedigital.co.nz).
|
5
|
+
Refinery was born out of Resolve Digital (http://resolvedigital.co.nz).
|
6
6
|
After building 40 real client sites, we began making our own content manager which would suit the small businesses we worked with. We learnt all the common requests and included them and nothing more.
|
7
7
|
|
8
8
|
== License
|
9
9
|
|
10
|
-
Refinery is released under the MIT license and is copyright (c) 2005-2009 Resolve Digital Ltd.
|
10
|
+
Refinery is released under the MIT license and is copyright (c) 2005-2009 Resolve Digital Ltd.
|
11
11
|
A copy of the MIT license can be found in the LICENSE file.
|
12
12
|
|
13
13
|
== Help
|
@@ -54,15 +54,17 @@ Refinery runs using a number of gems which (as of Refinery version 0.9.5) are ou
|
|
54
54
|
|
55
55
|
- "rake", :version => ">= 0.8.3"
|
56
56
|
- "friendly_id", :version => ">= 2.2.2"
|
57
|
-
- "
|
57
|
+
- "will_paginate", :version => ">= 2.3.11"
|
58
58
|
- "rails", :version => ">= 2.3.4"
|
59
|
-
- "
|
59
|
+
- "aasm", :version => ">= 2.1.3"
|
60
60
|
- "unicode", :version => ">= 0.1"
|
61
|
+
- "slim_scrooge", :version => ">= 1.0.1" (Note: This gem is disabled under Windows as we've had reports it doesn't work on Windows.)
|
62
|
+
- "hpricot", :version => "= 0.8.1"
|
61
63
|
|
62
64
|
== Updates to core files
|
63
65
|
|
64
66
|
If you are running Refinery as a gem, updates are simple to incorporate into your project.
|
65
|
-
Simply run the command 'refinery-update-core /path/to/project' and the up-to-date core files will be copied from the latest gem into your project's directory.
|
67
|
+
Simply run the command 'refinery-update-core /path/to/project' and the up-to-date core files will be copied from the latest gem into your project's directory.
|
66
68
|
Note: the directory that you specify here must be the Rails root for the project.
|
67
69
|
|
68
70
|
If you are running using a git clone, you can update by running these commands:
|
data/Rakefile
CHANGED
@@ -1,15 +1,42 @@
|
|
1
1
|
# Add your own tasks in files placed in lib/tasks ending in .rake,
|
2
2
|
# for example lib/tasks/capistrano.rake, and they will automatically be available to Rake.
|
3
|
-
|
3
|
+
|
4
4
|
require(File.join(File.dirname(__FILE__), 'config', 'boot'))
|
5
|
-
|
5
|
+
|
6
6
|
require 'rake'
|
7
7
|
require 'rake/testtask'
|
8
8
|
require 'rake/rdoctask'
|
9
|
-
|
9
|
+
|
10
10
|
require 'tasks/rails'
|
11
11
|
|
12
12
|
desc 'Removes trailing whitespace'
|
13
13
|
task :whitespace do
|
14
14
|
sh %{find . -name '*.*rb' -exec sed -i '' 's/\t/ /g' {} \\; -exec sed -i '' 's/ *$//g' {} \\; }
|
15
15
|
end
|
16
|
+
|
17
|
+
begin
|
18
|
+
require 'jeweler'
|
19
|
+
Jeweler::Tasks.new do |s|
|
20
|
+
s.name = %q{refinerycms}
|
21
|
+
s.description = %q{A beautiful open source Ruby on Rails content manager for small business. Easy to extend, easy to use, lightweight and all wrapped up in a super slick UI.}
|
22
|
+
s.summary = %q{A beautiful open source Ruby on Rails content manager for small business.}
|
23
|
+
s.email = %q{info@refinerycms.com}
|
24
|
+
s.homepage = %q{http://refinerycms.com}
|
25
|
+
s.authors = ["Resolve Digital", "David Jones", "Philip Arndt"]
|
26
|
+
s.extra_rdoc_files = %w(README CONTRIBUTORS LICENSE)
|
27
|
+
end
|
28
|
+
|
29
|
+
namespace :version do
|
30
|
+
namespace :bump do
|
31
|
+
desc "Bump the gemspec by a build version."
|
32
|
+
task :build => [:version_required, :version] do
|
33
|
+
version = Jeweler::VersionHelper.new(RAILS_ROOT)
|
34
|
+
version.update_to(version.major, version.minor, version.patch, ((version.build || 0).to_i + 1))
|
35
|
+
version.write
|
36
|
+
$stdout.puts "Updated version: #{version.to_s}"
|
37
|
+
end
|
38
|
+
end
|
39
|
+
end
|
40
|
+
rescue LoadError
|
41
|
+
puts "Jeweler not available. Install it with: sudo gem install jeweler"
|
42
|
+
end
|
data/VERSION
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
0.9.5.20
|
data/db/schema.rb
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
# This file is auto-generated from the current state of the database. Instead of editing this file,
|
1
|
+
# This file is auto-generated from the current state of the database. Instead of editing this file,
|
2
2
|
# please use the migrations feature of Active Record to incrementally modify your database, and
|
3
3
|
# then regenerate this schema definition.
|
4
4
|
#
|
@@ -1332,7 +1332,7 @@ WYMeditor.editor.prototype.uniqueStamp = function() {
|
|
1332
1332
|
};
|
1333
1333
|
|
1334
1334
|
WYMeditor.editor.prototype.paste = function(sData) {
|
1335
|
-
console.log('pasting..');
|
1335
|
+
//console.log('pasting..');
|
1336
1336
|
var sTmp;
|
1337
1337
|
var container = this.selected();
|
1338
1338
|
|
@@ -11,31 +11,35 @@
|
|
11
11
|
float: right;
|
12
12
|
width: 360px;
|
13
13
|
}
|
14
|
-
|
15
14
|
.inquiries form label {
|
16
15
|
width: 150px;
|
17
16
|
float: left;
|
18
17
|
}
|
19
18
|
.inquiries form input {
|
20
|
-
|
19
|
+
|
21
20
|
}
|
22
21
|
.inquiries form input, .inquiries form textarea {
|
23
|
-
|
22
|
+
|
24
23
|
}
|
25
24
|
.inquiries form textarea {
|
26
|
-
|
25
|
+
|
27
26
|
}
|
28
27
|
.inquiries form .actions {
|
29
28
|
margin-left: 150px;
|
30
29
|
}
|
31
|
-
|
32
30
|
.inquiries form .actions input {
|
33
31
|
}
|
34
|
-
|
35
32
|
.inquiries .field {
|
36
33
|
margin: 12px 0px;
|
37
34
|
}
|
38
|
-
|
39
35
|
.inquiries form {
|
40
36
|
padding-top: 12px;
|
37
|
+
}
|
38
|
+
.page_not_live {
|
39
|
+
border: 1px solid #A00027;
|
40
|
+
color: #A00027;
|
41
|
+
background: #FFB1B1;
|
42
|
+
padding:3px 9px;
|
43
|
+
font-weight:bold;
|
44
|
+
width:auto;
|
41
45
|
}
|
@@ -21,6 +21,29 @@ class Page < ActiveRecord::Base
|
|
21
21
|
self.deletable && self.link_url.blank? and self.menu_match.blank?
|
22
22
|
end
|
23
23
|
|
24
|
+
# provide helpful feedback
|
25
|
+
def destroy
|
26
|
+
if self.deletable?
|
27
|
+
super
|
28
|
+
else
|
29
|
+
puts "This page is not deletable. Please use .destroy! if you really want it gone or first"
|
30
|
+
puts "unset .link_url" unless self.link_url.blank?
|
31
|
+
puts "unset .menu_match" unless self.menu_match.blank?
|
32
|
+
puts "set .deletable to true" unless self.deletable
|
33
|
+
return false
|
34
|
+
end
|
35
|
+
end
|
36
|
+
|
37
|
+
# provide a method to definitely get rid of the page.
|
38
|
+
def destroy!
|
39
|
+
self.update_attributes({
|
40
|
+
:menu_match => nil,
|
41
|
+
:link_url => nil,
|
42
|
+
:deletable => true
|
43
|
+
})
|
44
|
+
self.destroy
|
45
|
+
end
|
46
|
+
|
24
47
|
# used for the browser title to get the full path to this page
|
25
48
|
def path(reverse = true)
|
26
49
|
unless self.parent.nil?
|
@@ -0,0 +1,20 @@
|
|
1
|
+
Copyright (c) 2009 [name of plugin creator]
|
2
|
+
|
3
|
+
Permission is hereby granted, free of charge, to any person obtaining
|
4
|
+
a copy of this software and associated documentation files (the
|
5
|
+
"Software"), to deal in the Software without restriction, including
|
6
|
+
without limitation the rights to use, copy, modify, merge, publish,
|
7
|
+
distribute, sublicense, and/or sell copies of the Software, and to
|
8
|
+
permit persons to whom the Software is furnished to do so, subject to
|
9
|
+
the following conditions:
|
10
|
+
|
11
|
+
The above copyright notice and this permission notice shall be
|
12
|
+
included in all copies or substantial portions of the Software.
|
13
|
+
|
14
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
15
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
16
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
17
|
+
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
18
|
+
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
19
|
+
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
20
|
+
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
@@ -0,0 +1,46 @@
|
|
1
|
+
h1. Rails Indexes
|
2
|
+
|
3
|
+
Rails indexes is a small package of 2 rake tasks that scan your application models and displays a list of columns that _probably_ should be indexed.
|
4
|
+
|
5
|
+
note: there should be mode fields depending on your application design and custom queries.
|
6
|
+
|
7
|
+
h2. Installation
|
8
|
+
|
9
|
+
as a rails plugin:
|
10
|
+
<pre>script/plugin install git://github.com/eladmeidar/rails_indexes.git</pre>
|
11
|
+
|
12
|
+
h2. Usage
|
13
|
+
|
14
|
+
<del>Display a simple report:</del>
|
15
|
+
<pre><del>rake db:show_me_some_indexes</del></pre>
|
16
|
+
- *deprecated*
|
17
|
+
|
18
|
+
Display a migration for adding/removing all necessary indexes based on associations:
|
19
|
+
<pre>rake db:show_me_a_migration</pre>
|
20
|
+
|
21
|
+
Display a migration for adding/removing all necessary indexes based on AR::Base#find calls (including: find, find_by, find_all_by, find_by_x_and_y, find_all_by_x_and_y):
|
22
|
+
<pre>rake db:show_me_ar_find_indexes</pre>
|
23
|
+
|
24
|
+
Note that it would probably make more sense running those tasks on production, where you *actually* need those indexes to be added.
|
25
|
+
|
26
|
+
* Add an option to create a migration that adds all the needed indexes.
|
27
|
+
* Add an option to scan the application root tree for #find, #find_all_by and #find_by to get some more index-required columns.
|
28
|
+
|
29
|
+
h2. Tests
|
30
|
+
|
31
|
+
Requires SQLite3 installed, then just:
|
32
|
+
<pre>rake</pre>
|
33
|
+
to run the tests
|
34
|
+
|
35
|
+
h4. Author:
|
36
|
+
|
37
|
+
Elad Meidar
|
38
|
+
"http://blog.eizesus.com":http://blog.eizesus.com
|
39
|
+
|
40
|
+
Thanks:
|
41
|
+
Eric Davis,
|
42
|
+
"http://littlestreamsoftware.com":http://littlestreamsoftware.com
|
43
|
+
|
44
|
+
Released under the same license as Ruby. No Support. No Warranty, no Pain.
|
45
|
+
|
46
|
+
|
@@ -0,0 +1,23 @@
|
|
1
|
+
require 'rake'
|
2
|
+
require 'rake/testtask'
|
3
|
+
require 'rake/rdoctask'
|
4
|
+
|
5
|
+
desc 'Default: run unit tests.'
|
6
|
+
task :default => :test
|
7
|
+
|
8
|
+
desc 'Testing the rails indexes plugin.'
|
9
|
+
Rake::TestTask.new(:test) do |t|
|
10
|
+
t.libs << 'lib'
|
11
|
+
t.libs << 'test'
|
12
|
+
t.pattern = 'test/**/*_test.rb'
|
13
|
+
t.verbose = true
|
14
|
+
end
|
15
|
+
|
16
|
+
desc 'Generate documentation for the rails_indexes plugin.'
|
17
|
+
Rake::RDocTask.new(:rdoc) do |rdoc|
|
18
|
+
rdoc.rdoc_dir = 'rdoc'
|
19
|
+
rdoc.title = 'RailsIndexes'
|
20
|
+
rdoc.options << '--line-numbers' << '--inline-source'
|
21
|
+
rdoc.rdoc_files.include('README')
|
22
|
+
rdoc.rdoc_files.include('lib/**/*.rb')
|
23
|
+
end
|
@@ -1,16 +1,15 @@
|
|
1
1
|
module Indexer
|
2
|
-
|
3
|
-
|
2
|
+
|
4
3
|
def self.sortalize(array)
|
5
4
|
Marshal.load(Marshal.dump(array)).each do |element|
|
6
5
|
element.sort! if element.is_a?(Array)
|
7
6
|
end
|
8
7
|
end
|
9
|
-
|
8
|
+
|
10
9
|
def self.check_for_indexes(migration_format = false)
|
11
10
|
model_names = []
|
12
|
-
Dir.chdir(Rails.root) do
|
13
|
-
model_names = Dir["**/app/models
|
11
|
+
Dir.chdir(Rails.root) do
|
12
|
+
model_names = Dir["**/app/models/**/*.rb"].collect {|filename| File.basename(filename) }.uniq
|
14
13
|
end
|
15
14
|
|
16
15
|
model_classes = []
|
@@ -25,58 +24,45 @@ module Indexer
|
|
25
24
|
# No-op
|
26
25
|
end
|
27
26
|
end
|
28
|
-
|
29
|
-
|
30
|
-
@indexes_required = Hash.new([])
|
27
|
+
|
31
28
|
@index_migrations = Hash.new([])
|
32
29
|
|
33
30
|
model_classes.each do |class_name|
|
34
31
|
|
35
|
-
# check if this is an STI child instance
|
32
|
+
# check if this is an STI child instance
|
36
33
|
if class_name.base_class.name != class_name.name && (class_name.column_names.include?(class_name.base_class.inheritance_column) || class_name.column_names.include?(class_name.inheritance_column))
|
34
|
+
|
37
35
|
# add the inharitance column on the parent table
|
38
|
-
|
39
|
-
|
40
|
-
else
|
41
|
-
# index migration for STI should require both the primary key and the inheritance_column in a composite index.
|
42
|
-
@index_migrations[class_name.base_class.table_name] += [[class_name.inheritance_column, class_name.base_class.primary_key].sort] unless @index_migrations[class_name.base_class.table_name].include?([class_name.base_class.inheritance_column].sort)
|
43
|
-
end
|
36
|
+
# index migration for STI should require both the primary key and the inheritance_column in a composite index.
|
37
|
+
@index_migrations[class_name.base_class.table_name] += [[class_name.inheritance_column, class_name.base_class.primary_key].sort] unless @index_migrations[class_name.base_class.table_name].include?([class_name.base_class.inheritance_column].sort)
|
44
38
|
end
|
45
|
-
|
39
|
+
#puts "class name: #{class_name}"
|
46
40
|
class_name.reflections.each_pair do |reflection_name, reflection_options|
|
41
|
+
#puts "reflection => #{reflection_name}"
|
47
42
|
case reflection_options.macro
|
48
43
|
when :belongs_to
|
49
44
|
# polymorphic?
|
50
|
-
@table_name = class_name.table_name.to_s
|
45
|
+
@table_name = class_name.table_name.to_s
|
51
46
|
if reflection_options.options.has_key?(:polymorphic) && (reflection_options.options[:polymorphic] == true)
|
52
47
|
poly_type = "#{reflection_options.name.to_s}_type"
|
53
48
|
poly_id = "#{reflection_options.name.to_s}_id"
|
54
|
-
|
55
|
-
|
56
|
-
else
|
57
|
-
|
58
|
-
@index_migrations[@table_name.to_s] += [[poly_type, poly_id].sort] unless @index_migrations[@table_name.to_s].include?([poly_type, poly_id].sort)
|
59
|
-
end
|
49
|
+
|
50
|
+
@index_migrations[@table_name.to_s] += [[poly_type, poly_id].sort] unless @index_migrations[@table_name.to_s].include?([poly_type, poly_id].sort)
|
60
51
|
else
|
61
52
|
|
62
53
|
foreign_key = reflection_options.options[:foreign_key] ||= reflection_options.primary_key_name
|
63
|
-
|
64
|
-
if !(migration_format)
|
65
|
-
@indexes_required[@table_name.to_s] += [foreign_key] unless @indexes_required[@table_name.to_s].include?(foreign_key)
|
66
|
-
else
|
67
54
|
@index_migrations[@table_name.to_s] += [foreign_key] unless @index_migrations[@table_name.to_s].include?(foreign_key)
|
68
|
-
end
|
69
55
|
end
|
70
56
|
when :has_and_belongs_to_many
|
71
57
|
table_name = reflection_options.options[:join_table] ||= [class_name.table_name, reflection_name.to_s].sort.join('_')
|
72
58
|
association_foreign_key = reflection_options.options[:association_foreign_key] ||= "#{reflection_name.to_s.singularize}_id"
|
73
59
|
foreign_key = reflection_options.options[:foreign_key] ||= "#{class_name.name.tableize.singularize}_id"
|
60
|
+
|
61
|
+
composite_keys = [association_foreign_key, foreign_key]
|
62
|
+
|
63
|
+
@index_migrations[table_name.to_s] += [composite_keys] unless @index_migrations[table_name].include?(composite_keys)
|
64
|
+
@index_migrations[table_name.to_s] += [composite_keys.reverse] unless @index_migrations[table_name].include?(composite_keys.reverse)
|
74
65
|
|
75
|
-
if !(migration_format)
|
76
|
-
@indexes_required[table_name.to_s] += [association_foreign_key, foreign_key].sort unless @indexes_required[table_name].include?([association_foreign_key, foreign_key].sort)
|
77
|
-
else
|
78
|
-
@index_migrations[table_name.to_s] += [[association_foreign_key, foreign_key].sort] unless @index_migrations[table_name].include?([association_foreign_key, foreign_key].sort)
|
79
|
-
end
|
80
66
|
else
|
81
67
|
#nothing
|
82
68
|
end
|
@@ -84,60 +70,79 @@ module Indexer
|
|
84
70
|
end
|
85
71
|
|
86
72
|
@missing_indexes = {}
|
87
|
-
|
73
|
+
|
74
|
+
@index_migrations.each do |table_name, foreign_keys|
|
88
75
|
|
89
76
|
unless foreign_keys.blank?
|
90
|
-
existing_indexes = ActiveRecord::Base.connection.indexes(table_name.to_sym).collect
|
91
|
-
keys_to_add = self.sortalize(foreign_keys.uniq) - self.sortalize(existing_indexes)
|
77
|
+
existing_indexes = ActiveRecord::Base.connection.indexes(table_name.to_sym).collect {|index| index.columns.size > 1 ? index.columns : index.columns.first}
|
78
|
+
keys_to_add = foreign_keys.uniq - existing_indexes #self.sortalize(foreign_keys.uniq) - self.sortalize(existing_indexes)
|
92
79
|
@missing_indexes[table_name] = keys_to_add unless keys_to_add.empty?
|
93
80
|
end
|
94
81
|
end
|
95
|
-
|
96
|
-
|
97
|
-
else
|
98
|
-
@index_migrations
|
99
|
-
end
|
82
|
+
|
83
|
+
@missing_indexes
|
100
84
|
end
|
101
85
|
|
102
86
|
def self.scan_finds
|
103
87
|
file_names = []
|
104
|
-
|
88
|
+
|
89
|
+
Dir.chdir(Rails.root) do
|
105
90
|
file_names = Dir["**/app/**/*.rb"].uniq.reject {|file_with_path| file_with_path.include?('test')}
|
106
91
|
end
|
107
92
|
|
108
|
-
puts "Found #{file_names.size} files."
|
109
|
-
|
110
93
|
@indexes_required = Hash.new([])
|
111
|
-
file_names.each do |file_name|
|
94
|
+
file_names.each do |file_name|
|
112
95
|
current_file = File.open(File.join(Rails.root, file_name), 'r')
|
113
96
|
|
114
97
|
current_file.each do |line|
|
115
|
-
|
98
|
+
|
99
|
+
# by default, try to add index on primary key, based on file name
|
100
|
+
# this will fail if the file isnot a model file
|
101
|
+
|
102
|
+
begin
|
103
|
+
current_model_name = File.basename(file_name).sub(/\.rb$/,'').camelize
|
104
|
+
rescue
|
105
|
+
# NO-OP
|
106
|
+
end
|
107
|
+
|
108
|
+
klass = current_model_name.split('::').inject(Object){ |klass,part| klass.const_get(part) } rescue nil
|
109
|
+
if klass.present? && klass < ActiveRecord::Base && !klass.abstract_class?
|
110
|
+
current_model = current_model_name.constantize
|
111
|
+
primary_key = current_model.primary_key
|
112
|
+
table_name = current_model.table_name
|
113
|
+
@indexes_required[table_name] += [primary_key] unless @indexes_required[table_name].include?(primary_key)
|
114
|
+
end
|
115
|
+
|
116
|
+
find_regexp = Regexp.new(/([A-Z]{1}[A-Za-z]+|self).(find){1}((_all){0,1}(_by_){0,1}([A-Za-z_]+))?\(([0-9A-Za-z"\':=>. \[\]{},]*)\)/)
|
116
117
|
if matches = find_regexp.match(line)
|
117
118
|
|
118
119
|
model_name, column_names, options = matches[1], matches[6], matches[7]
|
119
|
-
|
120
|
-
|
121
|
-
|
122
|
-
|
123
|
-
|
120
|
+
|
121
|
+
if model_name == "self"
|
122
|
+
model_name = File.basename(file_name).sub(/\.rb$/,'').camelize
|
123
|
+
table_name = model_name.constantize.table_name
|
124
|
+
else
|
125
|
+
if model_name.respond_to?(:constantize)
|
126
|
+
if model_name.constantize.respond_to?(:table_name)
|
127
|
+
table_name = model_name.constantize.table_name
|
128
|
+
else
|
129
|
+
#puts "Unable to get the table_name for #{model_name.to_s}. it could be an ActiveResource"
|
130
|
+
next
|
131
|
+
end
|
124
132
|
else
|
125
|
-
puts "Unable to
|
133
|
+
#puts "Unable to constantize #{model_name.to_s}, if you are sure that #{model_name.to_s} is a valid class name, please file an issue on\nhttp://github.com/eladmeidar/rails_indexes\nPlease supply the relevant code as well, thanks. =)"
|
126
134
|
next
|
127
135
|
end
|
128
|
-
else
|
129
|
-
puts "Unable to constantize #{model_name.to_s}, if you are sure that #{model_name.to_s} is a valid class name, please file an issue on\nhttp://github.com/eladmeidar/rails_indexes\nPlease supply the relevant code as well, thanks. =)"
|
130
|
-
next
|
131
136
|
end
|
132
|
-
|
133
|
-
|
134
|
-
|
135
|
-
|
136
|
-
|
137
|
+
|
138
|
+
primary_key = model_name.constantize.primary_key
|
139
|
+
@indexes_required[table_name] += [primary_key] unless @indexes_required[table_name].include?(primary_key)
|
140
|
+
|
141
|
+
if column_names.present?
|
137
142
|
column_names = column_names.split('_and_')
|
138
143
|
|
139
144
|
# remove find_by_sql references.
|
140
|
-
|
145
|
+
column_names.delete("sql")
|
141
146
|
|
142
147
|
column_names = model_name.constantize.column_names & column_names
|
143
148
|
|
@@ -146,30 +151,40 @@ module Indexer
|
|
146
151
|
column_name = column_names.first
|
147
152
|
@indexes_required[table_name] += [column_name] unless @indexes_required[table_name].include?(column_name)
|
148
153
|
else
|
149
|
-
@indexes_required[table_name] += [column_names
|
154
|
+
@indexes_required[table_name] += [column_names] unless @indexes_required[table_name].include?(column_names)
|
155
|
+
@indexes_required[table_name] += [column_names.reverse] unless @indexes_required[table_name].include?(column_names.reverse)
|
150
156
|
end
|
151
157
|
end
|
152
158
|
end
|
153
159
|
end
|
154
160
|
end
|
161
|
+
|
155
162
|
@missing_indexes = {}
|
156
163
|
@indexes_required.each do |table_name, foreign_keys|
|
157
164
|
|
158
|
-
unless foreign_keys.blank?
|
159
|
-
|
160
|
-
|
161
|
-
|
165
|
+
unless foreign_keys.blank?
|
166
|
+
begin
|
167
|
+
if ActiveRecord::Base.connection.tables.include?(table_name.to_s)
|
168
|
+
existing_indexes = ActiveRecord::Base.connection.indexes(table_name.to_sym).collect {|index| index.columns.size > 1 ? index.columns : index.columns.first}
|
169
|
+
keys_to_add = self.sortalize(foreign_keys.uniq) - self.sortalize(existing_indexes)
|
170
|
+
@missing_indexes[table_name] = keys_to_add unless keys_to_add.empty?
|
171
|
+
else
|
172
|
+
puts "BUG: table '#{table_name.to_s}' does not exist, please report this bug."
|
173
|
+
end
|
174
|
+
rescue Exception => e
|
175
|
+
puts "ERROR: #{e}"
|
176
|
+
end
|
162
177
|
end
|
163
178
|
end
|
164
|
-
|
179
|
+
|
165
180
|
@indexes_required
|
166
181
|
end
|
167
|
-
|
168
|
-
def self.key_exists?(table,key_columns)
|
182
|
+
|
183
|
+
def self.key_exists?(table,key_columns)
|
169
184
|
result = (key_columns.to_a - ActiveRecord::Base.connection.indexes(table).map { |i| i.columns }.flatten)
|
170
185
|
result.empty?
|
171
186
|
end
|
172
|
-
|
187
|
+
|
173
188
|
def self.simple_migration
|
174
189
|
migration_format = true
|
175
190
|
missing_indexes = check_for_indexes(migration_format)
|
@@ -189,14 +204,14 @@ module Indexer
|
|
189
204
|
add << "add_index :#{table_name}, :#{key}"
|
190
205
|
remove << "remove_index :#{table_name}, :#{key}"
|
191
206
|
end
|
192
|
-
|
207
|
+
|
193
208
|
end
|
194
209
|
end
|
195
|
-
|
196
|
-
migration = <<EOM
|
210
|
+
|
211
|
+
migration = <<EOM
|
197
212
|
class AddMissingIndexes < ActiveRecord::Migration
|
198
213
|
def self.up
|
199
|
-
|
214
|
+
|
200
215
|
# These indexes were found by searching for AR::Base finds on your application
|
201
216
|
# It is strongly recommanded that you will consult a professional DBA about your infrastucture and implemntation before
|
202
217
|
# changing your database in that matter.
|
@@ -207,10 +222,10 @@ class AddMissingIndexes < ActiveRecord::Migration
|
|
207
222
|
# http://www.railstutor.org
|
208
223
|
# http://guides.rubyonrails.org
|
209
224
|
|
210
|
-
|
225
|
+
|
211
226
|
#{add.uniq.join("\n ")}
|
212
227
|
end
|
213
|
-
|
228
|
+
|
214
229
|
def self.down
|
215
230
|
#{remove.uniq.join("\n ")}
|
216
231
|
end
|
@@ -221,39 +236,40 @@ EOM
|
|
221
236
|
puts migration
|
222
237
|
end
|
223
238
|
end
|
224
|
-
|
239
|
+
|
225
240
|
def self.indexes_list
|
226
241
|
check_for_indexes.each do |table_name, keys_to_add|
|
227
242
|
puts "Table '#{table_name}' => #{keys_to_add.to_sentence}"
|
228
243
|
end
|
229
244
|
end
|
230
|
-
|
231
|
-
def self.ar_find_indexes
|
245
|
+
|
246
|
+
def self.ar_find_indexes(migration_mode=true)
|
232
247
|
find_indexes = self.scan_finds
|
233
|
-
|
234
|
-
|
235
|
-
|
236
|
-
|
237
|
-
|
238
|
-
|
239
|
-
|
240
|
-
|
241
|
-
|
242
|
-
|
243
|
-
|
244
|
-
|
245
|
-
|
246
|
-
|
247
|
-
|
248
|
+
|
249
|
+
if migration_mode
|
250
|
+
unless find_indexes.keys.empty?
|
251
|
+
add = []
|
252
|
+
remove = []
|
253
|
+
find_indexes.each do |table_name, keys_to_add|
|
254
|
+
keys_to_add.each do |key|
|
255
|
+
next if key_exists?(table_name,key)
|
256
|
+
next if key.blank?
|
257
|
+
if key.is_a?(Array)
|
258
|
+
keys = key.collect {|k| ":#{k}"}
|
259
|
+
add << "add_index :#{table_name}, [#{keys.join(', ')}]"
|
260
|
+
remove << "remove_index :#{table_name}, :column => [#{keys.join(', ')}]"
|
261
|
+
else
|
262
|
+
add << "add_index :#{table_name}, :#{key}"
|
263
|
+
remove << "remove_index :#{table_name}, :#{key}"
|
264
|
+
end
|
265
|
+
|
248
266
|
end
|
249
|
-
|
250
267
|
end
|
251
|
-
|
252
|
-
|
253
|
-
migration = <<EOM
|
268
|
+
|
269
|
+
migration = <<EOM
|
254
270
|
class AddFindsMissingIndexes < ActiveRecord::Migration
|
255
271
|
def self.up
|
256
|
-
|
272
|
+
|
257
273
|
# These indexes were found by searching for AR::Base finds on your application
|
258
274
|
# It is strongly recommanded that you will consult a professional DBA about your infrastucture and implemntation before
|
259
275
|
# changing your database in that matter.
|
@@ -263,7 +279,7 @@ class AddFindsMissingIndexes < ActiveRecord::Migration
|
|
263
279
|
# http://www.railsmentors.org
|
264
280
|
# http://www.railstutor.org
|
265
281
|
# http://guides.rubyonrails.org
|
266
|
-
|
282
|
+
|
267
283
|
#{add.uniq.join("\n ")}
|
268
284
|
end
|
269
285
|
|
@@ -272,9 +288,12 @@ class AddFindsMissingIndexes < ActiveRecord::Migration
|
|
272
288
|
end
|
273
289
|
end
|
274
290
|
EOM
|
275
|
-
|
276
|
-
|
277
|
-
|
291
|
+
|
292
|
+
puts "## Drop this into a file in db/migrate ##"
|
293
|
+
puts migration
|
294
|
+
end
|
278
295
|
end
|
296
|
+
else
|
297
|
+
find_indexes
|
279
298
|
end
|
280
|
-
end
|
299
|
+
end
|
@@ -0,0 +1,10 @@
|
|
1
|
+
class Gift < ActiveRecord::Base
|
2
|
+
|
3
|
+
set_primary_key :custom_primary_key
|
4
|
+
has_and_belongs_to_many :users, :join_table => "purchases", :association_foreign_key => 'buyer_id', :foreign_key => 'present_id'
|
5
|
+
|
6
|
+
def search_all(name, price)
|
7
|
+
Gift.find_all_by_name_and_price(name, price)
|
8
|
+
end
|
9
|
+
|
10
|
+
end
|
@@ -0,0 +1,16 @@
|
|
1
|
+
class User < ActiveRecord::Base
|
2
|
+
|
3
|
+
has_one :company, :foreign_key => 'owner_id'
|
4
|
+
has_one :address, :as => :addressable
|
5
|
+
|
6
|
+
has_and_belongs_to_many :users, :join_table => "purchases", :association_foreign_key => 'present_id', :foreign_key => 'buyer_id'
|
7
|
+
|
8
|
+
|
9
|
+
def search_via_email(email = "user@domain.com")
|
10
|
+
self.find_by_email(email)
|
11
|
+
end
|
12
|
+
|
13
|
+
def search_via_email_and_name(email, name)
|
14
|
+
self.find_by_email_and_name(email, name)
|
15
|
+
end
|
16
|
+
end
|
@@ -0,0 +1,46 @@
|
|
1
|
+
ActiveRecord::Schema.define do
|
2
|
+
create_table "users", :force => true do |t|
|
3
|
+
t.column "name", :text
|
4
|
+
t.column "email", :text
|
5
|
+
end
|
6
|
+
|
7
|
+
create_table "companies", :force => true do |t|
|
8
|
+
t.column "name", :text
|
9
|
+
t.column "owned_id", :integer
|
10
|
+
t.column "country_id", :integer
|
11
|
+
end
|
12
|
+
|
13
|
+
add_index :companies, :country_id
|
14
|
+
|
15
|
+
create_table "addresses", :force => true do |t|
|
16
|
+
t.column "addressable_type", :string
|
17
|
+
t.column "addressable_id", :integer
|
18
|
+
t.column "address", :text
|
19
|
+
t.column "country_id", :integer
|
20
|
+
end
|
21
|
+
|
22
|
+
create_table "freelancers", :force => true do |t|
|
23
|
+
t.column "name", :string
|
24
|
+
t.column "price_per_hour", :integer
|
25
|
+
end
|
26
|
+
|
27
|
+
create_table "companies_freelancers", :force => true do |t|
|
28
|
+
t.column "freelancer_id", :integer
|
29
|
+
t.column "company_id", :integer
|
30
|
+
end
|
31
|
+
|
32
|
+
create_table "gifts", :force => true do |t|
|
33
|
+
t.column "custom_primary_key", :integer
|
34
|
+
t.column "name", :string
|
35
|
+
t.column "price", :integer
|
36
|
+
end
|
37
|
+
|
38
|
+
create_table "purchases", :force => true do |t|
|
39
|
+
t.column "present_id", :integer
|
40
|
+
t.column "buyer_id", :integer
|
41
|
+
end
|
42
|
+
|
43
|
+
create_table "countries", :force => true do |t|
|
44
|
+
t.column "name", :string
|
45
|
+
end
|
46
|
+
end
|
@@ -0,0 +1,83 @@
|
|
1
|
+
require 'test_helper'
|
2
|
+
|
3
|
+
class RailsIndexesTest < ActiveSupport::TestCase
|
4
|
+
|
5
|
+
test "relationship indexes are found" do
|
6
|
+
@relationship_indexes = Indexer.check_for_indexes
|
7
|
+
|
8
|
+
assert @relationship_indexes.size > 0
|
9
|
+
|
10
|
+
assert @relationship_indexes.has_key?("companies")
|
11
|
+
assert @relationship_indexes.has_key?("companies_freelancers")
|
12
|
+
assert @relationship_indexes.has_key?("addresses")
|
13
|
+
assert @relationship_indexes.has_key?("purchases")
|
14
|
+
end
|
15
|
+
|
16
|
+
# should add 2 composite indexes or each pair
|
17
|
+
test "has_and_belongs_to_many" do
|
18
|
+
@relationship_indexes = Indexer.check_for_indexes(true)
|
19
|
+
|
20
|
+
assert @relationship_indexes["companies_freelancers"].include?(["company_id", "freelancer_id"])
|
21
|
+
assert @relationship_indexes["companies_freelancers"].include?(["freelancer_id", "company_id"])
|
22
|
+
end
|
23
|
+
|
24
|
+
test "has_and_belongs_to_many with custom columns" do
|
25
|
+
@relationship_indexes = Indexer.check_for_indexes(true)
|
26
|
+
|
27
|
+
assert @relationship_indexes["purchases"].include?(["present_id", "buyer_id"])
|
28
|
+
assert @relationship_indexes["purchases"].include?(["buyer_id", "present_id"])
|
29
|
+
end
|
30
|
+
|
31
|
+
test "belongs_to" do
|
32
|
+
@relationship_indexes = Indexer.check_for_indexes(true)
|
33
|
+
assert @relationship_indexes["addresses"].include?("country_id")
|
34
|
+
end
|
35
|
+
|
36
|
+
test "belongs_to with a custom foreign key" do
|
37
|
+
@relationship_indexes = Indexer.check_for_indexes(true)
|
38
|
+
assert @relationship_indexes["companies"].include?("owner_id")
|
39
|
+
end
|
40
|
+
|
41
|
+
test "should not add an already existing index" do
|
42
|
+
@relationship_indexes = Indexer.check_for_indexes(true)
|
43
|
+
assert !(@relationship_indexes["companies"].include?("country_id"))
|
44
|
+
end
|
45
|
+
|
46
|
+
test "default find_by indexes for primary keys" do
|
47
|
+
@find_by_indexes = Indexer.ar_find_indexes(false)
|
48
|
+
|
49
|
+
# Default added the primary key for each table
|
50
|
+
assert @find_by_indexes.has_key?("users")
|
51
|
+
assert @find_by_indexes.has_key?("companies")
|
52
|
+
assert @find_by_indexes.has_key?("gifts")
|
53
|
+
assert @find_by_indexes.has_key?("freelancers")
|
54
|
+
assert @find_by_indexes.has_key?("countries")
|
55
|
+
end
|
56
|
+
|
57
|
+
test "default find_by indexes for custom primary keys" do
|
58
|
+
@find_by_indexes = Indexer.ar_find_indexes(false)
|
59
|
+
|
60
|
+
assert @find_by_indexes["gifts"].include?("custom_primary_key")
|
61
|
+
end
|
62
|
+
|
63
|
+
test "find_by indexes for self.find_by_email_and_name" do
|
64
|
+
@find_by_indexes = Indexer.ar_find_indexes(false)
|
65
|
+
|
66
|
+
assert @find_by_indexes["users"].include?(["name", "email"])
|
67
|
+
assert @find_by_indexes["users"].include?(["email", "name"])
|
68
|
+
end
|
69
|
+
|
70
|
+
test "find_by indexes for Gift.find_all_by_name_and_price" do
|
71
|
+
@find_by_indexes = Indexer.ar_find_indexes(false)
|
72
|
+
|
73
|
+
assert @find_by_indexes["gifts"].include?(["name", "price"])
|
74
|
+
assert @find_by_indexes["gifts"].include?(["price", "name"])
|
75
|
+
end
|
76
|
+
|
77
|
+
test "find_by indexes from UsersController" do
|
78
|
+
@find_by_indexes = Indexer.ar_find_indexes(false)
|
79
|
+
|
80
|
+
assert @find_by_indexes["freelancers"].include?("name")
|
81
|
+
|
82
|
+
end
|
83
|
+
end
|
@@ -0,0 +1,30 @@
|
|
1
|
+
require 'rubygems'
|
2
|
+
|
3
|
+
require 'test/unit'
|
4
|
+
|
5
|
+
require 'activerecord'
|
6
|
+
require 'active_record/fixtures'
|
7
|
+
require 'active_support'
|
8
|
+
require 'active_support/test_case'
|
9
|
+
require 'action_controller'
|
10
|
+
|
11
|
+
require 'indexer'
|
12
|
+
|
13
|
+
ActiveRecord::Base.establish_connection(
|
14
|
+
:adapter => "sqlite3",
|
15
|
+
:database => ":memory:"
|
16
|
+
)
|
17
|
+
|
18
|
+
class Rails
|
19
|
+
def self.root
|
20
|
+
"test/fixtures/"
|
21
|
+
end
|
22
|
+
end
|
23
|
+
|
24
|
+
load 'test/fixtures/schema.rb'
|
25
|
+
|
26
|
+
# Load models
|
27
|
+
Dir['test/fixtures/app/models/**/*.rb'].each { |f| require f }
|
28
|
+
|
29
|
+
# load controllers
|
30
|
+
Dir['test/fixtures/app/controllers/**/*.rb'].each { |f| require f }
|
@@ -1,5 +1,6 @@
|
|
1
|
+
<%= link_to "Show", "", :id => "current_image_toggler" if (toggle_image_display ||= false) %>
|
1
2
|
<%= f.hidden_field field %>
|
2
|
-
<div
|
3
|
+
<div id='current_image_container'<%= " style='display: none'" if (toggle_image_display ||= false) %>>
|
3
4
|
<a id='current_image_link' href="<%= insert_admin_images_url %>?thickbox=true&modal=true&titlebar=true&field=<%= f.object.class.name.underscore.downcase %>_<%= field %>&update_image=current_picked_image&callback=picked_image_changed&thumbnail=&KeepThis=true&TB_iframe=true&width=<%= width ||= 950 %>&height=<%= height ||= 510 %>" style='border: 0px' title='Change <%= (description ||= "image").titleize %>' name='Change <%= (description ||= "image").titleize %>' class='thickbox'>
|
4
5
|
<% unless image.nil? %>
|
5
6
|
<%= image_fu image, nil, {:class => "brown_border", :id => "current_picked_image"} %>
|
@@ -37,6 +38,13 @@
|
|
37
38
|
this.hide();
|
38
39
|
e.stop();
|
39
40
|
});
|
41
|
+
<% if toggle_image_display ||= false -%>
|
42
|
+
jQuery('#current_image_toggler').click(function(e){
|
43
|
+
jQuery(this).html((jQuery(this).html() == 'Show' ? 'Hide' : 'Show'));
|
44
|
+
jQuery("#current_image_container").toggle();
|
45
|
+
e.preventDefault();
|
46
|
+
});
|
47
|
+
<% end -%>
|
40
48
|
});
|
41
49
|
</script>
|
42
50
|
<% end %>
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: refinerycms
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.9.5.
|
4
|
+
version: 0.9.5.20
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Resolve Digital
|
@@ -11,8 +11,8 @@ autorequire:
|
|
11
11
|
bindir: bin
|
12
12
|
cert_chain: []
|
13
13
|
|
14
|
-
date: 2009-12-
|
15
|
-
default_executable:
|
14
|
+
date: 2009-12-04 00:00:00 +13:00
|
15
|
+
default_executable:
|
16
16
|
dependencies: []
|
17
17
|
|
18
18
|
description: A beautiful open source Ruby on Rails content manager for small business. Easy to extend, easy to use, lightweight and all wrapped up in a super slick UI.
|
@@ -24,14 +24,17 @@ executables:
|
|
24
24
|
extensions: []
|
25
25
|
|
26
26
|
extra_rdoc_files:
|
27
|
-
- README
|
28
27
|
- CONTRIBUTORS
|
29
28
|
- LICENSE
|
29
|
+
- README
|
30
30
|
files:
|
31
|
+
- .gems
|
32
|
+
- .gitignore
|
31
33
|
- CONTRIBUTORS
|
32
34
|
- LICENSE
|
33
35
|
- README
|
34
36
|
- Rakefile
|
37
|
+
- VERSION
|
35
38
|
- app/controllers/admin/base_controller.rb
|
36
39
|
- app/controllers/application.rb
|
37
40
|
- app/controllers/application_controller.rb
|
@@ -174,8 +177,8 @@ files:
|
|
174
177
|
- public/javascripts/effects.js
|
175
178
|
- public/javascripts/fastinit.js
|
176
179
|
- public/javascripts/jquery/GPL-LICENSE.txt
|
177
|
-
- public/javascripts/jquery/jquery.js
|
178
180
|
- public/javascripts/jquery/MIT-LICENSE.txt
|
181
|
+
- public/javascripts/jquery/jquery.js
|
179
182
|
- public/javascripts/lightbox.js
|
180
183
|
- public/javascripts/livepipe.js
|
181
184
|
- public/javascripts/prototype.js
|
@@ -246,35 +249,39 @@ files:
|
|
246
249
|
- script/runner
|
247
250
|
- script/server
|
248
251
|
- vendor/plugins/acts_as_indexed/CHANGELOG
|
252
|
+
- vendor/plugins/acts_as_indexed/MIT-LICENSE
|
253
|
+
- vendor/plugins/acts_as_indexed/README.rdoc
|
254
|
+
- vendor/plugins/acts_as_indexed/Rakefile
|
249
255
|
- vendor/plugins/acts_as_indexed/init.rb
|
250
256
|
- vendor/plugins/acts_as_indexed/lib/acts_as_indexed.rb
|
251
257
|
- vendor/plugins/acts_as_indexed/lib/search_atom.rb
|
252
258
|
- vendor/plugins/acts_as_indexed/lib/search_index.rb
|
253
259
|
- vendor/plugins/acts_as_indexed/lib/will_paginate_search.rb
|
254
|
-
- vendor/plugins/acts_as_indexed/MIT-LICENSE
|
255
|
-
- vendor/plugins/acts_as_indexed/Rakefile
|
256
|
-
- vendor/plugins/acts_as_indexed/README.rdoc
|
257
260
|
- vendor/plugins/acts_as_indexed/test/abstract_unit.rb
|
258
261
|
- vendor/plugins/acts_as_indexed/test/acts_as_indexed_test.rb
|
259
262
|
- vendor/plugins/acts_as_indexed/test/database.yml
|
260
263
|
- vendor/plugins/acts_as_indexed/test/fixtures/post.rb
|
261
264
|
- vendor/plugins/acts_as_indexed/test/fixtures/posts.yml
|
262
265
|
- vendor/plugins/acts_as_indexed/test/schema.rb
|
266
|
+
- vendor/plugins/acts_as_tree/README
|
267
|
+
- vendor/plugins/acts_as_tree/Rakefile
|
263
268
|
- vendor/plugins/acts_as_tree/init.rb
|
264
269
|
- vendor/plugins/acts_as_tree/lib/active_record/acts/tree.rb
|
265
|
-
- vendor/plugins/acts_as_tree/Rakefile
|
266
|
-
- vendor/plugins/acts_as_tree/README
|
267
270
|
- vendor/plugins/acts_as_tree/test/abstract_unit.rb
|
268
271
|
- vendor/plugins/acts_as_tree/test/acts_as_tree_test.rb
|
269
272
|
- vendor/plugins/acts_as_tree/test/database.yml
|
270
273
|
- vendor/plugins/acts_as_tree/test/fixtures/mixin.rb
|
271
274
|
- vendor/plugins/acts_as_tree/test/fixtures/mixins.yml
|
272
275
|
- vendor/plugins/acts_as_tree/test/schema.rb
|
273
|
-
- vendor/plugins/attachment_fu/amazon_s3.yml.tpl
|
274
276
|
- vendor/plugins/attachment_fu/CHANGELOG
|
277
|
+
- vendor/plugins/attachment_fu/LICENSE
|
278
|
+
- vendor/plugins/attachment_fu/README
|
279
|
+
- vendor/plugins/attachment_fu/Rakefile
|
280
|
+
- vendor/plugins/attachment_fu/amazon_s3.yml.tpl
|
275
281
|
- vendor/plugins/attachment_fu/init.rb
|
276
282
|
- vendor/plugins/attachment_fu/install.rb
|
277
283
|
- vendor/plugins/attachment_fu/lib/geometry.rb
|
284
|
+
- vendor/plugins/attachment_fu/lib/technoweenie/attachment_fu.rb
|
278
285
|
- vendor/plugins/attachment_fu/lib/technoweenie/attachment_fu/backends/cloud_file_backend.rb
|
279
286
|
- vendor/plugins/attachment_fu/lib/technoweenie/attachment_fu/backends/db_file_backend.rb
|
280
287
|
- vendor/plugins/attachment_fu/lib/technoweenie/attachment_fu/backends/file_system_backend.rb
|
@@ -284,11 +291,7 @@ files:
|
|
284
291
|
- vendor/plugins/attachment_fu/lib/technoweenie/attachment_fu/processors/image_science_processor.rb
|
285
292
|
- vendor/plugins/attachment_fu/lib/technoweenie/attachment_fu/processors/mini_magick_processor.rb
|
286
293
|
- vendor/plugins/attachment_fu/lib/technoweenie/attachment_fu/processors/rmagick_processor.rb
|
287
|
-
- vendor/plugins/attachment_fu/lib/technoweenie/attachment_fu.rb
|
288
|
-
- vendor/plugins/attachment_fu/LICENSE
|
289
294
|
- vendor/plugins/attachment_fu/rackspace_cloudfiles.yml.tpl
|
290
|
-
- vendor/plugins/attachment_fu/Rakefile
|
291
|
-
- vendor/plugins/attachment_fu/README
|
292
295
|
- vendor/plugins/attachment_fu/test/backends/db_file_test.rb
|
293
296
|
- vendor/plugins/attachment_fu/test/backends/file_system_test.rb
|
294
297
|
- vendor/plugins/attachment_fu/test/backends/remote/cloudfiles_test.rb
|
@@ -317,6 +320,8 @@ files:
|
|
317
320
|
- vendor/plugins/attachment_fu/vendor/red_artisan/core_image/filters/scale.rb
|
318
321
|
- vendor/plugins/attachment_fu/vendor/red_artisan/core_image/filters/watermark.rb
|
319
322
|
- vendor/plugins/attachment_fu/vendor/red_artisan/core_image/processor.rb
|
323
|
+
- vendor/plugins/authentication/README
|
324
|
+
- vendor/plugins/authentication/Rakefile
|
320
325
|
- vendor/plugins/authentication/app/controllers/admin/users_controller.rb
|
321
326
|
- vendor/plugins/authentication/app/controllers/sessions_controller.rb
|
322
327
|
- vendor/plugins/authentication/app/controllers/users_controller.rb
|
@@ -335,11 +340,9 @@ files:
|
|
335
340
|
- vendor/plugins/authentication/app/views/user_mailer/signup_notification.html.erb
|
336
341
|
- vendor/plugins/authentication/app/views/users/new.html.erb
|
337
342
|
- vendor/plugins/authentication/config/routes.rb
|
338
|
-
- vendor/plugins/authentication/rails/init.rb
|
339
343
|
- vendor/plugins/authentication/lib/authenticated_system.rb
|
340
344
|
- vendor/plugins/authentication/lib/authenticated_test_helper.rb
|
341
|
-
- vendor/plugins/authentication/
|
342
|
-
- vendor/plugins/authentication/README
|
345
|
+
- vendor/plugins/authentication/rails/init.rb
|
343
346
|
- vendor/plugins/authentication/test/fixtures/users.yml
|
344
347
|
- vendor/plugins/authentication/test/functional/admin/base_controller_test.rb
|
345
348
|
- vendor/plugins/authentication/test/functional/admin/dashboard_controller_test.rb
|
@@ -367,8 +370,8 @@ files:
|
|
367
370
|
- vendor/plugins/images/app/views/admin/images/insert.html.erb
|
368
371
|
- vendor/plugins/images/app/views/admin/images/new.html.erb
|
369
372
|
- vendor/plugins/images/config/routes.rb
|
370
|
-
- vendor/plugins/images/rails/init.rb
|
371
373
|
- vendor/plugins/images/lib/tasks/images.rake
|
374
|
+
- vendor/plugins/images/rails/init.rb
|
372
375
|
- vendor/plugins/inquiries/app/controllers/admin/inquiries_controller.rb
|
373
376
|
- vendor/plugins/inquiries/app/controllers/admin/inquiry_settings_controller.rb
|
374
377
|
- vendor/plugins/inquiries/app/controllers/inquiries_controller.rb
|
@@ -422,6 +425,23 @@ files:
|
|
422
425
|
- vendor/plugins/pages/app/views/pages/show.html.erb
|
423
426
|
- vendor/plugins/pages/config/routes.rb
|
424
427
|
- vendor/plugins/pages/rails/init.rb
|
428
|
+
- vendor/plugins/rails_indexes/MIT-LICENSE
|
429
|
+
- vendor/plugins/rails_indexes/README.textile
|
430
|
+
- vendor/plugins/rails_indexes/Rakefile
|
431
|
+
- vendor/plugins/rails_indexes/lib/indexer.rb
|
432
|
+
- vendor/plugins/rails_indexes/tasks/indexer.rake
|
433
|
+
- vendor/plugins/rails_indexes/test/fixtures/app/controllers/users_controller.rb
|
434
|
+
- vendor/plugins/rails_indexes/test/fixtures/app/models/address.rb
|
435
|
+
- vendor/plugins/rails_indexes/test/fixtures/app/models/company.rb
|
436
|
+
- vendor/plugins/rails_indexes/test/fixtures/app/models/country.rb
|
437
|
+
- vendor/plugins/rails_indexes/test/fixtures/app/models/freelancer.rb
|
438
|
+
- vendor/plugins/rails_indexes/test/fixtures/app/models/gift.rb
|
439
|
+
- vendor/plugins/rails_indexes/test/fixtures/app/models/god.rb
|
440
|
+
- vendor/plugins/rails_indexes/test/fixtures/app/models/user.rb
|
441
|
+
- vendor/plugins/rails_indexes/test/fixtures/app/sweepers/user_sweeper.rb
|
442
|
+
- vendor/plugins/rails_indexes/test/fixtures/schema.rb
|
443
|
+
- vendor/plugins/rails_indexes/test/rails_indexes_test.rb
|
444
|
+
- vendor/plugins/rails_indexes/test/test_helper.rb
|
425
445
|
- vendor/plugins/refinery/app/controllers/admin/refinery_core_controller.rb
|
426
446
|
- vendor/plugins/refinery/app/views/admin/_head.html.erb
|
427
447
|
- vendor/plugins/refinery/app/views/admin/_menu.html.erb
|
@@ -448,18 +468,18 @@ files:
|
|
448
468
|
- vendor/plugins/refinery/app/views/welcome.html.erb
|
449
469
|
- vendor/plugins/refinery/app/views/wymiframe.html.erb
|
450
470
|
- vendor/plugins/refinery/config/routes.rb
|
451
|
-
- vendor/plugins/refinery/rails/init.rb
|
452
471
|
- vendor/plugins/refinery/lib/crud.rb
|
453
|
-
- vendor/plugins/refinery/lib/generators/refinery/install.rb
|
454
|
-
- vendor/plugins/refinery/lib/generators/refinery/Rakefile
|
455
472
|
- vendor/plugins/refinery/lib/generators/refinery/README
|
473
|
+
- vendor/plugins/refinery/lib/generators/refinery/Rakefile
|
474
|
+
- vendor/plugins/refinery/lib/generators/refinery/USAGE
|
475
|
+
- vendor/plugins/refinery/lib/generators/refinery/install.rb
|
456
476
|
- vendor/plugins/refinery/lib/generators/refinery/refinery_generator.rb
|
457
477
|
- vendor/plugins/refinery/lib/generators/refinery/templates/config/routes.rb
|
458
478
|
- vendor/plugins/refinery/lib/generators/refinery/templates/controller.rb
|
459
|
-
- vendor/plugins/refinery/lib/generators/refinery/templates/rails/init.rb
|
460
479
|
- vendor/plugins/refinery/lib/generators/refinery/templates/migration.rb
|
461
480
|
- vendor/plugins/refinery/lib/generators/refinery/templates/model.rb
|
462
481
|
- vendor/plugins/refinery/lib/generators/refinery/templates/public_controller.rb
|
482
|
+
- vendor/plugins/refinery/lib/generators/refinery/templates/rails/init.rb
|
463
483
|
- vendor/plugins/refinery/lib/generators/refinery/templates/views/admin/_form.html.erb
|
464
484
|
- vendor/plugins/refinery/lib/generators/refinery/templates/views/admin/_singular_name.html.erb
|
465
485
|
- vendor/plugins/refinery/lib/generators/refinery/templates/views/admin/_sortable_list.html.erb
|
@@ -468,8 +488,7 @@ files:
|
|
468
488
|
- vendor/plugins/refinery/lib/generators/refinery/templates/views/admin/new.html.erb
|
469
489
|
- vendor/plugins/refinery/lib/generators/refinery/templates/views/index.html.erb
|
470
490
|
- vendor/plugins/refinery/lib/generators/refinery/templates/views/show.html.erb
|
471
|
-
- vendor/plugins/refinery/lib/
|
472
|
-
- vendor/plugins/refinery/lib/indexer.rb
|
491
|
+
- vendor/plugins/refinery/lib/refinery.rb
|
473
492
|
- vendor/plugins/refinery/lib/refinery/activity.rb
|
474
493
|
- vendor/plugins/refinery/lib/refinery/admin_base_controller.rb
|
475
494
|
- vendor/plugins/refinery/lib/refinery/application_controller.rb
|
@@ -480,9 +499,8 @@ files:
|
|
480
499
|
- vendor/plugins/refinery/lib/refinery/link_renderer.rb
|
481
500
|
- vendor/plugins/refinery/lib/refinery/plugin.rb
|
482
501
|
- vendor/plugins/refinery/lib/refinery/plugins.rb
|
483
|
-
- vendor/plugins/refinery/lib/refinery.rb
|
484
|
-
- vendor/plugins/refinery/lib/tasks/indexer.rake
|
485
502
|
- vendor/plugins/refinery/lib/tasks/refinery.rake
|
503
|
+
- vendor/plugins/refinery/rails/init.rb
|
486
504
|
- vendor/plugins/refinery_dialogs/app/controllers/admin/dialogs_controller.rb
|
487
505
|
- vendor/plugins/refinery_dialogs/app/views/admin/dialogs/show.html.erb
|
488
506
|
- vendor/plugins/refinery_dialogs/app/views/layouts/admin_dialog.html.erb
|
@@ -513,8 +531,8 @@ homepage: http://refinerycms.com
|
|
513
531
|
licenses: []
|
514
532
|
|
515
533
|
post_install_message:
|
516
|
-
rdoc_options:
|
517
|
-
|
534
|
+
rdoc_options:
|
535
|
+
- --charset=UTF-8
|
518
536
|
require_paths:
|
519
537
|
- lib
|
520
538
|
required_ruby_version: !ruby/object:Gem::Requirement
|