lib/boom/storage/keychain.rb in boom-0.2.3 vs lib/boom/storage/keychain.rb in boom-0.2.4
- old
+ new
@@ -17,18 +17,24 @@
`open /Applications/Utilities/'Keychain Access.app' &`
end
alias_method :json_file, :open_keychain_app
- # Boostraps Keychain by asking if you're using Mac OS X which is a prereq
+ # Boostraps Keychain by checking if you're using a Mac which is a prereq
#
- # Returns true on a Mac
+ # Returns
def bootstrap
- raise RuntimeError unless Boom::Platform.darwin?
- true
+ raise RuntimeError unless is_mac?
rescue
- puts(e 'No Keychain utility to access, maybe try another storage option?')
- false
+ puts('No Keychain utility to access, maybe try another storage option?')
+ exit
+ end
+
+ # Asks if you're using Mac OS X
+ #
+ # Returns true on a Mac
+ def is_mac?
+ return Boom::Platform.darwin?
end
# Populate the in-memory store with all the lists and items from Keychain
#
# Returns Array of keychain names, i.e. ["Boom.list.mylist.keychain"]