You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/extending-caches.md
+8-7Lines changed: 8 additions & 7 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -51,20 +51,21 @@ Caching can be configured by modifying the [`config/cache.yml`][] file in the bu
51
51
The [`DownloadCache`][] is the most generic of the two caches. It allows you to create a cache that persists files any that write access is available. The constructor signature looks the following:
52
52
53
53
```ruby
54
-
# Creates an instance of the cache that is backed by the filesystem rooted at +cache_root+
54
+
# Creates an instance of the cache that is backed by a number of filesystem locations. The first argument
55
+
# (+mutable_cache_root+) is the only location that downloaded files will be stored in.
55
56
#
56
-
#@param[String] cache_root the filesystem root for downloaded files to be cached in
57
-
definitialize(cache_root=Dir.tmpdir)
57
+
#@param[Pathname] mutable_cache_root the filesystem location in which find cached files in. This will also be
58
+
# the location that all downloaded files are written to.
59
+
#@param[Pathname] immutable_cache_roots other filesystem locations to find cached files in. No files will be
The [`ApplicationCache`][] is a cache that persists files into the application cache passed to the `compile` script. It examines `ARGV[1]` for the cache location and configures itself accordingly.
62
66
63
67
```ruby
64
-
# Creates an instance that is configured to use the application cache. The application cache location is defined by
65
-
# the second argument (<tt>ARGV[1]</tt>) to the +compile+ script.
66
-
#
67
-
#@raise if the second argument (<tt>ARGV[1]</tt>) to the +compile+ script is +nil+
68
+
# Creates an instance of the cache that is backed by the the application cache
Copy file name to clipboardExpand all lines: docs/extending-droplet.md
+6-3Lines changed: 6 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -32,7 +32,8 @@ attr_reader :sandbox
32
32
33
33
# Copy resources from a components resources directory to a directory
34
34
#
35
-
#@param[Pathname] target_directory the directory to copy to. Default to a component's +sandbox+
35
+
#@param[Pathname] target_directory the directory to copy to. Defaults to the component's +sandbox+.
36
+
#@return[Void]
36
37
defcopy_resources(target_directory=@sandbox)
37
38
```
38
39
@@ -48,6 +49,7 @@ def as_classpath
48
49
# Symlink the contents of the collection to a destination directory.
49
50
#
50
51
#@param[Pathname] destination the destination to link to
52
+
#@return[Void]
51
53
deflink_to(destination)
52
54
```
53
55
@@ -58,17 +60,18 @@ The id of the component, as determined by the buildpack. This is used in variou
58
60
One of two helper types (`JavaBuildpack::Component::ImmutableJavaHome`, `JavaBuildpack::Component::MutableJavaHome`) that enables the mutation and retrieval of the droplet's `JAVA_HOME`. Components that are JREs will be given the `MutableJavaHome` in order to set the value. All other components will be given the `ImmutableJavaHome` in order to retrieve the value.
59
61
60
62
```ruby
61
-
# Returns the path of +JAVA_HOME+ as an environment variable formatted as +JAVA_HOME="$PWD/<value>"+
63
+
# Returns the path of +JAVA_HOME+ as an environment variable formatted as +JAVA_HOME=$PWD/<value>+
62
64
#
63
65
#@return[String] the path of +JAVA_HOME+ as an environment variable
64
66
defas_env_var
65
67
66
68
# Execute a block with the +JAVA_HOME+ environment variable set
67
69
#
68
70
#@yield yields to block with the +JAVA_HOME+ environment variable set
71
+
#@return[Object] the returned value of the block
69
72
defdo_with
70
73
71
-
#@return[String] the root of the droplet's +JAVA_HOME+
74
+
#@return[String] the root of the droplet's +JAVA_HOME+ formatted as +$PWD/<value>+
Copy file name to clipboardExpand all lines: docs/extending-repositories.md
+5-3Lines changed: 5 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -22,15 +22,17 @@ An example filesystem might look like:
22
22
The main class used when dealing with a repository is [`JavaBuildpack::Repository::ConfiguredItem`][]. It provides a single method that is used to resolve a specific version and its URI.
23
23
24
24
```ruby
25
-
# Finds an instance of the file based on the configuration.
25
+
# Finds an instance of the file based on the configuration and wraps any exceptions
26
+
# to identify the component.
26
27
#
28
+
#@param[String] component_name the name of the component
27
29
#@param[Hash] configuration the configuration
28
30
#@optionconfiguration[String] :repository_root the root directory of the repository
29
31
#@optionconfiguration[String] :version the version of the file to resolve
30
32
#@param[Block, nil] version_validator an optional version validation block
31
-
#@return[JavaBuildpack::Util::TokenizedVersion] the chosen version of the file
32
33
#@return[String] the URI of the chosen version of the file
33
-
deffind_item(configuration, &version_validator)
34
+
#@return[JavaBuildpack::Util::TokenizedVersion] the chosen version of the file
0 commit comments