Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
[#487] Upgrade CKeditor
* Replace included CKeditor files with ckeditor-rails gem which is Asset Pipeline ready
* Remove all vendored asset files for ckeditor
* Override default config.js provided by ckeditor.js gem.
* Move CKEditor 'boot' files from vendor into app directory.
* Add gem dependency on ckeditor_rails
* Bump to RC3
  • Loading branch information
peakpg committed Mar 14, 2012
1 parent ce2d1fe commit 255fb97
Show file tree
Hide file tree
Showing 370 changed files with 42 additions and 95,359 deletions.
6 changes: 5 additions & 1 deletion Gemfile.lock
@@ -1,8 +1,9 @@
PATH
remote: .
specs:
browsercms (3.4.0.rc2)
browsercms (3.4.0.rc3)
ancestry (~> 1.2.4)
ckeditor_rails (~> 3.6.2.2)
jquery-rails (~> 1.0.14)
rails (~> 3.1.0)
term-ansicolor
Expand Down Expand Up @@ -61,6 +62,9 @@ GEM
xpath (~> 0.1.4)
childprocess (0.2.2)
ffi (~> 1.0.6)
ckeditor_rails (3.6.2.2)
railties (~> 3.0)
thor (~> 0.14)
cucumber (1.1.0)
builder (>= 2.1.2)
diff-lcs (>= 1.1.2)
Expand Down
@@ -1,13 +1,16 @@
//
// Generic functions for loading WYSIWYG editors for BrowserCMS
// Manifest file for loading the CKeditor JS. Loads it from ckeditor-rails gem.
// See /assets/ckeditor/config.js for default configuration.
//
//= require ckeditor-jquery

jQuery(function($){
$('textarea.editor').each(function(e){
if(editorEnabled()) {
loadEditor(this.id)
}
});
})
});

function editorEnabled() {
return $.cookie('editorEnabled') ? $.cookie('editorEnabled') == "true" : true
Expand Down Expand Up @@ -51,4 +54,4 @@ function loadEditor(id) {
} else {
return false
}
}
}
9 changes: 0 additions & 9 deletions app/assets/javascripts/browsercms/application.js

This file was deleted.

@@ -1,3 +1,5 @@
// Default configuration for the CKeditor in BrowseCMS projects.

CKEDITOR.config.toolbar_CMS = [
['Source','-','Cut','Copy','Paste','PasteText','PasteFromWord','-','SpellChecker','Scayt','-','Undo','Redo','Find','Replace','RemoveFormat','-','NumberedList','BulletedList','Outdent','Indent','HorizontalRule'],
'/',
Expand Down
2 changes: 1 addition & 1 deletion app/assets/javascripts/cms/application.js
@@ -1,5 +1,5 @@
//
// Javascript librarys required for the Admin area of the CMS.
// Javascript libraries required for the Admin area of the CMS.
//
//= require jquery
//= require jquery-ui
Expand Down
19 changes: 10 additions & 9 deletions browsercms.gemspec
Expand Up @@ -2,33 +2,34 @@ require File.dirname(__FILE__) + "/lib/cms/version.rb"

Gem::Specification.new do |s|
s.platform = Gem::Platform::RUBY
s.name = %q{browsercms}
s.name = "browsercms"
s.version = Cms::VERSION

s.authors = ["BrowserMedia"]
s.summary = %q{BrowserCMS is a a general purpose, open source Web Content Management System (CMS), written using Ruby on Rails.}
s.description = %q{Web Content Management in Rails.}
s.email = %q{github@browsermedia.com}
s.extra_rdoc_files = [
"LICENSE.txt",
"README.markdown"
]
s.extra_rdoc_files = %w{
LICENSE.txt
README.markdown
}
s.required_ruby_version = '>= 1.9.2'

s.files = `git ls-files`.split("\n")
s.files -= Dir['test/dummy/*']
s.files -= Dir["test/dummy/*"]
s.files -= Dir["lib/tasks/cucumber.rake"]
s.files -= Dir["lib/tasks/cms.rake"]
s.files -= Dir["lib/tasks/core_tasks.rake"]
s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
s.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }

