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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 861266924d983e8acf72255c94ad4d72b0683091
4
- data.tar.gz: 5bb980ac94bde104fd846d20f97baa04f86dd20a
3
+ metadata.gz: 605ca48dcffe6766bbbcb05ee79da68e50e0a605
4
+ data.tar.gz: 84b8217ba7289109542a26f74cca461566c43616
5
5
  SHA512:
6
- metadata.gz: 2fb342c65b829ee4a75bb2369adac0ab16b46b17ffa85f5d35145ee736940da6cd1b3acb31e7339a665cf544534f7ba56ef4a2173a30e9b37d31586b4fe0e274
7
- data.tar.gz: a8da371ffd5781f80c173737ffa7fe9a25fbfa5184d8895b3d62dfffe4a9efc2296fa68b87051ee484a673bb5fcec8c5b4deeed19b47c4127af4e3590ecb4264
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? }
@@ -5,6 +5,7 @@ module Nyauth
5
5
  include Nyauth::SessionConcern
6
6
  before_action -> { require_authentication! as: client_name }
7
7
 
8
+ self.responder = Nyauth::AppResponder
8
9
  respond_to :html, :json
9
10
  before_action :set_client
10
11
 
@@ -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
8
9
 
@@ -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? }
@@ -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
8
9
 
@@ -5,6 +5,7 @@ module Nyauth
5
5
  include Nyauth::SessionConcern
6
6
  before_action -> { require_authentication! as: client_name }
7
7
  allow_everyone only: [:new, :create]
8
+ self.responder = Nyauth::AppResponder
8
9
  respond_to :html, :json
9
10
  before_action :set_session_service
10
11
 
@@ -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
@@ -1,3 +1,3 @@
1
1
  module Nyauth
2
- VERSION = "0.2.6"
2
+ VERSION = "0.2.7"
3
3
  end
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.6
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-15 00:00:00.000000000 Z
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