ctws 0.2.0.beta → 0.2.1.beta

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: a6c25ba08ef913a24e861aba68d2db65fa8d565d
4
- data.tar.gz: b52120e6a18aacd9a858f85af3192aab2f2e4dd9
3
+ metadata.gz: 7c2e36b52ac2c13db809f7c2e5a78b0f958e1010
4
+ data.tar.gz: 9594e2b4248c424f7fc5f2ce87e40223f10fca7a
5
5
  SHA512:
6
- metadata.gz: e25816a5b51a541350ae19078fa34529a89283ce87c9640a048d55d1775d086f87a47d385982fa5536e770a5a43ccb43941ba83086ebba14ebc0aec17e3e0460
7
- data.tar.gz: 39505555c5fa0ee29712ac8f20e28ab49c67583dd6190d0cf856bcc1a41b2029b65f2b96395dd3509a7e536f047ad94b7af266b2928decddd49d7083aa0805ec
6
+ metadata.gz: 95004fef551479d5bae047cf41f8f65e88a40a4099410e0ee7a4345bc301aaabec4727048d15c2d39ae713b6d7c4ce19bd5968405373097a572747b94db6c3b6
7
+ data.tar.gz: 0d0e236475f8253d0dade3b21e1d429536ffbac643929d34b51a3bc7955309dbf851e6b1d3816980202e0b6fe746bd00ccb11d892db70f4ccbd4d7c5faa152bb
@@ -20,12 +20,17 @@ module Ctws
20
20
 
21
21
  included do
22
22
  # Define custom handlers
23
+ # 422 - Unprocessable Entity
23
24
  rescue_from ActiveRecord::RecordInvalid, with: :four_twenty_two
24
25
  rescue_from ExceptionHandler::MissingToken, with: :four_twenty_two
25
26
  rescue_from ExceptionHandler::InvalidToken, with: :four_twenty_two
26
27
  rescue_from ExceptionHandler::UnprocessableEntity, with: :four_twenty_two
28
+ rescue_from ArgumentError, with: :four_twenty_two
29
+ # 401 - Unauthorized
27
30
  rescue_from ExceptionHandler::AuthenticationError, with: :unauthorized_request
31
+ # 498 - Invalid Token
28
32
  rescue_from ExceptionHandler::ExpiredSignature, with: :four_ninety_eight
33
+ # 404 - Not Found
29
34
  rescue_from ExceptionHandler::RoutingError, with: :not_found
30
35
  rescue_from ActiveRecord::RecordNotFound, with: :not_found
31
36
  rescue_from ActionController::RoutingError, with: :not_found
data/lib/ctws/version.rb CHANGED
@@ -1,3 +1,7 @@
1
1
  module Ctws
2
- VERSION = '0.2.0.beta'
2
+ # Under development: BETA
3
+
4
+ VERSION = '0.2.1.beta'
5
+ # PATCH - 0.2.1.beta - 6/4/2018
6
+ # [FEATURE] Add exception handler for ArgumentError.
3
7
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ctws
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0.beta
4
+ version: 0.2.1.beta
5
5
  platform: ruby
6
6
  authors:
7
7
  - Agustí B.R.
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-04-04 00:00:00.000000000 Z
11
+ date: 2018-04-06 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails
@@ -193,11 +193,8 @@ files:
193
193
  - app/controllers/ctws/v1/ctws_controller.rb
194
194
  - app/controllers/ctws/v1/min_app_versions_controller.rb
195
195
  - app/controllers/ctws/v1/users_controller.rb
196
- - app/controllers/ctws/v2/authentication_controller.rb
197
196
  - app/controllers/ctws/v2/ctws_controller.rb
198
197
  - app/controllers/ctws/v2/min_app_versions_controller.rb
199
- - app/controllers/ctws/v2/users_controller.rb
200
- - app/jobs/ctws/application_job.rb
201
198
  - app/lib/ctws/json_web_token.rb
202
199
  - app/lib/ctws/message.rb
203
200
  - app/mailers/ctws/application_mailer.rb
@@ -269,9 +266,7 @@ files:
269
266
  - spec/dummy/db/development.sqlite3
