extractula 0.0.6 → 0.0.7

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.
data/lib/extractula.rb CHANGED
@@ -9,7 +9,7 @@ require 'extractula/extracted_content'
9
9
  require 'extractula/extractor'
10
10
 
11
11
  module Extractula
12
- VERSION = "0.0.6"
12
+ VERSION = "0.0.7"
13
13
 
14
14
  @extractors = []
15
15
 
@@ -20,6 +20,16 @@ module Extractula
20
20
  end
21
21
  end
22
22
 
23
+ def self.max_width(width = nil)
24
+ @global_oembed_max_width = width if width
25
+ @global_oembed_max_width
26
+ end
27
+
28
+ def self.max_height(height = nil)
29
+ @global_oembed_max_height = height if height
30
+ @global_oembed_max_height
31
+ end
32
+
23
33
  module ClassMethods
24
34
  def oembed_endpoint(url = nil)
25
35
  if url
@@ -36,12 +46,12 @@ module Extractula
36
46
 
37
47
  def oembed_max_width(width = nil)
38
48
  @oembed_max_width = width if width
39
- @oembed_max_width
49
+ @oembed_max_width || OEmbed.max_width
40
50
  end
41
51
 
42
52
  def oembed_max_height(height = nil)
43
53
  @oembed_max_height = height if height
44
- @oembed_max_height
54
+ @oembed_max_height || OEmbed.max_height
45
55
  end
46
56
 
47
57
  def oembed_format_param_required?
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: extractula
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.6
4
+ version: 0.0.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Paul Dix