Class: Jeweler::RubyforgeTasks
- Inherits:
-
Rake::TaskLib
- Object
- Rake::TaskLib
- Jeweler::RubyforgeTasks
- Defined in:
- lib/jeweler/rubyforge_tasks.rb
Instance Attribute Summary collapse
-
#jeweler ⇒ Object
Returns the value of attribute jeweler.
-
#project ⇒ Object
Returns the value of attribute project.
-
#remote_doc_path ⇒ Object
Returns the value of attribute remote_doc_path.
Instance Method Summary collapse
- #define ⇒ Object
-
#initialize {|_self| ... } ⇒ RubyforgeTasks
constructor
A new instance of RubyforgeTasks.
Constructor Details
#initialize {|_self| ... } ⇒ RubyforgeTasks
Returns a new instance of RubyforgeTasks.
11 12 13 14 15 16 17 18 19 20 |
# File 'lib/jeweler/rubyforge_tasks.rb', line 11 def initialize yield self if block_given? self.jeweler = Rake.application.jeweler self.remote_doc_path ||= jeweler.gemspec.name self.project ||= jeweler.gemspec.rubyforge_project define end |
Instance Attribute Details
#jeweler ⇒ Object
Returns the value of attribute jeweler.
9 10 11 |
# File 'lib/jeweler/rubyforge_tasks.rb', line 9 def jeweler @jeweler end |
#project ⇒ Object
Returns the value of attribute project.
8 9 10 |
# File 'lib/jeweler/rubyforge_tasks.rb', line 8 def project @project end |
#remote_doc_path ⇒ Object
Returns the value of attribute remote_doc_path.
8 9 10 |
# File 'lib/jeweler/rubyforge_tasks.rb', line 8 def remote_doc_path @remote_doc_path end |
Instance Method Details
#define ⇒ Object
22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 |
# File 'lib/jeweler/rubyforge_tasks.rb', line 22 def define namespace :rubyforge do desc "Release gem and RDoc documentation to RubyForge" task :release => ["rubyforge:release:gem", "rubyforge:release:docs"] namespace :release do desc "Publish RDoc to RubyForge." task :docs => [:rdoc] do config = YAML.load( File.read(File.('~/.rubyforge/user-config.yml')) ) host = "#{config['username']}@rubyforge.org" remote_dir = "/var/www/gforge-projects/#{project}/#{remote_doc_path}" local_dir = 'rdoc' sh %{rsync -av --delete #{local_dir}/ #{host}:#{remote_dir}} end end end end |