myobie-turbine-core 0.3.3 → 0.3.5

Sign up to get free protection for your applications and to get access to all the features.
data/VERSION.yml CHANGED
@@ -1,4 +1,4 @@
1
1
  ---
2
2
  :major: 0
3
3
  :minor: 3
4
- :patch: 3
4
+ :patch: 5
@@ -1,8 +1,7 @@
1
1
  class Audio < PostType
2
- fields :audio_url, :title, :description, :embed
2
+ fields :audio_url, :description, :embed
3
3
  required :audio_url
4
4
  primary :description
5
- heading :title
6
5
 
7
6
  def self.detect?(text)
8
7
  has_required? text
@@ -1,5 +1,5 @@
1
1
  class Photo < PostType
2
- fields :photo_url, :caption
2
+ fields :photo_url, :caption, :url
3
3
  required :photo_url
4
4
  primary :caption
5
5
 
@@ -15,6 +15,10 @@ class Photo < PostType
15
15
  # end#if
16
16
  # end#special
17
17
 
18
+ special :url do |link_content|
19
+ 'http://' + link_content.gsub(/^http:\/\//, '')
20
+ end
21
+
18
22
  def self.detect?(text)
19
23
  has_required? text
20
24
  end
@@ -1,5 +1,5 @@
1
1
  class Review < PostType
2
- fields :rating, :item, :description
2
+ fields :rating, :item, :description, :url
3
3
  required :rating, :item
4
4
  primary :description
5
5
  heading :item
@@ -8,6 +8,10 @@ class Review < PostType
8
8
  rating_content.to_f
9
9
  end
10
10
 
11
+ special :url do |link_content|
12
+ 'http://' + link_content.gsub(/^http:\/\//, '')
13
+ end
14
+
11
15
  def self.detect?(text)
12
16
  has_required? text
13
17
  end
@@ -1,8 +1,7 @@
1
1
  class Video < PostType
2
- fields :video_url, :title, :description, :embed
2
+ fields :video_url, :description, :embed
3
3
  required :video_url
4
4
  primary :description
5
- heading :title
6
5
 
7
6
  def self.detect?(text)
8
7
  has_required? text
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: myobie-turbine-core
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.3
4
+ version: 0.3.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Nathan Herald