-
Notifications
You must be signed in to change notification settings - Fork 208
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
Do not use `configs' which is used by RubyMotion internal #143
Conversation
It seems like it crashes the specs:
|
Oh, sorry. `setup_blocks' method will be added by v1.24. |
Okay sure,. Is there a way we can add a check if the RM version is |
Which one do you like?
diff --git a/lib/bubble-wrap/ext/motion_project_app.rb b/lib/bubble-wrap/ext/motion_project_app.rb
index 28e8f24..1d303f9 100644
--- a/lib/bubble-wrap/ext/motion_project_app.rb
+++ b/lib/bubble-wrap/ext/motion_project_app.rb
@@ -11,8 +11,12 @@ module BubbleWrap
app.frameworks = ::BubbleWrap::Requirement.frameworks(app.frameworks)
block.call(app) unless block.nil?
end
- configs.each_value &bw_config
- config.validate
+ begin
+ config.setup_blocks << bw_config
+ rescue
+ configs.each_value &bw_config
+ config.validate
+ end
end
alias :setup_without_bubblewrap :setup
alias :setup :setup_with_bubblewrap
I think that No.3 is best select :) |
I would say option 2 + a warning to the user. Let's see what the others think, but for now, my suggestion would be something like: begin
config.setup_blocks << bw_config
rescue
NSLog "BW: It seems like you're running an older RubyMotion version than 1.24.
Please run `sudo motion update` to remove this warning."
configs.each_value &bw_config
config.validate
end |
OK. Whenever you think that anyone will not have to downgrade, you could modify it :) Thanks :) |
I'll reopen this one until we get it fixed :) Currently, the specs are failing with the iOS6 SDK, so I can't get it tested/merged. |
Is this related to the error I'm getting? I just update to the latest RubyMotion and BubbleWrap. This happens when I run rake:
|
@michael-erasmus yes |
It works fine when change
To
In
So that is a quickfix for anyone getting this and who still needs to work today :) |
@michael-erasmus Thanks for the patch |
@mneorr Unfortunately, once you update to RubyMotion 1.24, the specs won't run because of this config vs configs issue (I realize that once that's fixed, there are still other issues preventing the specs from running). I think we should push this change using the recommendation of Option 2 + a warning. |
RubyMotion 1.24 fails to build projects that include BubbleWrap for me. michael-erasmus's patch fixes it. (thanks!) |
Now that I think about it, I think Option 3 is actually better (just don't support < 1.24). If someone has their app locked to an older version in production, they should also have it locked to an older version of BW too. Ideally, RubyMotion would have properly deprecated the Since RubyMotion is still very young and new, and changing all the time, supporting older versions doesn't seem to make a lot of sense. I'd hate to see BW get littered with dozens of conditional statements and/or rescue blocks (for example, @Watson1978's other pull request to add _spec to the end of the test suite name would need a conditional based on the version of RubyMotion being used). Thoughts? I'd like to get this fixed ASAP so we can push an updated gem; in the mean time, no one can use the current BW gem on RubyMotion 1.24 |
I'll merge this first for that 1.24 is released. |
Do not use `configs' which is used by RubyMotion internal
bubble-wrap 1.1.4 with this fix is released. |
`configs' will be removed with next update (v1.24).