lockup 1.4 → 1.4.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (4) hide show
  1. checksums.yaml +4 -4
  2. data/lib/lockup.rb +4 -11
  3. data/lib/lockup/version.rb +1 -1
  4. metadata +31 -31
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: d6fa8ff46e56b5f05af1e6da77b67db58d4c0612
4
- data.tar.gz: 2ea7f15e15a368f264e19454291432b7117bea7b
3
+ metadata.gz: 2875d9830e24b149067a271bfdc7c2cb6a0d5b1f
4
+ data.tar.gz: 3e0506c7845e4ab375f42535b1e3acea201ce371
5
5
  SHA512:
6
- metadata.gz: c3c5204b3c75055706ea0e6ed33c2cd520b24f2b5212daea474ea48cf101990f406a83daab9ca75a1541deb2e06f9635b1d91d249933ca39f1597e10dbe9d80a
7
- data.tar.gz: 98ea9db0a10a44681984f494787468b9637938bb3eb7d1e13d166cfda533f834c5be9b84a46e9331fc7e3f7965f1ede3a3d9bf179a23c1e8401313caf9c70fe2
6
+ metadata.gz: e375b926cdfbf5271773cf93136cc200fa3784b91679f368629129a5e0b62ce00cee5574acb4343262f3f33048045f5fa0c0dff68e25ecab793f9806078bade8
7
+ data.tar.gz: d536f469916c4b8f6b6001f2b1c9ea43e2ef77e931243db152abd56c1529f8c8b21c97bdddead0d4558b1a7640860a60a1ad4fd985583e70e84442c007decce3
data/lib/lockup.rb CHANGED
@@ -14,17 +14,10 @@ module Lockup
14
14
  private
15
15
 
16
16
  def check_for_lockup
17
- if lockup_codeword_present?
18
- if cookies[:lockup].present?
19
- if cookies[:lockup] == lockup_codeword
20
- return
21
- else
22
- redirect_to lockup.unlock_path(return_to: request.fullpath.split('?lockup_codeword')[0], lockup_codeword: params[:lockup_codeword])
23
- end
24
- else
25
- redirect_to lockup.unlock_path(return_to: request.fullpath.split('?lockup_codeword')[0], lockup_codeword: params[:lockup_codeword])
26
- end
27
- end
17
+ return unless respond_to?(:lockup) && lockup_codeword_present?
18
+ return if cookies[:lockup].present? && cookies[:lockup] == lockup_codeword
19
+
20
+ redirect_to lockup.unlock_path(return_to: request.fullpath.split('?lockup_codeword')[0], lockup_codeword: params[:lockup_codeword])
28
21
  end
29
22
 
30
23
  def lockup_codeword_present?
@@ -1,3 +1,3 @@
1
1
  module Lockup
2
- VERSION = "1.4"
2
+ VERSION = "1.4.1"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: lockup
3
3
  version: !ruby/object:Gem::Version
4
- version: '1.4'
4
+ version: 1.4.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - gb Studio
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-09-24 00:00:00.000000000 Z
11
+ date: 2018-06-06 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails
@@ -191,58 +191,58 @@ signing_key:
191
191
  specification_version: 4
192
192
  summary: Lock staging servers from search engines and prying eyes.
193
193
  test_files:
194
- - spec/controllers/lockup/lockup_controller_spec.rb
195
- - spec/dummy/app/assets/javascripts/application.js
196
- - spec/dummy/app/assets/stylesheets/application.css
194
+ - spec/spec_helper.rb
195
+ - spec/dummy/app/models/post.rb
197
196
  - spec/dummy/app/controllers/application_controller.rb
198
197
  - spec/dummy/app/controllers/posts_controller.rb
199
- - spec/dummy/app/helpers/application_helper.rb
200
- - spec/dummy/app/models/post.rb
201
- - spec/dummy/app/views/layouts/application.html.erb
202
198
  - spec/dummy/app/views/posts/index.html.erb
203
199
  - spec/dummy/app/views/posts/show.html.erb
200
+ - spec/dummy/app/views/layouts/application.html.erb
201
+ - spec/dummy/app/assets/javascripts/application.js
202
+ - spec/dummy/app/assets/stylesheets/application.css
203
+ - spec/dummy/app/helpers/application_helper.rb
204
+ - spec/dummy/bin/rake
204
205
  - spec/dummy/bin/bundle
205
206
  - spec/dummy/bin/rails
206
- - spec/dummy/bin/rake
207
- - spec/dummy/config/application.rb
208
- - spec/dummy/config/boot.rb
207
+ - spec/dummy/config/routes.rb
208
+ - spec/dummy/config/locales/en.yml
209
209
  - spec/dummy/config/database.yml.old
210
- - spec/dummy/config/environment.rb
211
- - spec/dummy/config/environments/development.rb
212
210
  - spec/dummy/config/environments/production.rb
211
+ - spec/dummy/config/environments/development.rb
213
212
  - spec/dummy/config/environments/test.rb
213
+ - spec/dummy/config/environment.rb
214
+ - spec/dummy/config/application.rb
215
+ - spec/dummy/config/boot.rb
214
216
  - spec/dummy/config/initializers/backtrace_silencers.rb
215
- - spec/dummy/config/initializers/filter_parameter_logging.rb
216
- - spec/dummy/config/initializers/inflections.rb
217
217
  - spec/dummy/config/initializers/mime_types.rb
218
- - spec/dummy/config/initializers/secret_token.rb
218
+ - spec/dummy/config/initializers/filter_parameter_logging.rb
219
219
  - spec/dummy/config/initializers/session_store.rb
220
220
  - spec/dummy/config/initializers/wrap_parameters.rb
