omniauth-naranya_id 0.0.14 → 0.0.15
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.
- checksums.yaml +4 -4
- data/lib/naranya_id/models/user.rb +4 -2
- data/lib/naranya_id.rb +6 -4
- data/lib/omniauth-naranya_id/version.rb +1 -1
- metadata +23 -23
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: aae17711f483e0ea4fc400c11f11abd09ac77400
|
4
|
+
data.tar.gz: 2ccf1c9521021cad216dd9cd09101301e0645b0a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b2b24f9dbb89d429940075b5432fdfdba24c35bc43800dbb40073d55bd1f40275fdc9ddd6c2d1e3ee3dd268c9ad09245c4a1dfe2a170b0dda11e01bd64399599
|
7
|
+
data.tar.gz: e6f35c490700d88f6f953fedd8b8cd05805623aff58fd3608ed1ed7119e3c031172d0b1ca04c4394a538e08cbe050840dad8285d71dc2386e5b6f9af8bb56bd5
|
@@ -48,7 +48,8 @@ module NaranyaId
|
|
48
48
|
nid_hash[:birthday] = @date_of_birth.to_s unless @date_of_birth.nil?
|
49
49
|
nid_hash[:screenname] = @screen_name unless @screen_name.nil?
|
50
50
|
|
51
|
-
|
51
|
+
put_path = NaranyaId.config.client_options['api_path'] + '/user'
|
52
|
+
response = api_token.put put_path, nid_hash
|
52
53
|
response_data = ActiveSupport::JSON.decode(response.body).with_indifferent_access if response.body =~ /\A{.*}/i
|
53
54
|
|
54
55
|
if Net::HTTPSuccess
|
@@ -106,7 +107,8 @@ module NaranyaId
|
|
106
107
|
|
107
108
|
api_access_token = ::OAuth::AccessToken.new NaranyaId.consumer, options[:token], options[:secret]
|
108
109
|
|
109
|
-
|
110
|
+
user_info_path = NaranyaId.config.client_options['api_path'] + '/user'
|
111
|
+
user_info_response = api_access_token.get(user_info_path)
|
110
112
|
|
111
113
|
if Net::HTTPSuccess === user_info_response
|
112
114
|
response_data = ActiveSupport::JSON.decode(user_info_response.body).with_indifferent_access
|
data/lib/naranya_id.rb
CHANGED
@@ -28,8 +28,9 @@ module NaranyaId
|
|
28
28
|
|
29
29
|
# Sitio de Naranya ID:
|
30
30
|
# TODO: Sustituir con el URL de producción (https)
|
31
|
-
site: ENV
|
32
|
-
api_site: ENV
|
31
|
+
site: ENV.fetch('NARANYA_ID_WEB_URL', 'http://id.naranya.net'),
|
32
|
+
api_site: ENV.fetch('NARANYA_ID_API_URL', 'http://id.naranya.net:89'),
|
33
|
+
api_path: ENV.fetch('NARANYA_ID_API_PATH', '/crmcapi'),
|
33
34
|
scheme: :query_string,
|
34
35
|
http_method: :post,
|
35
36
|
request_token_path: "/oauthv1/request_token.php",
|
@@ -50,8 +51,9 @@ module NaranyaId
|
|
50
51
|
end
|
51
52
|
|
52
53
|
# TODO: WTF??? Porqué no carga la config default?????
|
53
|
-
config.client_options[:site] = ENV
|
54
|
-
config.client_options[:api_site] = ENV
|
54
|
+
config.client_options[:site] = ENV.fetch('NARANYA_ID_WEB_URL', 'http://id.naranya.net')
|
55
|
+
config.client_options[:api_site] = ENV.fetch('NARANYA_ID_API_URL', 'http://id.naranya.net:89')
|
56
|
+
config.client_options[:api_path] = ENV.fetch('NARANYA_ID_API_PATH', '/crmcapi')
|
55
57
|
|
56
58
|
consumer_key = config.consumer_key || ENV['NARANYA_ID_API_KEY']
|
57
59
|
consumer_secret = config.consumer_secret || ENV['NARANYA_ID_API_SECRET']
|
metadata
CHANGED
@@ -1,125 +1,125 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: omniauth-naranya_id
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.15
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Roberto Quintanilla
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2015-01-23 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
|
-
- -
|
17
|
+
- - ~>
|
18
18
|
- !ruby/object:Gem::Version
|
19
19
|
version: '4'
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
|
-
- -
|
24
|
+
- - ~>
|
25
25
|
- !ruby/object:Gem::Version
|
26
26
|
version: '4'
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: activemodel
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
|
-
- -
|
31
|
+
- - ~>
|
32
32
|
- !ruby/object:Gem::Version
|
33
33
|
version: '4'
|
34
34
|
type: :runtime
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
|
-
- -
|
38
|
+
- - ~>
|
39
39
|
- !ruby/object:Gem::Version
|
40
40
|
version: '4'
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
42
|
name: omniauth-oauth
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
44
44
|
requirements:
|
45
|
-
- -
|
45
|
+
- - ~>
|
46
46
|
- !ruby/object:Gem::Version
|
47
47
|
version: '1.0'
|
48
48
|
type: :runtime
|
49
49
|
prerelease: false
|
50
50
|
version_requirements: !ruby/object:Gem::Requirement
|
51
51
|
requirements:
|
52
|
-
- -
|
52
|
+
- - ~>
|
53
53
|
- !ruby/object:Gem::Version
|
54
54
|
version: '1.0'
|
55
55
|
- !ruby/object:Gem::Dependency
|
56
56
|
name: bundler
|
57
57
|
requirement: !ruby/object:Gem::Requirement
|
58
58
|
requirements:
|
59
|
-
- -
|
59
|
+
- - ~>
|
60
60
|
- !ruby/object:Gem::Version
|
61
61
|
version: '1.6'
|
62
62
|
type: :development
|
63
63
|
prerelease: false
|
64
64
|
version_requirements: !ruby/object:Gem::Requirement
|
65
65
|
requirements:
|
66
|
-
- -
|
66
|
+
- - ~>
|
67
67
|
- !ruby/object:Gem::Version
|
68
68
|
version: '1.6'
|
69
69
|
- !ruby/object:Gem::Dependency
|
70
70
|
name: rspec
|
71
71
|
requirement: !ruby/object:Gem::Requirement
|
72
72
|
requirements:
|
73
|
-
- -
|
73
|
+
- - ~>
|
74
74
|
- !ruby/object:Gem::Version
|
75
75
|
version: '3.1'
|
76
76
|
type: :development
|
77
77
|
prerelease: false
|
78
78
|
version_requirements: !ruby/object:Gem::Requirement
|
79
79
|
requirements:
|
80
|
-
- -
|
80
|
+
- - ~>
|
81
81
|
- !ruby/object:Gem::Version
|
82
82
|
version: '3.1'
|
83
83
|
- !ruby/object:Gem::Dependency
|
84
84
|
name: rack-test
|
85
85
|
requirement: !ruby/object:Gem::Requirement
|
86
86
|
requirements:
|
87
|
-
- -
|
87
|
+
- - ~>
|
88
88
|
- !ruby/object:Gem::Version
|
89
89
|
version: '0.6'
|
90
90
|
type: :development
|
91
91
|
prerelease: false
|
92
92
|
version_requirements: !ruby/object:Gem::Requirement
|
93
93
|
requirements:
|
94
|
-
- -
|
94
|
+
- - ~>
|
95
95
|
- !ruby/object:Gem::Version
|
96
96
|
version: '0.6'
|
97
97
|
- !ruby/object:Gem::Dependency
|
98
98
|
name: simplecov
|
99
99
|
requirement: !ruby/object:Gem::Requirement
|
100
100
|
requirements:
|
101
|
-
- -
|
101
|
+
- - ~>
|
102
102
|
- !ruby/object:Gem::Version
|
103
103
|
version: '0.8'
|
104
104
|
type: :development
|
105
105
|
prerelease: false
|
106
106
|
version_requirements: !ruby/object:Gem::Requirement
|
107
107
|
requirements:
|
108
|
-
- -
|
108
|
+
- - ~>
|
109
109
|
- !ruby/object:Gem::Version
|
110
110
|
version: '0.8'
|
111
111
|
- !ruby/object:Gem::Dependency
|
112
112
|
name: webmock
|
113
113
|
requirement: !ruby/object:Gem::Requirement
|
114
114
|
requirements:
|
115
|
-
- -
|
115
|
+
- - ~>
|
116
116
|
- !ruby/object:Gem::Version
|
117
117
|
version: '1'
|
118
118
|
type: :development
|
119
119
|
prerelease: false
|
120
120
|
version_requirements: !ruby/object:Gem::Requirement
|
121
121
|
requirements:
|
122
|
-
- -
|
122
|
+
- - ~>
|
123
123
|
- !ruby/object:Gem::Version
|
124
124
|
version: '1'
|
125
125
|
description: Omniauth provider for NaranyaID.
|
@@ -129,8 +129,8 @@ executables: []
|
|
129
129
|
extensions: []
|
130
130
|
extra_rdoc_files: []
|
131
131
|
files:
|
132
|
-
-
|
133
|
-
-
|
132
|
+
- .gitignore
|
133
|
+
- .rspec
|
134
134
|
- Gemfile
|
135
135
|
- LICENSE.txt
|
136
136
|
- README.md
|
@@ -154,17 +154,17 @@ require_paths:
|
|
154
154
|
- lib
|
155
155
|
required_ruby_version: !ruby/object:Gem::Requirement
|
156
156
|
requirements:
|
157
|
-
- -
|
157
|
+
- - '>='
|
158
158
|
- !ruby/object:Gem::Version
|
159
159
|
version: '0'
|
160
160
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
161
161
|
requirements:
|
162
|
-
- -
|
162
|
+
- - '>='
|
163
163
|
- !ruby/object:Gem::Version
|
164
164
|
version: '0'
|
165
165
|
requirements: []
|
166
166
|
rubyforge_project:
|
167
|
-
rubygems_version: 2.
|
167
|
+
rubygems_version: 2.0.14
|
168
168
|
signing_key:
|
169
169
|
specification_version: 4
|
170
170
|
summary: Omniauth provider for NaranyaID.
|