Skip to content

Commit

Permalink
Merge branch 'japanese', remote branch 'mainline/master' into japanese
Browse files Browse the repository at this point in the history
  • Loading branch information
BanzaiMan committed Feb 17, 2011
2 parents 0a7aefb + 42984c9 commit f2ae288
Show file tree
Hide file tree
Showing 11 changed files with 19 additions and 17 deletions.
2 changes: 1 addition & 1 deletion Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ GEM
cucumber (>= 0.8.0)
culerity (0.2.15)
database_cleaner (0.6.3)
devise (1.1.5)
devise (1.1.7)
bcrypt-ruby (~> 2.1.2)
warden (~> 1.0.2)
diff-lcs (1.1.2)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ def self.up
t.datetime "created_at"
end

add_index ::Slug.table_name, ["name", "sluggable_type", "scope", "sequence"], :name => "index_#{::Slug.table_name}_on_name_sluggable_type_scope_and_sequence", :unique => true
add_index ::Slug.table_name, ["name", "sluggable_type", "scope", "sequence"], :name => "index_#{::Slug.table_name}_on_n_s_s_and_s", :unique => true
add_index ::Slug.table_name, ["sluggable_id"], :name => "index_#{::Slug.table_name}_on_sluggable_id"
end

Expand Down
4 changes: 2 additions & 2 deletions core/lib/generators/refinerycms_generator.rb
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ def generate
Refinery.roots('core').join('public', 'stylesheets', ss)
}.reject{|ss| !ss.file?}.each do |stylesheet|
copy_file stylesheet,
Rails.root.join('public', 'stylesheets', stylesheet.split.last),
Rails.root.join('public', 'stylesheets', stylesheet.basename),
:verbose => true
end
copy_file Refinery.roots('core').join('public', 'javascripts', 'admin.js'),
Expand Down Expand Up @@ -91,7 +91,7 @@ def generate
self.options = force_options
# Seeds and migrations now need to be copied from their various engines.
existing_source_root = self.class.source_root
::Refinery::Plugins.registered.pathnames.reject{|p| !p.join('db').directory?}.sort.each do |pathname|
::Refinery::Plugins.registered.pathnames.reject{|p| !p.join('db').directory?}.each do |pathname|
self.class.source_root pathname
super
end
Expand Down
6 changes: 3 additions & 3 deletions core/lib/refinery/plugins.rb
Original file line number Diff line number Diff line change
Expand Up @@ -30,15 +30,15 @@ def in_menu
end

def names
self.collect { |p| p.name }
self.map(&:name)
end

def pathnames
self.collect { |p| p.pathname }.compact.uniq
self.map(&:pathname).compact.uniq
end

def titles
self.collect { |p| p.title }
self.map(&:title)
end

class << self
Expand Down
4 changes: 2 additions & 2 deletions core/lib/tasks/refinery.rake
Original file line number Diff line number Diff line change
Expand Up @@ -187,15 +187,15 @@ namespace :refinery do
Rails.root.join("db", "migrate").mkpath
migrations = Pathname.glob(Refinery.roots.map{|r| r.join("db", "migrate", "*.rb")}).reject{|m|
m.to_s =~ %r{\d+_create_refinerycms_.+?_schema\.rb} or
Dir[Rails.root.join('db', 'migrate', "*#{m.split.last.to_s.split(/\d+_/).last}")].any?
Dir[Rails.root.join('db', 'migrate', "*#{m.basename.to_s.split(/\d+_/).last}")].any?
}
FileUtils::cp migrations,
Rails.root.join('db', 'migrate').cleanpath.to_s,
:verbose => verbose

Rails.root.join("db", "seeds").mkpath
Pathname.glob(Refinery.roots.map{|r| r.join('db', 'seeds', '*.rb')}).each do |seed|
unless (destination = Rails.root.join('db', 'seeds', seed.split.last)).exist?
unless (destination = Rails.root.join('db', 'seeds', seed.basename)).exist?
FileUtils::cp seed, destination.to_s, :verbose => verbose
end
end
Expand Down
2 changes: 1 addition & 1 deletion dashboard/config/locales/de.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
de:
plugins:
refinery_dashboard:
title: Armaturenbrett
title: Übersicht
description: Gibt eine Übersicht über Aktivitäten in Refinery
admin:
dashboard:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ def self.up
t.datetime "created_at"
end

add_index ::Slug.table_name, ["name", "sluggable_type", "scope", "sequence"], :name => "index_#{::Slug.table_name}_on_name_sluggable_type_scope_and_sequence", :unique => true
add_index ::Slug.table_name, ["name", "sluggable_type", "scope", "sequence"], :name => "index_#{::Slug.table_name}_on_n_s_s_and_s", :unique => true
add_index ::Slug.table_name, ["sluggable_id"], :name => "index_#{::Slug.table_name}_on_sluggable_id"
end
end
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@ def self.up
t.integer "lft"
t.integer "rgt"
t.integer "depth"
t.string "cached_slug"
end

add_index ::Page.table_name, ["depth"], :name => "index_#{::Page.table_name}_on_depth"
Expand Down
6 changes: 4 additions & 2 deletions db/migrate/20101216194133_remove_cached_slug_from_pages.rb
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
class RemoveCachedSlugFromPages < ActiveRecord::Migration
def self.up
remove_column :pages, :cached_slug
if ::Page.column_names.map(&:to_s).include?('cached_slug')
remove_column ::Page.table_name, :cached_slug
end
end

def self.down
add_column :pages, :cached_slug, :string
# Don't add this column back, it breaks stuff.
end
end
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@ def self.up
t.integer "lft"
t.integer "rgt"
t.integer "depth"
t.string "cached_slug"
end

add_index ::Page.table_name, ["depth"], :name => "index_#{::Page.table_name}_on_depth"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
class RemoveCachedSlugFromPages < ActiveRecord::Migration
def self.up
remove_column :pages, :cached_slug
if ::Page.column_names.map(&:to_s).include?('cached_slug')
remove_column ::Page.table_name, :cached_slug
end
end

def self.down
add_column :pages, :cached_slug, :string
# Don't add this column back, it breaks stuff.
end
end

0 comments on commit f2ae288

Please sign in to comment.