Changeset 38
- Timestamp:
- 03/31/08 22:44:42 (5 months ago)
- Files:
-
- trunk/malline (modified) (1 prop)
- trunk/malline/README (modified) (1 diff)
- trunk/malline/Rakefile (modified) (1 diff)
- trunk/malline/init.rb (modified) (1 diff)
- trunk/malline/lib/malline.rb (modified) (2 diffs)
- trunk/malline/lib/malline/rails.rb (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/malline
- Property svn:ignore set to
pkg
- Property svn:ignore set to
trunk/malline/README
r36 r38 1 Malline 1.0. 11 Malline 1.0.2 2 2 ============= 3 3 trunk/malline/Rakefile
r29 r38 21 21 rdoc.rdoc_files.include('lib/**/*.rb') 22 22 end 23 24 summary = <<-EOF 25 Malline is a full-featured pure Ruby template system designed to be 26 a replacement for ERB views in Rails or any other framework. See 27 http://www.malline.org/ for more info. 28 EOF 29 30 desc = <<-EOF 31 Malline is a full-featured template system designed to be 32 a replacement for ERB views in Rails or any other framework. 33 It also includes standalone bin/malline to compile Malline 34 templates to XML in commandline. All Malline templates are 35 pure Ruby, see http://www.malline.org/ for more info. 36 EOF 37 38 begin 39 require 'rubygems' 40 require 'rake/gempackagetask' 41 PKG_FILES = FileList['lib/**/*.rb', 'bin/*', 'COPYING*', 'README', 'scripts/*rb', 'test/*', 'test/examples/*'] 42 PKG_VERSION = File.read('README').scan(/^Malline (\d+\.\d+\.\d+)/).first.first 43 spec = Gem::Specification.new do |s| 44 s.author = 'Riku Palomäki' 45 s.autorequire = 'malline' 46 s.email = 'riku@palomaki.fi' 47 s.executables = ['malline'] 48 s.extra_rdoc_files = ['README'] 49 s.files = PKG_FILES.to_a 50 s.homepage = 'http://www.malline.org/' 51 s.name = 'malline' 52 s.rubyforge_project = 'malline' 53 s.summary = summary 54 s.test_file = 'test/malline_test.rb' 55 s.version = PKG_VERSION 56 s.description = desc 57 end 58 59 Rake::GemPackageTask.new(spec) do |pkg| 60 pkg.need_zip = true 61 pkg.need_tar = true 62 end 63 rescue LoadError => e 64 warn e.message 65 warn 'Warning: Package building is disabled because of missing libs' 66 end trunk/malline/init.rb
r29 r38 1 # This file is required by Rails if using a Malline plugin 1 2 require 'malline' 2 ActionView::Base.register_template_handler 'mn', Malline::Base 3 require 'malline/rails' trunk/malline/lib/malline.rb
r35 r38 19 19 require 'malline/view_wrapper.rb' 20 20 require 'malline/view_xhtml.rb' 21 require 'malline/rails.rb'22 21 require 'malline/erb_out.rb' 23 22 require 'malline/form_builder.rb' … … 25 24 26 25 module Malline 26 VERSION = '1.0.2' 27 27 28 # Template-handler class that is registered to ActionView and initialized by it. 28 29 class Base trunk/malline/lib/malline/rails.rb
r35 r38 15 15 # You should have received a copy of the GNU Lesser General Public License 16 16 # along with Malline. If not, see <http://www.gnu.org/licenses/>. 17 18 require 'malline' unless Kernel.const_defined?('Malline') 19 20 ActionView::Base.register_template_handler 'mn', Malline::Base 17 21 18 22 module ActionView … … 38 42 tmp 39 43 end 40 end if const_defined?('Base')44 end 41 45 end
