apress-api 1.24.0 → 1.24.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (86) hide show
  1. checksums.yaml +4 -4
  2. data/.drone.yml +72 -30
  3. data/Appraisals +9 -13
  4. data/CHANGELOG.md +11 -1
  5. data/Gemfile +1 -0
  6. data/README.md +2 -0
  7. data/Rakefile +1 -0
  8. data/app/controllers/apress/api/deprecated_versions_controller.rb +1 -0
  9. data/app/controllers/apress/api/v1/callbacks_controller.rb +1 -0
  10. data/app/controllers/apress/api/v1/tokens_controller.rb +1 -0
  11. data/app/docs/schema/api/v1/types/apress/api/link.rb +1 -0
  12. data/app/docs/schema/api/v1/types/apress/api/links.rb +1 -0
  13. data/app/docs/swagger/v1/controllers/apress/api/tokens_controller.rb +1 -0
  14. data/app/docs/swagger/v1/default_responses/bad_request.rb +1 -0
  15. data/app/docs/swagger/v1/default_responses/not_found.rb +1 -0
  16. data/app/docs/swagger/v1/default_responses/unauthenticated.rb +1 -0
  17. data/app/docs/swagger/v1/default_responses/unauthorized.rb +1 -0
  18. data/app/docs/swagger/v1/default_responses/unprocessable.rb +1 -0
  19. data/app/docs/swagger/v1/default_responses/updates_locked.rb +1 -0
  20. data/app/docs/swagger/v1/models/apress/api/client.rb +1 -0
  21. data/app/docs/swagger/v1/models/apress/api/simple_error.rb +1 -0
  22. data/app/docs/swagger/v1/models/apress/api/unproccesable_error.rb +1 -0
  23. data/app/docs/swagger/v1/models/apress/api/unprocessable_error.rb +1 -0
  24. data/app/docs/swagger/v1/root.rb +1 -0
  25. data/app/interactors/apress/api/callbacks/base_callback.rb +1 -0
  26. data/app/interactors/apress/api/delayed_fire_callback.rb +1 -0
  27. data/app/jobs/apress/api/event_handler_enqueueing_job.rb +1 -0
  28. data/app/jobs/apress/api/fire_callback_job.rb +1 -0
  29. data/app/models/apress/api/client.rb +1 -0
  30. data/app/policies/apress/api/callback_policy.rb +1 -0
  31. data/app/services/apress/api/auth_service.rb +1 -0
  32. data/app/views/apress/api/shared/_exception.json.jbuilder +1 -0
  33. data/app/views/apress/api/shared/error.json.jbuilder +1 -0
  34. data/app/views/apress/api/shared/parameter_missing_errors.json.jbuilder +1 -0
  35. data/app/views/apress/api/shared/unprocessable_errors.json.jbuilder +1 -0
  36. data/app/views/apress/api/v1/clients/_client.json.jbuilder +1 -0
  37. data/app/views/apress/api/v1/tokens/create.json.jbuilder +1 -0
  38. data/apress-api.gemspec +1 -0
  39. data/config/routes.rb +1 -0
  40. data/db/migrate/20150716000000_create_api_clients.rb +1 -0
  41. data/dip.yml +4 -3
  42. data/lib/apress-api.rb +1 -0
  43. data/lib/apress/api.rb +1 -0
  44. data/lib/apress/api/api_controller/authentification.rb +1 -0
  45. data/lib/apress/api/api_controller/base.rb +1 -0
  46. data/lib/apress/api/api_controller/compatibility.rb +1 -0
  47. data/lib/apress/api/api_controller/pagination.rb +1 -0
  48. data/lib/apress/api/api_controller/pagination_helper.rb +1 -0
  49. data/lib/apress/api/api_controller/rescue.rb +1 -0
  50. data/lib/apress/api/api_controller/responds.rb +1 -0
  51. data/lib/apress/api/callbacks/config.rb +1 -0
  52. data/lib/apress/api/callbacks/fire_callback_error.rb +1 -0
  53. data/lib/apress/api/callbacks/integration.rb +1 -0
  54. data/lib/apress/api/callbacks/repeat_callback_error.rb +1 -0
  55. data/lib/apress/api/engine.rb +1 -0
  56. data/lib/apress/api/extensions/jbuilder/jbuilder_template.rb +1 -0
  57. data/lib/apress/api/rspec.rb +1 -0
  58. data/lib/apress/api/rspec/utils.rb +1 -0
  59. data/lib/apress/api/testing/json_matcher.rb +1 -0
  60. data/lib/apress/api/version.rb +2 -1
  61. data/lib/tasks/docs.rake +1 -0
  62. data/spec/controllers/api_controller/authentification_spec.rb +1 -0
  63. data/spec/controllers/api_controller/pagination_spec.rb +1 -0
  64. data/spec/controllers/api_controller/rescue_spec.rb +1 -0
  65. data/spec/controllers/deprecated_versions_controller_spec.rb +1 -0
  66. data/spec/controllers/v1/callbacks_controller_spec.rb +1 -0
  67. data/spec/controllers/v1/tokens_controller_spec.rb +1 -0
  68. data/spec/factories/client_factory.rb +1 -0
  69. data/spec/helpers/paginating_cache_spec.rb +1 -0
  70. data/spec/interactors/apress/api/delayed_fire_callback_spec.rb +1 -0
  71. data/spec/internal/app/integrations/error_client/fire_callback.rb +1 -0
  72. data/spec/internal/app/integrations/service_client/fire_callback.rb +1 -0
  73. data/spec/internal/app/jobs/handler_job.rb +1 -0
  74. data/spec/internal/app/jobs/second_handler_job.rb +1 -0
  75. data/spec/internal/app/models/dummy_model.rb +1 -0
  76. data/spec/internal/config/environments/test.rb +1 -0
  77. data/spec/internal/config/initializers/api.rb +1 -0
  78. data/spec/internal/config/routes.rb +1 -0
  79. data/spec/internal/db/schema.rb +1 -0
  80. data/spec/jobs/apress/api/event_handler_equeueing_job_spec.rb +1 -0
  81. data/spec/jobs/apress/api/fire_callback_job_spec.rb +1 -0
  82. data/spec/lib/apress/api/callbacks/integration_spec.rb +1 -0
  83. data/spec/models/client_spec.rb +1 -0
  84. data/spec/services/auth_service_spec.rb +1 -0
  85. data/spec/spec_helper.rb +1 -0
  86. metadata +2 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 94df686686e25123a2ebb3730ea3c572a8c43043
