Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Let users add arbitrary configuration to tests #213

Merged
merged 4 commits into from
Feb 12, 2015
Merged

Conversation

gfontenot
Copy link
Member

This adds the extra_test_config key to the liftoffrc. This key acts
similarly to the extra_config key, but adds arbitrary configuration to the
test target. If more than one test target exists, the user will be given the
chance to select the target they would like to modify.

Fixes #193

This adds the `extra_test_config` key to the `liftoffrc`. This key acts
similarly to the `extra_config` key, but adds arbitrary configuration to
the test target. If more than one test target exists, the user will be
given the chance to select the target they would like to modify.
end
def perform_extra_config(app_config, test_config)
[app_config, test_config].each do |config|
if config
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You could do .compact.each to remove this if statement. .compact removes nils.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How functional!

I'm a dummy and this didn't actually work before. Now it does. Huzzah!
@@ -7,6 +7,12 @@ def []=(key, value)
configuration.build_settings[key] = value
end
end

def merge!(hash)
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@gfontenot
Copy link
Member Author

@gabebw I'm going to merge this unless you had any other comments.

if config
config.each do |name, settings|
if name.downcase == "all"
object = target
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should this now be application_target?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nope, it's whatever target we've associated with the config on line 56.

@gabebw
Copy link
Contributor

gabebw commented Feb 12, 2015

👍

@gfontenot gfontenot merged commit d3eb4af into master Feb 12, 2015
@gfontenot
Copy link
Member Author

merged as a159489

@gfontenot gfontenot deleted the gf-test-settings branch February 13, 2015 20:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Feature] Change build settings (extra_config) in UnitTests target too
3 participants