s.add_dependency('rails', "~> 3.1.0 ")
s.add_dependency "rails", "~> 3.1.0 "
s.add_dependency "ancestry", "~> 1.2.4"
s.add_dependency "ckeditor_rails", "~> 3.6.2.2"
s.add_dependency "jquery-rails", "~> 1.0.14"

# Required only for bcms-upgrade
s.add_dependency('term-ansicolor')
s.add_dependency("jquery-rails", "~> 1.0.14")
s.add_dependency "term-ansicolor"

end

7 changes: 6 additions & 1 deletion lib/cms/engine.rb
Expand Up @@ -2,6 +2,12 @@
require 'cms/module'
require 'cms/init'
require 'browsercms'

# Gem name is different than file name
# Must be required FIRST, so that our assets paths appear before its do.
# This allows app/assets/ckeditor/config.js to set CMS specific defaults.
require 'ckeditor-rails'

module Cms

# Configuring BrowserCMS as an engine. This seems to work, but could probably be cleaned up.
Expand Down Expand Up @@ -35,7 +41,6 @@ class Engine < Rails::Engine
app.config.assets.precompile += ['cms/application.css']
end


def self.add_cms_load_paths
ActiveSupport::Dependencies.autoload_paths += %W( #{self.root}/vendor #{self.root}/app/mailers #{self.root}/app/helpers)
ActiveSupport::Dependencies.autoload_paths += %W( #{self.root}/app/controllers #{self.root}/app/models #{self.root}/app/portlets)
Expand Down
2 changes: 1 addition & 1 deletion lib/cms/version.rb
Expand Up @@ -2,5 +2,5 @@
# Allows the precise version of BrowserCMS to be determined programatically.
#
module Cms
VERSION = "3.4.0.rc2"
VERSION = "3.4.0.rc3"
end
15 changes: 10 additions & 5 deletions test/dummy/config/initializers/quiet_sprocket_assets.rb
@@ -1,8 +1,13 @@
# This removes all the Sprocket asset logging from development log, which makes them much saner.
Rails.application.assets.logger = Logger.new('/dev/null')
Rails::Rack::Logger.class_eval do
def before_dispatch_with_quiet_assets(env)
before_dispatch_without_quiet_assets(env) unless env['PATH_INFO'].index("/assets/") == 0
silence_sprockets = true

if silence_sprockets
Rails.application.assets.logger = Logger.new('/dev/null')
Rails::Rack::Logger.class_eval do
def before_dispatch_with_quiet_assets(env)
before_dispatch_without_quiet_assets(env) unless env['PATH_INFO'].index("/assets/") == 0
end

alias_method_chain :before_dispatch, :quiet_assets
end
alias_method_chain :before_dispatch, :quiet_assets
end
2 changes: 1 addition & 1 deletion todo_list.markdown
@@ -1,12 +1,12 @@
# Working on release of bcms 3.4

Current:
* Test this on a production environment prior to releasing (things like assets and/or config options might be wonky)

Tasks:

* [CMS] Upgrade a 3rd module (with a migration) to confirm the installation and upgrade instructions work correctly.
* Audit the buglist to see what else is getting closed as part of 3.1
* Test this on a production environment prior to releasing (things like assets and/or config options might be wonky)
* Test upgrading a browsercms v3.1.x/3.3.x to 3.4.x
* Write upgrade instructions from 3.1.x/3.3.x to 3.4
* Update Roadmap (https://github.com/browsermedia/browsercms/wiki/Roadmap)
Expand Down
6 changes: 0 additions & 6 deletions vendor/assets/javascripts/bcms/ckeditor.js

This file was deleted.

0 comments on commit 255fb97

Please sign in to comment.