4
- data.tar.gz: 285221061f1816e795c6a256aaa071029ce942ed
3
+ metadata.gz: 2a15ba51274eacfc7eb5ed70f29a74b65d392a54
4
+ data.tar.gz: 29f78fba861651c173d7b17ad3c2f1a1764e6896
5
5
  SHA512:
6
- metadata.gz: f7febab7293f6b314c4ad4dd07061e659efa4c6b569e2466ed5370f9d7b6537ee68e2384dfe9c9aecbe8db6b273ab7ca86280595100561cba843972d2bbe189b
7
- data.tar.gz: '09ba9c12e3a7f968422c13d90e8b6a6094c5f7d7d7c5cbe9c3267edb5d763c1b92a35104652e3c9f9c185c5404c5d620a875210b0bdc41fdf3e354fd859a4138'
6
+ metadata.gz: 4e6cefef7e7243fb8de4767d02f28f3d0069dc12e397cba8989ca4f86bbb50dc7fa833fbc86ec2dc6cb41efbbe4f20a3e898072d19bdd483b54a0882c309c511
7
+ data.tar.gz: 9ea70efe78bf9c39c1c12169721893bad755f6b28f34ac8788f29b731f733c1e6b8a378639d754e4cf9c439200f21dd197a0a3093ff179b93c36f60cc0a1ab1c
data/.drone.yml CHANGED
@@ -1,30 +1,72 @@
1
- build:
2
- test:
3
- image: abakpress/dind-testing
4
- privileged: true
5
- pull: true
6
- volumes:
7
- - /home/data/drone/images:/images
8
- - /home/data/drone/gems:/bundle
9
- environment:
10
- - COMPOSE_FILE_EXT=drone
11
- - RUBY_IMAGE_TAG=2.2-latest
12
- - POSTGRES_IMAGE_TAG=9.3-latest
13
- commands:
14
- - wrapdocker docker -v
15
-
16
- - fetch-images --image abakpress/ruby-app:$RUBY_IMAGE_TAG
17
-
18
- - dip provision
19
- - dip rspec
20
-
21
- release:
22
- image: abakpress/gem-publication
23
- pull: true
24
- when:
25
- event: push
26
- branch: master
27
- volumes:
28
- - /home/data/drone/rubygems:/root/.gem
29
- commands:
30
- - release-gem --public
1
+ ---
2
+ kind: pipeline
3
+ type: docker
4
+ name: build
5
+
6
+ volumes:
7
+ - name: rubygems
8
+ host:
9
+ path: /home/data/drone/rubygems
10
+ - name: bundle
11
+ host:
12
+ path: /home/data/drone/gems
13
+
14
+ spec_step_common: &spec_step_common
15
+ pull: if-not-exists
16
+ volumes:
17
+ - name: bundle
18
+ path: /bundle
19
+ commands:
20
+ - rm -fr Gemfile.lock gemfiles/
21
+ - bundle install -j 5
22
+ - bundle exec appraisal install
23
+ - bundle exec appraisal bundle exec rspec
24
+
25
+ steps:
26
+ - name: postgres
27
+ image: abakpress/postgres-db:9.6-latest
28
+ pull: if-not-exists
29
+ environment:
30
+ POSTGRES_DB: docker
31
+ detach: true
32
+
33
+ - name: build on ruby2.2
34
+ image: abakpress/ruby-app:2.2-latest
35
+ environment:
36
+ TEST_DB_HOST: postgres
37
+ TEST_DB_NAME: docker
38
+ TEST_DB_USERNAME: postgres
39
+ BUNDLE_PATH: /bundle/2.2
40
+ <<: *spec_step_common
41
+
42
+ - name: build on ruby2.3
43
+ image: abakpress/ruby-app:2.3-latest
44
+ environment:
45
+ TEST_DB_HOST: postgres
46
+ TEST_DB_NAME: docker
47
+ TEST_DB_USERNAME: postgres
48
+ BUNDLE_PATH: /bundle/2.3
49
+ <<: *spec_step_common
50
+
51
+ - name: build on ruby2.4
52
+ image: abakpress/ruby-app:2.4-latest
53
+ environment:
54
+ TEST_DB_HOST: postgres
55
+ TEST_DB_NAME: docker
56
+ TEST_DB_USERNAME: postgres
57
+ BUNDLE_PATH: /bundle/2.4
58
+ <<: *spec_step_common
59
+
60
+ - name: release
61
+ image: abakpress/gem-publication:latest
62
+ pull: if-not-exists
63
+ when:
64
+ event: push
65
+ branch: master
66
+ status: success
67
+ volumes:
68
+ - name: rubygems
69
+ path: /root/.gem
70
+ commands:
71
+ - release-gem --public
72
+
data/Appraisals CHANGED
@@ -1,18 +1,14 @@
1
- appraise "rails3.2" do
2
- gem "rails", "~> 3.2.0", require: false
3
- gem "strong_parameters", ">= 0.2", require: false
1
+ # frozen_string_literal: true
2
+ if RUBY_VERSION < '2.4'
3
+ appraise "rails4.0" do
4
+ gem "rails", "~> 4.0.0", require: false
5
+ end
4
6
  end
