authic_client 0.0.6 → 0.0.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
data/MIT-LICENSE CHANGED
@@ -1,4 +1,4 @@
1
- Copyright 2012 YOURNAME
1
+ Copyright 2012 Authic.com
2
2
 
3
3
  Permission is hereby granted, free of charge, to any person obtaining
4
4
  a copy of this software and associated documentation files (the
@@ -13,7 +13,7 @@ module AuthicClient
13
13
 
14
14
  def destroy
15
15
  session[:authic_user_id] = nil
16
- redirect_path = "https://#{AuthicClient::AUTHIC_CLIENT_SUBDOMAIN}.authic.com/authic_sign_out?&return_path=#{URI.escape root_url}"
16
+ redirect_path = "#{AuthicClient::AUTHIC_CLIENT_FULL_URL}/authic_sign_out?&return_path=#{URI.escape root_url}"
17
17
  redirect_to redirect_path
18
18
  end
19
19
  end
@@ -13,6 +13,10 @@ module AuthicClient
13
13
  "/auth/authic?&authic_action=signup"
14
14
  end
15
15
 
16
+ def user_account_path
17
+ "#{AuthicClient::AUTHIC_CLIENT_FULL_URL}/edit_account"
18
+ end
19
+
16
20
  def login_required
17
21
  unless current_user
18
22
  session[:authic_return_to_this_url] = request.fullpath
@@ -16,10 +16,15 @@ module AuthicUserMixin
16
16
  user.email = auth.info.email
17
17
  user.first_name = auth.info.first_name
18
18
  user.last_name = auth.info.last_name
19
+ user.middle_name = auth.info.middle_name
19
20
  user.full_name = auth.info.full_name
20
21
  user.mobile = auth.info.mobile
21
22
  user.phone = auth.info.phone
22
23
  user.birth_date = auth.info.birth_date
24
+ user.gender = auth.info.gender
25
+ user.timezone = auth.info.timezone
26
+ user.country = auth.info.country
27
+ user.address = auth.info.address
23
28
  user.groups = (auth.info.groups.join(",") if auth.info.groups)
24
29
  user.roles = (auth.info.roles.join(",") if auth.info.roles)
25
30
  user.authic_data = (auth.extra.raw_info.to_json.to_s if auth.extra.raw_info)
@@ -1,3 +1,3 @@
1
1
  module AuthicClient
2
- VERSION = "0.0.6"
2
+ VERSION = "0.0.7"
3
3
  end
@@ -15,6 +15,11 @@ class AuthicCreate<%= table_name.camelize %> < ActiveRecord::Migration
15
15
  t.string :groups
16
16
  t.string :roles
17
17
 
18
+ t.string :middle_name
19
+ t.string :gender
20
+ t.string :timezone
21
+ t.string :country
22
+ t.string :address
18
23
 
19
24
  <% attributes.each do |attribute| -%>
20
25
  t.<%= attribute.type %> :<%= attribute.name %>
@@ -15,6 +15,12 @@ class AddAuthicTo<%= table_name.camelize %> < ActiveRecord::Migration
15
15
  t.string :groups unless t.column_exists?(:groups)
16
16
  t.string :roles unless t.column_exists?(:roles)
17
17
 
18
+ t.string :middle_name unless t.column_exists?(:middle_name)
19
+ t.string :gender unless t.column_exists?(:gender)
20
+ t.string :timezone unless t.column_exists?(:timezone)
21
+ t.string :country unless t.column_exists?(:country)
22
+ t.string :address unless t.column_exists?(:address)
23
+
18
24
  t.index :email, :unique => true unless t.index_exists?(:email, :unique => true)
19
25
  t.index :provider unless t.index_exists?(:provider)
20
26
  t.index :uid unless t.index_exists?(:uid)
@@ -3,4 +3,5 @@ module AuthicClient
3
3
  AUTHIC_CLIENT_KEY ||= ENV['AUTHIC_CLIENT_KEY'] ||= '< your authic client key >'
4
4
  AUTHIC_CLIENT_SECRET ||= ENV['AUTHIC_CLIENT_SECRET'] ||= '< your authic client secret >'
5
5
  AUTHIC_CLIENT_SUBDOMAIN ||= ENV['AUTHIC_CLIENT_SUBDOMAIN'] ||= '< your authic subdomain >'
6
+ AUTHIC_CLIENT_FULL_URL = "https://#{AUTHIC_CLIENT_SUBDOMAIN}.authic.com"
6
7
  end
metadata CHANGED
@@ -2,7 +2,7 @@
2
2
  name: authic_client
3
3
  version: !ruby/object:Gem::Version
4
4
  prerelease:
5
- version: 0.0.6
5
+ version: 0.0.7
6
6
  platform: ruby
7
7
  authors:
8
8
  - authic
@@ -10,7 +10,7 @@ autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
12
 
13
- date: 2012-11-10 00:00:00 Z
13
+ date: 2012-11-16 00:00:00 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: rails
@@ -153,7 +153,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
153
153
  requirements:
154
154
  - - ">="
155
155
  - !ruby/object:Gem::Version
156
- hash: 1439866202659759572
156
+ hash: -1275839006331813346
157
157
  segments:
158
158
  - 0
159
159
  version: "0"
@@ -162,7 +162,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
162
162
  requirements:
163
163
  - - ">="
164
164
  - !ruby/object:Gem::Version
165
- hash: 1439866202659759572
165
+ hash: -1275839006331813346
166
166
  segments:
167
167
  - 0
168
168
  version: "0"