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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: d901be09d533533429cc8b8ac7e4a8ba959ceadc
4
- data.tar.gz: fdfcfbd33c36dc8f7dd2fcff6eb6cbcd3d46d0a2
3
+ metadata.gz: 3c47a4659d7a16de1e8682a0406686f1bd955125
4
+ data.tar.gz: 5b60a71aa11abf6cc4784b4cbaab4c21f20dfe97
5
5
  SHA512:
6
- metadata.gz: b9acc90448a3db5c038cf6e2c5a8be27a22d2a3892047017bc12305de8db74c2a4d828209ec445e8cf0b95415a9a1008347adc24b93e8bcb7cd245b8ce15cf6a
7
- data.tar.gz: 1884dd9d7fae5c90dd177c9c4a1c02f039b621a0661de26b63b7b4ca038330f1621b4baf4e0a555819216aa70ebb789fd3e0856f4e3eadd35dd92037db7ba2a9
6
+ metadata.gz: b1bd3b7ceadd0c64175ba166c45ad51d767f4d087b3915bad8f32713773a07aa0087fedd3a8a935e5a3fad604988f103c433fa871a49a1e1cb2f398aa6b67657
7
+ data.tar.gz: c1d434655d783bab07953a3b44439ec31c16625d5183b6ffa61c3ccb7883940c3b62b17e5592cd03810ff90fdecb8a1acfd6365dc2aaa66a1f8c96c5a0313e97
@@ -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 :status
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
@@ -5,6 +5,7 @@ module Boxxspring
5
5
  field :created_at
6
6
  field :updated_at
7
7
 
8
+ field :type_name
8
9
  field :id
9
10
  field :provider
10
11
  field :public_settings
@@ -5,10 +5,10 @@ module Boxxspring
5
5
  field :created_at
6
6
  field :updated_at
7
7
 
8
+ field :type_name
8
9
  field :id
9
10
  field :name
10
11
  field :picture_id
11
- field :stories_count
12
12
 
13
13
  end
14
14
 
@@ -2,7 +2,8 @@ module Boxxspring
2
2
 
3
3
  class Theme < Base
4
4
 
5
- field :id
5
+ field :type_name
6
+ field :id
6
7
  field :code_name
7
8
  field :name
8
9
 
@@ -2,6 +2,9 @@ module Boxxspring
2
2
 
3
3
  class ThemeEnvironment < Base
4
4
 
5
+ field :type_name
6
+ field :id
7
+
5
8
  field :created_at
6
9
  field :updated_at
7
10
 
@@ -2,7 +2,9 @@ module Boxxspring
2
2
 
3
3
  class UserAgent < Base
4
4
 
5
- field :id
5
+ field :type_name
6
+ field :id
7
+
6
8
  field :name
7
9
  field :pattern
8
10
 
@@ -1,3 +1,3 @@
1
1
  module Boxxspring
2
- VERSION = '2.0.5'
2
+ VERSION = '2.0.6'
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: boxxspring
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.5
4
+ version: 2.0.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Kristoph Cichocki-Romanov