lib/omnibus/config.rb in omnibus-5.6.1 vs lib/omnibus/config.rb in omnibus-5.6.6

- old
+ new

@@ -99,22 +99,28 @@ # - Defaults to +/var/cache/omnibus+ on other platforms # # @return [String] default(:base_dir) do if Ohai["platform"] == "windows" - "C:/omnibus-ruby" + File.join(*["C:/omnibus-ruby", cache_suffix].compact) else - "/var/cache/omnibus" + File.join(*["/var/cache/omnibus", cache_suffix].compact) end end # The absolute path to the directory on the virtual machine where # code will be cached. # # @return [String] default(:cache_dir) { File.join(base_dir, "cache") } + # The suffix added (typically the software name) to create a wholly + # separate base cache directory for the software. + # + # @return [String] + default(:cache_suffix, nil) + # The absolute path to the directory on the virtual machine where # git caching will occur and software's will be progressively cached. # # @return [String] default(:git_cache_dir) do @@ -275,11 +281,11 @@ raise MissingRequiredAttribute.new(self, :s3_bucket, "'my_bucket'") end # The S3 access key to use with S3 caching. # - # @return [String] + # @return [String, nil] default(:s3_access_key) do if s3_profile nil else raise MissingRequiredAttribute.new(self, :s3_access_key, "'ABCD1234'") @@ -297,11 +303,11 @@ end end # The AWS credentials profile to use with S3 caching. # - # @return [String] + # @return [String, nil] default(:s3_profile, nil) # The region of the S3 bucket you want to cache software artifacts in. # Defaults to 'us-east-1' # @@ -313,10 +319,15 @@ # The HTTP or HTTPS endpoint to send requests to, when using non-standard endpoint # # @return [String, nil] default(:s3_endpoint, nil) + # Use path style URLs instead of subdomains for S3 URLs + # + # @return [true, false] + default(:s3_force_path_style, false) + # Enable or disable S3 Accelerate support # # @return [true, false] default(:s3_accelerate, false) @@ -369,10 +380,18 @@ # @return [String] default(:artifactory_base_path) do raise MissingRequiredAttribute.new(self, :artifactory_base_path, "'com/mycompany'") end + # Directory pattern for the Artifactory publisher. + # Interpolation of metadata keys is supported. + # + # @example '%{platform}/%{platform_version}/%{arch}/%{basename}' + # + # @return [String] + default(:artifactory_publish_pattern, "%{name}/%{version}/%{platform}/%{platform_version}/%{basename}") + # The path on disk to an SSL pem file to sign requests with. # # @return [String, nil] default(:artifactory_ssl_pem_file, nil) @@ -409,28 +428,41 @@ # @!group S3 Publisher # -------------------------------------------------- # The S3 access key to use for S3 artifact release. # - # @return [String] + # @return [String, nil] default(:publish_s3_access_key) do - if s3_profile + if publish_s3_profile nil else raise MissingRequiredAttribute.new(self, :publish_s3_access_key, "'ABCD1234'") end end # The S3 secret key to use for S3 artifact release # - # @return [String] + # @return [String, nil] default(:publish_s3_secret_key) do - if s3_profile + if publish_s3_profile nil else raise MissingRequiredAttribute.new(self, :publish_s3_secret_key, "'EFGH5678'") end end + + # The AWS credentials profile to use with S3 publisher. + # + # @return [String, nil] + default(:publish_s3_profile, nil) + + # Directory pattern for the S3 publisher. + # Interpolation of metadata keys is supported. + # + # @example '%{platform}/%{platform_version}/%{arch}/%{basename}' + # + # @return [String] + default(:s3_publish_pattern, "%{platform}/%{platform_version}/%{arch}/%{basename}") # -------------------------------------------------- # @!endgroup #