aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Homebrew/resource.rb
AgeCommit message (Collapse)Author
2018-01-22resource: allow patches to be appliedilovezfs
2017-06-28Refactor using `Forwardable` and `DelegateClass`.Markus Reiter
2016-11-10Resource: set version to nil if version is nullMisty De Meo
Is this the right fix? This fixes version cascading from the parent.
2016-07-16resource: detect HEAD versionsVlad Shablinsky
2016-06-07Resource.unpack: install invisible files and dirsilovezfs
Since patches sometimes change .gitignore and .travis.yml, it's desirable to install them along with everything else if a resource needs patching. Also, for resources that are git respositories, this allows install to interact with git objects other than the commit specifically checked out. More generally, this may help to avoid subtle issues by preserving the fidelity of resources in cases where invisible dot files play a functional role. Closes #329. Signed-off-by: ilovezfs <ilovezfs@icloud.com>
2016-04-22stage: fix block signature back-compatibility under Ruby 1.8.7Andrew Janke
The new stage() signature introduced by #66 breaks back-compatibility under Ruby 1.8.7. This fixes it by switching back to a one-argument block signature and using a new class to wrap both the Resource and Mktemp info for the staging context, in a signature-back-compatible way. Addresses homebrew/homebrew-core#529. Closes #135. Signed-off-by: Andrew Janke <andrew@apjanke.net>
2016-04-18brew test, install, update-test: add --keep-tmp optionAndrew Janke
Also enables sandbox for --interactive and --debug use of install and test, using automatic retention. Closes #66. Signed-off-by: Andrew Janke <andrew@apjanke.net>
2016-02-01DSL method "apply" to specify patch filesilovezfs
The "apply" DSL method can be called from patch-do blocks to specify the paths within an archive of the desired patch files, which will be applied in the order in which they were supplied to the "apply" calls. If "apply" isn't used, raise an error whenever the extracted directory doesn't contain exactly one file. The "apply" method can be called zero or more times within a patch-do block with the following syntaxes supported: apply "single_apply" apply "multiple_apply_1", "multiple_apply_2" apply [array_of_apply] If apply must be used, a single call using the second syntax above is usually best practice. Each apply leaf should be the relative path to a specific patch file in the extracted directory. For example, if extracting this-v123-patches.tar.gz gives you this-123 this-123/.DS_Store this-123/LICENSE.txt this-123/patches this-123/patches/A.diff this-123/patches/B.diff this-123/patches/C.diff this-123/README.txt and you want to apply only B.diff and C.diff, then you need to use "patches/B.diff" and "patches/C.diff" for the lowest-level apply leaves. The code was provided by Xu Cheng. Any mistakes are mine.
2016-01-15build: store source modified time in tabfileXu Cheng
2015-08-06more core file style updated by rubocopXu Cheng
2015-08-03Core files style updates.BrewTestBot
Closes Homebrew/homebrew#42354. Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
2015-03-05checksums: switch to sha256 for bottles and new formulaeDominyk Tiller
Closes Homebrew/homebrew#37164. Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
2015-01-12Use attr_accessor for checksumJack Nagel
2015-01-08Remove the direct url writer from ResourceJack Nagel
2015-01-06Stop caching the downloader on the resource instanceJack Nagel
2014-12-31Don't attempt to detect version if URL is not setJack Nagel
2014-12-14Revert "Skip temporary directory when target directory is known"Jack Nagel
This reverts commit 028ee18b851497f8aede55004bcdcc5c16f087cc.
2014-12-14Skip temporary directory when target directory is knownJack Nagel
2014-12-13Validate arguments in Resource#stageJack Nagel
2014-12-05Pass the downloader a proxy object instead of the resourceJack Nagel
We need to limit the interface that is exposed to the downloader in order to make future changes easier. This will be important for work on new features, such as selecting a mirror from the command line. In the future, the existing Resource class will probably be split into multiple classes.
2014-12-05Download strategies should return a Pathname from cached_locationJack Nagel
2014-10-10Pull cache creation out of begin blockJack Nagel
2014-10-10Remove redundant commentsJack Nagel
2014-09-01Add Go language module, resourcesMisty De Meo
This introduces a new GoResource category of resource. GoResources have a specialized stage method which allows a resource to stage itself into a gopath. The new Go language module provides a one-liner to stage all GoResources present in the formula.
2014-09-01resource: escape slashes from download_nameMisty De Meo
This is useful to be able to write go resources using their package name as the resource name
2014-07-15Eagerly set the download strategyJack Nagel
2014-05-27Remove support for version "schemes", just pass version objects directlyJack Nagel
I'm not sure why I thought reinventing object instantiation was a good idea.
2014-05-27Remove some evals from formula DSLJack Nagel
The default arguments were removed from these methods long ago, so nothing is standing in the way of using define_method here.
2014-03-18Always use CurlDownloadStrategy for legacy patchesJack Nagel
Fixes Homebrew/homebrew#27671.
2014-03-13New patch implementation and DSLJack Nagel
This commit introduces a new patch implementation that supports checksums and caching. Patches are declared in blocks: patch do url ... sha1 ... end A strip level of -p1 is assumed. It can be overridden using a symbol argument: patch :p0 do url ... sha1 ... end Patches can be declared in stable, devel, and head blocks. This form is preferred over using conditionals. stable do # ... patch do url ... sha1 ... end end Embedded (__END__) patches are declared like so: patch :DATA patch :p0, :DATA Patches can also be embedded by passing a string. This makes it possible to provide multiple embedded patches while making only some of them conditional. patch :p0, "..."
2014-02-18Tweak DownloadError message to include wrapped exceptionJack Nagel
2014-02-18Collapse begin..end into def..end and use else clauseJack Nagel
2014-02-18Add DownloadError to catch a broader range of resource download errors.Drew Rodman
Adding a broader exception class allows for errors raised in Resource.fetch to be caught in upgrade and prevent the process from being killed when a download fails. This should resolve issue 18364. Fixes Homebrew/homebrew#18364. Closes Homebrew/homebrew#26618. Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2014-02-18Inline static exception text to remove a rescueJack Nagel
2013-12-08formula, resource: output when verifying checksum.Mike McQuaid
References Homebrew/homebrew#24566.
2013-11-27resource: convert unpack target to Pathname.Mike McQuaid
2013-11-06resource: only unpack to target if it exists.Mike McQuaid
2013-10-31fetch: clear partial downloads when --force is givenJack Nagel
Fixes Homebrew/homebrew#23764.
2013-10-30Resource: extract unpacking from #stageJack Nagel
Closes Homebrew/homebrew#23768.
2013-10-30Resource: push conditional down into #verify_download_integrityJack Nagel
2013-10-11Resource: do not mutate passed-in specs hashJack Nagel
2013-10-02Pass the mktemp prefix as an argumentJack Nagel
2013-09-23Clean up SoftwareSpec and Resource initializersJack Nagel
2013-09-17Allow partial installation of resourcesJack Nagel
2013-09-17More useful error message for missing checksumsJack Nagel
2013-09-17Reorganize resource download methodsJack Nagel
2013-09-17Move formula resources to SoftwareSpecJack Nagel
2013-09-17Reimplement SoftwareSpec on top of ResourceJack Nagel
2013-09-17Decouple Resource from SoftwareSpecJack Nagel
2013-09-16Cater to download strategies not yielding a fileSamuel Cochran
Closes Homebrew/homebrew#22580. Signed-off-by: Jack Nagel <jacknagel@gmail.com>