Permalink
Browse files

make liquid and redcloth gem dependencies

  • Loading branch information...
kookster committed Apr 23, 2012
1 parent 74f7383 commit 83d17edef28468bedba84ddf001dece55678e14a
View
@@ -1,5 +1,7 @@
Copyright (c) 2006 Matthew McCray [ http://www.mattmccray.com ]
+MIT License
+
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
"Software"), to deal in the Software without restriction, including
View
@@ -1,3 +1,6 @@
+#!/usr/bin/env rake
+require "bundler/gem_tasks"
+
require 'rake'
require 'rake/tasklib'
require 'rake/testtask'
View
@@ -1,7 +1,7 @@
-author: Matt McCray
+author: 'Matt McCray, Andrew Kuklewicz'
summary: A micro CMS for embedding in Rails applications.
homepage: http://comatose.rubyforge.org
-plugin: git://github.com/darthapo/comatose.git
+plugin: git://github.com/PRX/comatose.git
license: MIT
version: 2.0.5
-rails_version: 2+
+rails_version: 3+
View
@@ -1,106 +1,23 @@
-# Generated on Tue May 20 20:13:12 -0500 2008
-Gem::Specification.new do |s|
- s.name = "comatose"
- s.version = "2.0.5"
- s.date = "2008-10-31" # 2008-05-20
- s.summary = "Micro CMS designed for being embedded into existing Rails applications"
- s.email = "matt@elucidata.net"
- s.rubyforge_project = 'comatose'
- s.homepage = "http://comatose.rubyforge.org"
- s.description = "Comatose is a micro CMS designed for being embedded into existing Rails applications."
- s.authors = ["M@ McCray"]
- s.bindir = 'bin'
- s.executables = ['comatose']
+# -*- encoding: utf-8 -*-
+require File.expand_path('../lib/comatose/version', __FILE__)
+
+Gem::Specification.new do |gem|
+ gem.authors = ["M@ McCray", "kookster"]
+ gem.email = ["matt@elucidata.net", "andrew@beginsinwonder.com"]
+ gem.description = "Comatose is a micro CMS designed for being embedded into existing Rails 3 applications."
+ gem.summary = "Micro CMS designed for being embedded into existing Rails 3 applications"
+ gem.homepage = "http://comatose.rubyforge.org"
+
+ gem.files = `git ls-files`.split($\)
+ gem.executables = gem.files.grep(%r{^bin/}).map{ |f| File.basename(f) }
+ gem.test_files = gem.files.grep(%r{^(test|spec|features)/})
+ gem.name = "comatose"
+ gem.require_paths = ["lib"]
+ gem.version = Comatose::VERSION
- s.files = ["CHANGELOG",
- "INSTALL",
- "LICENSE",
- "MANIFEST",
- "README.markdown",
- "Rakefile",
- "SPECS",
- "about.yml",
- "bin/comatose",
- "comatose.gemspec",
- "init.rb",
- "install.rb",
- "lib/acts_as_versioned.rb",
- "lib/comatose/comatose_drop.rb",
- "lib/comatose/configuration.rb",
- "lib/comatose/page_wrapper.rb",
- "lib/comatose/processing_context.rb",
- "lib/comatose/tasks/admin.rb",
- "lib/comatose/tasks/data.rb",
- "lib/comatose/tasks/setup.rb",
- "lib/comatose/version.rb",
- "lib/comatose.rb",
- "lib/comatose_admin_controller.rb",
- "lib/comatose_admin_helper.rb",
- "lib/comatose_controller.rb",
- "lib/comatose_helper.rb",
- "lib/comatose_page.rb",
- "lib/liquid/block.rb",
- "lib/liquid/context.rb",
- "lib/liquid/document.rb",
- "lib/liquid/drop.rb",
- "lib/liquid/errors.rb",
- "lib/liquid/extensions.rb",
- "lib/liquid/file_system.rb",
- "lib/liquid/htmltags.rb",
- "lib/liquid/standardfilters.rb",
- "lib/liquid/standardtags.rb",
- "lib/liquid/strainer.rb",
- "lib/liquid/tag.rb",
- "lib/liquid/template.rb",
- "lib/liquid/variable.rb",
- "lib/liquid.rb",
- "lib/redcloth.rb",
- "lib/support/class_options.rb",
- "lib/support/inline_rendering.rb",
- "lib/support/route_mapper.rb",
- "lib/text_filters/markdown.rb",
- "lib/text_filters/markdown_smartypants.rb",
- "lib/text_filters/none.rb",
- "lib/text_filters/rdoc.rb",
- "lib/text_filters/simple.rb",
- "lib/text_filters/textile.rb",
- "lib/text_filters.rb",
- "resources/layouts/comatose_admin_template.html.erb",
- "resources/public/images/collapsed.gif",
- "resources/public/images/expanded.gif",
- "resources/public/images/no-children.gif",
- "resources/public/images/page.gif",
- "resources/public/images/spinner.gif",
- "resources/public/images/title-hover-bg.gif",
- "resources/public/javascripts/comatose_admin.js",
- "resources/public/stylesheets/comatose_admin.css",
- "views/comatose_admin/_form.html.erb",
- "views/comatose_admin/_page_list_item.html.erb",
- "views/comatose_admin/delete.html.erb",
- "views/comatose_admin/edit.html.erb",
- "views/comatose_admin/index.html.erb",
- "views/comatose_admin/new.html.erb",
- "views/comatose_admin/reorder.html.erb",
- "views/comatose_admin/versions.html.erb",
- "views/layouts/comatose_admin.html.erb",
- "views/layouts/comatose_admin_customize.html.erb",
- "views/layouts/comatose_content.html.erb"]
-
- s.test_files = ["test/behaviors.rb",
- "test/fixtures/comatose_pages.yml",
- "test/functional/comatose_admin_controller_test.rb",
- "test/functional/comatose_controller_test.rb",
- "test/javascripts/test.html",
- "test/javascripts/test_runner.js",
- "test/test_helper.rb",
- "test/unit/class_options_test.rb",
- "test/unit/comatose_page_test.rb",
- "test/unit/processing_context_test.rb",
- "test/unit/text_filters_test.rb"]
-
- s.rdoc_options = ["--main", "README.markdown"]
- s.extra_rdoc_files = %w(README.markdown CHANGELOG SPECS LICENSE)
- s.add_dependency("acts_as_tree_rails3")
- s.add_dependency("acts_as_versioned")
- s.add_dependency("dynamic_form")
+ gem.add_dependency("acts_as_tree_rails3")
+ gem.add_dependency("acts_as_versioned")
+ gem.add_dependency("dynamic_form")
+ gem.add_dependency("liquid")
+ gem.add_dependency("RedCloth")
end
@@ -1,60 +0,0 @@
-require 'rake'
-require 'rake/tasklib'
-
-namespace :comatose do
- #
- # Customization Tasks
- #
- namespace :admin do
-
- desc "Create Comatose views, layouts, and public files..."
- task :customize do
- puts "Copying public files..."
- plugin_dir = File.join(File.dirname(__FILE__), '../../..')
- FileUtils.cp(
- Dir[File.join(plugin_dir, 'resources', 'public', 'stylesheets', '*.css')],
- File.join(Rails.root.to_s, 'public', 'stylesheets'),
- :verbose => true
- )
- FileUtils.cp(
- Dir[File.join(plugin_dir, 'resources', 'public', 'javascripts', '*.js')],
- File.join(Rails.root.to_s, 'public', 'javascripts'),
- :verbose => true
- )
- puts "Copying application views..."
- FileUtils.mkdir_p(File.join(RAILS_ROOT, 'app', 'views', 'comatose_admin'))
- FileUtils.cp(
- Dir[File.join(plugin_dir, 'views', 'comatose_admin', '*.html.erb')],
- File.join(Rails.root.to_s, 'app', 'views', 'comatose_admin'),
- :verbose => true
- )
- puts "Copying application layout..."
- FileUtils.cp(
- File.join(plugin_dir, 'views', 'layouts', 'comatose_admin_customize.html.erb'),
- File.join(Rails.root.to_s, 'app', 'views', 'layouts', 'comatose_admin.html.erb'),
- :verbose => true
- )
- puts "Finished."
- end
-
-
- desc "Removes the customized files... It doesn't ask for any confirmation, nor is it Subversion-safe -- so be warned!"
- task :teardown do
- puts "Removing public files..."
- FileUtils.rm(
- File.join(Rails.root.to_s, 'public', 'stylesheets', 'comatose_admin.css')
- )
- FileUtils.rm(
- File.join(Rails.root.to_s, 'public', 'javascripts', 'comatose_admin.js')
- )
-
- puts "Removing application views..."
- FileUtils.rm_rf(
- File.join(Rails.root.to_s, 'app', 'views', 'comatose_admin')
- )
- FileUtils.rm(
- File.join(Rails.root.to_s, 'app', 'views', 'layouts', 'comatose_admin.html.erb')
- )
- end
- end
-end
@@ -1,82 +0,0 @@
-require 'rake'
-require 'rake/tasklib'
-
-namespace :comatose do
- #
- # Data Migration Tasks
- #
- namespace :data do
-
- def page_to_hash(page)
- data = page.attributes.clone
- # Pull out the specific, or unnecessary fields
- %w(id parent_id updated_on author position version created_on full_path).each {|key| data.delete(key)}
- if !page.children.empty?
- data['children'] = []
- page.children.each do |child|
- data['children'] << page_to_hash(child)
- end
- end
- data
- end
-
- def hash_to_page_tree(hsh, page)
- child_ary = hsh.delete 'children'
- page.update_attributes(hsh)
- page.save
- child_ary.each do |child_hsh|
- if child_pg = page.children.find_by_slug( child_hsh['slug'] )
- hash_to_page_tree( child_hsh, child_pg )
- else
- hash_to_page_tree( child_hsh, page.children.create )
- end
- end if child_ary
- end
-
- desc "Saves a page tree from page FROM or '' to file TO_FILE or db/comatose-pages.yml"
- task :export do
- require "#{RAILS_ROOT}/config/environment"
-
- root = ENV['FROM'] || ''
- target = ENV['TO_FILE'] || 'db/comatose-pages.yml'
- # Nested hash of the page tree...
- from = ComatosePage.find_by_path(root)
- if from
- data = page_to_hash( from )
- File.open(target, 'w') {|f| f.write data.to_yaml }
- else
- puts "Could not find the page at '#{root}', export aborted!"
- end
-
- puts "Finished."
- end
-
- desc "Loads page tree data FROM_FILE or db/comatose-pages.yml in to TO or ComatosePage.root"
- task :import do
- require "#{RAILS_ROOT}/config/environment"
-
- src = ENV['FROM_FILE'] || 'db/comatose-pages.yml'
- root = ENV['TO'] || ''
- target = (root == '') ? ComatosePage.root : ComatosePage.find_by_path(root)
- data = YAML::load( File.open(src) )
- #hash_to_page(data, target)
- if target
- if root == ''
- hash_to_page_tree(data, target)
- else
- if page = target.children.find_by_slug(data['slug'])
- hash_to_page_tree(data, page)
- else
- hash_to_page_tree(data, target.children.create)
- end
- end
- else
- puts "Could not find the page at '#{root}', import aborted!"
- # TODO: Ask to create the specified path if it doesn't exist?
- end
- puts "Finished."
- end
-
- end
-
-end
@@ -1,52 +0,0 @@
-require 'rake'
-require 'rake/tasklib'
-
-namespace :comatose do
- #
- # Setup Task...
- #
- namespace :setup do
-
- desc "If the installation didn't add the images correctly, use this task"
- task :copy_images do
- plugin_dir = File.join(File.dirname(__FILE__), '..')
- unless FileTest.exist? File.join(RAILS_ROOT, 'public', 'images', 'comatose')
- FileUtils.mkdir( File.join(RAILS_ROOT, 'public', 'images', 'comatose') )
- end
- FileUtils.cp(
- Dir[File.join(plugin_dir, 'resources', 'public', 'images', '*.gif')],
- File.join(RAILS_ROOT, 'public', 'images', 'comatose'),
- :verbose => true
- )
- puts "Finished."
- end
-
- # For use when upgrading...
-
- def move(args)
- if ENV['USE_SVN'] == 'true'
- `svn move #{args}`
- else
- `mv #{args}`
- end
- end
-
- def delete(args)
- if ENV['USE_SVN'] == 'true'
- `svn delete #{args}`
- else
- `rm -rf #{args}`
- end
- end
-
- # TODO: Test the setup:restructure_customization task...
- desc "[EXPERIMENTAL] Restructures customized admin folder to version 0.6 from older version -- Only run this if you have customized the admin. USE_SVN=true if you want to update subversion"
- task :restructure_customization do
- ENV['USE_SVN'] ||= 'false'
- move 'public/javscripts/comatose.js public/javscripts/comatose_admin.js'
- move 'public/stylesheets/comatose.css public/stylesheets/comatose_admin.css'
- move 'app/views/comatose app/views/comatose_admin'
- delete 'app/views/layouts/comatose_content.html.erb'
- end
- end
-end
Oops, something went wrong.

0 comments on commit 83d17ed

Please sign in to comment.