boxxspring 2.0.5 → 2.0.6
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/boxxspring/operation.rb +29 -0
- data/lib/boxxspring/resources/artifact.rb +10 -4
- data/lib/boxxspring/resources/service.rb +1 -0
- data/lib/boxxspring/resources/sponsor.rb +1 -1
- data/lib/boxxspring/resources/theme.rb +2 -1
- data/lib/boxxspring/resources/theme_environment.rb +3 -0
- data/lib/boxxspring/resources/user_agent.rb +3 -1
- data/lib/boxxspring/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3c47a4659d7a16de1e8682a0406686f1bd955125
|
4
|
+
data.tar.gz: 5b60a71aa11abf6cc4784b4cbaab4c21f20dfe97
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b1bd3b7ceadd0c64175ba166c45ad51d767f4d087b3915bad8f32713773a07aa0087fedd3a8a935e5a3fad604988f103c433fa871a49a1e1cb2f398aa6b67657
|
7
|
+
data.tar.gz: c1d434655d783bab07953a3b44439ec31c16625d5183b6ffa61c3ccb7883940c3b62b17e5592cd03810ff90fdecb8a1acfd6365dc2aaa66a1f8c96c5a0313e97
|
data/lib/boxxspring/operation.rb
CHANGED
@@ -23,6 +23,10 @@ module Boxxspring
|
|
23
23
|
self.spawn( offset: _offset )
|
24
24
|
end
|
25
25
|
|
26
|
+
def include( *arguments )
|
27
|
+
self.spawn( :include => self.normalize_include( *arguments ) )
|
28
|
+
end
|
29
|
+
|
26
30
|
def query
|
27
31
|
result = nil
|
28
32
|
Boxxspring::Request.new.tap do | request |
|
@@ -48,6 +52,31 @@ module Boxxspring
|
|
48
52
|
)
|
49
53
|
end
|
50
54
|
|
55
|
+
public; def normalize_include( *arguments )
|
56
|
+
|
57
|
+
includes = {};
|
58
|
+
arguments.each do | argument |
|
59
|
+
case argument
|
60
|
+
when Array
|
61
|
+
argument.each do | value |
|
62
|
+
includes.deep_merge!( self.normalize_include( value ) )
|
63
|
+
end
|
64
|
+
when Hash
|
65
|
+
argument.each do | key, value |
|
66
|
+
if !includes.include?( key ) || includes[ key ] === true
|
67
|
+
includes[ key ] = self.normalize_include( value )
|
68
|
+
else
|
69
|
+
includes[ key ].deep_merge!( self.normalize_include( value ) )
|
70
|
+
end
|
71
|
+
end
|
72
|
+
else
|
73
|
+
includes[ argument ] = true
|
74
|
+
end
|
75
|
+
end
|
76
|
+
includes
|
77
|
+
|
78
|
+
end
|
79
|
+
|
51
80
|
end
|
52
81
|
|
53
82
|
end
|
@@ -2,17 +2,17 @@ module Boxxspring
|
|
2
2
|
|
3
3
|
class Artifact < Base
|
4
4
|
|
5
|
+
field :type_name
|
6
|
+
field :id
|
7
|
+
|
5
8
|
field :created_at
|
6
9
|
field :updated_at
|
7
10
|
field :edited_at
|
8
11
|
field :published_at
|
9
|
-
field :featured_at
|
10
12
|
|
11
|
-
field :
|
13
|
+
field :state
|
12
14
|
field :original
|
13
15
|
|
14
|
-
field :type_name
|
15
|
-
field :id
|
16
16
|
field :name
|
17
17
|
field :short_description
|
18
18
|
field :description
|
@@ -24,6 +24,12 @@ module Boxxspring
|
|
24
24
|
field :meta_title
|
25
25
|
field :slug
|
26
26
|
|
27
|
+
has_one :attribution
|
28
|
+
|
29
|
+
has_many :artifacts
|
30
|
+
has_many :pictures
|
31
|
+
has_many :cards
|
32
|
+
|
27
33
|
end
|
28
34
|
|
29
35
|
end
|
data/lib/boxxspring/version.rb
CHANGED