pragma-operation 1.6.0 → 1.6.1

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: 9eb3cf53720469a289a53f3a93125af42f1dce5e
4
- data.tar.gz: 69ef331da2c7f241928fa6328d5fd5d30574d693
3
+ metadata.gz: eb07ac878d2d43280ac04eccaa46383f2c65dc92
4
+ data.tar.gz: 11619bebb76c36865c479f061febc07ba3e336e0
5
5
  SHA512:
6
- metadata.gz: ebe0ec7683d681eb68b14e4b424a98dbd5454e9b051205a544d078a448bc946e8232914b98049601762d21fd5860de2ba38b7d9a50b211b07a42b82a74eb34b3
7
- data.tar.gz: 68120660aae43abb27be4ac0ecc475ef97ff4956caf764fb9cef2d217500e5acb25b7452641ea735c1062714d470eeade194277a5587631ca58a077fb3dc3faa
6
+ metadata.gz: dc0566cc122ba0f654e0c0b934fc4e2a4495cf396ccbdaab7877c1b062b343fa3727e7c4d4da4882ed895e7e25d60664c646a2523ae59b548313cf72fb4ffb6c
7
+ data.tar.gz: c9466ecb6da4bb99ba207b3c94d520b432605735171ade1b6f03766dcb34ae9001ce285d57350c79d1bd364ea7f10bf3770ec5b8c400c7410e35ab95d54fea85
@@ -68,9 +68,13 @@ module Pragma
68
68
  end
69
69
  # rubocop:enable Metrics/LineLength
70
70
 
71
- params.each_pair do |name, value|
72
- next unless policy.resource.respond_to?("#{name}=")
73
- policy.resource.send("#{name}=", value)
71
+ if Object.const_defined?('Pragma::Contract::Base') && authorizable.is_a?(Pragma::Contract::Base)
72
+ authorizable.deserialize(params)
73
+ else
74
+ params.each_pair do |name, value|
75
+ next unless policy.resource.respond_to?("#{name}=")
76
+ policy.resource.send("#{name}=", value)
77
+ end
74
78
  end
75
79
 
76
80
  policy.send("#{self.class.operation_name}?").tap do |result|
@@ -1,6 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
  module Pragma
3
3
  module Operation
4
- VERSION = '1.6.0'
4
+ VERSION = '1.6.1'
5
5
  end
6
6
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: pragma-operation
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.6.0
4
+ version: 1.6.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Alessandro Desantis
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2017-01-20 00:00:00.000000000 Z
11
+ date: 2017-01-26 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: interactor