270
267
  - spec/dummy/db/migrate/20170622072636_create_users.rb
271
268
  - spec/dummy/db/schema.rb
272
- - spec/dummy/db/test.sqlite3
273
269
  - spec/dummy/log/development.log
274
- - spec/dummy/log/test.log
275
270
  - spec/dummy/public/404.html
276
271
  - spec/dummy/public/422.html
277
272
  - spec/dummy/public/500.html
@@ -314,77 +309,75 @@ signing_key:
314
309
  specification_version: 4
315
310
  summary: Rails gem to be used as Webservice base.
316
311
  test_files:
317
- - spec/controllers/ctws/users_controller_spec.rb
318
312
  - spec/controllers/ctws/ctws_controller_spec.rb
319
- - spec/factories/ctws/ctws_user.rb
320
- - spec/factories/ctws_min_app_version.rb
321
- - spec/support/ctws/request_spec_helper.rb
322
- - spec/support/ctws/controller_spec_helper.rb
323
- - spec/auth/ctws/authenticate_user_spec.rb
313
+ - spec/controllers/ctws/users_controller_spec.rb
314
+ - spec/spec_helper.rb
324
315
  - spec/auth/ctws/authorize_api_request_spec.rb
325
- - spec/rails_helper.rb
326
- - spec/dummy/bin/setup
327
- - spec/dummy/bin/rake
328
- - spec/dummy/bin/bundle
329
- - spec/dummy/bin/update
330
- - spec/dummy/bin/rails
331
- - spec/dummy/config/boot.rb
332
- - spec/dummy/config/spring.rb
333
- - spec/dummy/config/locales/en.yml
334
- - spec/dummy/config/secrets.yml
335
- - spec/dummy/config/cable.yml
336
- - spec/dummy/config/application.rb
316
+ - spec/auth/ctws/authenticate_user_spec.rb
317
+ - spec/dummy/db/migrate/20170622072636_create_users.rb
318
+ - spec/dummy/db/schema.rb
319
+ - spec/dummy/db/development.sqlite3
337
320
  - spec/dummy/config/routes.rb
338
- - spec/dummy/config/database.yml
339
- - spec/dummy/config/puma.rb
321
+ - spec/dummy/config/environment.rb
322
+ - spec/dummy/config/application.rb
323
+ - spec/dummy/config/locales/en.yml
324
+ - spec/dummy/config/spring.rb
325
+ - spec/dummy/config/initializers/inflections.rb
340
326
  - spec/dummy/config/initializers/backtrace_silencers.rb
341
- - spec/dummy/config/initializers/assets.rb
327
+ - spec/dummy/config/initializers/wrap_parameters.rb
342
328
  - spec/dummy/config/initializers/session_store.rb
343
- - spec/dummy/config/initializers/cookies_serializer.rb
344
329
  - spec/dummy/config/initializers/new_framework_defaults.rb
345
- - spec/dummy/config/initializers/inflections.rb
346
- - spec/dummy/config/initializers/filter_parameter_logging.rb
330
+ - spec/dummy/config/initializers/cookies_serializer.rb
347
331
  - spec/dummy/config/initializers/application_controller_renderer.rb
348
- - spec/dummy/config/initializers/wrap_parameters.rb
332
+ - spec/dummy/config/initializers/assets.rb
333
+ - spec/dummy/config/initializers/filter_parameter_logging.rb
349
334
  - spec/dummy/config/initializers/mime_types.rb
335
+ - spec/dummy/config/boot.rb
336
+ - spec/dummy/config/cable.yml
337
+ - spec/dummy/config/environments/test.rb
350
338
  - spec/dummy/config/environments/development.rb
351
339
  - spec/dummy/config/environments/production.rb
352
- - spec/dummy/config/environments/test.rb
353
- - spec/dummy/config/environment.rb
354
- - spec/dummy/app/controllers/user_controller.rb
340
+ - spec/dummy/config/secrets.yml
341
+ - spec/dummy/config/database.yml
342
+ - spec/dummy/config/puma.rb
355
343
  - spec/dummy/app/controllers/application_controller.rb