221
- - spec/dummy/config/locales/en.yml
222
- - spec/dummy/config/routes.rb
221
+ - spec/dummy/config/initializers/secret_token.rb
222
+ - spec/dummy/config/initializers/inflections.rb
223
223
  - spec/dummy/config.ru
224
- - spec/dummy/log/test.log
225
- - spec/dummy/public/404.html
224
+ - spec/dummy/Rakefile
225
+ - spec/dummy/public/favicon.ico
226
226
  - spec/dummy/public/422.html
227
227
  - spec/dummy/public/500.html
228
- - spec/dummy/public/favicon.ico
229
- - spec/dummy/Rakefile
230
- - spec/dummy/tmp/cache/assets/sprockets/v3.0/1T/1T-a1hn7TPU4VqYN1_WMFcWXOJr7VHGalLxVInuxckM.cache
231
- - spec/dummy/tmp/cache/assets/sprockets/v3.0/2s/2s3YUjKGbnsy4nqjtt3_bLi2-n7vURwbi1N4I3efe3M.cache
232
- - spec/dummy/tmp/cache/assets/sprockets/v3.0/54/54JuizNobIWGWy1THHxcQSq9oLjimE6qRyKaKuNrnuA.cache
233
- - spec/dummy/tmp/cache/assets/sprockets/v3.0/B3/B33FTX989v8LP64xdx3RQwjUBAenWdgN6qT8sRqdw0U.cache
228
+ - spec/dummy/public/404.html
229
+ - spec/dummy/log/test.log
230
+ - spec/dummy/tmp/cache/assets/sprockets/v3.0/PE/PE4qT2vBxYzDt9ccdMf4qpdTP7dOm-R5cLIBQibKwRQ.cache
234
231
  - spec/dummy/tmp/cache/assets/sprockets/v3.0/GA/GASYa5vOdbDTxwlNjrbfSeP0VqSsLpI1WPJOL-DlpX8.cache
235
232
  - spec/dummy/tmp/cache/assets/sprockets/v3.0/gO/gO-rpB7IiDeyguj60kVlTKZVtRC2P1B99AOB14IdvVI.cache
233
+ - spec/dummy/tmp/cache/assets/sprockets/v3.0/Ng/NgxbVmfEhJPMVKKQOWa0nwrHB7PcQjSyU8CLLguWYlo.cache
234
+ - spec/dummy/tmp/cache/assets/sprockets/v3.0/B3/B33FTX989v8LP64xdx3RQwjUBAenWdgN6qT8sRqdw0U.cache
236
235
  - spec/dummy/tmp/cache/assets/sprockets/v3.0/hj/hj8Ir9wcVSy1KYrnWu9bpD24vDhCG3tvt-nKbNxb1Wg.cache
237
- - spec/dummy/tmp/cache/assets/sprockets/v3.0/jB/jBSZ526UktWa5tR11UzXAqsEYE1Uf1yI6odiAdWnvmA.cache
238
236
  - spec/dummy/tmp/cache/assets/sprockets/v3.0/JT/JT67EmzctkGMcnuWGu3PGVl4VdsixOmCeTj1iN8XqFU.cache
239
- - spec/dummy/tmp/cache/assets/sprockets/v3.0/Ng/NgxbVmfEhJPMVKKQOWa0nwrHB7PcQjSyU8CLLguWYlo.cache
240
- - spec/dummy/tmp/cache/assets/sprockets/v3.0/o_/o_N92h27J6XZ47drVHd36L-LHb1TeVSJOP8GCoR6rfc.cache
241
237
  - spec/dummy/tmp/cache/assets/sprockets/v3.0/oC/oCsZTGZyV4kH8Y4OeSDUdrwfkJFPzTODZjuBKZB8oGQ.cache
242
- - spec/dummy/tmp/cache/assets/sprockets/v3.0/PE/PE4qT2vBxYzDt9ccdMf4qpdTP7dOm-R5cLIBQibKwRQ.cache
238
+ - spec/dummy/tmp/cache/assets/sprockets/v3.0/1T/1T-a1hn7TPU4VqYN1_WMFcWXOJr7VHGalLxVInuxckM.cache
243
239
  - spec/dummy/tmp/cache/assets/sprockets/v3.0/q6/q6BYa32YJF11eGVapO4ouNl6gayPIsARgMavlzZmoi0.cache
244
240
  - spec/dummy/tmp/cache/assets/sprockets/v3.0/WC/WCPElyBEHMaQVSX5y9b3OeK62YirmwoDyI47yFYx5GQ.cache
245
241
  - spec/dummy/tmp/cache/assets/sprockets/v3.0/x7/x7KkTV3ibfIEysLB_ug5bfmnn2VLV_BldukPR3EoPBk.cache
242
+ - spec/dummy/tmp/cache/assets/sprockets/v3.0/2s/2s3YUjKGbnsy4nqjtt3_bLi2-n7vURwbi1N4I3efe3M.cache
243
+ - spec/dummy/tmp/cache/assets/sprockets/v3.0/54/54JuizNobIWGWy1THHxcQSq9oLjimE6qRyKaKuNrnuA.cache
244
+ - spec/dummy/tmp/cache/assets/sprockets/v3.0/jB/jBSZ526UktWa5tR11UzXAqsEYE1Uf1yI6odiAdWnvmA.cache
245
+ - spec/dummy/tmp/cache/assets/sprockets/v3.0/o_/o_N92h27J6XZ47drVHd36L-LHb1TeVSJOP8GCoR6rfc.cache
246
246
  - spec/features/access_restricted_spec.rb
247
- - spec/spec_helper.rb
248
247
  - spec/support/features/user_agent_helper.rb
248
+ - spec/controllers/lockup/lockup_controller_spec.rb