Closed markrickert closed 10 years ago
I just patched BW::Constants.get()
so that it doesn't try and bitwise an array of strings like ["com.apple.UIKit.activity.AirDrop", "com.apple.UIKit.activity.Print"]
I suppose the next step could be to have helper methods like BW::UIActivityViewController.email()
and BW::UIActivityViewController.airdrop()
that only allow that one activity type.
Huh... Travis returned back this error:
- should return an array of string constant values [ERROR: NameError - uninitialized constant Kernel::UIActivityTypeAirDrop]
NameError: uninitialized constant Kernel::UIActivityTypeAirDrop
constants.rb:41:in `get:': .get - should return an array of string constant values
constants.rb:32:in `get:'
spec.rb:314:in `block in run_spec_block'
spec.rb:438:in `execute_block'
spec.rb:314:in `run_spec_block'
spec.rb:329:in `run'
222 specifications (496 requirements), 0 failures, 1 errors
Wonder why, when I'm initializing those constants in the module?
Any feedback on this feature @colinta, @clayallsopp or @supermarin ?
The API looks solid, I wonder if Travis is running an old version, and doesn't have that AirDrop constant...
items: "string"
looks funny to me, seems like it should require an array; item: "string"
would then delegate to items: [..]
Yeah, +1 on @colinta's thoughts. seems like :items
or :item
should be valid options, for readability
Also editing the readme would be :+1:
Travis is yelling because on OS X the Airdrop constant doesn't exist; you should do something like this in the specs:
if App.ios?
it "should bitmask array values" do
#...
end
end
Aha! Thanks for the tip on the tests. I'll try and get it refactored a bit and get the tests working on Travis here in the next few days. FYI, I'm using this code in production in my Textables app to display the UIActivityViewController
.
Is there a preferred way to accept both item
and items
?
something like:
items = Array(options[:items] || options[:item])
??
Yup, that looks good to me
Once Travis passes, this is good to go! Working tests: 809 specifications (1202 requirements), 0 failures, 0 errors
:sparkles: It passed :)
Awesome - update the README as well?
Done. Added it to the UI
section of the readme.
:+1: most excellent, great work!
Thanks! Glad to contribute!
:sparkles: YAY!
This is my first attempt. Some guidance on how the DSL should work would be greatly appreciated. I'll write tests once I've nailed down functionality.
Usage:
Let me know if i'm on the right track here.