conred 0.0.7 → 0.0.8

Sign up to get free protection for your applications and to get access to all the features.
data/README.md CHANGED
@@ -18,7 +18,30 @@ Or install it yourself as:
18
18
 
19
19
  ## Usage
20
20
 
21
- TODO: Write usage instructions here
21
+ Right now (version 0.0.4) has one text formating option and video helper.
22
+ For video you can use:
23
+
24
+ c = Conred::Video.new("http://www.youtube.com/watch?v=Lrj5Kxdzouc")
25
+
26
+ Then for embed code:
27
+
28
+ c.code
29
+
30
+ You can also check if it is youtube video or vimeo video like this:
31
+
32
+ c.youtube_video? ==> true
33
+ c.vimeo_video? ==> false
34
+ Currently video feature works with Youtube and Vimeo URL's
35
+
36
+ If you wish to use text helpers then in your application_helper add this include line:
37
+
38
+ include Conred::Helpers
39
+
40
+ Now you have method sanitize_and_trim available to you:
41
+
42
+ sanitize_and_trim("<html>string with", 10) => "string ..."
43
+
44
+
22
45
 
23
46
  ## Contributing
24
47
 
@@ -22,6 +22,10 @@ module Conred
22
22
  text.html_safe
23
23
  end
24
24
 
25
+ def external_url(link)
26
+ /^http/.match(url) ? url : "http://#{url}"
27
+ end
28
+
25
29
  end
26
30
 
27
31
  end
@@ -1,3 +1,3 @@
1
1
  module Conred
2
- VERSION = "0.0.7"
2
+ VERSION = "0.0.8"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: conred
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.7
4
+ version: 0.0.8
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors: