nyauth 0.2.6 → 0.2.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.
- checksums.yaml +4 -4
- data/README.md +14 -0
- data/app/controllers/nyauth/confirmation_requests_controller.rb +1 -0
- data/app/controllers/nyauth/passwords_controller.rb +1 -0
- data/app/controllers/nyauth/registrations_controller.rb +1 -0
- data/app/controllers/nyauth/reset_password_requests_controller.rb +1 -0
- data/app/controllers/nyauth/reset_passwords_controller.rb +1 -0
- data/app/controllers/nyauth/sessions_controller.rb +1 -0
- data/app/responders/nyauth/app_responder.rb +15 -0
- data/lib/nyauth/version.rb +1 -1
- metadata +10 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 605ca48dcffe6766bbbcb05ee79da68e50e0a605
|
4
|
+
data.tar.gz: 84b8217ba7289109542a26f74cca461566c43616
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1f142720f5b6388a9e04890c85589f5b50dd9260298a35de3502b234a02ff3e4f07a1cddbc0563212487e40c4dea9037949c0d4f4069b4d2146a9b16a2115128
|
7
|
+
data.tar.gz: d2ab07b6852a6d869032b6f66b149b809882ed338bd85455ca4040c5c558e8fc24f868a6b80688c38c71f4af8ab78c2e35dc50da7902502067773afbafe5c344
|
data/README.md
CHANGED
@@ -193,3 +193,17 @@ ja:
|
|
193
193
|
messages:
|
194
194
|
invalid_email_or_password: 'ログイン情報に誤りがあります'
|
195
195
|
```
|
196
|
+
|
197
|
+
## test
|
198
|
+
|
199
|
+
spec/rails_helper.rb
|
200
|
+
|
201
|
+
```ruby
|
202
|
+
require 'nyauth/test/controller_macros'
|
203
|
+
require 'nyauth/test/feature_macros'
|
204
|
+
|
205
|
+
RSpec.configure do |config|
|
206
|
+
config.include Nyauth::Test::ControllerMacros, type: :controller
|
207
|
+
config.include Nyauth::Test::FeatureMacros, type: :feature
|
208
|
+
end
|
209
|
+
```
|
@@ -3,6 +3,7 @@ module Nyauth
|
|
3
3
|
include Nyauth::ApplicationConcern
|
4
4
|
include Nyauth::ClientConcern
|
5
5
|
allow_everyone
|
6
|
+
self.responder = Nyauth::AppResponder
|
6
7
|
respond_to :html, :json
|
7
8
|
before_action :set_client, only: [:create]
|
8
9
|
after_action :send_mail, only: [:create], if: -> { @client.confirmation_key.present? }
|
@@ -3,6 +3,7 @@ module Nyauth
|
|
3
3
|
include Nyauth::ApplicationConcern
|
4
4
|
include Nyauth::ClientConcern
|
5
5
|
allow_everyone
|
6
|
+
self.responder = Nyauth::AppResponder
|
6
7
|
respond_to :html, :json
|
7
8
|
before_action :set_client, only: [:create]
|
8
9
|
after_action :send_mail, only: [:create], if: -> { @client.reset_password_key.present? }
|
@@ -2,5 +2,20 @@ module Nyauth
|
|
2
2
|
class AppResponder < ActionController::Responder
|
3
3
|
include Responders::FlashResponder
|
4
4
|
include Responders::HttpCacheResponder
|
5
|
+
|
6
|
+
# @see https://github.com/plataformatec/responders/issues/126
|
7
|
+
def default_render
|
8
|
+
if @default_response
|
9
|
+
@default_response.call(options)
|
10
|
+
else
|
11
|
+
if Rails.version >= "5"
|
12
|
+
controller.default_render(options) do
|
13
|
+
raise ActionView::MissingTemplate.new([], "", [], true, [])
|
14
|
+
end
|
15
|
+
else
|
16
|
+
controller.default_render(options)
|
17
|
+
end
|
18
|
+
end
|
19
|
+
end
|
5
20
|
end
|
6
21
|
end
|
data/lib/nyauth/version.rb
CHANGED
metadata
CHANGED
@@ -1,29 +1,35 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: nyauth
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.7
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- ppworks
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-07-
|
11
|
+
date: 2015-07-17 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
|
-
- - "
|
17
|
+
- - ">="
|
18
18
|
- !ruby/object:Gem::Version
|
19
19
|
version: 4.2.0
|
20
|
+
- - "<"
|
21
|
+
- !ruby/object:Gem::Version
|
22
|
+
version: '6'
|
20
23
|
type: :runtime
|
21
24
|
prerelease: false
|
22
25
|
version_requirements: !ruby/object:Gem::Requirement
|
23
26
|
requirements:
|
24
|
-
- - "
|
27
|
+
- - ">="
|
25
28
|
- !ruby/object:Gem::Version
|
26
29
|
version: 4.2.0
|
30
|
+
- - "<"
|
31
|
+
- !ruby/object:Gem::Version
|
32
|
+
version: '6'
|
27
33
|
- !ruby/object:Gem::Dependency
|
28
34
|
name: responders
|
29
35
|
requirement: !ruby/object:Gem::Requirement
|