tramway-api 1.8.6.11 → 1.8.6.12

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
  SHA256:
3
- metadata.gz: df04e623451ee6c2e632f318925f3f0c90a3f75af5f50fdbf4dba7b44642d90e
4
- data.tar.gz: c5c71de5a66e7821b648cb2a2c501e4df11c1f3e2745015fb8c1ed050c2a8e99
3
+ metadata.gz: 1c7fde28a2dba38baca9b59921296f203bee015e5065567cbfc8c818e49c15c9
4
+ data.tar.gz: e54a9190f07f0f3b78485f6667d1585a2847ec4ae0503e14362afe5a60cafbe3
5
5
  SHA512:
6
- metadata.gz: 882cefd561e168aabca2c72eaff7eb5f5781f88659cc7c7f6ebc8431c90d2ff7fde947bae8f6977cf6fe392c5473a27543769eb09ebd1268cda6713422f236b3
7
- data.tar.gz: 2906e2e3d2d85dd9712091a1651c0ab3aabb797e810443e2513a3a1d97b07b896237e2745b19256af1e308739b2876dfbc0249efd76cce5c540d10a20211b737
6
+ metadata.gz: 34d26aaadfe0f49d721903fabe39147b4c577cd74c3a8b0983435a5066121950a73915f9ea242adde527d2964bc24891ddf0e3ce523f797ad94a91cd7ae18cce
7
+ data.tar.gz: 8e51f5fb8e026a090a086d3f293356bdf35c272d5dc0dc5382ec4f2500735824e7a7770f4cf1ea591b5586dbe2c1f960adbfbc188f95b4fc432376a3b56a2847
@@ -6,6 +6,7 @@ module Tramway
6
6
  include ::Knock::Authenticable
7
7
  protect_from_forgery with: :null_session, if: proc { |c| c.request.format == 'application/json' }
8
8
  rescue_from ActiveRecord::RecordNotFound, with: :not_found if Rails.env.production?
9
+ before_action :application
9
10
 
10
11
  private
11
12
 
@@ -4,8 +4,6 @@ module Tramway
4
4
  module Api
5
5
  module V1
6
6
  class ApplicationController < ::Tramway::Api::ApplicationController
7
- before_action :application
8
-
9
7
  def render_errors_for(model)
10
8
  render json: model, status: :unprocessable_entity, serializer: ::Tramway::Api::V1::ErrorSerializer
11
9
  end
@@ -23,40 +21,6 @@ module Tramway
23
21
  hash
24
22
  end
25
23
 
26
- # Need to be removed
27
-
28
- before_action :load_application
29
-
30
- def load_application
31
- if engine_loaded(request).present?
32
- build_application_with_engine engine_loaded request
33
- elsif application_class(request).present?
34
- @application = application_class(request).camelize.constantize.first
35
- else
36
- @application = application_object request
37
- end
38
- end
39
-
40
- private
41
-
42
- def build_application_with_engine(engine_loaded)
43
- engine_module = "::Tramway::#{engine_loaded.camelize}".constantize
44
- @application = "#{engine_module}::#{engine_module.application.to_s.camelize}".constantize.first
45
- @application_engine = engine_loaded
46
- end
47
-
48
- def application_class(request)
49
- Constraints::DomainConstraint.new(request.domain).application_class
50
- end
51
-
52
- def engine_loaded(request)
53
- Constraints::DomainConstraint.new(request.domain).engine_loaded
54
- end
55
-
56
- def application_object(request)
57
- Constraints::DomainConstraint.new(request.domain).application_object
58
- end
59
-
60
24
  private
61
25
 
62
26
  def record
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Tramway
4
4
  module Api
5
- VERSION = '1.8.6.11'
5
+ VERSION = '1.8.6.12'
6
6
  end
7
7
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: tramway-api
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.8.6.11
4
+ version: 1.8.6.12
5
5
  platform: ruby
6
6
  authors:
7
7
  - Pavel Kalashnikov