aptible-rails 0.4.4 → 0.4.5
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/aptible/rails/controller.rb +7 -1
- data/lib/aptible/rails/version.rb +1 -1
- data/lib/aptible/rails/view_helper.rb +9 -4
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 4958636cae6b034e1241110f6e1774f51e6b5e80
|
|
4
|
+
data.tar.gz: 8596952c947ab63ab3a6a5d3bbe706f1d12a2823
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: b4541522805f44c58dbb763cbc1f717bd3058ab9ecfbcb62916b78cd2ce4a3a54af62e237cf7f2fca99f62f6821904330c36faae1e0118254dd773b1be065b65
|
|
7
|
+
data.tar.gz: bd0c509d1c06c1debd5d4f0b36437b2934961d6a343bddc6e32a7d3651bbcdb23b19cd6a386f85c1456818fafaeaf908ef52fe23b588cb5fb2a9009f84381798
|
|
@@ -9,7 +9,7 @@ module Aptible
|
|
|
9
9
|
|
|
10
10
|
included do
|
|
11
11
|
helper_method :current_user, :current_organization, :user_url,
|
|
12
|
-
:organization_url, :criterion_by_handle
|
|
12
|
+
:organization_url, :criterion_by_handle, :auth_url
|
|
13
13
|
end
|
|
14
14
|
|
|
15
15
|
def current_user
|
|
@@ -105,6 +105,12 @@ module Aptible
|
|
|
105
105
|
organization: current_organization
|
|
106
106
|
).first
|
|
107
107
|
end
|
|
108
|
+
|
|
109
|
+
def auth_url(path = '/', params = {})
|
|
110
|
+
uri = URI.join(Aptible::Auth.configuration.root_url, path)
|
|
111
|
+
uri.query = params.to_query if params
|
|
112
|
+
uri.to_s
|
|
113
|
+
end
|
|
108
114
|
end
|
|
109
115
|
end
|
|
110
116
|
end
|
|
@@ -10,10 +10,6 @@ module Aptible
|
|
|
10
10
|
"https://secure.gravatar.com/avatar/#{digest}?s=#{size}"
|
|
11
11
|
end
|
|
12
12
|
|
|
13
|
-
def auth_url(path = '/')
|
|
14
|
-
URI.join Aptible::Auth.configuration.root_url, path
|
|
15
|
-
end
|
|
16
|
-
|
|
17
13
|
def controller?(*controller)
|
|
18
14
|
controller.include?(params[:controller])
|
|
19
15
|
end
|
|
@@ -21,6 +17,15 @@ module Aptible
|
|
|
21
17
|
def action?(*action)
|
|
22
18
|
action.include?(params[:action])
|
|
23
19
|
end
|
|
20
|
+
|
|
21
|
+
def verification_code_reset_url
|
|
22
|
+
callback = "#{dashboard_url}/callback?type=verification_code_reset"
|
|
23
|
+
auth_url(
|
|
24
|
+
'/reset',
|
|
25
|
+
type: 'verification_code',
|
|
26
|
+
redirect_uri: callback
|
|
27
|
+
)
|
|
28
|
+
end
|
|
24
29
|
end
|
|
25
30
|
end
|
|
26
31
|
end
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: aptible-rails
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.4.
|
|
4
|
+
version: 0.4.5
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Frank Macreery
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2014-07-
|
|
11
|
+
date: 2014-07-23 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: gem_config
|