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 +4 -4
- data/lib/boxxspring/parser.rb +8 -6
- data/lib/boxxspring/resources/artifact.rb +2 -0
- data/lib/boxxspring/resources/attribution.rb +3 -0
- data/lib/boxxspring/resources/page.rb +9 -0
- data/lib/boxxspring/resources/property.rb +2 -0
- data/lib/boxxspring/resources/reaction.rb +12 -0
- data/lib/boxxspring/resources/tag.rb +3 -0
- data/lib/boxxspring/version.rb +1 -1
- data/lib/boxxspring.rb +5 -0
- metadata +6 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ad95673c857946070f0c1813b4e7bebc188d20c3
|
4
|
+
data.tar.gz: 2b0cad536cfdd3cafc8b3bacc46012d839030797
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0f80add7cbbcb1ef992a1c6721b1d64c9c5f520af9af7e903282ef5f12a072d417b73ba85fe3c9e706894cd572b5505b44e746c64daa1894578910f38931578a
|
7
|
+
data.tar.gz: 22c1fa94d6ac7d91d335f9e37ee15bff0623fa0b6b5dc9ab5c3a7aad3527219c2b104ad50ceedd6297a584f73083c1e9d9994771b2d90f812679c0b6a0f75f90
|
data/lib/boxxspring/parser.rb
CHANGED
@@ -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
|
-
|
68
|
+
association = associations[ name ].detect do | association |
|
69
69
|
association[ 'id' ] == key
|
70
70
|
end
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
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
|
data/lib/boxxspring/version.rb
CHANGED
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.
|
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-
|
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
|