356
- - spec/dummy/app/views/layouts/mailer.text.erb
357
- - spec/dummy/app/views/layouts/mailer.html.erb
358
- - spec/dummy/app/views/layouts/application.html.erb
344
+ - spec/dummy/app/controllers/user_controller.rb
359
345
  - spec/dummy/app/helpers/application_helper.rb
360
346
  - spec/dummy/app/helpers/user_helper.rb
361
- - spec/dummy/app/jobs/application_job.rb
347
+ - spec/dummy/app/mailers/application_mailer.rb
362
348
  - spec/dummy/app/assets/config/manifest.js
363
- - spec/dummy/app/assets/stylesheets/application.css
364
349
  - spec/dummy/app/assets/javascripts/cable.js
365
350
  - spec/dummy/app/assets/javascripts/application.js
351
+ - spec/dummy/app/assets/stylesheets/application.css
352
+ - spec/dummy/app/jobs/application_job.rb
366
353
  - spec/dummy/app/channels/application_cable/channel.rb
367
354
  - spec/dummy/app/channels/application_cable/connection.rb
368
- - spec/dummy/app/models/user.rb
355
+ - spec/dummy/app/views/layouts/mailer.html.erb
356
+ - spec/dummy/app/views/layouts/application.html.erb
357
+ - spec/dummy/app/views/layouts/mailer.text.erb
369
358
  - spec/dummy/app/models/application_record.rb
370
- - spec/dummy/app/mailers/application_mailer.rb
371
- - spec/dummy/db/test.sqlite3
372
- - spec/dummy/db/schema.rb
373
- - spec/dummy/db/migrate/20170622072636_create_users.rb
374
- - spec/dummy/db/development.sqlite3
375
- - spec/dummy/Rakefile
376
- - spec/dummy/config.ru
377
- - spec/dummy/public/404.html
359
+ - spec/dummy/app/models/user.rb
378
360
  - spec/dummy/public/apple-touch-icon.png
379
- - spec/dummy/public/500.html
380
- - spec/dummy/public/apple-touch-icon-precomposed.png
381
361
  - spec/dummy/public/422.html
362
+ - spec/dummy/public/404.html
382
363
  - spec/dummy/public/favicon.ico
383
- - spec/dummy/log/test.log
364
+ - spec/dummy/public/500.html
365
+ - spec/dummy/public/apple-touch-icon-precomposed.png
384
366
  - spec/dummy/log/development.log
385
- - spec/models/ctws/min_app_version_spec.rb
386
- - spec/models/ctws/user_spec.rb
387
- - spec/requests/ctws/users_spec.rb
367
+ - spec/dummy/Rakefile
368
+ - spec/dummy/config.ru
369
+ - spec/dummy/bin/rails
370
+ - spec/dummy/bin/setup
371
+ - spec/dummy/bin/rake
372
+ - spec/dummy/bin/update
373
+ - spec/dummy/bin/bundle
374
+ - spec/rails_helper.rb
388
375
  - spec/requests/ctws/min_app_version_spec.rb
376
+ - spec/requests/ctws/users_spec.rb
389
377
  - spec/requests/ctws/authentication_spec.rb
390
- - spec/spec_helper.rb
378
+ - spec/factories/ctws/ctws_user.rb
379
+ - spec/factories/ctws_min_app_version.rb
380
+ - spec/support/ctws/request_spec_helper.rb
381
+ - spec/support/ctws/controller_spec_helper.rb
382
+ - spec/models/ctws/user_spec.rb
383
+ - spec/models/ctws/min_app_version_spec.rb
@@ -1,6 +0,0 @@
1
- module Ctws
2
- module V2
3
- class AuthenticationController < Ctws::AuthenticationController
4
- end
5
- end
6
- end
@@ -1,6 +0,0 @@
1
- module Ctws
2
- module V2
3
- class UsersController < Ctws::UsersController
4
- end
5
- end
6
- end
@@ -1,4 +0,0 @@
1
- module Ctws
2
- class ApplicationJob < ActiveJob::Base
3
- end
4
- end
Binary file