muck-oauth 0.1.8 → 0.1.9

Sign up to get free protection for your applications and to get access to all the features.
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.1.8
1
+ 0.1.9
@@ -2,8 +2,9 @@ module MuckOauthHelper
2
2
 
3
3
  # Generates a javascript array of emails from gmail. Values will be
4
4
  # put into a variable named 'gmail_contacts'
5
- def gmail_contacts_for_auto_complete
6
- contacts = current_user.google.portable_contacts.all.collect do |contact|
5
+ def gmail_contacts_for_auto_complete(user)
6
+ return unless user.google
7
+ contacts = user.google.portable_contacts.all.collect do |contact|
7
8
  contact["emails"].collect{ |email| "'#{email['value']}'" }
8
9
  end.flatten
9
10
  "var gmail_contacts = [#{contacts.join(',')}];"
data/muck-oauth.gemspec CHANGED
@@ -5,7 +5,7 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{muck-oauth}
8
- s.version = "0.1.8"
8
+ s.version = "0.1.9"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Justin Ball"]
metadata CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
5
5
  segments:
6
6
  - 0
7
7
  - 1
8
- - 8
9
- version: 0.1.8
8
+ - 9
9
+ version: 0.1.9
10
10
  platform: ruby
11
11
  authors:
12
12
  - Justin Ball