boxxspring 2.2.5 → 2.3.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/boxxspring/parser.rb +20 -6
- data/lib/boxxspring/resources/artifact.rb +5 -5
- data/lib/boxxspring/resources/artifact_curation_task.rb +31 -0
- data/lib/boxxspring/resources/branding_rule.rb +16 -0
- data/lib/boxxspring/resources/distribution.rb +2 -0
- data/lib/boxxspring/resources/feed.rb +8 -7
- data/lib/boxxspring/resources/theme_environment.rb +4 -4
- data/lib/boxxspring/resources/verizon_distribution.rb +12 -0
- data/lib/boxxspring/resources/verizon_distribution_task.rb +11 -0
- data/lib/boxxspring/resources/video_article_curation_task.rb +21 -0
- data/lib/boxxspring/resources/videos_branding_task.rb +10 -0
- data/lib/boxxspring/resources/videos_curation_task.rb +1 -0
- data/lib/boxxspring/resources/videos_interrogation_task.rb +7 -0
- data/lib/boxxspring/resources/youtube_subscription_metadata_task.rb +14 -0
- data/lib/boxxspring/resources/youtube_subscription_task.rb +7 -0
- data/lib/boxxspring/version.rb +1 -1
- data/lib/boxxspring.rb +13 -18
- metadata +11 -20
- data/lib/boxxspring/resources/atomic_video_card.rb +0 -6
- data/lib/boxxspring/resources/attribution.rb +0 -3
- data/lib/boxxspring/resources/author.rb +0 -5
- data/lib/boxxspring/resources/card.rb +0 -23
- data/lib/boxxspring/resources/group.rb +0 -3
- data/lib/boxxspring/resources/organization.rb +0 -3
- data/lib/boxxspring/resources/page.rb +0 -9
- data/lib/boxxspring/resources/picture_card.rb +0 -6
- data/lib/boxxspring/resources/player.rb +0 -3
- data/lib/boxxspring/resources/playlist.rb +0 -3
- data/lib/boxxspring/resources/post_card.rb +0 -6
- data/lib/boxxspring/resources/reaction.rb +0 -12
- data/lib/boxxspring/resources/school.rb +0 -3
- data/lib/boxxspring/resources/story.rb +0 -10
- data/lib/boxxspring/resources/tag.rb +0 -3
- data/lib/boxxspring/resources/team.rb +0 -3
- data/lib/boxxspring/resources/text_card.rb +0 -6
- data/lib/boxxspring/resources/video_card.rb +0 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b4f45ace16bfe017378a10f162bebb4e90c92a42
|
4
|
+
data.tar.gz: 5eac5c69a5fb0f743281958051dfcb888e0acd73
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ab1a8f4f8f703b7d1fcb2fa3be5ece170da8fb432ff642dbdc4e41e5133de32082ea0bdc1d9ff5c063ba5b68eb4a74e4c0fa6d913bef211d576c86c668303d96
|
7
|
+
data.tar.gz: 0510c3a3ef50280ac51c025f9336f73b94c49d3f63b267bf3db96f969616c933ef50d3e9a28c6146d85c2fa500778d508e27ae8d6b132afeb249a48241ce5452
|
data/lib/boxxspring/parser.rb
CHANGED
@@ -42,12 +42,14 @@ module Boxxspring
|
|
42
42
|
def resources
|
43
43
|
result = nil
|
44
44
|
unless self.name.blank?
|
45
|
-
result = self.keys.map
|
45
|
+
result = self.keys.map do | key |
|
46
|
+
self.resource_by( name, key, { 'type_name' => self.type_name } )
|
47
|
+
end
|
46
48
|
end
|
47
49
|
result
|
48
50
|
end
|
49
51
|
|
50
|
-
def resource_by( name, key )
|
52
|
+
def resource_by( name, key, options = {} )
|
51
53
|
|
52
54
|
@resources_index ||= Hash.new { | hash, key | hash[ key ] = {} }
|
53
55
|
@resource_index_mutex ||= Hash.new { | hash, key | hash[ key ] = [] }
|
@@ -63,8 +65,15 @@ module Boxxspring
|
|
63
65
|
result = nil
|
64
66
|
resource_attributes = resource_attribute_index[ name ][ key ]
|
65
67
|
if resource_attributes.present?
|
66
|
-
type_name = resource_attributes[ 'type_name' ]
|
67
|
-
klass =
|
68
|
+
type_name = resource_attributes[ 'type_name' ]
|
69
|
+
klass = nil
|
70
|
+
klass = ( Boxxspring.const_get( type_name.camelize ) rescue nil ) \
|
71
|
+
if type_name.present?
|
72
|
+
if klass.nil?
|
73
|
+
type_name = options[ 'type_name' ]
|
74
|
+
klass = ( Boxxspring.const_get( type_name.camelize ) rescue nil ) \
|
75
|
+
if type_name.present?
|
76
|
+
end
|
68
77
|
if klass.present?
|
69
78
|
result = klass.new(
|
70
79
|
resource_attributes,
|
@@ -92,8 +101,13 @@ module Boxxspring
|
|
92
101
|
if association.present?
|
93
102
|
association.each do | key, value |
|
94
103
|
unless key == 'id'
|
95
|
-
|
96
|
-
|
104
|
+
type_name = value[ 'type_name' ]
|
105
|
+
result[ key ] = ( value[ 'ids' ] || [] ).map do | associated_id |
|
106
|
+
self.resource_by(
|
107
|
+
key,
|
108
|
+
associated_id,
|
109
|
+
{ 'type_name' => type_name }
|
110
|
+
)
|
97
111
|
end
|
98
112
|
result[ key ].compact!
|
99
113
|
end
|
@@ -30,20 +30,20 @@ module Boxxspring
|
|
30
30
|
field :provider
|
31
31
|
field :provider_uid
|
32
32
|
field :provider_url
|
33
|
-
|
33
|
+
|
34
34
|
field :sponsor_id
|
35
35
|
field :template_id
|
36
|
+
field :attribution_id
|
36
37
|
|
37
38
|
field :attribution_name
|
38
39
|
field :attribution_url
|
39
40
|
|
40
|
-
has_one :attribution
|
41
|
+
has_one :attribution
|
41
42
|
|
42
43
|
has_many :artifacts
|
43
44
|
has_many :pictures
|
44
|
-
has_many :
|
45
|
-
has_many :
|
46
|
-
has_many :advertisements
|
45
|
+
has_many :sponsors
|
46
|
+
has_many :advertisements
|
47
47
|
has_many :artifact_locators
|
48
48
|
|
49
49
|
end
|
@@ -0,0 +1,31 @@
|
|
1
|
+
module Boxxspring
|
2
|
+
|
3
|
+
class ArtifactCurationTask < Task
|
4
|
+
|
5
|
+
field :artifact_name
|
6
|
+
field :artifact_description
|
7
|
+
field :artifact_type_name
|
8
|
+
field :artifact_picture_url
|
9
|
+
field :artifact_provider_uid
|
10
|
+
field :artifact_provider_url
|
11
|
+
field :artifact_originated_at
|
12
|
+
field :provider
|
13
|
+
field :artifact_slug
|
14
|
+
field :artifact_template_id
|
15
|
+
field :artifact_sponsor_id
|
16
|
+
field :artifact_note
|
17
|
+
field :artifact_short_name
|
18
|
+
field :attribution_id
|
19
|
+
field :artifact_state
|
20
|
+
field :artifact_tagline
|
21
|
+
field :artifact_short_description
|
22
|
+
field :attribution_name
|
23
|
+
field :attribution_provider_uid
|
24
|
+
field :attribution_picture_url
|
25
|
+
field :artifact_id
|
26
|
+
field :artifact_original
|
27
|
+
field :artifact_ids
|
28
|
+
|
29
|
+
end
|
30
|
+
|
31
|
+
end
|
@@ -2,15 +2,16 @@ module Boxxspring
|
|
2
2
|
|
3
3
|
class Feed < Base
|
4
4
|
|
5
|
-
field
|
6
|
-
field
|
5
|
+
field :created_at
|
6
|
+
field :updated_at
|
7
|
+
field :generated_at
|
7
8
|
|
8
|
-
field
|
9
|
-
field
|
10
|
-
field
|
11
|
-
field
|
12
|
-
field :filter_id
|
9
|
+
field :provider
|
10
|
+
field :id
|
11
|
+
field :name
|
12
|
+
field :code_name
|
13
13
|
|
14
|
+
field :time_to_live
|
14
15
|
has_one :filter
|
15
16
|
|
16
17
|
end
|
@@ -1,13 +1,13 @@
|
|
1
1
|
module Boxxspring
|
2
2
|
|
3
|
-
|
3
|
+
class ThemeEnvironment < Base
|
4
4
|
|
5
5
|
field :id
|
6
6
|
|
7
7
|
field :created_at
|
8
8
|
field :updated_at
|
9
9
|
|
10
|
-
field :
|
10
|
+
field :position
|
11
11
|
field :code_name
|
12
12
|
field :name
|
13
13
|
field :description
|
@@ -16,6 +16,6 @@ module Boxxspring
|
|
16
16
|
|
17
17
|
has_one :user_agent
|
18
18
|
|
19
|
-
|
19
|
+
end
|
20
20
|
|
21
|
-
end
|
21
|
+
end
|
@@ -0,0 +1,21 @@
|
|
1
|
+
module Boxxspring
|
2
|
+
|
3
|
+
class VideoArticleCurationTask < Task
|
4
|
+
|
5
|
+
field :video_title
|
6
|
+
field :video_description
|
7
|
+
field :video_picture_url
|
8
|
+
field :video_provider_uid
|
9
|
+
field :video_provider_url
|
10
|
+
field :video_originated_at
|
11
|
+
field :provider
|
12
|
+
field :attribution_name
|
13
|
+
field :attribution_provider_uid
|
14
|
+
field :attribution_picture_url
|
15
|
+
field :artifact_id
|
16
|
+
field :artifact_slug
|
17
|
+
field :artifact_ids
|
18
|
+
|
19
|
+
end
|
20
|
+
|
21
|
+
end
|
data/lib/boxxspring/version.rb
CHANGED
data/lib/boxxspring.rb
CHANGED
@@ -27,29 +27,12 @@ require 'boxxspring/resources/theme'
|
|
27
27
|
require 'boxxspring/resources/feed'
|
28
28
|
require 'boxxspring/resources/filter'
|
29
29
|
require 'boxxspring/resources/filter_criteria'
|
30
|
-
require 'boxxspring/resources/card'
|
31
|
-
require 'boxxspring/resources/video_card'
|
32
|
-
require 'boxxspring/resources/picture_card'
|
33
|
-
require 'boxxspring/resources/text_card'
|
34
|
-
require 'boxxspring/resources/atomic_video_card'
|
35
30
|
require 'boxxspring/resources/advertising_doubleclick_advertisement'
|
36
31
|
require 'boxxspring/resources/advertising_liverail_advertisement'
|
37
32
|
require 'boxxspring/resources/video'
|
38
33
|
require 'boxxspring/resources/video_source'
|
39
34
|
require 'boxxspring/resources/artifact_relationship'
|
40
35
|
require 'boxxspring/resources/artifact'
|
41
|
-
require 'boxxspring/resources/story'
|
42
|
-
require 'boxxspring/resources/page'
|
43
|
-
require 'boxxspring/resources/author'
|
44
|
-
require 'boxxspring/resources/school'
|
45
|
-
require 'boxxspring/resources/player'
|
46
|
-
require 'boxxspring/resources/team'
|
47
|
-
require 'boxxspring/resources/organization'
|
48
|
-
require 'boxxspring/resources/reaction'
|
49
|
-
require 'boxxspring/resources/attribution'
|
50
|
-
require 'boxxspring/resources/tag'
|
51
|
-
require 'boxxspring/resources/playlist'
|
52
|
-
require 'boxxspring/resources/group'
|
53
36
|
require 'boxxspring/resources/property'
|
54
37
|
require 'boxxspring/resources/service'
|
55
38
|
require 'boxxspring/resources/legacy_service'
|
@@ -57,6 +40,7 @@ require 'boxxspring/resources/social_service'
|
|
57
40
|
require 'boxxspring/resources/source'
|
58
41
|
require 'boxxspring/resources/task'
|
59
42
|
require 'boxxspring/resources/videos_ingestion_task'
|
43
|
+
require 'boxxspring/resources/videos_interrogation_task'
|
60
44
|
require 'boxxspring/resources/videos_picture_task'
|
61
45
|
require 'boxxspring/resources/feed_generation_task'
|
62
46
|
require 'boxxspring/resources/subscription_ingestion_task'
|
@@ -70,11 +54,22 @@ require 'boxxspring/resources/facebook_page_distribution_task'
|
|
70
54
|
require 'boxxspring/resources/twitter_distribution_task'
|
71
55
|
require 'boxxspring/resources/youtube_distribution_task'
|
72
56
|
require 'boxxspring/resources/artifact_locator'
|
73
|
-
require 'boxxspring/resources/
|
57
|
+
require 'boxxspring/resources/verizon_distribution'
|
58
|
+
require 'boxxspring/resources/verizon_distribution_task'
|
59
|
+
|
74
60
|
|
75
61
|
require 'boxxspring/resources/youtube_channel_service'
|
76
62
|
require 'boxxspring/resources/facebook_page_service'
|
77
63
|
require 'boxxspring/resources/twitter_service'
|
78
64
|
require 'boxxspring/resources/videos_curation_task'
|
79
65
|
|
66
|
+
require 'boxxspring/resources/youtube_subscription_task'
|
67
|
+
require 'boxxspring/resources/video_article_curation_task'
|
68
|
+
require 'boxxspring/resources/youtube_subscription_metadata_task'
|
69
|
+
require 'boxxspring/resources/artifact_curation_task'
|
70
|
+
|
80
71
|
require 'boxxspring/resources/analytics_media_sample'
|
72
|
+
|
73
|
+
require 'boxxspring/resources/branding_rule'
|
74
|
+
require 'boxxspring/resources/videos_branding_task'
|
75
|
+
|
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.
|
4
|
+
version: 2.3.3
|
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: 2015-
|
11
|
+
date: 2015-06-09 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: multi_json
|
@@ -82,14 +82,12 @@ files:
|
|
82
82
|
- lib/boxxspring/resources/advertising_liverail_advertisement.rb
|
83
83
|
- lib/boxxspring/resources/analytics_media_sample.rb
|
84
84
|
- lib/boxxspring/resources/artifact.rb
|
85
|
+
- lib/boxxspring/resources/artifact_curation_task.rb
|
85
86
|
- lib/boxxspring/resources/artifact_locator.rb
|
86
87
|
- lib/boxxspring/resources/artifact_relationship.rb
|
87
|
-
- lib/boxxspring/resources/atomic_video_card.rb
|
88
88
|
- lib/boxxspring/resources/attribute_error.rb
|
89
|
-
- lib/boxxspring/resources/attribution.rb
|
90
|
-
- lib/boxxspring/resources/author.rb
|
91
89
|
- lib/boxxspring/resources/base.rb
|
92
|
-
- lib/boxxspring/resources/
|
90
|
+
- lib/boxxspring/resources/branding_rule.rb
|
93
91
|
- lib/boxxspring/resources/distribution.rb
|
94
92
|
- lib/boxxspring/resources/error.rb
|
95
93
|
- lib/boxxspring/resources/facebook_page_distribution.rb
|
@@ -100,33 +98,20 @@ files:
|
|
100
98
|
- lib/boxxspring/resources/filter.rb
|
101
99
|
- lib/boxxspring/resources/filter_criteria.rb
|
102
100
|
- lib/boxxspring/resources/forbidden_error.rb
|
103
|
-
- lib/boxxspring/resources/group.rb
|
104
101
|
- lib/boxxspring/resources/legacy_service.rb
|
105
102
|
- lib/boxxspring/resources/malformed_parameter_error.rb
|
106
103
|
- lib/boxxspring/resources/metric.rb
|
107
104
|
- lib/boxxspring/resources/missing_parameter_error.rb
|
108
105
|
- lib/boxxspring/resources/not_found_error.rb
|
109
|
-
- lib/boxxspring/resources/organization.rb
|
110
|
-
- lib/boxxspring/resources/page.rb
|
111
106
|
- lib/boxxspring/resources/picture.rb
|
112
|
-
- lib/boxxspring/resources/picture_card.rb
|
113
|
-
- lib/boxxspring/resources/player.rb
|
114
|
-
- lib/boxxspring/resources/playlist.rb
|
115
|
-
- lib/boxxspring/resources/post_card.rb
|
116
107
|
- lib/boxxspring/resources/property.rb
|
117
|
-
- lib/boxxspring/resources/reaction.rb
|
118
108
|
- lib/boxxspring/resources/sample.rb
|
119
|
-
- lib/boxxspring/resources/school.rb
|
120
109
|
- lib/boxxspring/resources/service.rb
|
121
110
|
- lib/boxxspring/resources/social_service.rb
|
122
111
|
- lib/boxxspring/resources/source.rb
|
123
112
|
- lib/boxxspring/resources/sponsor.rb
|
124
|
-
- lib/boxxspring/resources/story.rb
|
125
113
|
- lib/boxxspring/resources/subscription_ingestion_task.rb
|
126
|
-
- lib/boxxspring/resources/tag.rb
|
127
114
|
- lib/boxxspring/resources/task.rb
|
128
|
-
- lib/boxxspring/resources/team.rb
|
129
|
-
- lib/boxxspring/resources/text_card.rb
|
130
115
|
- lib/boxxspring/resources/theme.rb
|
131
116
|
- lib/boxxspring/resources/theme_environment.rb
|
132
117
|
- lib/boxxspring/resources/theme_template.rb
|
@@ -134,16 +119,22 @@ files:
|
|
134
119
|
- lib/boxxspring/resources/twitter_distribution_task.rb
|
135
120
|
- lib/boxxspring/resources/twitter_service.rb
|
136
121
|
- lib/boxxspring/resources/user_agent.rb
|
122
|
+
- lib/boxxspring/resources/verizon_distribution.rb
|
123
|
+
- lib/boxxspring/resources/verizon_distribution_task.rb
|
137
124
|
- lib/boxxspring/resources/video.rb
|
138
|
-
- lib/boxxspring/resources/
|
125
|
+
- lib/boxxspring/resources/video_article_curation_task.rb
|
139
126
|
- lib/boxxspring/resources/video_source.rb
|
140
127
|
- lib/boxxspring/resources/video_source_segment.rb
|
128
|
+
- lib/boxxspring/resources/videos_branding_task.rb
|
141
129
|
- lib/boxxspring/resources/videos_curation_task.rb
|
142
130
|
- lib/boxxspring/resources/videos_ingestion_task.rb
|
131
|
+
- lib/boxxspring/resources/videos_interrogation_task.rb
|
143
132
|
- lib/boxxspring/resources/videos_picture_task.rb
|
144
133
|
- lib/boxxspring/resources/youtube_channel_service.rb
|
145
134
|
- lib/boxxspring/resources/youtube_distribution.rb
|
146
135
|
- lib/boxxspring/resources/youtube_distribution_task.rb
|
136
|
+
- lib/boxxspring/resources/youtube_subscription_metadata_task.rb
|
137
|
+
- lib/boxxspring/resources/youtube_subscription_task.rb
|
147
138
|
- lib/boxxspring/response.rb
|
148
139
|
- lib/boxxspring/serializer.rb
|
149
140
|
- lib/boxxspring/version.rb
|
@@ -1,23 +0,0 @@
|
|
1
|
-
module Boxxspring
|
2
|
-
|
3
|
-
class Card < Base
|
4
|
-
|
5
|
-
field :created_at
|
6
|
-
field :updated_at
|
7
|
-
|
8
|
-
field :id
|
9
|
-
field :name
|
10
|
-
field :body
|
11
|
-
|
12
|
-
field :picture_id
|
13
|
-
|
14
|
-
field :provider
|
15
|
-
field :provider_uid
|
16
|
-
field :provider_url
|
17
|
-
|
18
|
-
field :attribution_id
|
19
|
-
field :properties
|
20
|
-
|
21
|
-
end
|
22
|
-
|
23
|
-
end
|