pragma 0.1.0 → 0.1.1
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 +4 -4
- data/lib/pragma/operation/defaults.rb +15 -3
- data/lib/pragma/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 37c47b2f76d464f81e6611ec84accd125eef3b45
|
4
|
+
data.tar.gz: a2f6182c7b4d4d8a201dcb330e2f294448154513
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 44b5d55c2e90634907a72ec35a2f054279835f3c099de10f432ba3109bef6ef935edefaa318cd56e4e265b29cb24e94c194e5bca59aeacf71c3b7b5a62e0dba5
|
7
|
+
data.tar.gz: c44c4dd1b8fbc077928e672b6a978bb52e620a9a37c4decf5d1621476f1205fd064410bbdd4a0cb218ffe172c8d4f8ac5f04cb4e9629b5f640c41fc1534fc3bd
|
@@ -14,24 +14,36 @@ module Pragma
|
|
14
14
|
#
|
15
15
|
# If the operation name is +API::V1::Post::Operation::Show+, returns
|
16
16
|
# +API::V1::Post::Decorator+.
|
17
|
+
#
|
18
|
+
# @return [Class]
|
17
19
|
def decorator_klass
|
18
|
-
super || (
|
20
|
+
super || (
|
21
|
+
Object.const_get(computed_decorator_klass) if class_exists?(computed_decorator_klass)
|
22
|
+
)
|
19
23
|
end
|
20
24
|
|
21
25
|
# Returns the policy class for the current resource (if the inferred class exists).
|
22
26
|
#
|
23
27
|
# If the operation name is +API::V1::Post::Operation::Show+, returns
|
24
28
|
# +API::V1::Post::Policy+.
|
29
|
+
#
|
30
|
+
# @return [Class]
|
25
31
|
def policy_klass
|
26
|
-
super || (
|
32
|
+
super || (
|
33
|
+
Object.const_get(computed_policy_klass) if class_exists?(computed_policy_klass)
|
34
|
+
)
|
27
35
|
end
|
28
36
|
|
29
37
|
# Returns the contract class for the current resource (if the inferred class exists).
|
30
38
|
#
|
31
39
|
# If the operation name is +API::V1::Post::Operation::Create+, returns
|
32
40
|
# +API::V1::Post::Contract::Create+.
|
41
|
+
#
|
42
|
+
# @return [Class]
|
33
43
|
def contract_klass
|
34
|
-
super || (
|
44
|
+
super || (
|
45
|
+
Object.const_get(computed_contract_klass) if class_exists?(computed_contract_klass)
|
46
|
+
)
|
35
47
|
end
|
36
48
|
|
37
49
|
# Returns the model class for the current resource (if the inferred class exists).
|
data/lib/pragma/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: pragma
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.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: 2016-12-
|
11
|
+
date: 2016-12-30 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: pragma-operation
|