cyrax 0.5.13 → 0.5.14

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
- SHA1:
3
- metadata.gz: 4a305051a8e89e95a2fccd98ef8c2ac05679189c
4
- data.tar.gz: f9f3cb1822a1f850ff9a55e1f0d492579ff73ad8
2
+ SHA256:
3
+ metadata.gz: ffa73afcc3fa3024643e425b5063022a1868c533b684db1b3051e0a5512ba02e
4
+ data.tar.gz: 51db666b13256c83848a69f9c62c5796749ff68113261870ad1552b6c73beabf
5
5
  SHA512:
6
- metadata.gz: d8e50444c96e653ab43c86463816cc5d7ab4593ef7f27c08b211c1193a87fb2e773ba620ff26d60c91c6e297857f76ea2e8d8d8631626660b7f77f57e4dbfea2
7
- data.tar.gz: dcbfc8d93cfdd24c5a4d080be8a4db16776e9e49bc45524f74fe5dce820473c744f29513479296b304ebe7b80f08a7880126d2215f67899d234319b3974666a2
6
+ metadata.gz: 926899dc59201b60ca43de71876abfbfca228b10a8622b89cde69fd5befc6cbd30f2583f6cbbe874c759f1304b96c44ffa0971cdc26f4753cec355a352d75abf
7
+ data.tar.gz: b42a00f20a319fdd645d539b069cc6849775014a77871c3465c23a4af6e76a959d553f0ef7ffd9602fbeb331419e041e5d0c668b2f22f7a2253865bb1b225c07
@@ -1,4 +1,6 @@
1
1
  require 'active_model'
2
+ # require 'active_model/serializers/xml'
3
+
2
4
  class Cyrax::Decorator < Cyrax::Wrapper
3
5
  include ActiveModel::Serialization
4
6
  include ActiveModel::Serializers::JSON
@@ -15,7 +15,7 @@ module Cyrax::ControllerHelper
15
15
  result = result.to_model if result.respond_to?(:to_model)
16
16
 
17
17
  respond_to do |format|
18
- format.any do
18
+ format.html do
19
19
  # set flashes
20
20
  if response.success?
21
21
  flash[:notice] = options[:notice] if options[:notice].present?
@@ -24,11 +24,14 @@ module Cyrax::ControllerHelper
24
24
  flash.now[:error] = options[:error] if options[:error].present?
25
25
  end
26
26
  set_resource_from(response)
27
- super(result, options, &block)
28
27
  end
29
28
  format.json do
30
29
  render json: MultiJson.dump(response.as_json), status: options[:status] || 200
31
30
  end
31
+ format.any do
32
+ set_resource_from(response)
33
+ super(response, options, &block)
34
+ end
32
35
  end
33
36
  else
34
37
  super(*args)
data/lib/cyrax/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Cyrax
2
- VERSION = "0.5.13"
2
+ VERSION = "0.5.14"
3
3
  end
metadata CHANGED
@@ -1,43 +1,43 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cyrax
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.13
4
+ version: 0.5.14
5
5
  platform: ruby
6
6
  authors:
7
7
  - Droidlabs
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-06-28 00:00:00.000000000 Z
11
+ date: 2022-06-20 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - ">="
17
+ - - "~>"
18
18
  - !ruby/object:Gem::Version
19
- version: '0'
19
+ version: '4.2'
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
- - - ">="
24
+ - - "~>"
25
25
  - !ruby/object:Gem::Version
26
- version: '0'
26
+ version: '4.2'
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: activemodel
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
- - - ">="
31
+ - - "~>"
32
32
  - !ruby/object:Gem::Version
33
- version: '0'
33
+ version: '4.2'
34
34
  type: :runtime
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
- - - ">="
38
+ - - "~>"
39
39
  - !ruby/object:Gem::Version
40
- version: '0'
40
+ version: '4.2'
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: has_active_logger
43
43
  requirement: !ruby/object:Gem::Requirement
@@ -150,19 +150,18 @@ required_rubygems_version: !ruby/object:Gem::Requirement
150
150
  - !ruby/object:Gem::Version
151
151
  version: '0'
152
152
  requirements: []
153
- rubyforge_project:
154
- rubygems_version: 2.4.3
153
+ rubygems_version: 3.0.3.1
155
154
  signing_key:
156
155
  specification_version: 4
157
156
  summary: Small library for adding service layer to Rails projects
158
157
  test_files:
159
- - spec/cyrax/base_spec.rb
160
- - spec/cyrax/decorator_spec.rb
161
- - spec/cyrax/extensions/has_decorator_spec.rb
162
158
  - spec/cyrax/extensions/has_resource_spec.rb
163
- - spec/cyrax/extensions/has_response_spec.rb
164
159
  - spec/cyrax/extensions/has_service_spec.rb
165
- - spec/cyrax/resource_spec.rb
160
+ - spec/cyrax/extensions/has_decorator_spec.rb
161
+ - spec/cyrax/extensions/has_response_spec.rb
166
162
  - spec/cyrax/response_spec.rb
167
163
  - spec/cyrax/serializer_spec.rb
164
+ - spec/cyrax/resource_spec.rb
165
+ - spec/cyrax/base_spec.rb
166
+ - spec/cyrax/decorator_spec.rb
168
167
  - spec/spec_helper.rb