arena 0.0.5 → 0.0.6

Sign up to get free protection for your applications and to get access to all the features.
data/lib/arena/block.rb CHANGED
@@ -3,6 +3,7 @@ require 'arena/entity'
3
3
  require 'arena/entities/source'
4
4
  require 'arena/entities/image'
5
5
  require 'arena/entities/attachment'
6
+ require 'arena/entities/embed'
6
7
  require 'arena/creatable'
7
8
 
8
9
  module Arena
@@ -37,12 +38,16 @@ module Arena
37
38
  @attachment ||= Arena::Entity::Attachment.new(@attrs['attachment']) if has_attachment?
38
39
  end
39
40
 
41
+ def embed
42
+ @embed ||= Arena::Entity::Embed.new(@attrs['embed']) if has_embed?
43
+ end
44
+
40
45
  def connections
41
46
  @connections ||= @attrs['connections'].collect { |channel| Arena::Channel.new(channel) }
42
47
  end
43
48
 
44
49
  # Detect optional portions of the response
45
- [:image, :attachment].each do |kind|
50
+ [:image, :attachment, :embed].each do |kind|
46
51
  define_method "has_#{kind}?" do
47
52
  !@attrs[kind.to_s].nil?
48
53
  end
@@ -0,0 +1,11 @@
1
+ require 'arena/entity'
2
+ require 'arena/entities/version'
3
+
4
+ module Arena
5
+ class Entity
6
+ class Embed < Arena::Entity
7
+ attr_reader :embed, :url, :type, :title, :author_name, :author_url,
8
+ :source_url, :thumbnail_url, :width, :height, :html
9
+ end
10
+ end
11
+ end
data/lib/arena/version.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  module Arena
2
- VERSION = "0.0.5"
2
+ VERSION = "0.0.6"
3
3
 
4
4
  def self.version
5
5
  VERSION
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: arena
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.5
4
+ version: 0.0.6
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-12-10 00:00:00.000000000 Z
12
+ date: 2012-12-12 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rake
@@ -83,6 +83,7 @@ files:
83
83
  - lib/arena/creatable.rb
84
84
  - lib/arena/default.rb
85
85
  - lib/arena/entities/attachment.rb
86
+ - lib/arena/entities/embed.rb
86
87
  - lib/arena/entities/image.rb
87
88
  - lib/arena/entities/provider.rb
88
89
  - lib/arena/entities/source.rb