Rakefile in masterview_gem_pack-0.2.5 vs Rakefile in masterview_gem_pack-0.3.0

- old
+ new

@@ -105,56 +105,56 @@ desc 'Run parser on masterview html templates in examples' namespace 'dev' do task :mvparse_examples do - template_mio_tree = MasterView::FileMIOTree.new('examples', '.html', :logging => true ) - output_mio_tree = MasterView::FileMIOTree.new('tmp/views', '.rhtml', :logging => true ) + template_mio_tree = MasterView::MIO::FileMIOTree.new('examples', '.html', :logging => true ) + output_mio_tree = MasterView::MIO::MFileMIOTree.new('tmp/views', '.rhtml', :logging => true ) template_mio_tree.find(:pattern => '*.html') do |mio| MasterView::Parser.parse_mio( mio, output_mio_tree ) end end end # Run syntax check on all ruby code files desc 'Run syntax check on all ruby code files' namespace 'dev' do -task :check_syntax do +task :check_syntax do #WAS: filelist = Dir.glob('**/*.rb') #skip: generators - erb-ized code templates confuse the parser filelist = [ 'init.rb', 'lib/masterview.rb' ] filelist.concat Dir.glob('lib/**/*.rb') filelist.concat Dir.glob('test/**/*.rb') filelist.each do |file| output = `ruby -c #{file}` unless output =~ /Syntax OK/ puts "#{file}:" puts " #{output}" - return + return end end puts "#{filelist.length} files checked" - puts 'Syntax OK' + puts 'Syntax OK' end end # Count LOC in plugin lib desc 'Count LOC' namespace 'dev' do task :count_loc do files = 0 lines = 0 codelines = 0 - - #VER1 WAS: Dir.foreach("lib") { |file_name| + + #VER1 WAS: Dir.foreach("lib") { |file_name| #VER1 WAS: next unless file_name =~ /.*rb/ #VER1 WAS: f = File.open("lib/" + file_name) filelist = [ 'init.rb', 'lib/masterview.rb' ] filelist.concat Dir.glob('lib/**/*.rb') #filelist.concat Dir.glob('test**/*.rb') filelist.each { |file_name| - + f = File.open(file_name) files += 1 while line = f.gets lines += 1 @@ -177,11 +177,11 @@ #============================================================================== # Build/Release Tasks #============================================================================== -# Publish beta gem +# Publish beta gem #desc "Publish the gem" #task :publish => [:rdoc, :package] do # Rake::SshFilePublisher.new("foobar.com", "dist/pkg", "pkg", "#{PKG_FILE_NAME}.zip").upload # Rake::SshFilePublisher.new("foobar.com", "dist/pkg", "pkg", "#{PKG_FILE_NAME}.tgz").upload # Rake::SshFilePublisher.new("foobar.com", "dist/gems", "pkg", "#{PKG_FILE_NAME}.gem").upload @@ -219,11 +219,11 @@ desc 'Build all packages' task :package => [ :copy_duplicated_files, # gems (runtime, mv generator, mv plugin generator, 3-in-1 supersaver) - 'masterview:package', + 'masterview:package', 'masterview_generator:package', 'masterview_plugin_generator:package', 'masterview_gem_pack:package', # zip/gzip of full masterview 'masterview_plugin:package' @@ -231,11 +231,11 @@ desc 'Re-build all packages' task :repackage => [ :copy_duplicated_files, # gems (runtime, mv generator, mv plugin generator, 3-in-1 supersaver) - 'masterview:repackage', + 'masterview:repackage', 'masterview_generator:repackage', 'masterview_plugin_generator:repackage', 'masterview_gem_pack:repackage', # zip/gzip of full masterview 'masterview_plugin:repackage' @@ -255,21 +255,20 @@ desc 'Remove all tar.gz / zip / gem build pkg files' task :rm_packages do FileUtils.remove_dir('pkg', true) end -#### -#ISSUE: jeff - we don't include that top-level index.html in any of the packages?! -#### + PKG_FILES_RELEASE_DOCS = [ "[A-Z]*" # README, RELEASE_NOTES, CHANGELOG, MIT_LICENSE, TODO ] PKG_FILES_RUNTIME = [ "lib/**/*", + "lib/**/.metadata", "directives/**/*", #SHOULD THIS GO AWAY (??) - "Rakefile", + "Rakefile", "init.rb" ] PKG_FILES_MV_GENERATOR = [ "generators/masterview/**/*" # generator for creating app template scaffold ] @@ -309,23 +308,23 @@ s.has_rdoc = true s.files = PKG_FILES s.require_path = 'lib' s.autorequire = 'masterview' s.author = "Jeff Barczewski" - s.email = "jeff.barczewski@gmail.com" - s.homepage = "http://masterview.org/" + s.email = "jeff.barczewski (at) gmail (dot) com" + s.homepage = "http://masterview.org/" end # Create Rubygem package Rake::GemPackageTask.new(spec) do |p| p.gem_spec = spec p.need_tar = true p.need_zip = true end desc "Release files on RubyForge." - task :release_files => [ :verify_rubyforge ] do + task :release_files => [ :verify_rubyforge ] do release_files = ["zip", "tgz"].map { |ext| "pkg/#{PKG_FILE_NAME}.#{ext}" } Rake::XForge::Release.new(MASTERVIEW) do |release| release.user_name = ENV['RUBYFORGE_USER'] release.password = ENV['RUBYFORGE_PASSWORD'] @@ -381,23 +380,23 @@ s.extra_rdoc_files = ['README'] s.add_dependency( 'masterview', ">= #{PKG_VERSION}" ) s.add_dependency( 'masterview_generator', ">= #{PKG_VERSION}" ) s.add_dependency( 'masterview_plugin_generator', ">= #{PKG_VERSION}" ) s.author = "Jeff Barczewski" - s.email = "jeff.barczewski@gmail.com" - s.homepage = "http://masterview.org/" + s.email = "jeff.barczewski (at) gmail (dot) com" + s.homepage = "http://masterview.org/" end # Create Rubygem package Rake::GemPackageTask.new(spec) do |p| p.gem_spec = spec p.need_tar = false p.need_zip = false end desc "Release files on RubyForge." - task :release_files => [ :verify_rubyforge ] do + task :release_files => [ :verify_rubyforge ] do release_files = ["gem"].map { |ext| "pkg/#{PKG_FILE_NAME}.#{ext}" } Rake::XForge::Release.new(MASTERVIEW) do |release| release.user_name = ENV['RUBYFORGE_USER'] release.password = ENV['RUBYFORGE_PASSWORD'] @@ -451,23 +450,23 @@ s.files = PKG_FILES s.require_path = 'lib' s.autorequire = 'masterview' s.extra_rdoc_files = ['README'] s.author = "Jeff Barczewski" - s.email = "jeff.barczewski@gmail.com" - s.homepage = "http://masterview.org/" + s.email = "jeff.barczewski (at) gmail (dot) com" + s.homepage = "http://masterview.org/" end # Create Rubygem package Rake::GemPackageTask.new(spec) do |p| p.gem_spec = spec p.need_tar = false p.need_zip = false end desc "Release files on RubyForge." - task :release_files => [ :verify_rubyforge ] do + task :release_files => [ :verify_rubyforge ] do release_files = ["gem"].map { |ext| "pkg/#{PKG_FILE_NAME}.#{ext}" } Rake::XForge::Release.new(MASTERVIEW) do |release| release.user_name = ENV['RUBYFORGE_USER'] release.password = ENV['RUBYFORGE_PASSWORD'] @@ -512,11 +511,11 @@ PKG_FILE_NAME = "#{PKG_NAME}-#{PKG_VERSION}" PKG_DESTINATION = ENV["RAILS_PKG_DESTINATION"] || "../#{PKG_NAME}" RELEASE_NAME = "REL #{PKG_VERSION}" #PKG_INCLUDES = PKG_FILES_MV_GENERATOR #PKG_FILES = FileList.new( PKG_INCLUDES ).exclude( PKG_FILES_EXCLUDE_PATTERN ) - + desc "Package masterview_generator" task :package do work_dir = Dir.getwd Dir.chdir 'generators/masterview' system( "#{RAKE_PROCESSOR} package" ) @@ -530,11 +529,11 @@ system( "#{RAKE_PROCESSOR} repackage" ) Dir.chdir work_dir end desc "Release files on RubyForge." - task :release_files => [ :verify_rubyforge ] do + task :release_files => [ :verify_rubyforge ] do release_files = ["gem"].map { |ext| "pkg/#{PKG_FILE_NAME}.#{ext}" } Rake::XForge::Release.new(MASTERVIEW) do |release| release.user_name = ENV['RUBYFORGE_USER'] release.password = ENV['RUBYFORGE_PASSWORD'] @@ -596,10 +595,10 @@ system( "#{RAKE_PROCESSOR} repackage" ) Dir.chdir work_dir end desc "Release files on RubyForge." - task :release_files => [ :verify_rubyforge ] do + task :release_files => [ :verify_rubyforge ] do release_files = ["gem"].map { |ext| "pkg/#{PKG_FILE_NAME}.#{ext}" } Rake::XForge::Release.new(MASTERVIEW) do |release| release.user_name = ENV['RUBYFORGE_USER'] release.password = ENV['RUBYFORGE_PASSWORD']