5
7
 
6
- appraise "rails4.0" do
7
- gem "rails", "~> 4.0.0", require: false
8
- end
9
-
10
- appraise "rails4.1" do
11
- gem "rails", "~> 4.1.0", require: false
12
- end
13
-
14
- appraise "rails4.2" do
15
- gem "rails", "~> 4.2.0", require: false
8
+ if RUBY_VERSION < '2.5'
9
+ appraise "rails4.2" do
10
+ gem "rails", "~> 4.2.0", require: false
11
+ end
16
12
  end
17
13
 
18
14
  appraise "rails5.0" do
data/CHANGELOG.md CHANGED
@@ -1,6 +1,16 @@
1
+ # v1.24.2
2
+
3
+ * 2021-07-22 [79fba01](../../commit/79fba01) - __(Andrew N. Shalaev)__ fix: try to mount missed volume
4
+ * 2021-07-16 [37a8921](../../commit/37a8921) - __(Andrew N. Shalaev)__ Release v1.24.2
5
+ * 2021-07-16 [c261182](../../commit/c261182) - __(Andrew N. Shalaev)__ feature: freeze string literals
6
+ * 2021-07-16 [2e9f3f3](../../commit/2e9f3f3) - __(Andrew N. Shalaev)__ feature: add ruby2.4 support
7
+ https://jira.railsc.ru/browse/BPC-19154
8
+
9
+ * 2019-09-20 [f397049](../../commit/f397049) - __(Andrew N. Shalaev)__ Release v1.24.1
10
+ * 2019-09-20 [929480d](../../commit/929480d) - __(Andrew N. Shalaev)__ feature: add bage with version for link to rubygems.org
11
+
1
12
  # v1.24.0
