rubymotion/BubbleWrap — pull request #377 by markrickert (2014-05-15 20:10:07+00:00)
Title: Adds BW::Persistence.all to retrieve all keys and values stored as a hash.

This excludes all non-bubble-wrap created persistence items.

```ruby
(main)> NSUserDefaults.standardUserDefaults.dictionaryRepresentation
=> {
"AppleLocale"=>"en_US",
"WebKitKerningAndLigaturesEnabledByDefault"=>true,
"AppleLanguages"=>["en", "fr", "de", "zh-Hans", "zh-Hant", "ja", "nl", "it", "es", "es-MX", "ko", "pt", "pt-PT", "da", "fi", "nb", "sv", "ru", "pl", "tr", "uk", "ar", "hr", "cs", "el", "he", "ro", "sk", "th", "id", "ms", "en-GB", "en-AU", "ca", "hu", "vi"],
"AppleKeyboardsExpanded"=>1,
"AppleKeyboards"=>["en_US@hw=US;sw=QWERTY", "en_US@hw=US;sw=QWERTY"],
"UIDisableLegacyTextView"=>true,
"NSLanguages"=>["en", "fr", "de", "zh-Hans", "zh-Hant", "ja", "nl", "it", "es", "es-MX", "ko", "pt", "pt-PT", "da", "fi", "nb", "sv", "ru", "pl", "tr", "uk", "ar", "hr", "cs", "el", "he", "ro", "sk", "th", "id", "ms", "en-GB", "en-AU", "ca", "hu", "vi"],
"NSInterfaceStyle"=>"macintosh",
"AppleITunesStoreItemKinds"=>["artist", "eBook"]
}
(main)> BW::Persistence.all
=> {}
(main)> BW::Persistence['test'] = 'RubyMotion'
=> "RubyMotion"
(main)> BW::Persistence['test2'] = 'Mark'
=> "Mark"
(main)> BW::Persistence[:test3] = 'Rickert'
=> "Rickert"
(main)> BW::Persistence.all
=> {"test3"=>"Rickert", "test"=>"RubyMotion", "test2"=>"Mark"}
(main)> NSUserDefaults.standardUserDefaults.dictionaryRepresentation
=> {
"AppleLocale"=>"en_US",
"WebKitKerningAndLigaturesEnabledByDefault"=>true,
"AppleLanguages"=>["en", "fr", "de", "zh-Hans", "zh-Hant", "ja", "nl", "it", "es", "es-MX", "ko", "pt", "pt-PT", "da", "fi", "nb", "sv", "ru", "pl", "tr", "uk", "ar", "hr", "cs", "el", "he", "ro", "sk", "th", "id", "ms", "en-GB", "en-AU", "ca", "hu", "vi"],
"AppleKeyboardsExpanded"=>1,
"AppleKeyboards"=>["en_US@hw=US;sw=QWERTY", "en_US@hw=US;sw=QWERTY"],
"UIDisableLegacyTextView"=>true,
"NSLanguages"=>["en", "fr", "de", "zh-Hans", "zh-Hant", "ja", "nl", "it", "es", "es-MX", "ko", "pt", "pt-PT", "da", "fi", "nb", "sv", "ru", "pl", "tr", "uk", "ar", "hr", "cs", "el", "he", "ro", "sk", "th", "id", "ms", "en-GB", "en-AU", "ca", "hu", "vi"],
"NSInterfaceStyle"=>"macintosh",
"AppleITunesStoreItemKinds"=>["artist", "eBook"]
"io.bubblewrap.testSuite_test3"=>"Rickert",
"io.bubblewrap.testSuite_test"=>"RubyMotion",
"io.bubblewrap.testSuite_test2"=>"Mark"
}
```

Includes test.