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

Add arbitrary configuration settings to liftoffrc #174

Merged
merged 1 commit into from
Sep 30, 2014

Conversation

gfontenot
Copy link
Member

This allows the user to set arbitrary build configurations on a per-build
configuration basis. This is handled by the new extra_config key in
liftoffrc.

Fixes #142 #170 #160

@@ -0,0 +1,23 @@
module Xcodeproj
class Project
def set_project_settings(key, value)
Copy link

Choose a reason for hiding this comment

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

Are you adding a new method to this class? If so, could you extract this to a singleton method in another module/file that takes the project as its argument?

Copy link
Member Author

Choose a reason for hiding this comment

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

This is a new method, yeah. I might just revert this, since it's not actually needed for this PR.

@gfontenot gfontenot force-pushed the gf-arbitrary-settings branch from dc1a0cc to 81bc691 Compare September 30, 2014 14:18
@@ -47,6 +47,27 @@ def add_script_phases(scripts)
end
end

def perform_extra_config(extra_config)
if extra_config
Copy link

Choose a reason for hiding this comment

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

Is extra_config a hash? Can it sometimes be nil? You may want to use the Hash() method: http://www.ruby-doc.org/core-2.1.3/Kernel.html#method-i-Hash

[1] pry(main)> Hash(nil)
=> {}
[2] pry(main)> Hash({})
=> {}
[3] pry(main)> Hash({k: 'v'})
=> {:k=>"v"}

Copy link
Member Author

Choose a reason for hiding this comment

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

It's actually set inside the config file. I was thinking about doing a refactor to make sure that a lot of these variables don't end up nil, but I'm not sure it's worth it since I'm considering porting the entire project to Swift.

This allows the user to set arbitrary build configurations on a
per-build configuration basis. This is handled by the new `extra_config`
key in `liftoffrc`.
@gfontenot gfontenot force-pushed the gf-arbitrary-settings branch from 81bc691 to f09e187 Compare September 30, 2014 18:39
@gfontenot gfontenot merged commit f09e187 into master Sep 30, 2014
@gfontenot gfontenot deleted the gf-arbitrary-settings branch September 30, 2014 18:40
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.

Link in Frameworks Support
3 participants