2
13
 
3
- * 2019-09-19 [46e6337](../../commit/46e6337) - __(Andrew N. Shalaev)__ Release v1.24.0
4
14
  * 2019-09-19 [d2ec039](../../commit/d2ec039) - __(Andrew N. Shalaev)__ fix: send 401 Unathorized instead 403
5
15
  https://jira.railsc.ru/browse/BPC-15268
6
16
 
data/Gemfile CHANGED
@@ -1,3 +1,4 @@
1
+ # frozen_string_literal: true
1
2
  source "https://gems.railsc.ru"
2
3
  source "https://rubygems.org"
3
4
 
data/README.md CHANGED
@@ -1,5 +1,7 @@
1
1
  # Apress::Api
2
2
 
3
+ [![Gem Version](https://badge.fury.io/rb/apress-api.svg)](https://badge.fury.io/rb/apress-api)
4
+
3
5
  Базовый контроллер АПИ с авторизацией HMAC
4
6
 
5
7
  ## Installation
data/Rakefile CHANGED
@@ -1,2 +1,3 @@
1
+ # frozen_string_literal: true
1
2
  require "bundler/gem_tasks"
2
3
 
@@ -1,3 +1,4 @@
1
+ # frozen_string_literal: true
1
2
  module Apress
2
3
  module Api
3
4
  class DeprecatedVersionsController < ApiController::Base
@@ -1,3 +1,4 @@
1
+ # frozen_string_literal: true
1
2
  module Apress
2
3
  module Api
3
4
  module V1
@@ -1,3 +1,4 @@
1
+ # frozen_string_literal: true
1
2
  module Apress
2
3
  module Api
3
4
  module V1
@@ -1,3 +1,4 @@
1
+ # frozen_string_literal: true
1
2
  module Schema
2
3
  module Api
3
4
  module V1
@@ -1,3 +1,4 @@
1
+ # frozen_string_literal: true
1
2
  module Schema
2
3
  module Api
3
4
  module V1
@@ -1,3 +1,4 @@
1
+ # frozen_string_literal: true
1
2
  module Swagger
2
3
  module V1
3
4
  module Controllers
@@ -1,3 +1,4 @@
1
+ # frozen_string_literal: true
1
2
  module Swagger
2
3
  module V1
3
4
  module DefaultResponses
@@ -1,3 +1,4 @@
1
+ # frozen_string_literal: true
1
2
  module Swagger
2
3
  module V1
3
4
  module DefaultResponses
@@ -1,3 +1,4 @@
1
+ # frozen_string_literal: true
1
2
  module Swagger
2
3
  module V1
3
4
  module DefaultResponses
@@ -1,3 +1,4 @@
1
+ # frozen_string_literal: true
1
2
  module Swagger
2
3
  module V1
3
4
  module DefaultResponses
@@ -1,3 +1,4 @@
1
+ # frozen_string_literal: true
1
2
  module Swagger
2
3
  module V1
3
4
  module DefaultResponses
@@ -1,3 +1,4 @@
1
+ # frozen_string_literal: true
1
2
  module Swagger
2
3
  module V1
3
4
  module DefaultResponses
@@ -1,3 +1,4 @@
1
+ # frozen_string_literal: true
1
2
  module Swagger
2
3
  module V1
3
4
  module Models
@@ -1,3 +1,4 @@
1
+ # frozen_string_literal: true
1
2
  module Swagger
2
3
  module V1
3
4
  module Models
@@ -1,3 +1,4 @@
1
+ # frozen_string_literal: true
1
2
  require_relative 'unprocessable_error'
2
3
 
3
4
  module Swagger
@@ -1,3 +1,4 @@
1
+ # frozen_string_literal: true
1
2
  module Swagger
2
3
  module V1
3
4
  module Models
@@ -1,3 +1,4 @@
1
+ # frozen_string_literal: true
1
2
  module Swagger
2
3
  module V1
3
4
  class Root < ::Apress::Documentation::Swagger::Schema
@@ -1,3 +1,4 @@
1
+ # frozen_string_literal: true
1
2
  module Apress
2
3
  module Api
3
4
  module Callbacks
@@ -1,3 +1,4 @@
1
+ # frozen_string_literal: true
1
2
  module Apress
2
3
  module Api
3
4
  class DelayedFireCallback
@@ -1,3 +1,4 @@
1
+ # frozen_string_literal: true
1
2
  module Apress
2
3
  module Api
3
4
  class EventHandlerEnqueueingJob
@@ -1,3 +1,4 @@
1
+ # frozen_string_literal: true
1
2
  module Apress
2
3
  module Api
3
4
  class FireCallbackJob
@@ -1,3 +1,4 @@
1
+ # frozen_string_literal: true
1
2
  module Apress
2
3
  module Api
3
4
  class Client < ActiveRecord::Base
@@ -1,3 +1,4 @@
1
+ # frozen_string_literal: true
1
2
  module Apress
2
3
  module Api
3
4
  class CallbackPolicy
@@ -1,3 +1,4 @@
1
+ # frozen_string_literal: true
1
2
  module Apress
2
3
  module Api
3
4
  class AuthService
@@ -1,3 +1,4 @@
1
+ # frozen_string_literal: true
1
2
  json.error do
2
3
  json.message exception.message
3
4
  json.backtrace exception.backtrace
@@ -1,3 +1,4 @@
1
+ # frozen_string_literal: true
1
2
  json.status @status
2
3
 
3
4
  if @exception && show_errors?
@@ -1,3 +1,4 @@
1
+ # frozen_string_literal: true
1
2
  json.status @status
2
3
 
3
4
  json.errors do
@@ -1,3 +1,4 @@
1
+ # frozen_string_literal: true
1
2
  json.status @status
2
3
 
3
4
  json.errors do
@@ -1,2 +1,3 @@
1
+ # frozen_string_literal: true
1
2
  json.(client, :id, :access_id, :secret_token_expire_at, :refresh_token_expire_at, :user_agent,
2
3
  :updated_at, :created_at)
@@ -1,3 +1,4 @@
1
+ # frozen_string_literal: true
1
2
  json.client do
2
3
  json.partial! partial: "apress/api/v1/clients/client", locals: {client: @client}
3
4
  json.(@client, :secret_token, :refresh_token)
data/apress-api.gemspec CHANGED
@@ -1,3 +1,4 @@
1
+ # frozen_string_literal: true
1
2
  lib = File.expand_path('../lib', __FILE__)
2
3
  $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
3
4
  require 'apress/api/version'
data/config/routes.rb CHANGED
@@ -1,3 +1,4 @@
1
+ # frozen_string_literal: true
1
2
  Rails.application.routes.draw do
2
3
  current_api_routes = lambda do
3
4
  resources :clients, only: [] do
@@ -1,3 +1,4 @@
1
+ # frozen_string_literal: true
1
2
  if Rails::VERSION::MAJOR > 4
2
3
  MIGRATION_CLASS = ActiveRecord::Migration[4.2]
3
4
  else
data/dip.yml CHANGED
@@ -1,8 +1,8 @@
1
1
  version: '1'
2
2
 
3
3
  environment:
4
- DOCKER_RUBY_VERSION: 2.2
5
- RUBY_IMAGE_TAG: 2.2-latest
4
+ DOCKER_RUBY_VERSION: 2.3
5
+ RUBY_IMAGE_TAG: 2.3-latest
6
6
  POSTGRES_IMAGE_TAG: 9.6-0.7.0
7
7
  COMPOSE_FILE_EXT: development
8
8
  RAILS_ENV: test
@@ -39,10 +39,11 @@ interaction:
39
39
 
40
40
  clean:
41
41
  service: app
42
- command: rm -f Gemfile.lock gemfiles/*.gemfile.*
42
+ command: rm -rf Gemfile.lock gemfiles/
43
43
 
44
44
  provision:
45
45
  - docker volume create --name bundler_data
46
+ - dip bundle config --local https://gems.railsc.ru/ ${APRESS_GEMS_CREDENTIALS}
46
47
  - dip clean
47
48
  - dip bundle install
48
49
  - dip appraisal install
data/lib/apress-api.rb CHANGED
@@ -1 +1,2 @@
1
+ # frozen_string_literal: true
1
2
  require 'apress/api'
data/lib/apress/api.rb CHANGED
@@ -1,3 +1,4 @@
1
+ # frozen_string_literal: true
1
2
  require 'rails'
2
3
  require "active_support"
3
4
  require "active_support/lazy_load_patch" if ActiveSupport::VERSION::MAJOR == 3 && ActiveSupport::VERSION::MINOR == 1
@@ -1,3 +1,4 @@
1
+ # frozen_string_literal: true
1
2
  module Apress
2
3
  module Api
3
4
  module ApiController
@@ -1,3 +1,4 @@
1
+ # frozen_string_literal: true
1
2
  module Apress
2
3
  module Api
3
4
  module ApiController
@@ -1,3 +1,4 @@
1
+ # frozen_string_literal: true
1
2
  module Apress
2
3
  module Api
3
4
  module ApiController
@@ -1,3 +1,4 @@
1
+ # frozen_string_literal: true
1
2
  require 'addressable/uri'
2
3
  require 'apress/api/api_controller/pagination_helper'
3
4
  module Apress
@@ -1,3 +1,4 @@
1
+ # frozen_string_literal: true
1
2
  module Apress
2
3
  module Api
3
4
  module ApiController
@@ -1,3 +1,4 @@
1
+ # frozen_string_literal: true
1
2
  module Apress
2
3
  module Api
3
4
  module ApiController
@@ -1,3 +1,4 @@
1
+ # frozen_string_literal: true
1
2
  module Apress
2
3
  module Api
3
4
  module ApiController
@@ -1,3 +1,4 @@
1
+ # frozen_string_literal: true
1
2
  require 'singleton'
2
3
 
3
4
  module Apress
@@ -1,3 +1,4 @@
1
+ # frozen_string_literal: true
1
2
  module Apress
2
3
  module Api
3
4
  module Callbacks
@@ -1,3 +1,4 @@
1
+ # frozen_string_literal: true
1
2
  module Apress
2
3
  module Api
3
4
  module Callbacks
@@ -1,3 +1,4 @@
1
+ # frozen_string_literal: true
1
2
  module Apress
2
3
  module Api
3
4
  module Callbacks
@@ -1,3 +1,4 @@
1
+ # frozen_string_literal: true
1
2
  require 'rails/engine'
2
3
 
3
4
  module Apress
@@ -1,3 +1,4 @@
1
+ # frozen_string_literal: true
1
2
  module Apress
2
3
  module Api
3
4
  module Extensions
@@ -1,4 +1,5 @@
1
1
  # coding: utf-8
2
+ # frozen_string_literal: true
2
3
  require 'rspec/core'
3
4
  require 'rspec/expectations'
4
5
  require 'swagger'
@@ -1,3 +1,4 @@
1
+ # frozen_string_literal: true
1
2
  require 'json'
2
3
 
3
4
  module Apress
@@ -1,3 +1,4 @@
1
+ # frozen_string_literal: true
1
2
  require 'json-schema'
2
3
  require 'rspec/expectations'
3
4
 
@@ -1,5 +1,6 @@
1
+ # frozen_string_literal: true
1
2
  module Apress
2
3
  module Api
3
- VERSION = '1.24.0'.freeze
4
+ VERSION = '1.24.2'
4
5
  end
5
6
  end
data/lib/tasks/docs.rake CHANGED
@@ -1,3 +1,4 @@
1
+ # frozen_string_literal: true
1
2
  namespace :docs do
2
3
  desc 'Generate api documentation'
3
4
  task generate: :environment do
@@ -1,3 +1,4 @@
1
+ # frozen_string_literal: true
1
2
  require "spec_helper"
2
3
 
3
4
  describe Apress::Api::ApiController::Base, type: :controller do
@@ -1,3 +1,4 @@
1
+ # frozen_string_literal: true
1
2
  require "spec_helper"
2
3
 
3
4
  def form_params(p)
@@ -1,3 +1,4 @@
1
+ # frozen_string_literal: true
1
2
  require "spec_helper"
2
3
 
3
4
  describe Apress::Api::ApiController::Base, type: :controller do
@@ -1,3 +1,4 @@
1
+ # frozen_string_literal: true
1
2
  require "spec_helper"
2
3
 
3
4
  describe Apress::Api::DeprecatedVersionsController, type: :controller do
@@ -1,3 +1,4 @@
1
+ # frozen_string_literal: true
1
2
  require "spec_helper"
2
3
 
3
4
  def form_params(p)
@@ -1,3 +1,4 @@
1
+ # frozen_string_literal: true
1
2
  require "spec_helper"
2
3
 
3
4
  def form_params(p)
@@ -1,3 +1,4 @@
1
+ # frozen_string_literal: true
1
2
  FactoryGirl.define do
2
3
  factory 'api/client', class: Apress::Api::Client do
3
4
  end
@@ -1,3 +1,4 @@
1
+ # frozen_string_literal: true
1
2
  require 'spec_helper'
2
3
  SIMPLE_TEST = <<-JBUILDER
3
4
  json.paginating_cache! @collection, nil, skip_digest: true do
@@ -1,3 +1,4 @@
1
+ # frozen_string_literal: true
1
2
  require 'spec_helper'
2
3
 
3
4
  describe Apress::Api::DelayedFireCallback, type: :interactor do
@@ -1,3 +1,4 @@
1
+ # frozen_string_literal: true
1
2
  module ErrorClient
2
3
  class FireCallback < Apress::Api::Callbacks::BaseCallback
3
4
  class RepeatError < StandardError
@@ -1,3 +1,4 @@
1
+ # frozen_string_literal: true
1
2
  module ServiceClient
2
3
  class FireCallback < Apress::Api::Callbacks::BaseCallback
3
4
  def call
@@ -1,3 +1,4 @@
1
+ # frozen_string_literal: true
1
2
  class HandlerJob
2
3
  def self.perform
3
4
  "Do work"
@@ -1,3 +1,4 @@
1
+ # frozen_string_literal: true
1
2
  class SecondHandlerJob
2
3
  def self.perform
3
4
  "Do work"
@@ -1,3 +1,4 @@
1
+ # frozen_string_literal: true
1
2
  class DummyModel < ActiveRecord::Base
2
3
  include Apress::Api::Callbacks::Integration
3
4
 
@@ -1,3 +1,4 @@
1
+ # frozen_string_literal: true
1
2
  HOST = 'www.example.org'
2
3
  ASSETS_HOST = 'www.example.org'
3
4
 
@@ -1,3 +1,4 @@
1
+ # frozen_string_literal: true
1
2
  Apress::Api::Callbacks::Config.add_client('service_access_id')
2
3
 
3
4
  Apress::Api::Callbacks::Config.add_service(service: 'service', event: 'some_event')
@@ -1,3 +1,4 @@
1
+ # frozen_string_literal: true
1
2
  Rails.application.routes.draw do
2
3
  #
3
4
  end
@@ -1,3 +1,4 @@
1
+ # frozen_string_literal: true
1
2
  ActiveRecord::Schema.define do
2
3
  create_table :dummy_models do |t|
3
4
  t.string :name
@@ -1,3 +1,4 @@
1
+ # frozen_string_literal: true
1
2
  require 'spec_helper'
2
3
 
3
4
  describe Apress::Api::EventHandlerEnqueueingJob, type: :job do
@@ -1,3 +1,4 @@
1
+ # frozen_string_literal: true
1
2
  require 'spec_helper'
2
3
 
3
4
  describe Apress::Api::FireCallbackJob, type: :job do
@@ -1,3 +1,4 @@
1
+ # frozen_string_literal: true
1
2
  require 'spec_helper'
2
3
 
3
4
  describe Apress::Api::Callbacks::Integration, type: :mixin do
@@ -1,3 +1,4 @@
1
+ # frozen_string_literal: true
1
2
  require "spec_helper"
2
3
 
3
4
  describe Apress::Api::Client do
@@ -1,3 +1,4 @@
1
+ # frozen_string_literal: true
1
2
  require "spec_helper"
2
3
  require "rack/request"
3
4
  require "rack/mock"
data/spec/spec_helper.rb CHANGED
@@ -1,3 +1,4 @@
1
+ # frozen_string_literal: true
1
2
  require "bundler/setup"
2
3
  require 'pry-byebug'
3
4
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: apress-api
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.24.0
4
+ version: 1.24.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - merkushin
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-09-19 00:00:00.000000000 Z
11
+ date: 2021-07-22 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails