Rakefile in masterview_gem_pack-0.3.2 vs Rakefile in masterview_gem_pack-0.3.3
- old
+ new
@@ -210,10 +210,11 @@
desc 'Copy duplicated files - copy files that are duplicated between packages'
task :copy_duplicated_files do
copy_if_different 'init.rb', 'generators/masterview_plugin/templates/init.rb'
copy_if_different 'tasks/masterview.rake', 'generators/masterview_plugin/templates/masterview.rake'
copy_if_different 'lib/masterview/extras/app/views/masterview/admin/empty.rhtml', 'generators/masterview_plugin/templates/empty.rhtml'
+ copy_if_different 'examples/rails_app_admin_auth/admin_auth_mixin.rb', 'generators/masterview_plugin/templates/admin_auth_mixin.rb'
copy_if_different 'examples/rails_app_config/masterview/settings.rb', 'generators/masterview_plugin/templates/settings.rb'
copy_if_different 'examples/rails_app_config/masterview/environment/development.rb', 'generators/masterview_plugin/templates/development.rb'
copy_if_different 'examples/rails_app_config/masterview/environment/production.rb', 'generators/masterview_plugin/templates/production.rb'
end
@@ -633,35 +634,59 @@
end
end
desc "Publish news on RubyForge"
-task :publish_news => [ :verify_rubyforge, :tar, :gem, :demotar] do
- Rake::XForge::NewsPublisher.new(Ruby_PDF) do |news|
+task :publish_news => [ :verify_rubyforge] do
+ Rake::XForge::NewsPublisher.new(MASTERVIEW) do |news|
news.user_name = ENV['RUBYFORGE_USER']
news.password = ENV['RUBYFORGE_PASSWORD']
- news.subject = "PDF::Writer #{PDF::Writer::VERSION} Released"
+ news.subject = "MasterView #{MasterView::VERSION::STRING} Rails-optimized (x)html template engine"
news.changes_file = nil
details = []
- File.open("Release-Announcement") do |file|
+ File.open("ReleaseAnnouncement") do |file|
file.each do |line|
line.chomp!
break if line =~ /^=/
details << line
end
end
news.details = details.join("\n")
end
end
-desc "Post a release announcement via GMail."
-#task :email_announcement => [ :verify_gmail, :tar, :gem, :demotar] do
-task :email_announcement => [ :verify_gmail ] do
+# encapsulate gmail email call
+# takes mail_to address using form - Foo <foo@bar.com>
+def email_announcement_to(mail_to)
require 'gmailer'
+ puts "Emailing #{mail_to}"
GMailer.connect(ENV["GMAIL_USER"], ENV["GMAIL_PASSWORD"]) do |gmail|
- gmail.send :to => "ruby-talk@ruby-lang.org",
- :subject => "[ANN] PDF::Writer #{PDF::Writer::VERSION}",
- :body => File.read("Release-Announcement")
+ gmail.send :to => mail_to,
+ :subject => "[ANN] MasterView #{MasterView::VERSION::STRING} Rails-optimized (x)html template engine",
+ :body => File.read("ReleaseAnnouncement")
end
+end
+desc "Post a release announcement via GMail to all mailing lists"
+task :email_announcements => [ :email_ruby, :email_rails, :email_masterview, :email_stl ]
+
+
+task :email_ruby => [ :verify_gmail ] do
+ email_announcement_to "Ruby-Talk <ruby-talk@ruby-lang.org>"
end
+
+task :email_rails => [ :verify_gmail ] do
+ email_announcement_to "Ruby on Rails - Talk <rubyonrails-talk@googlegroups.com>"
+end
+
+task :email_masterview => [ :verify_gmail ] do
+ email_announcement_to "MasterView-Devel <masterview-devel@rubyforge.org>"
+ email_announcement_to "MasterView-Users <masterview-users@rubyforge.org>"
+ email_announcement_to "MasterView-Announce <masterview-announce@rubyforge.org>"
+end
+
+task :email_stl => [ :verify_gmail ] do
+ email_announcement_to "St. Louis Ruby Users <stlruby@googlegroups.com>"
+end
+
+