authic_client 0.0.12 → 0.1.1
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/README.rdoc +7 -7
- data/app/helpers/authic_client/application_helper.rb +1 -1
- data/config/routes.rb +2 -2
- data/lib/authic_client/engine.rb +2 -2
- data/lib/authic_client/version.rb +1 -1
- data/lib/generators/active_record/authic_generator.rb +3 -3
- data/lib/generators/authic/install_generator.rb +6 -9
- metadata +5 -5
data/README.rdoc
CHANGED
@@ -5,7 +5,7 @@ The Authic Client Gem is the quickest and easiest way to integrate your Rails 3
|
|
5
5
|
|
6
6
|
== Installation
|
7
7
|
|
8
|
-
In your Rails 3 applications Gemfile add:
|
8
|
+
In your Rails 3 or Rails 4 applications Gemfile add:
|
9
9
|
|
10
10
|
gem "authic_client"
|
11
11
|
|
@@ -55,14 +55,14 @@ This will create/update the application's +User+ model to include the following
|
|
55
55
|
|
56
56
|
== Configuration
|
57
57
|
|
58
|
-
Edit +/config/initializers/authic.rb+ and add your Authic details. The details include your Authic client key, secret and subdomain. These values can be found on Authic's Client Application details screen.
|
58
|
+
Edit +/config/initializers/authic.rb+ and add your Authic details. The details include your Authic client key, secret and subdomain. These values can be found on Authic's Client Application details screen.
|
59
59
|
|
60
60
|
The initializer looks like:
|
61
61
|
|
62
62
|
module AuthicClient
|
63
63
|
# Authic config
|
64
|
-
AUTHIC_CLIENT_KEY ||= ENV['AUTHIC_CLIENT_KEY'] ||= '< your authic client key >'
|
65
|
-
AUTHIC_CLIENT_SECRET ||= ENV['AUTHIC_CLIENT_SECRET'] ||= '< your authic client secret >'
|
64
|
+
AUTHIC_CLIENT_KEY ||= ENV['AUTHIC_CLIENT_KEY'] ||= '< your authic client key >'
|
65
|
+
AUTHIC_CLIENT_SECRET ||= ENV['AUTHIC_CLIENT_SECRET'] ||= '< your authic client secret >'
|
66
66
|
AUTHIC_CLIENT_SUBDOMAIN ||= ENV['AUTHIC_CLIENT_SUBDOMAIN'] ||= '< your authic subdomain >'
|
67
67
|
AUTHIC_CLIENT_FULL_URL = "https://#{AUTHIC_CLIENT_SUBDOMAIN}.authic.com"
|
68
68
|
end
|
@@ -71,10 +71,10 @@ Just replace the <XXXX> strings between the quotes with the values. There is no
|
|
71
71
|
|
72
72
|
Alternatively you can leave the file alone and initialize these variables with heroku style environment configuration values:
|
73
73
|
|
74
|
-
AUTHIC_CLIENT_KEY :: '< your authic client key >'
|
75
|
-
AUTHIC_CLIENT_SECRET :: '< your authic client secret >'
|
74
|
+
AUTHIC_CLIENT_KEY :: '< your authic client key >'
|
75
|
+
AUTHIC_CLIENT_SECRET :: '< your authic client secret >'
|
76
76
|
AUTHIC_CLIENT_SUBDOMAIN :: '< your authic subdomain >'
|
77
|
-
|
77
|
+
|
78
78
|
|
79
79
|
*NOTE:* Make sure keep the quotation marks around these values and don't include any '<' or '>'s.
|
80
80
|
|
data/config/routes.rb
CHANGED
@@ -1,4 +1,4 @@
|
|
1
1
|
Rails.application.routes.draw do
|
2
|
-
|
3
|
-
match
|
2
|
+
get 'auth/authic/callback' => 'authic/sessions#create'
|
3
|
+
match 'signout' => 'authic/sessions#destroy', as: 'signout', via: [:get, :delete]
|
4
4
|
end
|
data/lib/authic_client/engine.rb
CHANGED
@@ -3,10 +3,10 @@ require 'omniauth-authic'
|
|
3
3
|
|
4
4
|
module AuthicClient
|
5
5
|
class Engine < ::Rails::Engine
|
6
|
-
initializer '
|
6
|
+
initializer 'authic_client.app_controller' do |app|
|
7
7
|
ActiveSupport.on_load(:action_controller) do
|
8
8
|
include AuthicClient::ApplicationHelper
|
9
9
|
end
|
10
|
-
end
|
10
|
+
end
|
11
11
|
end
|
12
12
|
end
|
@@ -11,9 +11,9 @@ module ActiveRecord
|
|
11
11
|
|
12
12
|
def copy_authic_migration
|
13
13
|
if (behavior == :invoke && model_exists?) || (behavior == :revoke && migration_exists?(table_name))
|
14
|
-
migration_template "migration_existing.rb", "db/migrate/add_authic_to_#{table_name}"
|
14
|
+
migration_template "migration_existing.rb", "db/migrate/add_authic_to_#{table_name}.rb"
|
15
15
|
else
|
16
|
-
migration_template "migration.rb", "db/migrate/authic_create_#{table_name}"
|
16
|
+
migration_template "migration.rb", "db/migrate/authic_create_#{table_name}.rb"
|
17
17
|
end
|
18
18
|
end
|
19
19
|
|
@@ -40,7 +40,7 @@ CONTENT
|
|
40
40
|
|
41
41
|
def migration_data
|
42
42
|
<<RUBY
|
43
|
-
|
43
|
+
|
44
44
|
RUBY
|
45
45
|
end
|
46
46
|
end
|
@@ -1,14 +1,11 @@
|
|
1
1
|
module Authic
|
2
|
-
|
3
|
-
|
4
|
-
source_root File.expand_path("../../templates", __FILE__)
|
5
|
-
|
6
|
-
def copy_initializers
|
7
|
-
template "authic.rb", "config/initializers/authic.rb"
|
8
|
-
template "omniauth.rb", "config/initializers/omniauth.rb"
|
9
|
-
template "sessions_controller.rb", "app/controllers/authic/sessions_controller.rb"
|
10
|
-
end
|
2
|
+
class InstallGenerator < Rails::Generators::Base
|
3
|
+
source_root File.expand_path("../../templates", __FILE__)
|
11
4
|
|
5
|
+
def copy_initializers
|
6
|
+
template "authic.rb", "config/initializers/authic.rb"
|
7
|
+
template "omniauth.rb", "config/initializers/omniauth.rb"
|
8
|
+
template "sessions_controller.rb", "app/controllers/authic/sessions_controller.rb"
|
12
9
|
end
|
13
10
|
end
|
14
11
|
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.
|
5
|
+
version: 0.1.1
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
8
8
|
- authic
|
@@ -10,14 +10,14 @@ autorequire:
|
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
12
|
|
13
|
-
date:
|
13
|
+
date: 2014-10-12 00:00:00 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: rails
|
17
17
|
requirement: &id001 !ruby/object:Gem::Requirement
|
18
18
|
none: false
|
19
19
|
requirements:
|
20
|
-
- -
|
20
|
+
- - ">="
|
21
21
|
- !ruby/object:Gem::Version
|
22
22
|
version: 3.2.5
|
23
23
|
type: :runtime
|
@@ -151,7 +151,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
151
151
|
requirements:
|
152
152
|
- - ">="
|
153
153
|
- !ruby/object:Gem::Version
|
154
|
-
hash:
|
154
|
+
hash: 4008932432462106318
|
155
155
|
segments:
|
156
156
|
- 0
|
157
157
|
version: "0"
|
@@ -160,7 +160,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
160
160
|
requirements:
|
161
161
|
- - ">="
|
162
162
|
- !ruby/object:Gem::Version
|
163
|
-
hash:
|
163
|
+
hash: 4008932432462106318
|
164
164
|
segments:
|
165
165
|
- 0
|
166
166
|
version: "0"
|