token_authenticate_me 0.2.2 → 0.2.3
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
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 357dfb44bfccd7add446f558d0f3fa3b65b3dc79
|
4
|
+
data.tar.gz: a65010e05cae35dced331e904977d84f4840f38e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b3ed534c136e7832c43de248eef0618024a3ea8c588285760d440a5fc42818ab612b32b739e68d46b0091b7394d41337ef4a8210b378b94312637394ea69038d
|
7
|
+
data.tar.gz: 7b9ed23311e1e928e2fb2611014c37538bb32e220657e812a3a87fd23261ca6be184e1b38b82900df2ad64f841c9345f29b3e14fe0d8a0776964bdcf0c3a6fc0
|
@@ -34,7 +34,7 @@ namespace :api do
|
|
34
34
|
end
|
35
35
|
|
36
36
|
def create_users_controller
|
37
|
-
template 'users.rb', 'app/controllers/api/users_controller.rb'
|
37
|
+
template 'users.rb', 'app/controllers/api/v1/users_controller.rb'
|
38
38
|
|
39
39
|
# Inject /api/v1/users route into routes file
|
40
40
|
route <<-ROUTE
|
@@ -45,6 +45,17 @@ namespace :api do
|
|
45
45
|
end
|
46
46
|
ROUTE
|
47
47
|
end
|
48
|
+
|
49
|
+
private
|
50
|
+
|
51
|
+
def inject_before_actions_into_users_controllers
|
52
|
+
inject_into_class(
|
53
|
+
Rails.root.join('app', 'controllers', 'api', 'v1', 'users_controller.rb'),
|
54
|
+
UsersController
|
55
|
+
) do
|
56
|
+
" skip_before_action :authenticate, only: [:create]\n"
|
57
|
+
end
|
58
|
+
end
|
48
59
|
end
|
49
60
|
end
|
50
61
|
end
|
@@ -6,9 +6,13 @@ module TokenAuthenticateMe
|
|
6
6
|
|
7
7
|
invoke 'token_authenticate_me:models', params
|
8
8
|
invoke 'token_authenticate_me:controllers', params
|
9
|
-
invoke 'api_me:policy',
|
9
|
+
invoke 'api_me:policy', %w(user username email password password_confirmation)
|
10
10
|
invoke 'api_me:filter', ['user']
|
11
|
-
invoke 'serializer',
|
11
|
+
invoke 'serializer', %w(user username email created_at updated_at)
|
12
|
+
|
13
|
+
inject_into_class Rails.root.join('app', 'policies', 'user_policy.rb'), UserPolicy do
|
14
|
+
" def create?\n true\n end\n"
|
15
|
+
end
|
12
16
|
end
|
13
17
|
end
|
14
18
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: token_authenticate_me
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Sam Clopton
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2014-11-
|
12
|
+
date: 2014-11-25 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: activerecord
|