@@ -43,35 +43,32 @@ def initialize(context)
4343 @droplet = context [ :droplet ]
4444 end
4545
46- # @!macro [new] base_component_detect
47- # If the component should be used when staging an application
46+ # If the component should be used when staging an application
4847 #
49- # @return [Array<String>, String, nil] If the component should be used when staging the application, a +String+ or
50- # an +Array<String>+ that uniquely identifies the component (e.g.
51- # +open_jdk=1.7.0_40+). Otherwise, +nil+.
48+ # @return [Array<String>, String, nil] If the component should be used when staging the application, a +String+ or
49+ # an +Array<String>+ that uniquely identifies the component (e.g.
50+ # +open_jdk=1.7.0_40+). Otherwise, +nil+.
5251 def detect
5352 fail "Method 'detect' must be defined"
5453 end
5554
56- # @!macro [new] base_component_compile
57- # Modifies the application's file system. The component is expected to transform the application's file system in
58- # whatever way is necessary (e.g. downloading files or creating symbolic links) to support the function of the
59- # component. Status output written to +STDOUT+ is expected as part of this invocation.
55+ # Modifies the application's file system. The component is expected to transform the application's file system in
56+ # whatever way is necessary (e.g. downloading files or creating symbolic links) to support the function of the
57+ # component. Status output written to +STDOUT+ is expected as part of this invocation.
6058 #
61- # @return [void ]
59+ # @return [Void ]
6260 def compile
6361 fail "Method 'compile' must be defined"
6462 end
6563
66- # @!macro [new] base_component_release
67- # Modifies the application's runtime configuration. The component is expected to transform members of the +context+
68- # (e.g. +@java_home+, +@java_opts+, etc.) in whatever way is necessary to support the function of the component.
64+ # Modifies the application's runtime configuration. The component is expected to transform members of the +context+
65+ # (e.g. +@java_home+, +@java_opts+, etc.) in whatever way is necessary to support the function of the component.
6966 #
70- # Container components are also expected to create the command required to run the application. These components
71- # are expected to read the +context+ values and take them into account when creating the command.
67+ # Container components are also expected to create the command required to run the application. These components
68+ # are expected to read the +context+ values and take them into account when creating the command.
7269 #
73- # @return [void, String] components other than containers are not expected to return any value. Container
74- # components are expected to return the command required to run the application.
70+ # @return [void, String] components other than containers are not expected to return any value. Container
71+ # components are expected to return the command required to run the application.
7572 def release
7673 fail "Method 'release' must be defined"
7774 end
@@ -84,7 +81,7 @@ def release
8481 # @param [JavaBuildpack::Util::TokenizedVersion] version
8582 # @param [String] uri
8683 # @param [String] name an optional name for the download. Defaults to +@component_name+.
87- # @return [void ]
84+ # @return [Void ]
8885 def download ( version , uri , name = @component_name , &block )
8986 download_start_time = Time . now
9087 print "-----> Downloading #{ name } #{ version } from #{ uri } "
@@ -102,7 +99,7 @@ def download(version, uri, name = @component_name, &block)
10299 # @param [String] jar_name the name to save the jar as
103100 # @param [Pathname] target_directory the directory to store the JAR file in. Defaults to the component's sandbox.
104101 # @param [String] name an optional name for the download. Defaults to +@component_name+.
105- # @return [void ]
102+ # @return [Void ]
106103 def download_jar ( version , uri , jar_name , target_directory = @droplet . sandbox , name = @component_name )
107104 download ( version , uri , name ) do |file |
108105 FileUtils . mkdir_p target_directory
@@ -116,7 +113,7 @@ def download_jar(version, uri, jar_name, target_directory = @droplet.sandbox, na
116113 # @param [String] uri the uri of the download
117114 # @param [Pathname] target_directory the directory to expand the TAR file to. Defaults to the component's sandbox.
118115 # @param [String] name an optional name for the download and expansion. Defaults to +@component_name+.
119- # @return [void ]
116+ # @return [Void ]
120117 def download_tar ( version , uri , target_directory = @droplet . sandbox , name = @component_name )
121118 download ( version , uri , name ) do |file |
122119 with_timing "Expanding #{ name } to #{ target_directory . relative_path_from ( @droplet . root ) } " do
@@ -131,7 +128,7 @@ def download_tar(version, uri, target_directory = @droplet.sandbox, name = @comp
131128 # @param [Boolean] strip_top_level whether to strip the top-level directory when expanding. Defaults to +true+.
132129 # @param [Pathname] target_directory the directory to expand the ZIP file to. Defaults to the component's sandbox.
133130 # @param [String] name an optional name for the download. Defaults to +@component_name+.
134- # @return [void ]
131+ # @return [Void ]
135132 def download_zip ( version , uri , strip_top_level = true , target_directory = @droplet . sandbox , name = @component_name )
136133 download ( version , uri , name ) do |file |
137134 with_timing "Expanding #{ name } to #{ target_directory . relative_path_from ( @droplet . root ) } " do
@@ -153,7 +150,7 @@ def download_zip(version, uri, strip_top_level = true, target_directory = @dropl
153150 # Wrap the execution of a block with timing information
154151 #
155152 # @param [String] caption the caption to print when timing starts
156- # @return [void ]
153+ # @return [Void ]
157154 def with_timing ( caption )
158155 start_time = Time . now
159156 print " #{ caption } "
0 commit comments