class Autobuild::Ruby
Handling of “standard” Ruby
packages
The package is expected to follow the general standards laid down by the bundler guys (i.e. look like a package generated by ‘bundler gem`)
Attributes
The Rake
task that is used to run cleanup. Defaults to “clean”. Set to nil to disable tests for this package
The Rake
task that is used to generate documentation. Defaults to “doc”. Set to nil to disable documentation generation
The Rake
task that is used to set up the package. Defaults to “default”. Set to nil to disable setup altogether
Options that should be passed to the rake task
The Rake
task that is used to run tests. Defaults to “test”. Set to nil to disable tests for this package
Public Class Methods
Source
# File lib/autobuild/packages/ruby.rb, line 22 def initialize(*args) self.rake_setup_task = "default" self.rake_doc_task = "redocs" self.rake_clean_task = "clean" self.rake_test_task = "test" self.rake_test_options = [] super exclude << /\.so$/ exclude << /Makefile$/ exclude << /mkmf.log$/ exclude << /\.o$/ exclude << /doc$/ end
Calls superclass method
Autobuild::ImporterPackage::new
Public Instance Methods
Source
# File lib/autobuild/packages/ruby.rb, line 70 def install progress_start "setting up Ruby package %s", done_message: 'set up Ruby package %s' do invoke_rake end super end
Calls superclass method
Autobuild::Package#install
Source
# File lib/autobuild/packages/ruby.rb, line 61 def invoke_rake(setup_task = rake_setup_task) if setup_task && File.file?(File.join(srcdir, 'Rakefile')) run 'post-install', Autobuild.tool_in_path('ruby'), '-S', Autobuild.tool('rake'), setup_task, working_directory: srcdir end end
Source
# File lib/autobuild/packages/ruby.rb, line 107 def update_environment env_add_prefix srcdir libdir = File.join(srcdir, 'lib') env_add_path 'RUBYLIB', libdir if File.directory?(libdir) end
Source
# File lib/autobuild/packages/ruby.rb, line 37 def with_doc doc_task do progress_start "generating documentation for %s", done_message: 'generated documentation for %s' do run 'doc', Autobuild.tool_in_path('ruby'), '-S', Autobuild.tool('rake'), rake_doc_task, working_directory: srcdir end end end
Source
# File lib/autobuild/packages/ruby.rb, line 49 def with_tests test_utility.task do progress_start "running tests for %s", done_message: 'tests passed for %s' do run 'test', Autobuild.tool_in_path('ruby'), '-S', Autobuild.tool('rake'), rake_test_task, *rake_test_options, working_directory: srcdir end end end