Commit Graph

34 Commits

Author SHA1 Message Date
Matt Wean 47383169de [WIP] Change artifact behavior to moving instead of symlinking (#13966)
* Change app artifact to move instead of link

First step towards change in installation behavior mentioned in [13201]

* Fix handling of binaries linked from inside of app bundles

Also adds `appdir` method for interpolation in stanzas

* Change appdir to root Applications directory

* Update 2-app tests

* Refactor: add options, ivars to `Installer`, `Download`

In preparation for upcoming changes, this commit cleans up some code. The commit includes:

- In order to reduce unnecessary object passing, make both the `force` and `skip_cask_deps` option into instance variables of the `Installer` class

- Introduce options hashes to initializers of both the `Installer` and `Download` class

- When the `install --force` command enters the fetch phase, make it explicit in the code that fetching is never enforced in that case.

- Update tests

* Force overwrite artifacts on `--force` reinstall

This commit changes the behavior of a `Moved` artifact such that if the target already exists, `brew cask install --force` will remove the existing target before moving the staged artifact.

In that case, the warning message will say *overwriting* instead of *not moving*.

The behavior of plain `brew cask install` remains unchanged; the same goes for the warning message for that case.

* Change remaining artifacts to move instead of symlink

* Update casks to use appdir in binary paths

* Forcibly overwrite artifacts, modifying flags and using `sudo` if needed

- This commit implements [the proposed behavior for `install --force`](https://github.com/caskroom/homebrew-cask/pull/13966#issuecomment-220830387) when a target already exists and has either permission problems or is not owned by the user.

- The changes apply only when the `force` option is given.

- Reused the existing safeguard from the `.pkg` artifact to prevent deleting important directories by bug or mistake

- The two existing blacklists `SYSTEM_DIRS` and `UNDELETABLE_DIRS` have been consolidated into the `Hbc::MacOS` module.

- `UNDELETABLE_DIRS` now also contains all the entries from `SYSTEM_DIRS` which was a to-do anyway.

- The two blacklists are now also frozen for good measure.

- The utility method `permissions_rmtree` was moved to `Hbc::Utils`.

- The `tried_permissions` part in `Utils` now falls back correctly when there are also ownership issues at the same time.

- Introduced a separate `current_user` method for mocking.

- Added an optional feature to `FakeSystemCommand` so it can now act as a proxy to `SystemCommand`.

- Added tests for various `permissions_rmtree` cases.
2016-05-31 15:23:21 -04:00
Alessandro Aresta c31e3dd253 updated macdown (0.6) (#21201) 2016-05-14 02:43:54 -04:00
Victor Popkov c6f353ab59 macdown.rb: fix vendor comment 2016-03-20 17:23:16 -04:00
Vítor Galvão f9949466ce updated macdown (0.6) 2016-03-10 23:12:48 -05:00
Vítor Galvão 7ac5a77393 all casks: removed appcast comment 2016-02-01 14:57:04 +00:00
Vítor Galvão 8dc31e2dbe macdown.rb: added appcast verified comment 2016-01-31 23:39:18 +00:00
Victor Popkov 942eec0f53 macdown.rb: upgrade to v0.5.5.1 2016-01-31 15:39:17 +00:00
Victor Popkov b87519bd7f macdown.rb: upgrade to v0.5.5 2016-01-29 18:26:27 +02:00
Pei-Tang Huang fe6fd23624 Updated MacDown (0.5.4) 2016-01-28 01:09:49 -05:00
Josh Hagins 312ae841f1 Use Ruby 1.9 hash syntax in casks where possible 2016-01-17 21:57:28 -05:00
Vítor Galvão bbc9cc0138 change all appcast casks to use :checkpoint 2016-01-13 19:27:34 +00:00
Josh Hagins feba4ec740 Remove DSL versions from all casks 2015-12-17 20:15:28 -05:00
adityadalal924 473d0be51e updated macdown (0.5.3) 2015-11-17 10:01:32 -05:00
Victor Popkov 93f6ed327d macdown.rb: add name 2015-04-11 21:42:49 +03:00
Tzu-ping Chung 75f45e770a Switch MacDown to use "latest" link 2015-01-22 16:58:47 +08:00
Lincoln Lee 8d39294afb Update macdown to v0.4.1 2014-12-14 17:40:54 +08:00
Tzu-ping Chung 55f027d903 Add zap procedures for MacDown 2014-12-05 15:32:40 +08:00
Roland Walker 76119fbdc4 new-style header in macdown 2014-11-13 12:36:05 -05:00
Brian Fenton 5edfe07ac6 Updating Macdown to version 0.3
Updating appcast sha256 to current
Updating license to MIT
Updating version number and hash
2014-11-09 21:59:09 -08:00
Roland Walker ec10d70b2d add appcast :sha256 in macdown 2014-10-15 20:38:41 -04:00
Roland Walker f680aaf50b add license stanza to macdown 2014-10-01 11:43:17 -04:00
Chulki Lee 17eef14ea4 macdown: 0.2.5.1 2014-09-23 14:10:00 -07:00
Roland Walker 01036d89a1 app stanza in macdown.rb 2014-09-15 12:05:52 -04:00
Roland Walker 0bfbd5b5b3 Update macdown container layout
Fixes #6075
2014-09-08 13:01:05 -04:00
Tzu-ping Chung cd278cce97 Fix SHA 256 hash for MacDown 0.2.4 2014-09-08 16:22:22 +08:00
syscrusher 929503159f Update MacDown to 0.2.4 2014-09-06 16:57:08 -05:00
Richard Lee a08e0e1cfb Update MacDown to 0.2.3 2014-08-19 16:07:25 +08:00
Richard Lee 83dd0616df Update MacDown to 0.2.2 2014-08-15 16:47:21 +08:00
Vítor Galvão ed48ca3ea8 updated macdown (0.2.1) 2014-07-21 01:02:44 +01:00
Vítor Galvão 76ac2d078b made macdown easier to update 2014-06-28 23:59:58 +01:00
elnappo de1f1341d7 Updated Macdown to version 0.1.2 2014-06-29 00:22:30 +02:00
Richard Lee cc8ef6f825 Update MacDown to 0.1.1 2014-06-27 11:33:07 +08:00
Lee Hanxue d23f15309a MacDown 0.1
New cask MacDown, version 0.1 - with appcast xml

Closes #5076
2014-06-26 10:25:54 -07:00
Ephemera e1d432b927 Add MacDown 0.1 2014-06-26 10:35:34 +09:00