boxspring 0.1.0 → 0.1.1

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: cc5756cc43666a26ae580740c8f5c2db94400b1f
4
- data.tar.gz: d7c9e59b3e25cce4aa89764aa840481cdfe5b4cc
3
+ metadata.gz: 0edf4842e445ad8db3b4bc5675f28e5a27f0c937
4
+ data.tar.gz: 37c1faf2134640d6bde7a2196a3dd7c2cacb93be
5
5
  SHA512:
6
- metadata.gz: 3bb8cd8e1465da28f600ea66de575b4eff39c9d0cac86b4e2ec993fa7afe18cc553ab4aeb2c504ae9a018bf0c9fbc686a687eefe540a3a2853c2635077c63263
7
- data.tar.gz: f947b47d645ea009626223ca0f5553062dd9886163719fcd7816059401f776bf9041765e5394b72ae108354a1d1c2106cb0914301ac25058aff04970ef6857d4
6
+ metadata.gz: 8e6c55fd778ad975d59d63c662670f168a5189fff16ed8a0698bea961bfaf4d2195950d5d6701f2fd91cc3c6ce1cff9c75865772b8169711461620f97362f1d0
7
+ data.tar.gz: af95eab1336b06359ce18492bbd838bbae8c28266c79c9d20441a243f1525bb3073446c05660805f636180fb560891f94379417c0528863acd1e219148af8e27
@@ -0,0 +1,6 @@
1
+ module Boxspring
2
+
3
+ class AtomicVideoCard < VideoCard
4
+ end
5
+
6
+ end
@@ -21,6 +21,9 @@ module Boxspring
21
21
  field :short_description
22
22
  field :description
23
23
 
24
+ field :content_type
25
+ field :content_id
26
+
24
27
  field :picture_id
25
28
 
26
29
  field :meta_description
@@ -34,6 +37,16 @@ module Boxspring
34
37
  field :action_participations_count
35
38
  field :react_actions_counts
36
39
 
40
+ def content
41
+ @_content ||= begin
42
+ content_class = Boxspring.const_get( self.content_type ) \
43
+ rescue nil
44
+ content_class ?
45
+ content_class.new( self.attributes[ :content ] ) :
46
+ nil
47
+ end
48
+ end
49
+
37
50
  def show
38
51
  @_show ||= begin
39
52
  self.attributes.include?( :show ) ?
@@ -1,3 +1,3 @@
1
1
  module Boxspring
2
- VERSION = '0.1.0'
2
+ VERSION = '0.1.1'
3
3
  end
data/lib/boxspring.rb CHANGED
@@ -20,5 +20,8 @@ require 'boxspring/tag_collection'
20
20
  require 'boxspring/user_agent'
21
21
  require 'boxspring/theme_environment'
22
22
  require 'boxspring/theme'
23
+ require 'boxspring/card'
24
+ require 'boxspring/video_card'
25
+ require 'boxspring/atomic_video_card'
23
26
  require 'boxspring/story'
24
27
  require 'boxspring/property'
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: boxspring
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Kristoph Cichocki-Romanov
@@ -74,6 +74,7 @@ extensions: []
74
74
  extra_rdoc_files: []
75
75
  files:
76
76
  - lib/boxspring.rb
77
+ - lib/boxspring/atomic_video_card.rb
77
78
  - lib/boxspring/attribution.rb
78
79
  - lib/boxspring/base.rb
79
80
  - lib/boxspring/card.rb