Module: Albacore
- Defined in:
- lib/albacore/albacore_module.rb,
lib/albacore.rb,
lib/albacore/cli.rb,
lib/albacore/dsl.rb,
lib/albacore/facts.rb,
lib/albacore/paket.rb,
lib/albacore/semver.rb,
lib/albacore/cli_dsl.rb,
lib/albacore/logging.rb,
lib/albacore/package.rb,
lib/albacore/project.rb,
lib/albacore/version.rb,
lib/albacore/app_spec.rb,
lib/albacore/cmd_config.rb,
lib/albacore/config_dsl.rb,
lib/albacore/application.rb,
lib/albacore/nuget_model.rb,
lib/albacore/ext/teamcity.rb,
lib/albacore/fpm_app_spec.rb,
lib/albacore/package_repo.rb,
lib/albacore/tasks/release.rb,
lib/albacore/cpack_app_spec.rb,
lib/albacore/task_types/build.rb,
lib/albacore/tasks/albasemver.rb,
lib/albacore/app_spec/defaults.rb,
lib/albacore/app_spec/iis_site.rb,
lib/albacore/task_types/asmver.rb,
lib/albacore/tasks/projectlint.rb,
lib/albacore/tasks/versionizer.rb,
lib/albacore/cross_platform_cmd.rb,
lib/albacore/task_types/nugets_pack.rb,
lib/albacore/task_types/test_runner.rb,
lib/albacore/task_types/nugets_restore.rb,
lib/albacore/errors/command_failed_error.rb,
lib/albacore/errors/invalid_app_spec_error.rb,
lib/albacore/errors/command_not_found_error.rb,
lib/albacore/errors/unfilled_property_error.rb,
lib/albacore/task_types/nugets_authentication.rb
Overview
note: this is a Windows provider
Defined Under Namespace
Modules: AlbaSemVer, Asmver, Build, CliDSL, CmdConfig, ConfigDSL, CrossPlatformCmd, DSL, Ext, Facts, Logging, NugetModel, NugetsAuthentication, NugetsPack, NugetsRestore, Paket, Paths, Tasks, TestRunner, Tools Classes: AppSpec, Application, Cli, CommandFailedError, CommandNotFoundError, ConfigurationNotFoundError, CpackAppSpec, FpmAppSpec, InvalidAppSpecError, Package, PackageRepo, Project, SemVer, UnfilledPropertyError
Constant Summary collapse
- VERSION =
"2.5.1"
Class Method Summary collapse
-
.application ⇒ Object
Accessor for the Albacore application.
-
.define_task(*args, &block) ⇒ Object
Defines a new task with all of what that entails: will call application.define_task.
- .events ⇒ Object
-
.gemfile ⇒ Object
Name of the default Gemfile, used by Cli.
-
.log_level=(level) ⇒ Object
Set the global albacore logging level.
- .publish(event, obj) ⇒ Object
-
.puts(*args) ⇒ Object
Use to write to STDOUT (by default).
-
.rakefile ⇒ Object
Name of default Rakefile, used by Cli.
-
.semver_file ⇒ Object
Name of the default .semver file, used by Cli.
-
.set_application(app) ⇒ Object
set the application – good for testing the infrastructure of albacore by resetting the state after each test.
- .subscribe(event, &block) ⇒ Object
-
.windows? ⇒ Boolean
Gets whether we’re running under Windows.
Class Method Details
.application ⇒ Object
Accessor for the Albacore application. Configuration and similar singleton values will be stored in this instance. Multiple calls will yield the same instance.
12 13 14 |
# File 'lib/albacore/albacore_module.rb', line 12 def application @application ||= Albacore::Application.new end |
.define_task(*args, &block) ⇒ Object
Defines a new task with all of what that entails: will call application.define_task.
40 41 42 43 44 |
# File 'lib/albacore/albacore_module.rb', line 40 def define_task *args, &block args = [caller[0][/`.*'/][1..-2]] if args.nil? or args.empty? # delegate to the application singleton application.define_task *args, &block end |
.events ⇒ Object
56 57 58 |
# File 'lib/albacore/albacore_module.rb', line 56 def events @events ||= {} end |
.gemfile ⇒ Object
Name of the default Gemfile, used by Cli
22 23 24 |
# File 'lib/albacore/albacore_module.rb', line 22 def gemfile 'Gemfile' end |
.log_level=(level) ⇒ Object
Set the global albacore logging level.
47 48 49 |
# File 'lib/albacore/albacore_module.rb', line 47 def log_level= level application.logger.level = level end |
.publish(event, obj) ⇒ Object
66 67 68 69 70 |
# File 'lib/albacore/albacore_module.rb', line 66 def publish event, obj if events.member? event events[event].each { |m| m.call(obj) } end end |
.puts(*args) ⇒ Object
Use to write to STDOUT (by default)
52 53 54 |
# File 'lib/albacore/albacore_module.rb', line 52 def puts *args application.puts *args end |
.rakefile ⇒ Object
Name of default Rakefile, used by Cli
17 18 19 |
# File 'lib/albacore/albacore_module.rb', line 17 def rakefile 'Rakefile' end |
.semver_file ⇒ Object
Name of the default .semver file, used by Cli
27 28 29 |
# File 'lib/albacore/albacore_module.rb', line 27 def semver_file '.semver' end |
.set_application(app) ⇒ Object
set the application – good for testing the infrastructure of albacore by resetting the state after each test
34 35 36 |
# File 'lib/albacore/albacore_module.rb', line 34 def set_application app @application = app end |
.subscribe(event, &block) ⇒ Object
60 61 62 63 64 |
# File 'lib/albacore/albacore_module.rb', line 60 def subscribe event, &block event = event.to_sym unless event.is_a? Symbol events[event] ||= Set.new events[event].add block end |
.windows? ⇒ Boolean
Gets whether we’re running under Windows.
74 75 76 |
# File 'lib/albacore/albacore_module.rb', line 74 def windows? !!::Rake::Win32.windows? end |