petergate 1.9.1 → 2.0.1

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: fe88ac6321fea2180fa92791c94b3cca920e6d52
4
- data.tar.gz: 751cbbe03fa230735fdd3ded6468b078ea8d1e0c
3
+ metadata.gz: 58a47d171de262a67f8af150880112b0675773ba
4
+ data.tar.gz: 2f4dfb1fc73f9de9d2b402f95429d1903c5667c6
5
5
  SHA512:
6
- metadata.gz: 9be1294fae6e009199f85b42cf774c9ba272a7ddbaf0904c673fe21ea0f3307d6f5c6e78a8d21a190cc88544227cc7d73f42f1d74bbf9c9ccae8feb18396e4ab
7
- data.tar.gz: be77842329cb0f71881b9f149110e8be1ac9f90f36804532c9fa68575cc3c0df297dede637d3b577a9bea21938835a8453db8ab7f3c3033ab8329120b1a58a36
6
+ metadata.gz: 850f07d5ff5e44cfd3c5903d71d78a4efd34b7dd270032d6e4629e3fb8864aa24c6c5b985e0db10185aafd8e9e422d3983b5935e2be72353375c972f9ec4af86
7
+ data.tar.gz: 3d429d5ede18ef21746e618a60fcfc21b4a6667ea7dafda2e0b240015f650f6dd2f95540e0a3996880046351436203a5d2b325a63f78d02163c6744b76579c11
@@ -107,16 +107,20 @@ module Petergate
107
107
 
108
108
  def unauthorized!
109
109
  respond_to do |format|
110
- format.any(:js, :json, :xml) { render nothing: true, status: :unauthorized }
110
+ format.any(:js, :json, :xml) do
111
+ head(:unauthorized)
112
+ end
111
113
  format.html do
112
- authenticate_user!
114
+ return authenticate_user!
113
115
  end
114
116
  end
115
117
  end
116
118
 
117
119
  def forbidden!(msg = nil)
118
120
  respond_to do |format|
119
- format.any(:js, :json, :xml) { render nothing: true, status: :forbidden }
121
+ format.any(:js, :json, :xml) do
122
+ head(:forbidden)
123
+ end
120
124
  format.html do
121
125
  destination = current_user.present? ? request.referrer || after_sign_in_path_for(current_user) : root_path
122
126
  redirect_to destination, notice: (msg || custom_message)
@@ -1,3 +1,3 @@
1
1
  module Petergate
2
- VERSION = "1.9.1"
2
+ VERSION = "2.0.1"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: petergate
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.9.1
4
+ version: 2.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Isaac Sloan
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-10-02 00:00:00.000000000 Z
11
+ date: 2018-10-25 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler