39 Commits

Author SHA1 Message Date
Josh Hagins
9c519bbdbc keg_relocate: refactor relocate_text_files
Replace relocate_text_files with three methods that clarify intent:
replace_locations_with_placeholders, replace_placeholders_with_locations
and replace_text_in_files, the first two calling the third.
2016-10-24 16:21:08 -04:00
Josh Hagins
c46155aba4 keg_relocate: cache files rewritten during brew bottle
`brew bottle` replaces instances of the Homebrew prefix, cellar, and
repository with placeholders in all text files. Cache these files in
INSTALL_RECEIPT.json so that we don't have to check every single text
file for placeholders on install.
2016-10-24 16:21:08 -04:00
Markus Reiter
31ec04704a Move cask fixtures to test/fixtures/cask. 2016-10-24 15:52:41 +02:00
Alyssa Ross
cd615acd5f tab: don't interpret unknown deps as no deps 2016-10-11 09:00:39 +01:00
Alyssa Ross
28f707c907 tab: test tap runtime dependencies 2016-09-19 21:03:55 +01:00
Alyssa Ross
41e25209f7 Save runtime dependencies in INSTALL_RECEIPT.json
Fixes #930
2016-09-19 20:53:39 +01:00
Mike McQuaid
3982950e61 rubocop --auto-correct all hash-rocket usage. 2016-09-17 16:14:13 +01:00
Mike McQuaid
e24a890e59 test/test_tab: fix Rubocop warnings. 2016-09-11 21:48:06 +01:00
Alyssa Ross
4f1d47bc15 Test source.path on Tab.create and .for_formula 2016-09-07 22:52:29 +01:00
Alyssa Ross
f9e16ee2e0 Combine Tab alias_path with source.path 2016-09-07 22:48:52 +01:00
Alyssa Ross
b90eba8ffd Update Tap for alias_path 2016-09-05 14:26:17 +01:00
Alyssa Ross
65ee5408c3 Replace install_name/install_ref with alias_path 2016-09-05 01:19:08 +01:00
Alyssa Ross
0ef3e1e0dc Preserve alias when installing formulae
Part of #567
2016-09-03 21:16:43 +01:00
Vlad Shablinsky
1114219384
Add tests for Tab versions 2016-08-06 21:25:56 +08:00
Andrea Kao
8ec59253df tests: fix code style issues (#587) 2016-08-06 07:04:59 +02:00
Xu Cheng
b62a2c7e7f
add more test
Closes #514.

Signed-off-by: Xu Cheng <xucheng@me.com>
2016-07-15 19:57:23 +08:00
Mike McQuaid
e316cc9296 Make development tools code cross-platform. 2016-05-08 16:51:22 +01:00
Xu Cheng
deea4c82a4 fix brew tests
Fix the `brew tests` problem caused by core/formula separation.
2016-04-02 21:51:36 +08:00
Xu Cheng
fab16b83e9 tab: add source modified time metadata 2016-01-15 16:26:04 +08:00
Xu Cheng
ed35c18fcf test-tab: tap is a Tap object now
Closes Homebrew/homebrew#46735.

Signed-off-by: Xu Cheng <xucheng@me.com>
2015-12-09 16:57:00 +08:00
Xu Cheng
b124c81697 test_tab: use installed_prefixes 2015-11-29 20:24:30 +08:00
BrewTestBot
13d544e11e Core files style updates.
Closes Homebrew/homebrew#42354.

Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
2015-08-03 13:22:35 +01:00
Xu Cheng
8054161153 test_tab: add test for Tab#spec
Fixes Homebrew/homebrew#42147.
Closes Homebrew/homebrew#42205.

Signed-off-by: Xu Cheng <xucheng@me.com>
2015-07-31 19:44:07 +08:00
Jack Nagel
abb0cb3aa0 Switch to a more useful serialization of tap info
Closes Homebrew/homebrew#37383.
2015-03-14 21:14:37 -04:00
Jack Nagel
35860ac60f Switch to string keys
The OpenStruct initializer accepts both symbols and strings, but any
nested hashes will only allow access via string keys, so let's always
construct the object with strings for consistency.
2015-02-21 18:44:04 -05:00
Jack Nagel
a6b16dfa18 Eliminate conditional 2015-02-21 12:26:14 -05:00
Jack Nagel
4b1028c9e5 Start recording the formula path in the install receipt
Later we can use this information to try and load the formula from the
correct source.
2015-02-18 21:29:17 -05:00
Mike McQuaid
33b3449621 tab: remap deprecated options in tabs.
If a deprecated option is found in a tab, rename it to the new option.
2014-10-19 13:58:52 +01:00
Jack Nagel
c7444d34f7 Use the as_flags method instead of map 2014-08-14 01:00:23 -05:00
Jack Nagel
d443089270 Simplify tab test setup 2014-08-13 17:15:03 -05:00
Jack Nagel
ca3c727267 Stop exposing combined options from the tab 2014-08-09 16:27:57 -05:00
Jack Nagel
618bb9b413 Better assertions in tab test 2014-08-08 23:31:58 -05:00
Jack Nagel
472a2cec1e Avoid using setters in tab tests 2014-08-07 17:39:55 -05:00
Jack Nagel
c904c71792 Fix tab tests 2014-06-30 08:54:47 -05:00
Jack Nagel
07171f5527 Test that the tab round-trips through JSON 2014-06-29 22:18:44 -05:00
Jack Nagel
cd91709120 Fix typo in tab test setup
This is one of the many problems with using OpenStruct.
2014-06-29 22:18:44 -05:00
Jack Nagel
391bc4c981 Normalize paths before calling Tab.from_file 2014-06-29 21:50:08 -05:00
Jack Nagel
4d11def53c Add tests documenting install receipt loading behavior 2014-06-29 21:49:34 -05:00
Jack Nagel
e2e5839a9a Get the Tab class under test 2014-06-29 00:55:56 -05:00