boxxspring 2.0.6 → 2.0.8

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: 3c47a4659d7a16de1e8682a0406686f1bd955125
4
- data.tar.gz: 5b60a71aa11abf6cc4784b4cbaab4c21f20dfe97
3
+ metadata.gz: ad95673c857946070f0c1813b4e7bebc188d20c3
4
+ data.tar.gz: 2b0cad536cfdd3cafc8b3bacc46012d839030797
5
5
  SHA512:
6
- metadata.gz: b1bd3b7ceadd0c64175ba166c45ad51d767f4d087b3915bad8f32713773a07aa0087fedd3a8a935e5a3fad604988f103c433fa871a49a1e1cb2f398aa6b67657
7
- data.tar.gz: c1d434655d783bab07953a3b44439ec31c16625d5183b6ffa61c3ccb7883940c3b62b17e5592cd03810ff90fdecb8a1acfd6365dc2aaa66a1f8c96c5a0313e97
6
+ metadata.gz: 0f80add7cbbcb1ef992a1c6721b1d64c9c5f520af9af7e903282ef5f12a072d417b73ba85fe3c9e706894cd572b5505b44e746c64daa1894578910f38931578a
7
+ data.tar.gz: 22c1fa94d6ac7d91d335f9e37ee15bff0623fa0b6b5dc9ab5c3a7aad3527219c2b104ad50ceedd6297a584f73083c1e9d9994771b2d90f812679c0b6a0f75f90
@@ -65,15 +65,17 @@ module Boxxspring
65
65
  result = Hash.new { | hash, key | hash[ key ] = [] }
66
66
  associations = self.associations
67
67
  if associations && associations.include?( name )
68
- associations = associations[ name ].detect do | association |
68
+ association = associations[ name ].detect do | association |
69
69
  association[ 'id' ] == key
70
70
  end
71
- associations.each do | key, value |
72
- unless key == 'id'
73
- result[ key ] = value.map do | associated_id |
74
- self.resource_by( key, associated_id )
71
+ if association.present?
72
+ association.each do | key, value |
73
+ unless key == 'id'
74
+ result[ key ] = value.map do | associated_id |
75
+ self.resource_by( key, associated_id )
76
+ end
77
+ result[ key ].compact!
75
78
  end
76
- result[ key ].compact!
77
79
  end
78
80
  end
79
81
  end
@@ -23,6 +23,8 @@ module Boxxspring
23
23
  field :meta_description
24
24
  field :meta_title
25
25
  field :slug
26
+
27
+ field :sponsor_id
26
28
 
27
29
  has_one :attribution
28
30
 
@@ -0,0 +1,3 @@
1
+ module Boxxspring
2
+ class Attribution < Artifact; end
3
+ end
@@ -0,0 +1,9 @@
1
+ module Boxxspring
2
+
3
+ class Page < Artifact
4
+
5
+ field :code_name
6
+
7
+ end
8
+
9
+ end
@@ -21,6 +21,8 @@ module Boxxspring
21
21
  field :authentication_password
22
22
 
23
23
  has_many :groups
24
+ has_many :pages
25
+ has_many :services
24
26
  has_many :pictures
25
27
  has_one :theme
26
28
 
@@ -0,0 +1,12 @@
1
+ module Boxxspring
2
+
3
+ class Reaction < Artifact
4
+
5
+ field :id
6
+ field :name
7
+ field :code_name
8
+ field :slug
9
+
10
+ end
11
+
12
+ end
@@ -0,0 +1,3 @@
1
+ module Boxxspring
2
+ class Tag < Artifact; end
3
+ end
@@ -1,3 +1,3 @@
1
1
  module Boxxspring
2
- VERSION = '2.0.6'
2
+ VERSION = '2.0.8'
3
3
  end
data/lib/boxxspring.rb CHANGED
@@ -19,6 +19,11 @@ require 'boxxspring/resources/video_card'
19
19
  require 'boxxspring/resources/atomic_video_card'
20
20
  require 'boxxspring/resources/artifact'
21
21
  require 'boxxspring/resources/story'
22
+ require 'boxxspring/resources/page'
23
+ require 'boxxspring/resources/reaction'
24
+ require 'boxxspring/resources/attribution'
25
+ require 'boxxspring/resources/tag'
22
26
  require 'boxxspring/resources/playlist'
23
27
  require 'boxxspring/resources/group'
24
28
  require 'boxxspring/resources/property'
29
+ require 'boxxspring/resources/service'
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: boxxspring
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.6
4
+ version: 2.0.8
5
5
  platform: ruby
6
6
  authors:
7
7
  - Kristoph Cichocki-Romanov
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-08-27 00:00:00.000000000 Z
11
+ date: 2014-09-05 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: multi_json
@@ -81,16 +81,20 @@ files:
81
81
  - lib/boxxspring/request.rb
82
82
  - lib/boxxspring/resources/artifact.rb
83
83
  - lib/boxxspring/resources/atomic_video_card.rb
84
+ - lib/boxxspring/resources/attribution.rb
84
85
  - lib/boxxspring/resources/base.rb
85
86
  - lib/boxxspring/resources/card.rb
86
87
  - lib/boxxspring/resources/error.rb
87
88
  - lib/boxxspring/resources/group.rb
89
+ - lib/boxxspring/resources/page.rb
88
90
  - lib/boxxspring/resources/picture.rb
89
91
  - lib/boxxspring/resources/playlist.rb
90
92
  - lib/boxxspring/resources/property.rb
93
+ - lib/boxxspring/resources/reaction.rb
91
94
  - lib/boxxspring/resources/service.rb
92
95
  - lib/boxxspring/resources/sponsor.rb
93
96
  - lib/boxxspring/resources/story.rb
97
+ - lib/boxxspring/resources/tag.rb
94
98
  - lib/boxxspring/resources/theme.rb
95
99
  - lib/boxxspring/resources/theme_environment.rb
96
100
  - lib/boxxspring/resources/user_agent.rb